:root {
  --paper: #ffffff;
  --page: #0a24b4;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --swing: cubic-bezier(0.83, 0, 0.17, 1);
  --soft: cubic-bezier(0.333, 0, 0.667, 1);
  --snap: cubic-bezier(0.16, 1, 0.3, 1);
  --line: rgb(255 255 255 / 0.28);
  --bar-h: 50px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--page); }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0; background: var(--page); color: var(--paper);
  font-family: "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

.bar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h);
  display: flex; justify-content: space-between; align-items: center; padding: 0 20px;
  background: var(--bar-fill, var(--page)); font-size: 14px;
}
.brand { text-decoration: none; font-weight: 600; }
.brand span { font-weight: 400; opacity: 0.6; margin-left: 6px; }
.bar-note { font: 300 12px var(--mono); opacity: 0.75; }

/* The graph lives in one fixed layer behind the whole page. JS opens its clip from the bento slot to the full viewport. */
.stage {
  position: fixed; inset: 0; z-index: 0;
  clip-path: inset(var(--ct, 0px) var(--cr, 0px) var(--cb, 0px) var(--cl, 0px));
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .fluid { pointer-events: none; }
.glabels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gl {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform;
  font: 300 11px/14px var(--mono); padding: 0 4px; background: var(--gbg, var(--page)); color: var(--paper);
  transition: font-size 0.25s var(--snap), line-height 0.25s var(--snap);
}
.gl sup { font-size: 10px; opacity: 0.6; margin-left: 3px; vertical-align: super; line-height: 0; }
.gl b { font-weight: 300; }
.gl-hub.on { font-size: 24px; line-height: 28px; }
.gl-up { max-width: 280px; }
.gl-up.main { white-space: normal; width: max-content; max-width: 230px; background: #2a4cff; color: #fff; padding: 4px 6px; }

/* Hero runway: the first section starts right at the last stop, 1692 per 900 px of viewport. */
.hero { --r: max(1px, 100svh / 900); position: relative; z-index: 2; height: calc(1692 * var(--r)); pointer-events: none; outline: none; }
.hero-sticky { position: sticky; top: 0; height: 100svh; }
.bento {
  position: absolute; left: 10px; right: 10px; top: calc(var(--bar-h) + 10px); bottom: 10px;
  display: grid; gap: 10px;
  grid-template-columns: calc(min((100svh - 70px) * 144 / 740, 25vw) + 1px) clamp(205px, 17vw, 255px) 1fr;
}
.wordmark, .sidebar { pointer-events: auto; will-change: transform; }
.wordmark { position: relative; overflow: hidden; }
.wm {
  position: absolute; right: -0.06em; bottom: 0; writing-mode: vertical-rl; rotate: 180deg;
  font-size: min(100svh * 150 / 740, 26vw); font-weight: 500; letter-spacing: -0.045em; line-height: 0.8; white-space: nowrap;
}
.tag { position: absolute; left: 2px; bottom: 12%; writing-mode: vertical-rl; rotate: 180deg; font: 300 11px var(--mono); white-space: nowrap; opacity: 0.8; }
.sidebar { display: grid; grid-template-rows: auto 1fr 1fr; gap: 10px; min-height: 0; }
.card { border: 1px solid var(--line); position: relative; overflow: hidden; min-height: 0; }

.index ol { list-style: none; margin: 0; padding: 6px 6px 6px 4px; }
.index a {
  position: relative; display: flex; align-items: baseline; gap: 6px; text-decoration: none;
  font: 300 11px/15px var(--mono);
}
.index a span { padding: 0 2px; transition: background 0.18s var(--snap); }
.index a i { font-style: normal; margin-left: auto; opacity: 0.6; translate: calc(var(--curve, 0) * -1px) 0; transition: translate 0.18s var(--snap), opacity 0.18s var(--snap); }
.index a::before { content: ""; position: absolute; left: calc(var(--lw) + 10px); right: calc(var(--nw) + 6px); top: 50%; border-top: 1px solid rgb(255 255 255 / 0.3); scale: 0 1; transform-origin: left; transition: scale 0.18s var(--snap); }
.index a:hover span, .index a:focus-visible span { background: #2a4cff; text-decoration: underline; }
.index a:hover i, .index a:focus-visible i { opacity: 1; translate: var(--shift) 0; }
.index a:hover::before { scale: 1 1; }

.stat { display: flex; flex-direction: column; }
.stat-copy { margin: 0; padding: 8px 8px 0; font: 300 12px/16px var(--mono); }
.product-stage, .stream-stage { position: relative; flex: 1; min-height: 0; }
.product-card { cursor: grab; touch-action: pan-y; }
.product-card:active { cursor: grabbing; }
.card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cap { font: 300 10px var(--mono); text-transform: uppercase; opacity: 0.7; }
.card-ui { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 0 8px 8px; }
.modes { display: flex; gap: 4px; }
.modes button { border: 1px solid var(--line); background: none; padding: 2px 8px; border-radius: 99px; cursor: pointer; font: 300 10px var(--mono); }
.modes button[aria-pressed="true"] { background: #fff; color: var(--page); }
.swatches { display: flex; gap: 5px; }
.swatches button { width: 12px; height: 12px; border-radius: 50%; border: 1px solid transparent; padding: 0; cursor: pointer; background: var(--c); }
.swatches button[aria-pressed="true"] { border-color: #fff; outline: 1px solid #fff; outline-offset: 1px; }
.product-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.product-wires line { stroke: rgb(255 255 255 / 0.6); stroke-width: 1; }
.product-wires circle { fill: #fff; }
.product-labels { position: absolute; inset: 0; pointer-events: none; }
.product-labels span { position: absolute; left: 0; top: 0; white-space: nowrap; font: 300 9px var(--mono); padding: 1px 4px; background: var(--page); border: 1px solid var(--line); }
.product-name { display: none; }

/* Side nav: appears as the first section docks, marks the current section. */
.side { position: fixed; left: 16px; top: calc(50svh - 115px); z-index: 30; width: 110px; pointer-events: none; }
.side ol { list-style: none; margin: 0; padding: 0; }
.side li { opacity: var(--o, 0); translate: calc((1 - var(--o, 0)) * -8px) 0; }
.side a { display: flex; justify-content: space-between; align-items: center; min-height: 24px; text-decoration: none; font: 300 12px/16px var(--mono); opacity: 0.6; pointer-events: auto; transition: opacity 150ms; }
.side a::after { content: ""; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; flex: none; }
.side a[aria-current="true"] { opacity: 1; }
.side a[aria-current="true"]::after, .side a:hover::after { background: currentColor; }
.side a:hover { opacity: 1; text-decoration: underline; }

/* Sections float over the graph. Only their content takes the pointer, so the graph stays live in the gaps. */
main { position: relative; z-index: 3; pointer-events: none; }
.sec { --pad: max(194px, 13.5vw); padding: 0 6vw 22svh var(--pad); outline: none; scroll-margin-top: calc(40svh - 51px); }
.sec + .sec { padding-top: 40svh; }
.sec-title { margin: -30px 0 92px; padding: 30px 0; font-size: clamp(64px, 8.4vw, 120px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; pointer-events: auto; }
.panel {
  position: relative; pointer-events: auto; max-width: 73vw; border: 1px solid rgb(255 255 255 / 0.1); background: rgb(255 255 255 / 0.08);
}
.panel::after { content: ""; position: absolute; right: -2.5px; top: 20px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.panel-head { padding: 24px 24px 16px; }
.panel-head p { max-width: 512px; margin: 8px 0 16px; font-size: 18px; line-height: 22px; font-weight: 500; color: rgb(255 255 255 / 0.7); }
.panel-k { position: relative; margin: 0; font-size: 18px; line-height: 22px; font-weight: 500; }
.panel-k::before { content: ""; position: absolute; left: -12px; top: 9px; width: 3px; height: 3px; background: #fff; border-radius: 50%; }
.visual { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.rail { position: absolute; left: calc(100% + 105px); top: 64px; width: 260px; padding: 4px; font: 300 11px/14px var(--mono); }
.rail::before { content: ""; position: absolute; left: -9px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.rail-k { margin: 0; padding: 0 16px 8px 0; color: rgb(255 255 255 / 0.7); border-bottom: 1px solid rgb(255 255 255 / 0.05); }
.rail ul { list-style: none; margin: 0; padding: 0; counter-reset: note; }
.rail li { position: relative; padding: 8px 0 8px 32px; counter-increment: note; border-top: 1px solid rgb(255 255 255 / 0.05); }
.rail li:first-child { border-top: 0; }
.rail li::before { content: "[" counter(note) "]"; position: absolute; left: 0; color: rgb(255 255 255 / 0.7); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 73vw; margin-top: 94px; }
.note { position: relative; padding-left: 12px; pointer-events: auto; font-size: 14px; line-height: 18px; font-weight: 500; color: rgb(255 255 255 / 0.9); }
.note::before { content: ""; position: absolute; left: 0; top: 7px; width: 3px; height: 3px; background: #fff; border-radius: 50%; }
.note h3 { margin: 0 0 4px; font: inherit; color: #fff; }
.note p { margin: 0; }
.back {
  pointer-events: auto; border: 0; background: rgb(0 18 78); color: #fff; border-radius: 99px;
  padding: 4px 12px; cursor: pointer; font: 300 12px/16px var(--mono);
}
.back:hover { background: #fff; color: var(--page); }

.wire svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wire path { fill: none; stroke: rgb(255 255 255 / 0.25); stroke-width: 1.2; }
.wire .pulse { stroke: #fff; stroke-width: 2; stroke-dasharray: 36 600; stroke-linecap: round; animation: wire-pulse 2.6s var(--swing) infinite; }
.wire .pulse:nth-of-type(5) { animation-delay: 0.6s; }
.wire .pulse:nth-of-type(6) { animation-delay: 1.3s; }
.wire rect { fill: rgb(255 255 255 / 0.1); stroke: rgb(255 255 255 / 0.45); }
@keyframes wire-pulse { from { stroke-dashoffset: 640; } to { stroke-dashoffset: 0; } }
.bars { display: flex; align-items: flex-end; gap: 3%; padding: 8% 7%; }
.bars i { flex: 1; height: 100%; background: rgb(255 255 255 / 0.85); transform-origin: bottom; animation: bar 1.8s var(--swing) infinite alternate; animation-delay: calc(var(--i) * -0.17s); }
@keyframes bar { from { scale: 1 0.15; opacity: 0.4; } to { scale: 1 1; opacity: 1; } }
.orbit i { position: absolute; left: 50%; top: 50%; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 50%; translate: -50% -50%; animation: spin linear infinite; }
.orbit i::after { content: ""; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.orbit i:nth-child(1) { width: 22%; aspect-ratio: 1; animation-duration: 4s; }
.orbit i:nth-child(2) { width: 40%; aspect-ratio: 1; animation-duration: 7s; animation-direction: reverse; }
.orbit i:nth-child(3) { width: 58%; aspect-ratio: 1; animation-duration: 11s; }
@keyframes spin { to { rotate: 360deg; } }

.foot { position: relative; z-index: 3; padding: 12svh 6vw 12svh max(194px, 13.5vw); max-width: 900px; font: 300 12px/1.6 var(--mono); }

@media (max-width: 939px) {
  .bento { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .wordmark { height: 64px; }
  .wm { position: static; writing-mode: horizontal-tb; rotate: none; translate: none; font-size: 56px; line-height: 1; }
  .bar-note { display: none; }
  .tag, .sidebar, .side { display: none; }
  .hero { height: 100svh; }
  .sec, .sec + .sec { padding: 14svh 16px 10svh; }
  .cards { grid-template-columns: 1fr; max-width: none; }
  .panel { max-width: none; }
  .rail, .panel::after { display: none; }
  .foot { padding: 10svh 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Depth mode. The corner dock slides in with the side nav; the 3D view replaces the page under the header and side nav. */
.depth-dock { position: fixed; left: 10px; bottom: 24px; z-index: 50; opacity: var(--o, 0); translate: calc((1 - var(--o, 0)) * -45px) 0; }
.depth-dock:not([data-arrived]) { pointer-events: none; }
.depth-btn { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 4px; border: 0; background: none; cursor: pointer; color: #fff; }
.depth-btn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 16px; }
.depth-btn svg { overflow: visible; display: block; }
.depth-tip { font: 300 12px var(--mono); white-space: pre; }
.depth-gl, .depth-overlay { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; display: none; }
.depth-overlay { z-index: 21; }
html[data-depth] .depth-gl, html[data-depth] .depth-overlay { display: block; }
html[data-depth] .stage { visibility: hidden; }
html[data-depth] .bar { background: transparent; }

/* The notes rail runs off the right edge on purpose. Clip keeps that from widening the page, and unlike hidden it leaves sticky alone. */
.page-host { overflow-x: clip; }

/* Wires over the page: a fixed layer redrawn from the scroll position. */
.wires { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 25; pointer-events: none; fill: none; }
.wires path { stroke: rgb(255 255 255 / 0.22); stroke-width: 1; }
.wires .pulse { stroke: rgb(255 255 255 / 0.85); stroke-dasharray: 6 94; animation: wire-run 2.4s linear infinite; }
@keyframes wire-run { from { stroke-dashoffset: 6; } to { stroke-dashoffset: -94; } }
@media (prefers-reduced-motion: reduce) { .wires .pulse { display: none; } }
html[data-depth] .wires { display: none; }
