:root {
  --bg: #0b0c0e;
  --bg-raised: #111317;
  --bg-sunken: #08090a;
  --line: #1f2227;
  --line-strong: #2c3037;
  --text: #e2dfd8;
  --text-soft: #a9a7a1;
  --text-dim: #74767c;
  --gold: #c7a66b;
  --gold-bright: #dcbd82;
  --gold-dim: #8a7349;
  --gold-wash: rgba(199, 166, 107, 0.08);
  --ok: #7fb58a;
  --bad: #d4806b;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 11vw, 136px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--gold-dim); flex: none; }

.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text-soft); line-height: 1.6; }
.soft { color: var(--text-soft); }
.dim { color: var(--text-dim); }
.gold { color: var(--gold); }
.strong-line {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text);
  text-wrap: balance;
}
.strong-line em { font-style: normal; color: var(--gold); }
.mt-s { margin-top: 20px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: clamp(40px, 6vw, 56px); }

section { padding: var(--section) 0; border-top: 1px solid var(--line); position: relative; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 + p { margin-top: 24px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.two-col.top { align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 14, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 0.9rem; color: var(--text-soft); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-links .nav-cta { color: var(--gold); font-weight: 500; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: var(--radius); padding: 8px 12px; font: 500 0.85rem var(--font-body); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: 0; }
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius);
  font: 500 0.95rem var(--font-body); text-decoration: none;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.text-link { color: var(--gold); text-decoration: none; font-weight: 500; }
.text-link:hover { color: var(--gold-bright); }

/* ---------- hero ---------- */
.hero { border-top: 0; padding: clamp(56px, 9vw, 112px) 0 clamp(72px, 10vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 38%, rgba(199,166,107,0.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px;
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  opacity: .55;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 80px); align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); line-height: 1.03; letter-spacing: -0.035em; }
.hero h1 .gold { display: block; }
.product-tag { margin: clamp(28px, 4vw, 40px) 0 0; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.product-tag .name { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.product-tag .line { font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.hero-copy { margin: 20px 0 32px; color: var(--text-soft); max-width: 34em; }
.hero-copy .first { color: var(--text); font-size: 1.15rem; margin-bottom: 0.6em; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

/* session panel */
.session {
  margin: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(199,166,107,.04);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  overflow: hidden;
}
.session-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.04em; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.session ol { list-style: none; margin: 0; padding: 14px 0; }
.session li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 7px 18px; }
.session .stage { color: var(--gold); }
.session .out { color: var(--text-soft); word-break: break-word; }
.session .out b { font-weight: 500; color: var(--text); }
.session .ok { color: var(--ok); }
.session .bad { color: var(--bad); }
.session li.hl { background: rgba(212,128,107,.06); }
.session li.hl .stage { color: var(--bad); }
.session-foot { border-top: 1px solid var(--line); padding: 10px 18px; color: var(--text-dim); font-size: 0.7rem; }
@media (prefers-reduced-motion: no-preference) {
  .session.animate li { opacity: 0; transform: translateY(4px); animation: lineIn .45s ease forwards; }
  .session.animate li:nth-child(1) { animation-delay: .25s; }
  .session.animate li:nth-child(2) { animation-delay: .7s; }
  .session.animate li:nth-child(3) { animation-delay: 1.15s; }
  .session.animate li:nth-child(4) { animation-delay: 1.6s; }
  .session.animate li:nth-child(5) { animation-delay: 2.05s; }
  .session.animate li:nth-child(6) { animation-delay: 2.5s; }
  @keyframes lineIn { to { opacity: 1; transform: none; } }
}
@media (max-width: 920px) {
  .session { font-size: 0.76rem; }
  .session li { grid-template-columns: 84px 1fr; gap: 10px; padding: 7px 14px; }
}

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { font-family: var(--font-mono); font-size: 0.8rem; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-soft); background: var(--bg-raised); }
.chips.gold-chips li { border-color: var(--gold-dim); color: var(--text); }

/* ---------- problem question ---------- */
.question {
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-wash), transparent 75%);
  border-radius: var(--radius);
}
.question .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.question .q { font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.question .q span { color: var(--gold); }

/* ---------- stats ---------- */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats li { background: var(--bg-raised); padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 28px); }
.stats .num { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -0.04em; line-height: 1; color: var(--gold); margin-bottom: 14px; }
.stats .what { color: var(--text-soft); font-size: 0.95rem; line-height: 1.5; }
.footnote { margin-top: 16px; font-size: 0.82rem; color: var(--text-dim); font-style: italic; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

/* ---------- loop (6 steps) ---------- */
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative; }
.loop::before { content: ""; position: absolute; top: 19px; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, var(--gold-dim), var(--line-strong)); }
.loop li { position: relative; padding-right: 16px; }
.loop .dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--gold-dim);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold);
  position: relative; margin-bottom: 20px;
}
.loop li.key .dot { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.loop h3 { margin-bottom: 4px; }
.loop p { font-size: 0.92rem; color: var(--text-soft); line-height: 1.5; }
@media (max-width: 900px) {
  .loop { grid-template-columns: 1fr; }
  .loop::before { top: 20px; bottom: 20px; left: 19px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--gold-dim), var(--line-strong)); }
  .loop li { display: grid; grid-template-columns: 40px 1fr; column-gap: 20px; align-items: center; padding: 0 0 22px; }
  .loop li:last-child { padding-bottom: 0; }
  .loop .dot { margin: 0; }
}

.trust { margin-top: clamp(48px, 7vw, 72px); padding-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--line); }
.trust .soft { margin-bottom: 6px; }
.trust .strong-line { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

/* ---------- hardware ---------- */
.board { margin: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-sunken); padding: clamp(20px, 3vw, 32px); }
.board svg { width: 100%; height: auto; display: block; }
.board figcaption { margin-top: 14px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); letter-spacing: .04em; }
.chips.buses { margin: 24px 0; }
.chips li { white-space: nowrap; }

/* ---------- evidence record ---------- */
.record { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-sunken); font-family: var(--font-mono); font-size: 0.84rem; overflow: hidden; }
.record-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: var(--text-dim); font-size: 0.72rem; letter-spacing: .04em; }
.record-head .v { color: var(--ok); white-space: nowrap; }
.record ul { list-style: none; margin: 0; padding: 10px 0; }
.record li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 20px; }
.record .k { color: var(--gold); }
.record .val { color: var(--text-soft); }
.record li.diff { background: rgba(212,128,107,.06); }
.record li.diff .k { color: var(--bad); }
@media (max-width: 520px) { .record li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- qualify chain ---------- */
.chain5 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chain5 li { background: var(--bg-raised); padding: 26px 22px; position: relative; }
.chain5 b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
.chain5 span { color: var(--text-soft); font-size: 0.92rem; line-height: 1.5; display: block; }
.chain5 li.new { background: linear-gradient(160deg, var(--gold-wash), var(--bg-raised) 75%); }
.chain5 li.new b { color: var(--gold); }
.chain5 li.new::after { content: "new"; position: absolute; top: 12px; right: 14px; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 900px) { .chain5 { grid-template-columns: 1fr; } .chain5 li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; padding: 18px 20px; } .chain5 b { margin: 0; } .chain5 li.new::after { display: none; } }

/* ---------- who ---------- */
.icp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.icp li { background: var(--bg-raised); padding: 24px 22px; }
.icp b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.icp span { color: var(--text-soft); font-size: 0.92rem; line-height: 1.5; display: block; }
@media (max-width: 980px) { .icp { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .icp { grid-template-columns: 1fr; } }

/* ---------- opportunity ---------- */
.opportunity { text-align: center; }
.opportunity h2 { max-width: 20ch; margin: 0 auto; }
.opportunity .lede { max-width: 34em; margin: 24px auto 32px; }
.opportunity .chips { justify-content: center; max-width: 760px; margin: 0 auto; }
.opportunity .strong-line { margin-top: 36px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

/* ---------- today / cta ---------- */
.status { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.status li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.status li:last-child { border-bottom: 0; }
.status .area { font-family: var(--font-display); font-weight: 500; }
.pill { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill.done { color: var(--ok); border-color: rgba(127,181,138,.35); }
.pill.wip { color: var(--gold); border-color: rgba(199,166,107,.4); }
@media (max-width: 520px) { .status li { flex-direction: column; align-items: flex-start; gap: 8px; } }

.final { padding-bottom: clamp(96px, 13vw, 160px); overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 50% at 75% 100%, rgba(199,166,107,.10), transparent 70%); pointer-events: none; }
.final .wrap { position: relative; }
.final .big { font-size: clamp(2.2rem, 5vw, 3.5rem); }

/* ---------- tech page ---------- */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.parts li { background: var(--bg-raised); padding: 24px 22px; grid-column: span 2; }
.parts li:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 860px) { .parts { grid-template-columns: 1fr; } .parts li, .parts li:nth-child(n+4) { grid-column: auto; } }
.h2-sm { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.parts .n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--gold-dim); letter-spacing: .1em; display: block; margin-bottom: 14px; }
.parts h3 { margin-bottom: 8px; }
.parts p { font-size: 0.92rem; color: var(--text-soft); line-height: 1.55; }
.page-hero { border-top: 0; padding-bottom: clamp(48px, 7vw, 80px); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.035em; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0; font-size: 0.88rem; color: var(--text-dim); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
footer .brand { color: var(--text); margin-bottom: 6px; }
footer .tagline { font-style: italic; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { text-decoration: none; color: var(--text-soft); }
footer a:hover { color: var(--gold); }
footer .legal { flex-basis: 100%; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8rem; }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
