:root {
  --bg: #0c0e13;
  --surface: #12151d;
  --surface-2: #171b26;
  --border: #232a3a;
  --text: #e9ecf3;
  --muted: #9aa1b4;
  --accent: #ff6a52;
  --accent-soft: rgba(255, 106, 82, 0.12);
  --code-key: #8b93ff;
  --code-str: #7fd1a7;
  --code-attr: #e9ecf3;
  --code-comment: #6b7285;
  --ok: #4cc38a;
  --warn: #e5a24b;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf9f7;
    --surface: #ffffff;
    --surface-2: #f3f2ef;
    --border: #e3e1db;
    --text: #1a1c23;
    --muted: #5d6373;
    --accent: #d8452e;
    --accent-soft: rgba(216, 69, 46, 0.08);
    --code-key: #4c56d8;
    --code-str: #1e7d50;
    --code-attr: #1a1c23;
    --code-comment: #8a8f9e;
    --ok: #1e8a5a;
    --warn: #b07a2a;
    color-scheme: light;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code, pre, .footer-ids code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.mark { width: 26px; height: 26px; color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
}

.nav-links a:not(.btn) { color: var(--muted); transition: color 0.15s; }
.nav-links a:not(.btn):hover { color: var(--text); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost:hover { border-color: var(--muted); }

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(1000px 480px at 78% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-grid > * { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 22px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 30px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }

.badges {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.badges li::before {
  content: "✓";
  color: var(--ok);
  margin-right: 6px;
  font-weight: 700;
}

/* ---------- code cards ---------- */

.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.5);
}

.code-card figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.traffic {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
  box-shadow: 16px 0 0 var(--warn), 32px 0 0 var(--ok);
  margin-right: 26px;
  flex-shrink: 0;
}

.code-card pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
}

.code-card.wide pre { font-size: 0.86rem; }

.code-card .k { color: var(--code-key); font-weight: 600; }
.code-card .s { color: var(--code-str); }
.code-card .a { color: var(--code-attr); }
.code-card .c { color: var(--code-comment); font-style: italic; }

/* ---------- sections ---------- */

.section { padding: 76px 0; }

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 750;
  margin-bottom: 12px;
}

.section-lede {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 40px;
}

.section-lede code { font-size: 0.88em; }

/* ---------- cards ---------- */

.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.section.alt .card { background: var(--bg); }

.card .step {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.card p { font-size: 0.9rem; color: var(--muted); }

.card code {
  font-size: 0.84em;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------- resource grid ---------- */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.resource {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}

.resource code {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.resource span {
  font-size: 0.84rem;
  color: var(--muted);
  text-align: right;
}

.fineprint {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- spec list ---------- */

.spec-list { list-style: none; display: grid; gap: 12px; }

.spec-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.spec-list a code {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.spec-list a:hover code { text-decoration: underline; }

.spec-list span { font-size: 0.88rem; color: var(--muted); }

/* ---------- status ---------- */

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.status-col {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface-2);
}

.status-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.status-col.done h3 { color: var(--ok); }
.status-col.pending h3 { color: var(--warn); }

.status-col ul { list-style: none; display: grid; gap: 10px; }

.status-col li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 22px;
  position: relative;
}

.status-col.done li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

.status-col.pending li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--warn);
  font-weight: 700;
}

.status-col code { font-size: 0.85em; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 52px;
  background: var(--surface);
}

.footer-grid { display: grid; gap: 20px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.footer-brand .mark { width: 22px; height: 22px; }

.footer-links {
  list-style: none;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

.footer-ids {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-ids code { opacity: 0.8; overflow-wrap: anywhere; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards.three, .cards.four { grid-template-columns: 1fr 1fr; }
  .status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-links { gap: 14px; font-size: 0.85rem; }
  .nav-links a:not(.btn):not([href="#status"]) { display: none; }
  .cards.three, .cards.four { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource span { text-align: left; }
  .resource { flex-direction: column; gap: 4px; }
  .section { padding: 56px 0; }
}
