:root {
  --paper: #f1eee7;
  --paper-2: #e8e4da;
  --ink: #141413;
  --ink-2: #5d5a53;
  --line: #d6d0c3;
  --sig: #e23d28;
  --night: #121211;
  --night-2: #1c1c1a;
  --night-line: #2e2d2a;
  --night-ink: #efece4;
  --night-dim: #8f8b82;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: clamp(80px, 12vw, 160px); padding-bottom: clamp(80px, 12vw, 160px); }
em { font-style: italic; }
.sig { color: var(--sig); }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; }
h1 { font-size: clamp(44px, 7.2vw, 104px); }
h2 { font-size: clamp(38px, 5.2vw, 72px); margin-bottom: 28px; }
h1 em, h2 em { color: var(--ink-2); }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
p + p { margin-top: 1em; }

.label { display: flex; align-items: center; gap: 12px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 40px; }
.label span { color: var(--sig); }
.label::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .25; }

.btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; font: 500 15px var(--sans); text-decoration: none; transition: transform .2s, background .2s, color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--paper); }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 15px var(--mono); letter-spacing: .18em; }
.mark { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.4; }
.mark .core { fill: var(--sig); stroke: none; }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a:not(.btn) { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav nav a:not(.btn):hover { color: var(--ink); }
.nav .btn { height: 38px; padding: 0 16px; font-size: 14px; }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 72px; overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.hero-copy { position: relative; pointer-events: none; }
.hero-copy .cta { pointer-events: auto; }
.hero h1 { max-width: 15ch; }
.lede { max-width: 50ch; margin-top: 28px; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > div > p { max-width: 52ch; color: var(--ink-2); }
.split .btn { margin-top: 32px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { position: relative; }
.pair img { width: 100%; aspect-ratio: 11 / 9; object-fit: cover; border-radius: 4px; filter: saturate(.85); }
.pair figcaption { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px 0; border-top: 1px solid var(--ink); margin-top: 10px; }
.pair figcaption b { font: 400 34px var(--serif); letter-spacing: 0; }

/* dark */
.dark { background: var(--night); color: var(--night-ink); }
.dark .label { color: var(--night-dim); }
.dark h2 em { color: var(--night-dim); }
.dark p { color: var(--night-dim); }
.demo-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: 48px; }
.demo-head h2 { margin: 0; }
.demo-head p { max-width: 52ch; }
.demo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.player { position: relative; border-radius: 6px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; align-self: start; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.cue { position: absolute; left: 14px; top: 14px; right: 14px; display: flex; align-items: center; gap: 10px; color: var(--night-ink); font-size: 12px; }
.cue i { width: 8px; height: 8px; border-radius: 50%; background: var(--night-dim); flex: none; }
.cue.live i { background: var(--sig); animation: blink 1s steps(2) infinite; }
.cue span { background: rgba(0, 0, 0, .62); padding: 6px 10px; border-radius: 3px; }
.cue span:empty { display: none; }
.cue b { margin-left: auto; font-weight: 500; color: var(--sig); background: rgba(0, 0, 0, .62); padding: 6px 10px; border-radius: 3px; }
.cue b:empty { display: none; }
@keyframes blink { 50% { opacity: .25; } }
.play { position: absolute; left: 14px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; transition: transform .2s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 20px; height: 20px; fill: var(--ink); }
.play .i-pause, .play.on .i-play { display: none; }
.play.on .i-pause { display: block; }
.scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; cursor: pointer; }
.scrub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .18); }
#scrub-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--sig); }
.traces { display: flex; flex-direction: column; background: var(--night-2); border-radius: 6px; padding: 14px 14px 12px; min-height: 0; }
#traces { width: 100%; flex: 1; min-height: 340px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--night-dim); font-size: 11px; padding-top: 10px; }
.legend .k { width: 16px; height: 2px; display: inline-block; }
.legend .pred { background: var(--sig); }
.legend .meas { background: var(--night-ink); margin-left: 6px; }
.legend em { margin-left: auto; font-style: normal; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 56px 0 24px; padding-top: 28px; border-top: 1px solid var(--night-line); }
.stats b { display: block; font: 400 clamp(44px, 5vw, 64px)/1 var(--serif); color: var(--night-ink); margin-bottom: 10px; }
.stats span { display: block; font-size: 14px; color: var(--night-dim); max-width: 24ch; }
.stats div:first-child b { color: var(--sig); }

/* steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--ink); }
.steps li { padding: 24px 24px 0 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps .mono { color: var(--sig); }
.steps h3 { margin: 40px 0 10px; font: 400 32px var(--serif); }
.steps p { font-size: 15.5px; color: var(--ink-2); }

/* band */
.band-sec { background: var(--paper-2); }
.band-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.band-copy > p { color: var(--ink-2); max-width: 48ch; }
.toggle { display: inline-flex; margin: 32px 0 24px; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; }
.toggle button { padding: 8px 16px; border-radius: 999px; font-size: 12.5px; }
.toggle button.on { background: var(--ink); color: var(--paper); }
.parts { list-style: none; border-top: 1px solid var(--line); }
.parts li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); transition: color .2s; cursor: default; }
.parts li b { color: var(--sig); font-weight: 500; }
.parts li.hl, .parts li:hover { color: var(--ink); }
.band-stage { position: relative; aspect-ratio: 1 / 1; max-height: 720px; }
#band3d { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#band3d:active { cursor: grabbing; }
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; font: 500 12px var(--mono); color: #fff; background: var(--sig); box-shadow: 0 0 0 3px rgba(241, 238, 231, .7); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s; }
.tag.show { opacity: 1; }
.tag.hl { background: var(--ink); transform: translate(-50%, -50%) scale(1.2); }
.spec { width: 100%; border-collapse: collapse; margin-top: 64px; font-size: 13px; }
.spec th, .spec td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-weight: 500; color: var(--ink); border-bottom-color: var(--ink); }
.spec th:last-child { color: var(--sig); }
.spec td:first-child { color: var(--ink-2); width: 22%; }

/* data */
.streams { list-style: none; border-top: 1px solid var(--ink); }
.streams li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.streams em { font-style: normal; color: var(--ink-2); text-align: right; }
.streams .hot span { color: var(--sig); }
.streams .hot span::before { content: "●"; margin-right: 10px; font-size: 9px; vertical-align: 2px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 28px; color: var(--ink-2); font-size: 11.5px; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .split, .demo-head, .demo, .band-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .band-stage { max-width: 640px; width: 100%; margin: 0 auto; }
  #traces { min-height: 300px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav nav a:not(.btn) { display: none; }
  .hero { padding-bottom: 48px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 8px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .steps h3 { margin-top: 16px; }
  .spec { font-size: 11.5px; }
  .spec td:first-child { width: 30%; }
  .legend em { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
}
