/* Landing page only. */
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.dim { color: var(--faint); }
.small { font-size: 14px; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; margin-top: -70px; padding-top: 70px; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; width: 100%; padding-top: 6vh; }
.hero-title { max-width: 12ch; margin-bottom: 32px; }
.hero .lead { margin-bottom: 36px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; justify-content: space-between; color: var(--muted); }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--muted), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
#live-line b { color: var(--text); font-weight: 500; }

/* Thesis */
.thesis-text { font-size: clamp(28px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; max-width: 22ch; margin: 0; }
.thesis-text .w { color: var(--line-strong); transition: color .35s; }
.thesis-text .w.on { color: var(--text); }
.thesis-text .w.hl.on { color: var(--accent); }
.no-anim .thesis-text .w { color: var(--text); }

/* Route: the pinned how-it-works scene */
.route { height: 460vh; position: relative; border-top: 1px solid var(--line); }
.route-sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.route-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: center; width: 100%; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); opacity: .32; transition: opacity .5s var(--ease); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li.on { opacity: 1; }
.steps li .mono { padding-top: 4px; color: var(--muted); }
.steps li.on .mono { color: var(--accent); }
.steps h3 { font-size: 22px; letter-spacing: -0.025em; }
.steps p { color: var(--muted); margin: 0; max-width: 38ch; }
.route-progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px; height: 1px; background: var(--line); }
.route-progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.stage { position: relative; aspect-ratio: 600 / 600; width: 100%; max-height: 80svh; margin-left: auto; }
.chat {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(92%, 520px);
  display: flex; gap: 14px; align-items: center; padding: 14px 18px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--surface); font-size: clamp(14px, 1.4vw, 17px); z-index: 2;
}
.chat .who { color: var(--accent); flex: none; }
.typed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.18em; background: var(--text); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.net { position: absolute; left: 0; right: 0; top: 12%; width: 100%; height: auto; overflow: visible; }
.net .link { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.net .link.hit { stroke: var(--accent); stroke-width: 1.4; }
.net .link.miss { opacity: .35; }
.net .query-link { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 5; }
.net .pnode circle { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; transition: fill .3s, stroke .3s; }
.net .pnode.hit circle { fill: var(--accent); stroke: var(--accent); }
.net .pnode.miss { opacity: .35; }
.net .pnode text { font: 500 11px var(--mono); letter-spacing: .04em; text-transform: uppercase; fill: var(--muted); }
.net .pnode.hit text { fill: var(--text); }
.net .pulse { fill: var(--accent); }
.core-ring { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .5; }
.core-fill { fill: var(--text); }
.core-mark { fill: var(--accent); }
.results {
  list-style: none; padding: 0; margin: 0; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(92%, 520px); z-index: 2;
}
.results li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-weight: 500;
  opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.results li.on { opacity: 1; transform: none; }
.results li .mono { color: var(--muted); font-size: 11px; align-self: center; }

/* Ask lanes */
.ask { overflow: hidden; }
.lanes { display: grid; gap: 18px; }
.lane { display: flex; gap: 18px; white-space: nowrap; will-change: transform; }
.lane span {
  font-size: clamp(22px, 3.4vw, 44px); letter-spacing: -0.03em; font-weight: 500; padding: 18px 30px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.lane[data-dir="1"] span { color: var(--muted); }

/* Install */
.install h2 { margin-bottom: 64px; }
.install-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--text); }
.install-col { padding: 28px 28px 8px 0; }
.install-col + .install-col { padding-left: 28px; border-left: 1px solid var(--line); }
.mini-steps { padding: 0; margin: 14px 0 0; list-style: none; counter-reset: s; }
.mini-steps li { counter-increment: s; position: relative; padding: 8px 0 8px 30px; color: var(--muted); }
.mini-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 8px; font: 500 12px/1.9 var(--mono); color: var(--faint); }
.mini-steps b { color: var(--text); font-weight: 600; }
.url-col .url-pill { margin: 14px 0 14px; }
.url-col .url-pill code { font-size: 13px; }

/* Developers */
.devs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.devs h2 { margin-bottom: 28px; }
.devs .lead { margin-bottom: 32px; max-width: 44ch; }
.devs .lead code { font-size: .8em; }
.paths { border-top: 1px solid var(--line); margin-bottom: 32px; }
.path { display: grid; grid-template-columns: 32px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); }
.path p { margin: 0; }
.path .mono { padding-top: 4px; }
.code-panel { position: sticky; top: 100px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.code-head .mono { font-size: 11px; text-transform: none; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-ok { font: 500 11px var(--mono); color: var(--muted); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.dot-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transition: background .3s; }
.dot-ok.pass { color: var(--ok); }
.dot-ok.pass::before { background: var(--ok); }
pre.code { background: none; margin: 0; padding: 18px; font-size: 12.5px; line-height: 1.75; white-space: pre; overflow-x: auto; }
pre.code k { color: var(--text); } pre.code s { color: var(--accent); text-decoration: none; } pre.code n { color: var(--ok); }
pre.code .l { color: var(--muted); }
.js pre.code .l { opacity: .12; transition: opacity .4s; }
.js pre.code .l.on { opacity: 1; }
.checklist { list-style: none; margin: 0; padding: 4px 18px 16px; border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; color: var(--faint); transition: color .3s; }
.checklist li::before { content: ""; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 4px; flex: none; transition: background .3s, border-color .3s; }
.checklist li.on { color: var(--text); }
.checklist li.on::before { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }

/* Analytics teaser */
.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.insight h2 { margin-bottom: 28px; }
.insight .lead { margin-bottom: 32px; }
.funnel { border-top: 1px solid var(--text); }
.funnel-note { color: var(--faint); margin: 14px 0 6px; }
.f-row { position: relative; display: flex; justify-content: space-between; align-items: baseline; padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.f-row span { font-size: 18px; letter-spacing: -0.015em; }
.f-row b { font-size: clamp(28px, 4vw, 48px); font-weight: 400; letter-spacing: -0.04em; text-transform: none; }
.f-row i { position: absolute; left: 0; bottom: -1px; height: 3px; width: calc(var(--w) * 100%); min-width: 6px; background: var(--accent); border-radius: 0 4px 4px 0; transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.funnel.in .f-row i { transform: scaleX(1); }
.funnel.in .f-row:nth-child(3) i { transition-delay: .15s; }
.funnel.in .f-row:nth-child(4) i { transition-delay: .3s; }

/* Principles */
.p-rows { border-top: 1px solid var(--text); }
.p-row { display: grid; grid-template-columns: 80px minmax(0, 5fr) minmax(0, 6fr); gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.p-row h3 { font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -0.03em; margin: 0; }
.p-row p { margin: 0; max-width: 52ch; }
.p-row .mono { color: var(--accent); text-transform: none; font-size: 14px; }

.site-foot { padding-top: clamp(80px, 14vh, 160px); overflow: hidden; }

@media (max-width: 900px) {
  .route { height: 520vh; }
  .route-sticky { align-items: flex-start; padding-top: 76px; }
  .route-grid { grid-template-columns: 1fr; gap: 12px; }
  .steps li { display: none; padding: 0 0 8px; border: 0 !important; opacity: 1; }
  .steps li.on { display: grid; }
  .steps h3 { font-size: 20px; }
  .route-copy .tag { margin-bottom: 14px; }
  .stage { max-height: none; max-width: 520px; margin: 0 auto; }
  .install-grid { grid-template-columns: 1fr; }
  .install-col, .install-col + .install-col { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .devs-grid, .insight-grid { grid-template-columns: 1fr; }
  .code-panel { position: relative; top: 0; }
  .p-row { grid-template-columns: 40px 1fr; }
  .p-row p { grid-column: 2; }
}
@media (max-width: 520px) {
  .hero-title { font-size: clamp(42px, 11.6vw, 64px); }
  .hero-foot .scroll-cue { display: none; }
  .url-pill code { font-size: 12.5px; padding: 12px 12px; }
  .chat { padding: 10px 14px; }
  .net .pnode text { font-size: 15px; }
  .results li { padding: 9px 12px; font-size: 14px; }
}
