:root {
  --bg: #070b16;
  --bg-2: #0b1020;
  --surface: #11182b;
  --surface-2: #17213a;
  --text: #edf2ff;
  --muted: #9aa7c7;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --good: #34d399;
  --warn: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --radius-sm: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(125, 211, 252, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 5%, rgba(167, 139, 250, 0.16), transparent 30rem),
    linear-gradient(180deg, var(--bg), var(--bg-2) 42%, #080c17 100%);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
pre { overflow-x: auto; margin: 0; }

.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 760px; }
.section-pad { padding: 96px 0; }
.soft-bg { background: rgba(255, 255, 255, 0.03); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--text);
  color: var(--bg);
  padding: .65rem .85rem;
  border-radius: .75rem;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em; }
.brand img { filter: drop-shadow(0 10px 22px rgba(125, 211, 252, .25)); }
.primary-nav { display: flex; align-items: center; gap: 6px; }
.primary-nav a { color: var(--muted); padding: 10px 14px; border-radius: 999px; font-size: 0.95rem; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: rgba(255, 255, 255, .06); color: var(--text); }
.primary-nav .nav-cta { color: var(--bg); background: var(--text); font-weight: 700; }
.primary-nav .nav-cta:hover { color: var(--bg); background: var(--accent); }
.nav-toggle { display: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: transparent; color: var(--text); }

.hero { min-height: calc(100vh - 76px); display: grid; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; font-size: 0.78rem; margin: 0 0 16px; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: var(--good); box-shadow: 0 0 0 6px rgba(52, 211, 153, .12); margin-right: 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3rem, 8vw, 6.25rem); line-height: .95; letter-spacing: -0.07em; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1; letter-spacing: -0.055em; margin-bottom: 18px; }
h3 { font-size: 1.1rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.lead { color: #c6d2ef; font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 680px; }
.muted { color: var(--muted); margin-bottom: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 999px; font-weight: 800; border: 1px solid var(--line); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06101f; border: 0; }
.button.secondary { color: var(--text); background: rgba(255, 255, 255, .05); }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.hero-meta div, .status-overview div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: rgba(255, 255, 255, .04); }
.hero-meta dt, .signal-label { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 4px; }
.hero-meta dd { margin: 0; font-weight: 800; }

.status-card, .route-panel, .incident-panel, .docs-content, .docs-nav, .error-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.status-card { padding: 24px; }
.status-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.status-card h2 { font-size: 2rem; margin: 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.pill.good { color: #042016; background: var(--good); }
.pill.neutral { color: #f4f7ff; background: rgba(255,255,255,.1); }
.terminal { background: #060914; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; overflow: hidden; }
.terminal-bar { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.terminal pre { padding: 18px; color: #c8f7df; font-size: .92rem; }
.signal-grid, .status-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.signal-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.04); }
.signal-grid strong, .status-overview strong { font-size: 1.05rem; }

.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { min-height: 270px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); }
.feature-index { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(125, 211, 252, .12); color: var(--accent); font-weight: 900; margin-bottom: 70px; }
.feature-card p { color: var(--muted); }

.split-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 42px; align-items: start; }
.route-panel { padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
caption { text-align: left; color: var(--muted); margin-bottom: 12px; }
th, td { text-align: left; padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: #dce6ff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
td { color: #cbd6ef; }
td code { color: var(--accent); }

.dark-panel { background: linear-gradient(135deg, #08101f, #0e1430 60%, #111827); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; }
.timeline li { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.055); }
.timeline span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 900; margin-bottom: 22px; }
.timeline p { color: var(--muted); }

.page-hero { padding-top: 128px; }
.status-overview { margin: 0 0 20px; }
.component-list { display: grid; gap: 12px; }
.component-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: rgba(255,255,255,.05); }
.component-row p, .incident-panel p, .docs-content p { color: var(--muted); margin-bottom: 0; }
.incident-panel { padding: 12px; }
.incident-panel article { padding: 20px; border-bottom: 1px solid var(--line); }
.incident-panel article:last-child { border-bottom: 0; }
.incident-panel time { color: var(--accent); font-weight: 800; font-size: .86rem; }

.docs-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-nav { position: sticky; top: 96px; padding: 14px; display: grid; gap: 4px; }
.docs-nav a { color: var(--muted); padding: 10px 12px; border-radius: 12px; }
.docs-nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.docs-content { padding: 30px; }
.docs-content h2 { font-size: 2rem; margin-top: 34px; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content pre { margin: 18px 0 30px; padding: 18px; border-radius: 16px; background: #060914; border: 1px solid rgba(255,255,255,.09); color: #c8f7df; }

.site-footer { padding: 52px 0; border-top: 1px solid var(--line); background: rgba(0,0,0,.2); }
.footer-grid { display: grid; grid-template-columns: 1fr .5fr .7fr; gap: 40px; }
.site-footer h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer a, .site-footer p { display: block; color: var(--muted); margin: 0 0 8px; }
.footer-brand { margin-bottom: 14px; color: var(--text) !important; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { width: min(520px, 100%); padding: 32px; }
.error-card h1 { font-size: 3rem; }
.visually-small { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { position: absolute; top: 76px; left: 20px; right: 20px; display: none; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: rgba(7, 11, 22, .96); box-shadow: var(--shadow); }
  .primary-nav.is-open { display: grid; }
  .primary-nav a { border-radius: 14px; }
  .hero-grid, .split-grid, .docs-grid { grid-template-columns: 1fr; }
  .feature-grid, .timeline { grid-template-columns: repeat(2, 1fr); }
  .docs-nav { position: static; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  .section-pad { padding: 64px 0; }
  h1 { font-size: clamp(2.7rem, 16vw, 4rem); }
  .hero-meta, .signal-grid, .status-overview, .feature-grid, .timeline, .footer-grid { grid-template-columns: 1fr; }
  .component-row { align-items: flex-start; flex-direction: column; }
  .status-card { padding: 18px; }
}
