/* ==========================================================================
   LATENTFORM: design tokens
   ========================================================================== */
:root {
  --bg: #05060a;
  --bg-2: #0a0c13;
  --panel: rgba(9, 11, 17, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #8a8fa3;
  --ember: #ff6a3d;
  --ice: #5cc8ff;
  --lime: #c6f36b;

  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(16px, 4vw, 56px);
  --radius: 18px;
  color-scheme: dark; /* single, deliberately dark look */
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
::selection { background: var(--ember); color: #000; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Custom cursor hides the native one only once JS has it running */
html.has-cursor, html.has-cursor * { cursor: none !important; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ==========================================================================
   Fixed layers: WebGL, grain, progress, cursor
   ========================================================================== */
#webgl { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; display: block; }
.no-webgl body { background: radial-gradient(60% 50% at 50% 40%, rgba(92, 200, 255, 0.18), transparent 70%), radial-gradient(40% 40% at 70% 70%, rgba(255, 106, 61, 0.14), transparent 70%), var(--bg); }
main { position: relative; z-index: 1; }

.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: 0.14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); } 80% { transform: translate(4%, 2%); } 100% { transform: translate(0, 0); }
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ice), var(--ember)); transform-origin: left; transform: scaleX(0); }

.cursor { position: fixed; inset: 0; z-index: 200; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; will-change: transform; opacity: 0; transition: opacity 0.3s; }
.cursor.is-visible .cursor__dot, .cursor.is-visible .cursor__ring { opacity: 1; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; mix-blend-mode: difference; }
.cursor__ring { width: 0; height: 0; }
.cursor__circle {
  position: absolute; width: 40px; height: 40px; left: -20px; top: -20px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: transform 0.45s var(--ease-out), background-color 0.3s, border-color 0.3s;
}
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  color: #05060a; opacity: 0; transition: opacity 0.25s;
}
.cursor.is-hover .cursor__circle { transform: scale(1.6); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.8); }
.cursor.has-label .cursor__circle { transform: scale(2.3); background: var(--ember); border-color: var(--ember); }
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.is-down .cursor__circle { transform: scale(0.8); }

/* ==========================================================================
   Preloader
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad);
  clip-path: inset(0 0 0 0);
  /* Failsafe: if the scripts never run (blocked CDN, very old browser), don't trap the page behind the loader. */
  animation: preloader-failsafe 0.6s ease 9s forwards;
}
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }
body.is-loading { animation: unlock-scroll 0s 9s forwards; }
@keyframes unlock-scroll { to { overflow: visible; } }
.preloader__brand, .nav__brand { font-weight: 700; letter-spacing: 0.08em; font-size: 15px; }
.preloader__brand span, .nav__brand span { color: var(--muted); font-weight: 400; }
.preloader__matrix {
  display: grid; grid-template-columns: repeat(8, auto); gap: 6px 22px; justify-content: start;
  font-family: var(--font-mono); font-size: clamp(12px, 1.6vw, 18px); color: rgba(238, 240, 246, 0.35);
}
.preloader__matrix span { min-width: 5ch; text-align: right; font-variant-numeric: tabular-nums; }
.preloader__matrix span.hot { color: var(--ember); }
.preloader__status { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.preloader__count { font-size: clamp(48px, 9vw, 120px); color: var(--text); letter-spacing: -0.04em; font-family: var(--font-sans); font-weight: 300; line-height: 1; }
.preloader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.preloader__bar span { display: block; height: 100%; background: var(--ember); transform-origin: left; transform: scaleX(0); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 20px var(--pad) 40px;
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.96) 0%, rgba(5, 6, 10, 0.85) 45%, rgba(5, 6, 10, 0) 100%);
}
.nav__links { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 6, 10, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav__links a { padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color 0.3s, background 0.3s; }
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav__brand { justify-self: start; display: inline-block; }
.nav__hud { display: none; }
.nav__cta { justify-self: end; }
@media (min-width: 1100px) {
  .nav { grid-template-columns: 1fr auto auto auto; }
  .nav__brand { justify-self: start; }
  .nav__hud { display: flex; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  .nav__hud #hud-index { color: var(--text); }
  .nav__hud #hud-title { color: var(--ember); min-width: 10ch; }
}

/* ==========================================================================
   Buttons, tags, panels
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(5, 6, 10, 0.4); font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  transition: background 0.35s var(--ease-out), color 0.35s, border-color 0.35s;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--accent { background: var(--ember); border-color: var(--ember); color: #0b0503; }
.btn--accent:hover { background: #ff8a63; border-color: #ff8a63; color: #0b0503; }
.btn--small { padding: 10px 18px; font-size: 14px; }
.btn:focus-visible, .seg button:focus-visible, .chips button:focus-visible, .stepper button:focus-visible, a:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }

.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel__label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.panel__label code { color: var(--ember); font-size: 12px; text-transform: none; letter-spacing: 0; }

/* Split-text helpers */
.word { display: inline-block; vertical-align: top; }
[data-split] .word, [data-reveal] .word { overflow: hidden; padding: 0.06em 0.02em 0.14em; margin: -0.06em -0.02em -0.14em; }
.word__inner, .char { display: inline-block; will-change: transform; }

/* ==========================================================================
   01 · Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--pad) 32px;
}
.hero__inner { max-width: 1360px; width: 100%; margin: 0 auto; }
.hero__title {
  font-size: clamp(54px, 11.5vw, 196px); font-weight: 500; letter-spacing: -0.055em; line-height: 0.88;
  margin: 22px 0 36px; text-shadow: 0 0 60px rgba(5, 6, 10, 0.6);
}
.hero__title em { color: var(--ember); letter-spacing: -0.03em; padding-right: 0.05em; }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero__sub { max-width: 520px; font-size: clamp(16px, 1.4vw, 19px); color: #c5c9d6; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta {
  max-width: 1360px; width: 100%; margin: 48px auto 0; display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i { position: relative; width: 1px; height: 36px; background: var(--line-2); overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--text); animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { to { top: 100%; } }

/* ==========================================================================
   02 · Manifesto
   ========================================================================== */
.manifesto { min-height: 140vh; display: flex; align-items: center; padding: 20vh 0; }
.manifesto__text {
  margin-top: 28px; max-width: 1180px;
  font-size: clamp(28px, 4.3vw, 68px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 400;
}
.manifesto__text .word { opacity: 0.12; }

/* ==========================================================================
   03 · Process
   ========================================================================== */
.process { position: relative; }
.process__pin { height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; position: relative; }
.process__head { position: absolute; top: 96px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; z-index: 2; }
.process__bar { flex: 0 1 280px; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.process__bar span { display: block; height: 100%; background: var(--ember); transform-origin: left; transform: scaleX(0); }
.process__track { display: flex; width: max-content; will-change: transform; }
.step { width: 100vw; flex-shrink: 0; padding: 0 var(--pad); display: flex; align-items: center; }
.step__card { max-width: 500px; margin-left: max(0px, calc((100vw - 1360px) / 2)); }
.step__num {
  display: block; font-size: clamp(90px, 13vw, 200px); font-weight: 600; line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(238, 240, 246, 0.28); margin-bottom: 20px;
}
.step h3 { font-size: clamp(36px, 4.4vw, 64px); margin-bottom: 10px; }
.step__lead { font-family: var(--font-serif); font-style: italic; font-size: clamp(22px, 2vw, 28px); color: var(--ember); margin-bottom: 18px; }
.step p:not(.step__lead) { color: #c0c4d1; font-size: 17px; margin-bottom: 26px; max-width: 440px; }

/* ==========================================================================
   04 · Lab
   ========================================================================== */
.lab { padding: 18vh 0 12vh; }
.section-head { margin-bottom: 48px; max-width: 980px; }
.section-head h2 { font-size: clamp(38px, 5.6vw, 88px); margin: 20px 0 22px; letter-spacing: -0.045em; }
.section-head h2 em { color: var(--ember); }
.lede { color: #bfc3d0; font-size: clamp(16px, 1.3vw, 19px); max-width: 720px; }

.lab__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lab__plane { aspect-ratio: 1; overflow: hidden; padding: 0; }
.lab__plane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: inherit; touch-action: manipulation; }
.lab__readout {
  position: absolute; left: 14px; top: 14px; display: grid; gap: 5px; padding: 12px 14px; min-width: 200px;
  background: rgba(5, 6, 10, 0.72); border: 1px solid var(--line); border-radius: 12px; pointer-events: none;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ro-head { letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; margin-bottom: 2px; }
.ro-row { display: grid; grid-template-columns: 10px 14px 1fr 34px; align-items: center; gap: 6px; color: var(--text); }
.ro-row i { width: 8px; height: 8px; border-radius: 50%; }
.ro-row b { position: relative; height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.ro-row b::after { content: ''; position: absolute; inset: 0; width: var(--w); background: currentColor; border-radius: 4px; }
.ro-row em { font-family: var(--font-mono); font-style: normal; text-align: right; }
.lab__hint {
  position: absolute; right: 14px; bottom: 12px; pointer-events: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(238, 240, 246, 0.5);
}

.lab__side { display: grid; gap: 14px; }
.lab__net { height: clamp(240px, 26vw, 340px); overflow: hidden; }
.lab__net canvas { position: absolute; inset: 0; display: block; border-radius: inherit; }
.lab__net .panel__label { position: absolute; left: 16px; top: 14px; z-index: 1; pointer-events: none; }
.lab__net .panel__label span { color: var(--text); }
.lab__legend { position: absolute; right: 16px; top: 13px; z-index: 1; display: flex; gap: 12px; pointer-events: none; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.lab__legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.lab__legend .warm { background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.lab__legend .cool { background: var(--ice); box-shadow: 0 0 8px var(--ice); }

.lab__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lab__stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.lab__stats span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lab__stats strong { display: block; font-size: clamp(18px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }

.lab__controls { padding: 18px; display: grid; gap: 16px; }
.ctrl { display: grid; gap: 8px; }
.ctrl__label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ctrl__label output { color: var(--text); }
.ctrl--row { grid-template-columns: auto auto 1fr; gap: 18px; align-items: end; }
.ctrl--row > div { display: grid; gap: 8px; }
.ctrl--actions { display: flex; flex-wrap: wrap; gap: 8px; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); width: fit-content; max-width: 100%; }
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); transition: background 0.25s, color 0.25s;
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.seg button[aria-pressed='true'] { background: var(--text); color: var(--bg); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.chips button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.chips button[aria-pressed='true'] { border-color: var(--c); color: var(--text); background: color-mix(in srgb, var(--c) 14%, transparent); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: rgba(255, 255, 255, 0.03); cursor: pointer; font-size: 16px; color: var(--text); transition: background 0.2s; }
.stepper button:hover { background: rgba(255, 255, 255, 0.1); }
.stepper output { min-width: 36px; text-align: center; font-family: var(--font-mono); font-size: 14px; }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type='range']::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--ice), var(--ember)); border-radius: 2px; }
input[type='range']::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--ice), var(--ember)); border-radius: 2px; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-2); }
input[type='range']::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); }
input[type='range']:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }

.lab__bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.lab__chart { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.lab__chart canvas { flex: 1; width: 100%; min-height: 200px; display: block; }
.k-loss { color: var(--ember); } .k-acc { color: var(--ice); }
.lab__code { padding: 16px 0 0; display: flex; flex-direction: column; max-height: 420px; }
.lab__code .panel__label { padding: 0 18px 10px; border-bottom: 1px solid var(--line); }
.lab__code pre { margin: 0; padding: 14px 18px 18px; overflow: auto; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: #c9cdd9; tab-size: 2; }
.tk-c { color: #6f7590; font-style: italic; }
.tk-k { color: var(--ember); }
.tk-s { color: var(--lime); }
.tk-n { color: #ffb36b; }
.tk-f { color: var(--ice); }

/* Model tabs */
.models__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.models__tabs button {
  display: grid; gap: 4px; text-align: left; padding: 18px 20px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease-out);
}
.models__tabs button:hover { border-color: var(--line-2); transform: translateY(-2px); }
.models__tabs button[aria-selected='true'] { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 9%, var(--panel)); }
.models__tabs button:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.models__kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.models__tabs button[aria-selected='true'] .models__kind { color: var(--ember); }
.models__tabs strong { font-size: clamp(20px, 2vw, 28px); font-weight: 500; letter-spacing: -0.03em; }
.models__desc { font-size: 14px; color: #a9adbb; }
.models__panel { animation: panel-in 0.6s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px); } }
.lab__code--wide { margin-top: 20px; max-height: 380px; }

/* Language model */
.lm__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lm__main { display: grid; gap: 14px; min-width: 0; }
.lm__console, .lm__prompt { padding: 16px 18px; display: grid; gap: 12px; }
.lm__live { margin-left: 8px; color: var(--muted); }
.lm__live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 1px; }
.lm__live.is-on { color: var(--lime); }
.lm__live.is-on::before { background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: pulse 1.2s infinite; }
.lm__sample, .lm__output {
  font-family: var(--font-mono); font-size: clamp(13px, 1.1vw, 15px); line-height: 1.7; color: var(--text);
  min-height: 7.2em; white-space: pre-wrap; overflow-wrap: anywhere;
}
.lm__output { min-height: 5.2em; }
.lm__muted { color: var(--muted); }
.lm__caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: var(--ember); animation: pulse 0.8s steps(2) infinite; }
.lm__form { display: flex; gap: 8px; }
.lm__form input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03); color: var(--text); font: 14px var(--font-mono);
}
.lm__form input:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.lm__form button:disabled { opacity: 0.5; }
.lm__attn { padding: 16px 18px 6px; }
.lm__attn-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.lm__attn-ctrls { display: flex; flex-wrap: wrap; gap: 8px; }
.lm__attn-ctrls .seg button { padding: 5px 9px; font-size: 11px; }
.lm__attn-ctrls .seg i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.lm__attn canvas { display: block; width: 100%; height: 190px; touch-action: pan-y; }
.lm__arch { padding: 16px 18px; }
.lm__arch dl { margin: 10px 0 0; display: grid; gap: 8px; }
.lm__arch dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lm__arch dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.lm__arch dt { color: var(--muted); }
.lm__arch dd { margin: 0; text-align: right; }

/* Reinforcement learning */
.rl__stage { aspect-ratio: 4 / 3; overflow: hidden; }
.rl__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.rl__hud {
  position: absolute; left: 14px; top: 14px; right: 14px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
#rl-status { color: var(--ember); }
#rl-status.is-solved { color: var(--lime); }
.rl__policy { padding: 16px 18px; display: grid; gap: 10px; }
.rl__bar { display: grid; grid-template-columns: 84px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: #c0c4d1; }
.rl__bar b { position: relative; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rl__bar b::after { content: ''; position: absolute; inset: 0; width: var(--w, 50%); border-radius: 6px; background: var(--ice); }
.rl__bar:last-child b::after { background: var(--ember); }
.rl__bar em { font-style: normal; font-family: var(--font-mono); text-align: right; }

/* ==========================================================================
   05 · Capabilities
   ========================================================================== */
.capabilities { padding: 16vh 0 10vh; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; perspective: 1200px; }
.card {
  position: relative; padding: 28px 24px 24px; min-height: 380px; display: flex; flex-direction: column;
  background: rgba(9, 11, 17, 0.72); border: 1px solid var(--line); border-radius: var(--radius);
  transform-style: preserve-3d; overflow: hidden; --mx: 50%; --my: 0%;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 106, 61, 0.16), transparent 45%);
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.5), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card__icon { width: 48px; height: 48px; margin-bottom: auto; transform: translateZ(40px); }
.card__icon svg { width: 100%; height: 100%; fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card__icon circle { fill: var(--bg); }
.card h3 { font-size: 24px; margin: 60px 0 12px; transform: translateZ(30px); }
.card p { color: #b6bac8; font-size: 15px; margin-bottom: 22px; transform: translateZ(20px); }
.card .tags { transform: translateZ(26px); }

/* ==========================================================================
   Marquee + stats
   ========================================================================== */
.strip { padding: 6vh 0 14vh; overflow: hidden; }
.marquee { overflow: hidden; padding: 2vh 0 6vh; }
.marquee__inner { display: flex; width: max-content; will-change: transform; }
.marquee__inner span {
  font-size: clamp(64px, 11vw, 190px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(238, 240, 246, 0.32);
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(44px, 5vw, 76px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(1) strong { color: var(--ice); }
.stat:nth-child(3) strong { color: var(--ember); }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; max-width: 220px; }

/* ==========================================================================
   06 · Contact
   ========================================================================== */
.contact { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 18vh; }
.contact__inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 36px; padding: 0 var(--pad); }
.contact__title { font-size: clamp(40px, 6.4vw, 104px); letter-spacing: -0.05em; max-width: 980px; }
.contact__title em { color: var(--ember); }
.contact__cta {
  position: relative; width: clamp(150px, 15vw, 210px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--ember); color: #0b0503;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  box-shadow: 0 0 0 0 rgba(255, 106, 61, 0.4), 0 0 80px rgba(255, 106, 61, 0.35);
  transition: background 0.3s, box-shadow 0.5s var(--ease-out);
}
.contact__cta:hover { background: #ff8a63; box-shadow: 0 0 0 18px rgba(255, 106, 61, 0.12), 0 0 120px rgba(255, 106, 61, 0.55); }
.contact__cta span { display: block; pointer-events: none; }
.contact__mail { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: var(--muted); transition: color 0.3s; }
.contact__mail:hover { color: var(--text); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a { display: inline-block; color: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab__grid, .lab__bottom, .lm__grid { grid-template-columns: minmax(0, 1fr); }
  .rl__stage { max-width: 760px; width: 100%; justify-self: center; }
  .lab__plane { max-width: 640px; width: 100%; justify-self: center; }
  .lab__net { height: 300px; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; padding: 14px var(--pad); }
  .nav__links { display: none; }
  .preloader__matrix { grid-template-columns: repeat(5, auto); gap: 6px 16px; }
  .preloader__matrix span:nth-child(n + 31) { display: none; }
  .hero { padding-bottom: 24px; }
  .hero__meta span:first-child { display: none; }
  .hero__meta { justify-content: flex-end; margin-top: 32px; }
  .hero__actions .btn { padding: 13px 18px; font-size: 14px; }
  .process__head { top: 72px; }
  .step { align-items: flex-end; padding-bottom: 8vh; }
  .step__num { font-size: 72px; margin-bottom: 10px; }
  .step p:not(.step__lead) { font-size: 15px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .card h3 { margin-top: 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat { padding-bottom: 28px; }
  .lab__stats { grid-template-columns: repeat(2, 1fr); }
  .ctrl--row { grid-template-columns: auto auto; }
  .ctrl--row > div:last-child { grid-column: 1 / -1; }
  .lab__readout { min-width: 0; width: 150px; padding: 8px 10px; left: 10px; top: 10px; font-size: 10px; gap: 3px; }
  .ro-row { grid-template-columns: 8px 12px 1fr 30px; }
  .lab__legend { top: auto; bottom: 12px; }
  .lab__hint { display: none; }
  .models__tabs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .models__tabs button { padding: 12px 16px; }
  .models__desc { display: none; }
  .rl__stage { aspect-ratio: 5 / 4; }
  .lm__attn canvas { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue i::after, .eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}
