/* ============================================================
   How LLMs Work — stylesheet
   Palette & rhythm inspired by Vercel's Geist design language.
   ============================================================ */

:root {
  --bg:            #000000;
  --bg-raised:     #0a0a0a;
  --bg-card:       #0c0c0c;
  --border:        #1f1f1f;
  --border-strong: #2e2e2e;
  --fg:            #ededed;
  --fg-muted:      #a1a1a1;
  --fg-dim:        #6f6f6f;
  --accent:        #ffffff;
  --blue:          #52a8ff;
  --violet:        #a78bfa;
  --teal:          #4ade9f;
  --amber:         #f5a623;
  --pink:          #ff6b9d;

  --radius:    10px;
  --radius-lg: 14px;
  --maxw:      1080px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo,
          Consolas, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgba(82, 168, 255, 0.3); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.dim  { color: var(--fg-dim); }
em    { color: var(--fg); font-style: italic; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: #d6d6d6;
}

/* ── Background decoration ─────────────────────────────── */

.grid-bg {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 40%, transparent 100%);
}

.glow {
  position: fixed; top: -280px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 620px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 50% 50%,
    rgba(82,168,255,0.14) 0%, rgba(167,139,250,0.08) 35%, transparent 68%);
  filter: blur(30px);
}

/* ── Nav ───────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 28px;
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg); text-decoration: none;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.brand-mark { font-size: 13px; line-height: 1; }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--fg-muted); text-decoration: none; font-size: 14px;
  transition: color 0.15s var(--ease);
}
.nav-links a:hover { color: var(--fg); }

/* ── Buttons ───────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: transparent; color: var(--fg);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              transform 0.15s var(--ease);
}
.btn:hover { background: #141414; border-color: #444; transform: translateY(-1px); }

.btn-primary { background: var(--fg); color: #000; border-color: var(--fg); font-weight: 600; }
.btn-primary:hover { background: #fff; border-color: #fff; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ── Hero ──────────────────────────────────────────────── */

.hero { padding: 120px 0 72px; text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 10px; margin-bottom: 28px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-raised);
  font-size: 13px; color: var(--fg-muted);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(74,222,159,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,159,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(74,222,159,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,159,0); }
}

.hero-title {
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 25%, #8a8a8a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 620px; margin: 24px auto 0;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--fg-muted); line-height: 1.65;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* Terminal */
.hero-terminal {
  margin: 72px auto 0; max-width: 660px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
  box-shadow: 0 24px 70px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--border); background: #0d0d0d;
}
.tdot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a2a; }
.term-title {
  margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--fg-dim);
}
.term-body { padding: 20px 18px 18px; font-family: var(--mono); font-size: 14px; }
.term-line { color: var(--fg); min-height: 22px; }
.prompt { color: var(--teal); margin-right: 8px; }
.caret {
  display: inline-block; width: 8px; height: 16px; margin-left: 2px;
  background: var(--fg); vertical-align: -3px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-preds { margin-top: 16px; display: flex; flex-direction: column; gap: 7px; min-height: 96px; }
.pred {
  display: grid; grid-template-columns: 108px 1fr 48px; align-items: center; gap: 12px;
  font-size: 12.5px; opacity: 0; transform: translateY(4px);
  animation: fadeUp 0.35s var(--ease) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.pred-tok { color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-bar { height: 6px; border-radius: 3px; background: #171717; overflow: hidden; }
.pred-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  width: 0; transition: width 0.5s var(--ease);
}
.pred-pct { color: var(--fg-dim); text-align: right; }
.pred:first-child .pred-tok { color: var(--fg); }

/* ── Sections ──────────────────────────────────────────── */

.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section.tight { padding: 48px 0; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-dim); margin-bottom: 16px;
}

.h2 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15; letter-spacing: -0.035em; font-weight: 650;
  max-width: 760px;
}

.lede {
  margin-top: 18px; max-width: 680px;
  font-size: 16.5px; color: var(--fg-muted); line-height: 1.7;
}

/* ── Stats ─────────────────────────────────────────────── */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-raised); overflow: hidden;
}
.stat { padding: 26px 22px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 30px; font-weight: 650; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #9a9a9a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { margin-top: 4px; font-size: 13px; color: var(--fg-dim); line-height: 1.45; }

/* ── Pipeline ──────────────────────────────────────────── */

.pipeline {
  display: flex; align-items: stretch; gap: 6px; margin-top: 44px;
  overflow-x: auto; padding-bottom: 6px;
}
.pipeline::-webkit-scrollbar { height: 4px; }
.pipeline::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.pipe-step {
  flex: 1 1 0; min-width: 124px;
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 14px 14px 15px; cursor: pointer; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); color: var(--fg-muted);
  font-family: inherit;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
              transform 0.18s var(--ease);
}
.pipe-step:hover { border-color: var(--border-strong); background: #111; transform: translateY(-2px); }
.pipe-step.is-active {
  border-color: rgba(82,168,255,0.5);
  background: linear-gradient(180deg, rgba(82,168,255,0.09), rgba(82,168,255,0.02));
  color: var(--fg);
}
.pipe-idx {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
}
.pipe-step.is-active .pipe-idx { color: var(--blue); }
.pipe-name { font-size: 14.5px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.pipe-desc { font-size: 12px; color: var(--fg-dim); }

.pipe-arrow {
  display: flex; align-items: center; color: #2b2b2b; font-size: 13px; flex: 0 0 auto;
}

.panel {
  margin-top: 16px; padding: 26px 26px 28px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-raised);
}
.panel-mono {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--blue); text-transform: uppercase;
}
.panel-title { margin-top: 10px; font-size: 21px; letter-spacing: -0.02em; font-weight: 620; }
.panel-body { margin-top: 10px; color: var(--fg-muted); max-width: 720px; line-height: 1.7; }
.panel.is-swapping .panel-title, .panel.is-swapping .panel-body { opacity: 0; }
.panel-title, .panel-body { transition: opacity 0.18s var(--ease); }

/* ── Demo shells ───────────────────────────────────────── */

.demo {
  margin-top: 40px; padding: 22px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-raised);
}
.demo-flush { margin-top: 0; }

.demo-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.demo-label { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.demo-hint {
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.demo-input {
  width: 100%; resize: vertical;
  padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #060606; color: var(--fg);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.demo-input:focus {
  outline: none; border-color: #4a4a4a;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.note { margin-top: 14px; font-size: 12.5px; color: var(--fg-dim); line-height: 1.6; }

/* ── Tokenizer ─────────────────────────────────────────── */

.token-out {
  margin-top: 16px; padding: 16px;
  min-height: 76px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #060606;
  display: flex; flex-wrap: wrap; gap: 4px 3px;
  font-family: var(--mono); font-size: 13.5px;
}
.tok {
  padding: 3px 5px; border-radius: 4px; white-space: pre;
  border: 1px solid transparent;
  animation: tokIn 0.22s var(--ease) backwards;
  cursor: default;
  transition: transform 0.12s var(--ease);
}
.tok:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.22); }
@keyframes tokIn { from { opacity: 0; transform: scale(0.9); } }

.demo-foot { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.metric { display: flex; align-items: baseline; gap: 7px; }
.metric-val {
  font-family: var(--mono); font-size: 19px; font-weight: 600; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.metric-key { font-size: 12.5px; color: var(--fg-dim); }

/* ── Cards ─────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; overflow: hidden;
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255,255,255,0.055), transparent 65%);
  transition: opacity 0.2s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }

.card h4 { font-size: 16px; font-weight: 620; letter-spacing: -0.015em; }
.card p { margin-top: 8px; font-size: 14px; color: var(--fg-muted); line-height: 1.65; }
.card-lg { padding: 26px; }
.card-lg h4 { font-size: 19px; margin-top: 10px; }
.card-lg p { font-size: 14.5px; }

.card-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--violet);
}

/* ── Split / stack ─────────────────────────────────────── */

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-top: 40px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ── Embeddings ────────────────────────────────────────── */

.chiprow { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: #0e0e0e; color: var(--fg-muted);
  font-family: var(--mono); font-size: 12.5px;
  transition: all 0.15s var(--ease);
}
.chip:hover { color: var(--fg); border-color: #4a4a4a; }
.chip.is-active {
  background: var(--fg); color: #000; border-color: var(--fg); font-weight: 600;
}

.vector {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 5px; height: 132px; margin-top: 18px; align-items: end;
}
.vbar {
  border-radius: 3px 3px 0 0; position: relative;
  transition: height 0.45s var(--ease), background 0.45s var(--ease);
  min-height: 3px;
}
.vector-caption {
  margin-top: 12px; font-size: 12.5px; color: var(--fg-muted);
  font-family: var(--mono); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
}

/* ── Attention ─────────────────────────────────────────── */

.attn-sentence {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 22px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #060606;
}
.atok {
  padding: 7px 11px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: #101010; color: var(--fg-muted);
  font-size: 14.5px; font-family: var(--mono);
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.atok.is-source {
  border-color: var(--fg); background: var(--fg); color: #000; font-weight: 600;
  transform: translateY(-2px);
}
.attn-readout {
  margin-top: 14px; min-height: 46px; font-size: 14px; color: var(--fg-muted);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.attn-readout strong { color: var(--fg); }
.rpill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #0e0e0e;
  font-family: var(--mono); font-size: 12px;
  animation: fadeUp 0.25s var(--ease) backwards;
}
.rpill b { color: var(--fg); font-weight: 600; }
.rpill span { color: var(--blue); }

/* ── Layers ────────────────────────────────────────────── */

.layers { display: flex; flex-direction: column; gap: 7px; margin-top: 40px; }
.layer {
  display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 14px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.layer:hover { border-color: var(--border-strong); background: #111; }
.layer-id { font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim); }
.layer-bars { display: flex; gap: 5px; align-items: center; }
.lbar { height: 9px; border-radius: 3px; flex: none; transition: opacity 0.3s var(--ease); }
.lbar-a { background: linear-gradient(90deg, var(--blue), rgba(82,168,255,0.35)); }
.lbar-b { background: linear-gradient(90deg, var(--violet), rgba(167,139,250,0.3)); }
.lbar-c { background: #2a2a2a; }
.layer-note { margin-left: auto; font-size: 12px; color: var(--fg-dim); white-space: nowrap; }
.layer-ellipsis {
  text-align: center; color: var(--fg-dim); font-family: var(--mono); font-size: 13px;
  padding: 4px 0; letter-spacing: 0.3em;
}

.layers-legend {
  display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px;
  font-size: 12.5px; color: var(--fg-dim);
}
.layers-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 8px; border-radius: 2px; display: inline-block; }
.sw-a { background: var(--blue); }
.sw-b { background: var(--violet); }
.sw-c { background: #3a3a3a; }

/* ── Sampling ──────────────────────────────────────────── */

.slider-row { display: flex; align-items: center; gap: 16px; margin: 4px 0 22px; }
.slider-row label { font-size: 13.5px; color: var(--fg-muted); white-space: nowrap; }
.slider-row output {
  font-size: 14px; color: var(--fg); min-width: 44px; text-align: right;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 2px; background: #222; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--fg); border: 3px solid #000;
  box-shadow: 0 0 0 1px var(--border-strong);
  transition: transform 0.15s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%; border: 3px solid #000;
  background: var(--fg); box-shadow: 0 0 0 1px var(--border-strong);
}

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar {
  display: grid; grid-template-columns: 132px 1fr 58px; align-items: center; gap: 14px;
}
.bar-tok { font-family: var(--mono); font-size: 13px; color: var(--fg-muted); }
.bar-track { height: 9px; background: #141414; border-radius: 4px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: width 0.28s var(--ease);
}
.bar-pct {
  font-family: var(--mono); font-size: 12.5px; color: var(--fg-dim);
  text-align: right; font-variant-numeric: tabular-nums;
}
.bar.is-top .bar-tok { color: var(--fg); }

.temp-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.tn {
  padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #0a0a0a; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tn strong { font-size: 13px; color: var(--fg-muted); font-weight: 600; }
.tn span { font-size: 12.5px; color: var(--fg-dim); line-height: 1.5; }
.tn.is-active { border-color: rgba(82,168,255,0.5); background: rgba(82,168,255,0.06); }
.tn.is-active strong { color: var(--fg); }

/* ── Timeline ──────────────────────────────────────────── */

.timeline { list-style: none; margin-top: 44px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 17px; top: 12px; bottom: 12px;
  width: 1px; background: linear-gradient(180deg, var(--border-strong), var(--border), transparent);
}
.timeline li { display: flex; gap: 22px; padding-bottom: 30px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }

.tl-marker {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: #0b0b0b;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--fg); z-index: 1;
}
.tl-content h4 {
  font-size: 17px; font-weight: 620; letter-spacing: -0.015em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tag {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: #101010; color: var(--fg-dim);
}
.tl-content p { margin-top: 8px; color: var(--fg-muted); font-size: 14.5px; max-width: 680px; line-height: 1.7; }

/* ── CTA ───────────────────────────────────────────────── */

.cta {
  text-align: center; padding: 64px 28px;
  border: 1px solid var(--border); border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(82,168,255,0.09), transparent 70%),
    var(--bg-raised);
}
.cta-title {
  font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.035em; font-weight: 650;
}
.cta-sub { margin: 14px auto 28px; max-width: 540px; color: var(--fg-muted); font-size: 15.5px; }

/* ── Footer ────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 13px;
}

/* ── Reveal on scroll ──────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 900px) {
  .cards, .cards-2 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .hero { padding: 76px 0 48px; }
  .section { padding: 68px 0; }
  .cards, .cards-2, .temp-notes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .pipe-arrow { display: none; }
  .bar { grid-template-columns: 96px 1fr 46px; gap: 10px; }
  .pred { grid-template-columns: 88px 1fr 42px; }
  .layer { grid-template-columns: 50px 1fr; }
  .layer-note { display: none; }
  .term-body { font-size: 12.5px; }
}

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