:root {
  --bg: #0d0f14;
  --bg-elevated: #151922;
  --panel: rgba(21, 25, 34, 0.88);
  --text: #f4f1ec;
  --muted: #9aa3b2;
  --accent: #d9903d;
  --accent-bright: #f2b867;
  --accent-soft: rgba(217, 144, 61, 0.14);
  --success: #62cf93;
  --success-soft: rgba(98, 207, 147, 0.14);
  --warn: #e8b84a;
  --warn-soft: rgba(232, 184, 74, 0.14);
  --danger: #ef6b73;
  --danger-soft: rgba(239, 107, 115, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #1a1208;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.35) 0%, rgba(8, 10, 14, 0.15) 35%, rgba(8, 10, 14, 0.55) 70%, var(--bg) 100%),
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(13, 15, 20, 0.9), transparent 70%),
    linear-gradient(90deg, rgba(8, 10, 14, 0.45) 0%, transparent 40%);
}

.hero-content {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: 2.5rem;
  max-width: 1100px;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 24px rgba(217, 144, 61, 0.35));
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.brand-text h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.tagline {
  margin: 0.65rem 0 0;
  max-width: 38rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(244, 241, 236, 0.88);
  font-weight: 450;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.15rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 184, 103, 0.35);
  background: rgba(217, 144, 61, 0.12);
  color: var(--accent-bright);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* —— Sites —— */
.sites-section {
  padding: 1.75rem clamp(1.25rem, 4vw, 3.5rem) 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.sites-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.35rem;
}

.sites-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sites-sub {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.health-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cards-wrap {
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.15rem 0 0.5rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-media {
  display: none;
}

.card--visual {
  min-height: 260px;
}

.card--visual .card-media {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(
      180deg,
      rgba(8, 10, 14, 0.28) 0%,
      rgba(8, 10, 14, 0.55) 42%,
      rgba(8, 10, 14, 0.92) 78%,
      rgba(8, 10, 14, 0.97) 100%
    ),
    var(--card-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.card--visual:hover .card-media {
  transform: scale(1.06);
}

.card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  padding: clamp(0.95rem, 2.5vw, 1.2rem);
  min-height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 144, 61, 0.45);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(217, 144, 61, 0.12);
}

.card:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.card-host {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: rgba(244, 241, 236, 0.78);
  word-break: break-all;
}

.card-blurb {
  margin: 0;
  flex: 1;
  font-size: 0.88rem;
  color: rgba(244, 241, 236, 0.82);
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent);
}

.badge.online {
  color: var(--success);
  background: rgba(8, 12, 10, 0.72);
  border: 1px solid rgba(98, 207, 147, 0.35);
}
.badge.degraded {
  color: var(--warn);
  background: rgba(18, 14, 6, 0.72);
  border: 1px solid rgba(232, 184, 74, 0.35);
}
.badge.offline,
.badge.unknown {
  color: var(--danger);
  background: rgba(18, 8, 10, 0.72);
  border: 1px solid rgba(239, 107, 115, 0.35);
}

.beta-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.visit {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--accent-bright);
}

.card:hover .visit { text-decoration: underline; text-underline-offset: 3px; }

.card.skeleton {
  pointer-events: none;
  min-height: 240px;
  background: linear-gradient(110deg, var(--bg-elevated) 30%, #1d2330 50%, var(--bg-elevated) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-color: transparent;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.sites-error {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--danger-soft);
  color: #ffb4b8;
  font-size: 0.9rem;
}

/* —— Footer —— */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2rem;
  background: rgba(0, 0, 0, 0.2);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer .muted {
  font-weight: 450;
  color: var(--muted);
}

.footer .dot { color: var(--muted); }
