:root {
  --ink: #12151c;
  --ink-2: #1b1f2a;
  --ink-3: #252a37;
  --paper: #f5f3ee;
  --paper-2: #e9e6de;
  --coral: #ff5a45;
  --coral-ink: #c8331f;
  --muted: #8b91a1;
  --line: rgba(245, 243, 238, 0.09);
  --pw: clamp(150px, 17.5vw, 260px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Onest", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(34px, 4.6vw, 64px); }
.kicker {
  margin: 0 0 18px;
  font: 500 13px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--coral);
}

/* ---------- mark strokes ---------- */
.s-p, .s-d { fill: none; stroke-width: 52; }
.s-p { stroke: var(--paper); }
.s-d { stroke: var(--coral); }
.cap { stroke-linecap: round; }

/* ---------- chrome ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--coral); transform-origin: 0 50%; transform: scaleX(0); }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 44px);
  transition: color .5s var(--ease);
}
.nav::before {
  content: ""; position: absolute; inset: 0 0 -26px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(18, 21, 28, .92), rgba(18, 21, 28, 0));
  transition: opacity .5s var(--ease);
}
.nav::after {
  content: ""; position: absolute; inset: 0 0 -26px; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(var(--nav-tint, var(--paper)) 40%, transparent);
  transition: opacity .5s var(--ease);
}
.nav.on-coral::before, .nav.on-paper::before { opacity: 0; }
.nav.on-coral::after { --nav-tint: var(--coral); opacity: 1; }
.nav.on-paper::after { --nav-tint: var(--paper); opacity: 1; }
.nav.on-coral { color: var(--ink); }
.nav.on-coral .s-p { stroke: var(--ink); }
.nav.on-coral .s-d { stroke: var(--paper); }
.nav.on-paper { color: var(--ink); }
.nav.on-paper .s-p { stroke: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.brand-mark { width: 22px; height: 33px; overflow: visible; opacity: 0; transition: opacity .25s linear; }
.brand-mark .s-p, .brand-mark .s-d { transition: stroke .5s var(--ease); }
.brand.shown .brand-mark { opacity: 1; }
.nav nav { display: flex; gap: clamp(12px, 2.4vw, 30px); font-size: 14px; }
.nav nav a { text-decoration: none; opacity: .72; transition: opacity .2s; }
.nav nav a:hover { opacity: 1; }
.nav nav a.gh { opacity: 1; border: 1px solid currentColor; border-radius: 99px; padding: 5px 14px; margin-top: -6px; }

/* ---------- scenes ---------- */
.scene { position: relative; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

/* hero */
.hero .stage { display: grid; place-items: center; }
.grid-bg {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  will-change: transform;
}
.hero-mark {
  position: absolute; left: 50%; top: 42%;
  width: min(44vh, 62vw); height: min(44vh, 62vw);
  translate: -50% -50%;
  overflow: visible;
  will-change: transform;
}
.hero-copy { position: absolute; left: 0; right: 0; bottom: clamp(56px, 11vh, 120px); text-align: center; padding: 0 20px; }
.eyebrow { display: inline-flex; gap: 8px; margin: 0 0 18px; font: 500 12px/1 var(--mono); color: var(--muted); }
.eyebrow span { border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; }
.hero-title { font-size: clamp(48px, 9vw, 132px); font-weight: 800; }
.hero-title .w { display: inline-block; will-change: transform, opacity; }
.hero-title .accent { color: var(--coral); }
@media (min-width: 821px) { .hero-title .mbr { display: none; } }
.hero-sub { max-width: 560px; margin: 18px auto 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.scroll-hint span { width: 1px; height: 36px; background: linear-gradient(var(--coral), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* captions shared by render and ops */
.caption {
  position: absolute; left: clamp(20px, 6vw, 96px); top: 50%; translate: 0 -50%;
  width: min(470px, 34vw);
  z-index: 3;
}
.facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.facts li {
  position: relative; padding-left: 26px; color: var(--muted);
  transition: color .5s var(--ease);
}
.facts li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 2px; background: var(--line);
  transform-origin: left; transition: background .5s var(--ease), transform .5s var(--ease);
}
.facts li.on { color: var(--paper); }
.facts li.on::before { background: var(--coral); transform: scaleX(1.4); }

/* render */
.code-card {
  position: absolute; left: clamp(20px, 6vw, 96px); bottom: 6vh;
  width: min(420px, 31vw);
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  font: 12.5px/1.65 var(--mono);
  z-index: 3; will-change: transform, opacity;
}
.render .caption { top: clamp(84px, 11vh, 120px); translate: none; }
.render h2, .ops h2 { font-size: clamp(32px, 3.3vw, 50px); }
.cc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.cc-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.cc-bar span { margin-left: 8px; }
.code-card pre { margin: 0; padding: 14px 16px 16px; white-space: pre; overflow: hidden; }
.code-card .ln { display: block; opacity: .08; transition: opacity .25s linear; }
.code-card .ln.on { opacity: 1; }
.code-card b { color: var(--coral); font-weight: 400; }
.code-card i { color: #9fb8ff; font-style: normal; }
.code-card .ln-cmd { margin-top: 10px; color: var(--muted); }
.code-card .ln-cmd2 { color: var(--muted); }

/* pages (fixed layer shared by render and ops so the cut between them is seamless) */
.pages-layer { position: fixed; inset: 0; z-index: 4; pointer-events: none; display: none; }
.page {
  position: absolute; left: 0; top: 0;
  width: var(--pw); height: calc(var(--pw) * 1.414);
  margin: calc(var(--pw) * -0.707) 0 0 calc(var(--pw) * -0.5);
  background: var(--paper); color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 24px 60px -20px rgba(0, 0, 0, .65);
  padding: calc(var(--pw) * .085);
  font-size: calc(var(--pw) * .041);
  line-height: 1.35;
  overflow: hidden;
  will-change: transform, opacity;
}
.pg-title { font-weight: 700; font-size: 1.45em; letter-spacing: -.02em; margin-bottom: .9em; }
.page:not(:first-child) .pg-title { display: none; }
.pg-head, .pg-row { display: grid; grid-template-columns: 1fr 2.6fr 1.3fr; gap: .6em; padding: .45em .5em; }
.pg-head { background: var(--ink); color: var(--paper); font-weight: 600; border-radius: 2px; position: relative; }
.pg-head::after { content: ""; position: absolute; inset: -3px; border: 1.5px solid var(--coral); border-radius: 4px; opacity: var(--hl, 0); }
.pg-row { border-bottom: 1px solid var(--paper-2); opacity: 0; transform: translateY(6px); transition: none; white-space: nowrap; }
.pg-row span:last-child, .pg-head span:last-child { text-align: right; }
.pg-row.on { opacity: 1; transform: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.pg-foot { position: absolute; left: 0; right: 0; bottom: calc(var(--pw) * .06); text-align: center; color: #676d7c; font-size: .92em; }
.pg-foot .pn { display: inline-block; font-weight: 600; color: var(--ink); }
.pg-wm {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -38deg;
  font-weight: 800; font-size: 4.2em; letter-spacing: .18em; color: var(--coral);
  opacity: 0; white-space: nowrap; pointer-events: none;
}
.page .seal {
  position: absolute; right: 9%; bottom: 13%; width: 38%; aspect-ratio: 1; border-radius: 50%;
  border: .32em solid var(--coral); color: var(--coral); display: grid; place-items: center;
  font: 800 .78em/1 var(--sans); letter-spacing: .08em; rotate: -12deg; opacity: 0;
}
.scan {
  position: fixed; left: 0; top: 0; height: 2px; width: calc(var(--pw) * 1.1);
  margin-left: calc(var(--pw) * -.55);
  background: var(--coral); box-shadow: 0 0 18px 2px rgba(255, 90, 69, .6);
  z-index: 5; opacity: 0; pointer-events: none; will-change: transform, opacity;
}

/* ops */
.oplist { list-style: none; margin: 26px 0 0; padding: 0; position: relative; display: grid; gap: 2px; counter-reset: op; }
.oplist li {
  position: relative; padding: 7px 0 7px 34px; color: var(--muted); counter-increment: op;
  transition: color .4s var(--ease);
}
.oplist li::before { content: counter(op, decimal-leading-zero); position: absolute; left: 0; top: 9px; font: 500 12px/1.4 var(--mono); opacity: .6; }
.oplist li span { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.oplist li em { display: none; }
.oplist li.on { color: var(--paper); }
.oplist li.on::before { color: var(--coral); opacity: 1; }
.oplist::after {
  content: ""; position: absolute; left: -16px; top: 0; width: 3px; height: 40px; border-radius: 3px; background: var(--coral);
  transform: translateY(var(--bar, 0px)); transition: transform .5s var(--ease);
}
.opcmd { margin: 22px 0 0; min-height: 1.6em; font: 13px/1.6 var(--mono); color: var(--paper); opacity: .85; }
.opcmd::before { content: "$ "; color: var(--coral); }

.desk { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.badge {
  position: fixed; left: 0; top: 0; z-index: 7;
  padding: 8px 14px; border-radius: 99px; background: var(--paper); color: var(--ink);
  font: 600 14px/1 var(--mono); white-space: nowrap; opacity: 0; translate: -50% -50%;
  box-shadow: 0 14px 40px -12px rgba(0,0,0,.6); will-change: transform, opacity;
}
.badge.b-pdfa { background: var(--coral); color: var(--ink); }
.b-size .to { color: var(--coral-ink); }
.lock { position: fixed; left: 0; top: 0; width: 64px; height: 80px; translate: -50% -50%; z-index: 7; opacity: 0; overflow: visible; }
.lock rect { fill: var(--coral); }
.lock circle { fill: var(--ink); }
.lock .shackle { fill: none; stroke: var(--paper); stroke-width: 7; stroke-linecap: round; }
.stamp {
  position: fixed; left: 0; top: 0; z-index: 8; opacity: 0;
  width: calc(var(--pw) * .62); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; background: var(--coral); display: grid; place-items: center;
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.6), inset 0 0 0 calc(var(--pw) * .02) rgba(18,21,28,.25);
  will-change: transform, opacity;
}
.stamp span { font: 800 calc(var(--pw) * .055)/1 var(--sans); letter-spacing: .1em; color: var(--ink); }
.wipe { position: fixed; inset: 0; z-index: 9; background: var(--coral); clip-path: circle(0 at 50% 50%); pointer-events: none; display: none; }

/* doors */
.doors { background: var(--coral); color: var(--ink); }
.doors .stage { display: flex; flex-direction: column; justify-content: center; padding: 90px clamp(16px, 5vw, 72px) 40px; gap: clamp(22px, 4vh, 44px); }
.doors .kicker { color: var(--ink); opacity: .7; }
.doors-head { max-width: 760px; }
.doors-head .lede { margin: 16px 0 0; font-size: 18px; max-width: 520px; opacity: .8; }
.doors-head > * { will-change: transform, opacity; }
.doors-grid { position: relative; display: grid; grid-template-columns: 1fr minmax(180px, 230px) 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.door { position: relative; z-index: 2; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 16px 18px 18px; min-height: 132px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.door-label { font: 500 11px/1 var(--mono); letter-spacing: .14em; color: var(--coral); margin-bottom: 14px; }
.door pre { margin: 0; font: 14px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; min-height: 3.2em; }
.term .term-line::before { content: "$ "; color: var(--coral); }
.caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -2px; background: var(--paper); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.http-line { color: var(--paper); }
.http-res { margin-top: 10px; font: 13px/1 var(--mono); opacity: 0; transition: opacity .3s; }
.http-res.on { opacity: 1; }
.http-res .ok { color: #7ee2a8; }
.http-res .ct { color: var(--muted); }
.registry { position: relative; z-index: 2; display: grid; gap: 3px; font: 500 14px/1 var(--mono); }
.reg-row { padding: 8px 12px; border-radius: 8px; background: rgba(18, 21, 28, .08); transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease); }
.reg-row.on { background: var(--ink); color: var(--paper); transform: scale(1.06); }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; pointer-events: none; }
.wire { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.wire.w-r { stroke: var(--paper); }

/* numbers */
.numbers { background: var(--paper); color: var(--ink); padding: clamp(90px, 16vh, 170px) clamp(16px, 6vw, 96px); position: relative; z-index: 5; }
.numbers-inner { max-width: 1120px; margin: 0 auto; }
.numbers h2 { max-width: 900px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: clamp(40px, 8vh, 80px) 0 0; }
.stat { border-top: 2px solid var(--ink); padding-top: 18px; }
.stat b { font-size: clamp(44px, 6vw, 84px); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat small { margin-left: 6px; font: 600 15px var(--mono); color: var(--coral-ink); }
.stat span { display: block; margin-top: 10px; color: #5b6170; font-size: 15px; }
.bars { margin: clamp(46px, 8vh, 80px) 0 0; display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 220px 1fr 90px; gap: 18px; align-items: center; font-size: 15px; }
.bar .bt { height: 14px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar .bt i { display: block; height: 100%; width: 100%; background: var(--coral); border-radius: 99px; transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
.bar.ghost .bt i { background: #b9b4a8; }
.bars.in .bt i { transform: scaleX(var(--w)); }
.bar .bv { font: 600 14px var(--mono); text-align: right; }
.chips { list-style: none; padding: 0; margin: clamp(40px, 7vh, 70px) 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { border: 1px solid #cfcabd; border-radius: 99px; padding: 8px 14px; font-size: 14px; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stats .stat:nth-child(2) { transition-delay: .08s; }
.stats .stat:nth-child(3) { transition-delay: .16s; }
.stats .stat:nth-child(4) { transition-delay: .24s; }

/* install */
.install .stage { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: 80px clamp(16px, 6vw, 96px) 40px; }
.end-mark { width: 100%; max-width: 360px; justify-self: center; overflow: visible; will-change: transform; }
.install h2 { font-size: clamp(40px, 6vw, 88px); margin-bottom: 30px; }
.install-copy > * { will-change: transform, opacity; }
.cmds { display: grid; gap: 10px; }
.cmd { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 16px; }
.cmd .lbl { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.cmd code { font: 13.5px/1.5 var(--mono); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy { font: 500 12px var(--mono); color: var(--paper); background: var(--ink-3); border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.copy:hover { background: #303747; }
.copy.done { background: var(--coral); color: var(--ink); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { text-decoration: none; padding: 12px 20px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; transition: transform .2s var(--ease), background .2s; }
.btn:hover { transform: translateY(-2px); background: var(--ink-2); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.btn.primary:hover { background: #ff6f5c; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px clamp(16px, 6vw, 96px) 34px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  :root { --pw: clamp(104px, 27vw, 150px); }
  body { font-size: 16px; }
  .nav nav a:not(.gh) { display: none; }
  .caption { left: 16px; right: 16px; top: 92px; translate: none; width: auto; }
  .render .caption { top: 84px; }
  .caption h2 { font-size: 32px; }
  .facts { display: none; }
  .code-card { left: 16px; right: 16px; width: auto; bottom: auto; top: 200px; font-size: 11px; }
  .code-card pre { padding: 10px 12px; }
  .oplist { grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 14px; margin-top: 16px; }
  .oplist li { padding: 2px 0; }
  .oplist li::before, .oplist::after { display: none; }
  .oplist li span { font-size: 14px; }
  .opcmd { font-size: 11.5px; margin-top: 10px; }
  .doors .stage { padding-top: 76px; justify-content: flex-start; }
  .doors-head .lede { display: none; }
  .doors-grid { grid-template-columns: 1fr; gap: 14px; }
  .registry { grid-template-columns: repeat(3, 1fr); font-size: 12px; order: 2; }
  .door.term { order: 1; }
  .door.http { order: 3; }
  .door { min-height: 0; padding: 12px 14px; }
  .door pre { font-size: 12.5px; }
  .wires { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .bar { grid-template-columns: 1fr 70px; }
  .bar .bl { grid-column: 1 / -1; }
  .install .stage { grid-template-columns: 1fr; align-content: center; gap: 22px; }
  .end-mark { max-width: 130px; }
  .cmd { grid-template-columns: 1fr auto; }
  .cmd .lbl { grid-column: 1 / -1; }
}

/* ---------- reduced motion: no scroll-scrubbed travel, content stays put ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint span, .caret { animation: none; }
  .reveal { transition: opacity .3s linear; transform: none; }
}
