@font-face { font-family: "Syncopate"; font-weight: 400; font-display: swap; src: url("assets/fonts/syncopate-400.woff2") format("woff2"); }
@font-face { font-family: "Syncopate"; font-weight: 700; font-display: swap; src: url("assets/fonts/syncopate-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("assets/fonts/plexmono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("assets/fonts/plexmono-500.woff2") format("woff2"); }

:root {
  --ink: #f3efe8;
  --ink-2: rgba(243, 239, 232, 0.64);
  --ink-3: rgba(243, 239, 232, 0.58);   /* smallest labels: still ≥ 5:1 on black */
  --tick: rgba(243, 239, 232, 0.34);
  --line: rgba(243, 239, 232, 0.16);
  --hot: #ff7a3c;      /* low entropy: the shock front */
  --cool: #63c9ff;     /* high entropy: the bubbles */
  --display: "Syncopate", "Eurostile Extended", "Arial Black", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(18px, 3.2vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--cool); outline-offset: 4px; }

.skip { position: absolute; left: var(--pad); top: -60px; z-index: 10; padding: 10px 14px; background: var(--ink); color: #000; font: 500 12px var(--mono); text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; isolation: isolate; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.hero__canvas.is-dragging { cursor: grabbing; }
.hero__poster { position: absolute; inset: 0; background: #000 center / cover no-repeat; opacity: 0; transition: opacity 0.8s; pointer-events: none; }
.no-webgl .hero__poster { opacity: 1; background-image: url("assets/poster.jpg"); } /* fetched only when needed */
.no-webgl .hero__canvas { display: none; }
.no-webgl .kernel, .no-webgl .timeline, .no-webgl #replay, .no-webgl .hint { display: none; }
/* keeps the lockup legible whatever the star is doing behind it */
.hero__scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.28) 30%, rgba(0,0,0,0) 52%),
    linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 26%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 14%); }

.hero > header, .hero > .lockup, .hero > footer { position: absolute; z-index: 2; pointer-events: none; }
.hero button, .hero a, .hero input { pointer-events: auto; }

/* top bar */
.bar { top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(var(--pad) * 0.75) var(--pad); }
.mark { display: inline-flex; align-items: center; gap: 12px; font: 500 11px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.mark i { font-style: normal; color: var(--ink-3); margin: 0 0.2em; }
.mark span { text-transform: none; letter-spacing: 0.18em; }
.kernel { display: inline-flex; align-items: center; gap: 2px; font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.kernel__label { color: var(--ink-3); margin-right: 14px; }
.kernel button { position: relative; min-height: 40px; padding: 11px 14px 11px 12px; color: var(--ink-2); border: 1px solid var(--line); margin-left: -1px; letter-spacing: inherit; text-transform: inherit; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.kernel button kbd { font: inherit; color: var(--ink-3); margin-right: 9px; }
.kernel button:hover { color: var(--ink); }
.kernel button[aria-pressed="true"] { color: #000; background: var(--ink); border-color: var(--ink); z-index: 1; }
.kernel button[aria-pressed="true"] kbd { color: rgba(0,0,0,0.5); }

/* title lockup */
.lockup { left: var(--pad); top: 50%; transform: translateY(-54%); width: min(46vw, 620px); }
.overline { margin: 0 0 22px; font: 500 11px/1.2 var(--mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--hot); display: flex; align-items: center; gap: 14px; }
.overline::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.title { margin: 0; font: 700 clamp(38px, 6.1vw, 104px)/0.98 var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.title span { display: block; }
.title span:last-child { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.lede { margin: 26px 0 0; max-width: 40ch; font: 400 clamp(14px, 1.05vw, 16px)/1.62 var(--sans); color: var(--ink-2); text-wrap: pretty; }
.cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.btn { display: inline-flex; align-items: center; gap: 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none; transition: color 0.25s, background 0.25s, border-color 0.25s, gap 0.25s var(--ease); }
.btn--primary { padding: 19px 22px 19px 28px; color: #000; background: var(--ink); }
.btn--primary:hover { gap: 22px; background: #fff; }
.btn--ghost { padding: 8px 0; color: var(--ink-2); letter-spacing: 0.2em; }
.btn--ghost:hover { color: var(--ink); }

/* bottom deck */
.deck { left: 0; right: 0; bottom: 0; padding: 0 var(--pad) calc(var(--pad) * 0.7); display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: clamp(24px, 4vw, 72px); row-gap: 14px; }
.readout { display: flex; gap: clamp(20px, 3vw, 48px); }
.readout__item { display: grid; gap: 8px; }
.readout__label { font: 500 10px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.readout__value { display: flex; align-items: baseline; gap: 8px; font: 400 clamp(26px, 2.6vw, 40px)/0.9 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.readout__value b { font-weight: 400; }
.readout__value i { font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }

.timeline { display: flex; align-items: center; gap: 18px; padding-bottom: 4px; }
.timeline__play { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); transition: border-color 0.2s, background 0.2s; }
.timeline__play:hover { border-color: var(--ink-2); }
.timeline__play .i-play { display: none; }
.timeline__play[data-state="paused"] .i-play { display: block; }
.timeline__play[data-state="paused"] .i-pause { display: none; }
.timeline__rail { position: relative; flex: 1; height: 36px; }
.timeline__rail::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--line); }
.timeline__fill { position: absolute; left: 0; top: 10px; height: 3px; width: 0; background: linear-gradient(90deg, var(--hot), #ffd9b8 55%, var(--cool)); background-size: 100vw 100%; }
.timeline__fill::after { content: ""; position: absolute; right: -1px; top: -6px; width: 1px; height: 15px; background: var(--ink); }
.timeline__phases { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.timeline__phases li { position: absolute; left: calc(var(--at) * 100%); top: 6px; padding: 16px 0 0 0; font: 500 10px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.timeline__phases li::before { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 10px; background: var(--tick); }
.timeline input { position: absolute; left: 0; top: -10px; width: 100%; height: 44px; margin: 0; opacity: 0; cursor: ew-resize; z-index: 2; }
.timeline input:focus-visible ~ .timeline__fill::after { box-shadow: 0 0 0 3px var(--cool); }

.credit { grid-column: 1 / -1; margin: 6px 0 0; max-width: 110ch; font: 400 10.5px/1.5 var(--mono); letter-spacing: 0.04em; color: var(--ink-3); }
.credit cite { font-style: normal; color: var(--ink-2); }
.credit .hint { color: var(--ink-2); margin-left: 0.6em; white-space: nowrap; }

/* entrance */
/* The lockup is plain HTML and shows at once (it is the page's LCP); only the controls that need
   the simulation wait for it. Transitions, not keyframes: Chrome failed to repaint the paragraph
   after a keyframe animation over the WebGL canvas. */
.hero[data-state="loading"] .kernel, .hero[data-state="loading"] .deck { opacity: 0; }
.hero .kernel, .hero .deck { transition: opacity 1s 0.3s; }
.js .hero:not(.is-in) .lockup > * { opacity: 0; transform: translateY(14px); }
.hero .lockup > * { transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.lockup > :nth-child(1) { transition-delay: 0.05s; }
.lockup > :nth-child(2) { transition-delay: 0.15s; }
.lockup > :nth-child(3) { transition-delay: 0.3s; }
.lockup > :nth-child(4) { transition-delay: 0.42s; }
.hero[data-ui="off"] > header, .hero[data-ui="off"] > .lockup, .hero[data-ui="off"] > footer, .hero[data-ui="off"] .hero__scrim { display: none; }

/* ----------------------------------------------------------------- about */
.about { position: relative; background: #050506; border-top: 1px solid var(--line); }
.about__inner { max-width: 1240px; margin: 0 auto; padding: clamp(72px, 11vw, 168px) var(--pad) clamp(64px, 8vw, 120px); }
.about .overline { color: var(--cool); }
.about h2 { margin: 0 0 clamp(40px, 6vw, 88px); font: 700 clamp(24px, 3.4vw, 52px)/1.12 var(--display); letter-spacing: -0.035em; text-transform: uppercase; text-wrap: balance; }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.about article { border-top: 1px solid var(--line); padding-top: 22px; }
.about h3 { margin: 0 0 14px; font: 500 11px/1 var(--mono); letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-3); }
.about article p { margin: 0; font-size: 15px; line-height: 1.68; color: var(--ink-2); text-wrap: pretty; }
.about dl { margin: 0; display: grid; gap: 12px; }
.about dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.about dt { font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.about dd { margin: 0; font: 400 16px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.about__src { margin: clamp(40px, 5vw, 72px) 0 0; font: 400 12px/1.6 var(--mono); color: var(--ink-3); max-width: 90ch; }
.about__src a { color: var(--ink-2); text-underline-offset: 3px; }
.about__src a:hover { color: var(--ink); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .hero__scrim { background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.55) 34%, rgba(0,0,0,0) 58%), linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 14%); }
  .lockup { top: auto; bottom: 196px; transform: none; width: auto; right: var(--pad); }
  .overline { margin-bottom: 14px; }
  .title { font-size: clamp(34px, 10.4vw, 64px); }
  .lede { margin-top: 14px; font-size: 14px; max-width: 46ch; }
  .cta { margin-top: 20px; }
  .btn--primary { padding: 16px 18px 16px 22px; }
  .kernel__label, .kernel button kbd { display: none; }
  .kernel button { padding: 10px 11px; letter-spacing: 0.1em; }
  .deck { grid-template-columns: 1fr; row-gap: 12px; }
  .readout { justify-content: space-between; }
  .readout__value { font-size: 24px; }
  .timeline__phases li:nth-child(2), .timeline__phases li:nth-child(3) { font-size: 0; }
  .credit { font-size: 10px; margin-top: 0; }
  .credit__long, .credit .hint { display: none; }
  .about__grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) and (max-height: 700px) { .lede { display: none; } .lockup { bottom: 160px; } }
@media (max-width: 420px) { .mark span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .kernel, .hero .deck, .hero .lockup > * { transition: none; }
}
