/* Onix Labs — one dark world, built from the mark's three colours.
   Layout: wide display type on the left, live console / diagrams on the right, hairline grid underneath. */
:root {
  --ink: #121818;        /* page ground (from the logo background) */
  --ink-2: #171f1f;      /* raised panels */
  --ink-3: #1d2727;      /* hover / inner panels */
  --line: rgba(235, 255, 255, 0.09);
  --line-strong: rgba(235, 255, 255, 0.18);
  --frost: #ebffff;      /* logo white */
  --frost-dim: #93a8a8;  /* muted text, cyan-biased grey */
  --blade: #00b4ee;      /* logo cyan */
  --blade-soft: rgba(0, 180, 238, 0.12);
  --ok: #4fd8a0;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-xs: 0.8125rem;
  --s-sm: 0.9375rem;
  --s-md: 1.0625rem;
  --s-lg: 1.375rem;
  --s-xl: clamp(1.6rem, 3vw, 2.25rem);
  --s-hero: clamp(2.3rem, 5.4vw, 4.2rem);

  --max: 1180px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--frost);
  font-family: var(--f-body);
  font-size: var(--s-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--ink);
}

/* faint lab grid behind everything */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 10%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 10%, #000 20%, transparent 75%);
  opacity: 0.55;
}

a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blade); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: 106%;
  font-variation-settings: "wdth" 106;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.hero h1 { max-width: 13ch; }
.stealth h2, .section-head h2 { max-width: 18ch; }
h1 { font-size: var(--s-hero); font-weight: 800; }
h2 { font-size: var(--s-xl); font-weight: 700; }
h3 { font-size: var(--s-lg); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

.label {
  font-family: var(--f-mono);
  font-size: var(--s-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frost-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--blade);
  transform: skewX(-40deg);
}
.lead { font-size: var(--s-lg); line-height: 1.5; color: var(--frost-dim); max-width: 36ch; }
.muted { color: var(--frost-dim); }
.blade { color: var(--blade); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}
.brand img { width: 34px; height: 34px; }
.brand span { color: var(--frost-dim); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-size: var(--s-sm);
  color: var(--frost-dim);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--frost); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--frost);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: var(--s-sm);
  cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: var(--s-sm);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--frost-dim); }
.btn-primary { background: var(--frost); color: var(--ink); border-color: var(--frost); }
.btn-primary:hover { background: #fff; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.nav-links .btn { color: var(--frost); padding: 9px 18px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.hero h1 .slash {
  display: inline-block;
  color: var(--blade);
  transform: skewX(-12deg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-mark {
  position: absolute;
  right: -120px;
  top: -40px;
  width: 520px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

/* ---------- live console ---------- */
.console {
  min-width: 0;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  max-width: 420px;
  justify-self: end;
  width: 100%;
  opacity: 0.85;
}
.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: var(--s-xs);
  color: var(--frost-dim);
}
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.live::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(79, 216, 160, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(79, 216, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 216, 160, 0); } }
.console-body {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  padding: 14px 16px;
  height: 168px;
  color: var(--frost-dim);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
}
.log { display: grid; grid-template-columns: 62px 1fr; gap: 10px; white-space: nowrap; }
.log time { color: var(--frost-dim); opacity: 0.6; font-variant-numeric: tabular-nums; }
.log span { overflow: hidden; text-overflow: ellipsis; }
.log b { font-weight: 500; color: var(--frost); }
.log i { font-style: normal; color: var(--ok); }
.log.new { animation: logIn 0.35s ease-out; }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }
.console-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.console-foot div { padding: 12px 16px; display: grid; gap: 2px; }
.console-foot div + div { border-left: 1px solid var(--line); }
.console-foot strong {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 125;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.console-foot small { font-family: var(--f-mono); font-size: 0.68rem; color: var(--frost-dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- sections ---------- */
section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 720px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.service {
  padding: 32px 28px 36px 0;
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}
.service + .service { padding-left: 28px; border-left: 1px solid var(--line); }
.service .glyph {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--blade-soft);
  color: var(--blade);
}
.service p { color: var(--frost-dim); font-size: var(--s-sm); }

/* ---------- stealth product ---------- */
.stealth {
  background: var(--ink-2);
  border-block: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.stealth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.stealth-copy { display: grid; gap: 22px; min-width: 0; }
.codename {
  font-family: var(--f-mono);
  font-size: var(--s-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: fit-content;
}
.codename em { font-style: normal; color: var(--blade); }
.redacted {
  background: var(--frost);
  color: transparent;
  border-radius: 2px;
  padding: 0 0.15em;
  user-select: none;
}
.pillars { display: flex; flex-wrap: wrap; gap: 8px; }
.pillars li {
  list-style: none;
  font-family: var(--f-mono);
  font-size: var(--s-xs);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--ink-3);
  border: 1px solid var(--line);
}
.pillars { padding: 0; margin: 0; }

/* sync diagram */
.sync { width: 100%; max-width: 520px; justify-self: center; aspect-ratio: 1; }
.sync text { font-family: var(--f-mono); font-size: 11px; fill: var(--frost-dim); letter-spacing: 0.06em; }
.sync .node { fill: var(--ink); stroke: var(--line-strong); }
.sync .spoke { stroke: var(--line-strong); stroke-dasharray: 3 5; }
.sync .pulse { fill: var(--blade); }
.sync .core { fill: var(--blade-soft); stroke: var(--blade); }

/* lifecycle */
.flow {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.flow li {
  list-style: none;
  padding: 18px 16px;
  display: grid;
  gap: 6px;
  min-width: 0;
  background: var(--ink);
}
.flow li + li { border-left: 1px solid var(--line); }
.flow { padding: 0; }
.flow small { font-family: var(--f-mono); font-size: 0.7rem; color: var(--blade); letter-spacing: 0.06em; }
.flow strong { font-size: var(--s-sm); font-weight: 500; }
.flow span { font-size: var(--s-xs); color: var(--frost-dim); line-height: 1.45; }

/* ---------- track record ---------- */
.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
}
.record-list { display: grid; gap: 0; margin: 0; padding: 0; }
.record-list li {
  list-style: none;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.record-list li:last-child { border-bottom: 1px solid var(--line); }
.record-list dt, .record-list .k { font-family: var(--f-mono); font-size: var(--s-xs); color: var(--frost-dim); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 3px; }
.record-list p { color: var(--frost); }

/* ---------- CTA ---------- */
.cta {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(36px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  background:
    radial-gradient(circle at 100% 0%, var(--blade-soft), transparent 55%),
    var(--ink-2);
}
.cta-copy { display: grid; gap: 16px; min-width: 0; }
.mail {
  font-family: var(--f-mono);
  font-size: var(--s-sm);
  color: var(--frost-dim);
  user-select: all;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 40px;
  font-size: var(--s-xs);
  color: var(--frost-dim);
}
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--frost); }

/* ---------- about page ---------- */
.page-hero { padding-block: clamp(56px, 9vw, 110px) clamp(40px, 5vw, 64px); }
.page-hero .wrap { display: grid; gap: 26px; }
.page-hero h1 { max-width: 15ch; }

.timeline { margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 150px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(var(--blade), var(--line) 30%, var(--line));
}
.chapter {
  list-style: none;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 48px;
  padding-bottom: clamp(40px, 5vw, 64px);
  position: relative;
}
.chapter::after {
  content: "";
  position: absolute;
  left: 145px;
  top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--frost-dim);
}
.chapter.now::after { border-color: var(--blade); background: var(--blade); box-shadow: 0 0 0 6px var(--blade-soft); }
.chapter .when {
  font-family: var(--f-mono);
  font-size: var(--s-xs);
  color: var(--frost-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 2px;
  padding-right: 24px;
}
.chapter .body { display: grid; gap: 12px; max-width: 62ch; }
.chapter .body p { color: var(--frost-dim); }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.principle {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.principle p { color: var(--frost-dim); font-size: var(--s-sm); }

.founder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.founder-mark {
  width: 96px; height: 96px;
  border-radius: 20px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.founder-mark img { width: 60px; }
.founder div { display: grid; gap: 10px; min-width: 0; }

/* ---------- motion ---------- */
.reveal { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0.001; transform: translateY(14px); } }
.brand img, .mark-spin { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.brand:hover img { transform: rotate(-20deg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .console { justify-self: stretch; max-width: none; }
  .hero-grid, .stealth-grid, .record-grid { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow li:nth-child(4) { border-left: 0; }
  .flow li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .sync { max-width: 420px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter-r) 20px var(--gutter-l);
  }
  .nav-links[data-open="false"] { display: none; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; justify-content: center; border-bottom: 1px solid var(--line-strong); padding: 12px; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .service, .service + .service { padding: 28px 0; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .cta { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .record-list li, .chapter { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .timeline::before { left: 5px; }
  .chapter { padding-left: 32px; }
  .chapter::after { left: 0; }
  .hero-mark { width: 340px; right: -140px; }
}
@media (max-width: 480px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .flow li:nth-child(even) { border-left: 1px solid var(--line); }
  .flow li:nth-child(-n+2) { border-top: 0; }
  .console-body { height: 150px; font-size: 0.7rem; }
  .log { grid-template-columns: 54px 1fr; }
  .founder { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- legal page ---------- */
.legal { max-width: 70ch; display: grid; gap: 16px; }
.legal h2 { font-size: var(--s-lg); margin-top: 24px; }
.legal p, .legal li { color: var(--frost-dim); }
.legal strong { color: var(--frost); font-weight: 500; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal .mail { color: var(--frost); }

/* ===================== v2 additions ===================== */

/* never let decoration widen the page (fixes the sideways scroll on phones) */
html, body { overflow-x: clip; }
.hero { overflow: clip; }

/* cursor spotlight on the lab grid (desktop only, set by main.js) */
.spot {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 0.6s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(0, 180, 238, 0.07), transparent 70%);
}
.spot.on { opacity: 1; }

/* hero mark: slow drift */
.hero-mark { animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { from { transform: rotate(0deg) translateY(0); } to { transform: rotate(-14deg) translateY(18px); } }

/* demo feed tag reads as a label, not a live claim */
.live { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }

/* facts strip */
.facts-band { padding-block: 0; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--ink-2) 60%, transparent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 28px 24px 26px; display: grid; gap: 6px; min-width: 0; }
.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 118;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.fact small { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--frost-dim); }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact, .fact:first-child { padding: 22px 16px 20px 0; }
  .fact:nth-child(even) { padding-left: 16px; }
  .fact + .fact { border-left: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--line); }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* services: lift on hover */
.service { transition: background 0.3s; }
.service .glyph { transition: transform 0.4s cubic-bezier(.2,.7,.2,1), background 0.3s; }
.service:hover .glyph { transform: translateY(-3px) rotate(-6deg); background: rgba(0, 180, 238, 0.2); }

/* codename decode */
.decode { display: inline-block; min-width: 3.2ch; }

/* sync diagram: breathing core + nodes that light up */
.sync .core { animation: core 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes core { 50% { stroke-opacity: 0.45; } }
.sync .node { transition: stroke 0.3s, fill 0.3s; }
.sync .node.lit { stroke: var(--blade); fill: rgba(0, 180, 238, 0.1); }

/* track record left column sits at the top */
.record-head { align-content: start; margin-bottom: 0; }

/* scroll reveal */
/* content is only hidden once the script is running, so it can never get stuck invisible */
.sr-on .sr { opacity: 0; transform: translateY(22px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.sr-on .sr.in { opacity: 1; transform: none; }

/* footer link */
.foot span a { color: var(--frost); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.foot span a:hover { border-color: var(--frost); }

/* 404 */
.lost { min-height: 70vh; display: grid; align-content: center; gap: 24px; }
.lost .code { font-family: var(--f-mono); color: var(--blade); font-size: var(--s-sm); letter-spacing: 0.1em; }

@media (prefers-reduced-motion: reduce) {
  .sr { opacity: 1; transform: none; }
  .spot { display: none; }
}

/* ---------- about: note + future chapter ---------- */
.aside {
  display: flex; gap: 12px; align-items: baseline;
  padding: 12px 16px; border-left: 2px solid var(--blade);
  background: var(--blade-soft); border-radius: 0 8px 8px 0;
  color: var(--frost) !important; font-size: var(--s-sm);
}
.aside-k { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blade); flex: none; }
.chapter.next::after { border-style: dashed; border-color: var(--blade); }

/* ---------- secret: the Bertrand paradox ---------- */
.secret-term {
  position: relative;
  font: inherit; color: var(--frost);
  background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer;
  border-bottom: 1px dashed var(--blade);
  touch-action: manipulation; /* no double-tap zoom on phones */
  -webkit-tap-highlight-color: transparent;
}
.secret-term:hover { color: var(--blade); }
.tap-hint {
  position: absolute; left: 50%; top: calc(100% + 16px);
  width: 0; height: 0; pointer-events: none; color: var(--blade);
  opacity: 0; animation: hint-cycle 7s ease-in-out 2.5s infinite;
}
.tap-hint .ring {
  position: absolute; left: -11px; top: -11px; width: 22px; height: 22px;
  border: 1.5px solid currentColor; border-radius: 50%;
  opacity: 0; animation: ring 7s ease-out 2.5s infinite;
}
.tap-hint .ring:nth-child(2) { animation-name: ring2; }
.tap-hint .dot { position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tap-label {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
}
@keyframes hint-cycle { 0%, 100% { opacity: 0; } 6%, 26% { opacity: 1; } 34% { opacity: 0; } }
@keyframes ring  { 0%, 8% { opacity: 0; transform: scale(0.4); } 9% { opacity: 1; transform: scale(0.4); } 17% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; } }
@keyframes ring2 { 0%, 15% { opacity: 0; transform: scale(0.4); } 16% { opacity: 1; transform: scale(0.4); } 24% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; } }
.found .tap-hint { display: none; }
.chapter.next .body { padding-bottom: 44px; } /* room for the hint */

.secret {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px var(--gutter-r) 24px var(--gutter-l);
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease; cursor: pointer;
}
.secret.open { opacity: 1; pointer-events: auto; }
.secret blockquote { margin: 0; max-width: 640px; display: grid; gap: 22px; }
.secret blockquote p {
  font-family: var(--f-display); font-variation-settings: "wdth" 106; font-weight: 600;
  font-size: clamp(1.3rem, 4.4vw, 2rem); line-height: 1.35; letter-spacing: -0.01em;
  min-height: 4.2em; color: var(--frost);
}
.secret cite {
  font-style: normal; font-family: var(--f-mono); font-size: var(--s-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--blade);
  opacity: 0; transition: opacity 0.6s ease;
}
.secret cite.show { opacity: 1; }
.secret-close { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); font-family: var(--f-mono); font-size: 0.7rem; color: var(--frost-dim); }
.aside em { font-style: italic; }
/* fun fact: small, plain, italic */
.aside {
  display: block; padding: 0; border: 0; background: none; border-radius: 0;
  font-size: 0.85rem; font-style: italic; color: var(--frost-dim) !important;
}
.aside-k { font-style: italic; margin-right: 8px; }
/* click click: every 3.5s instead of every 7s */
.tap-hint { animation: hint-fast 3.5s ease-in-out 1.5s infinite; }
.tap-hint .ring { animation: ring-fast 3.5s ease-out 1.5s infinite; }
.tap-hint .ring:nth-child(2) { animation-name: ring2-fast; }
@keyframes hint-fast { 0%, 100% { opacity: 0; } 8%, 55% { opacity: 1; } 70% { opacity: 0; } }
@keyframes ring-fast  { 0%, 14% { opacity: 0; transform: scale(0.4); } 15% { opacity: 1; transform: scale(0.4); } 32% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; } }
@keyframes ring2-fast { 0%, 27% { opacity: 0; transform: scale(0.4); } 28% { opacity: 1; transform: scale(0.4); } 45% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tap-hint, .tap-hint .ring { animation: none !important; } }

/* ---------- interactive Ø/01 diagram ---------- */
.sync-wrap { display: grid; gap: 18px; justify-items: center; min-width: 0; width: 100%; }
.sync { user-select: none; -webkit-user-select: none; overflow: visible; }
.sync text { pointer-events: none; transition: fill 0.3s; }
.sync .ring-outer { fill: none; stroke: var(--line); stroke-width: 1; }
.sync .spoke { stroke: var(--line-strong); stroke-dasharray: 3 5; transition: stroke 0.3s, stroke-width 0.3s; }
.sync .flow { stroke: var(--blade); stroke-width: 1.5; fill: none; stroke-dasharray: 6 14; opacity: 0; transition: opacity 0.35s; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.sync .flow.on { opacity: 0.9; }
.sync .spoke.on { stroke: rgba(0, 180, 238, 0.35); }
.sync .pulse { transition: r 0.3s, opacity 0.3s; }
.sync.focus .pulse { opacity: 0.45; }
.sync.focus .pulse.on { opacity: 1; r: 4.5; }
.sync .halo { fill: none; stroke: rgba(0, 180, 238, 0.12); stroke-width: 18; animation: halo 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { stroke-opacity: 0.25; transform: scale(1.04); } }
.sync .orbit { fill: none; stroke: var(--blade); stroke-opacity: 0.5; stroke-width: 1; stroke-dasharray: 2 9; animation: orbit 24s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes orbit { to { transform: rotate(360deg); } }
.sync .node-g { cursor: pointer; outline: none; }
.sync .node-g .node { transition: stroke 0.3s, fill 0.3s, filter 0.3s; }
.sync .node-g:hover .node, .sync .node-g.on .node, .sync .node-g:focus-visible .node { stroke: var(--blade); fill: rgba(0, 180, 238, 0.12); filter: drop-shadow(0 0 10px rgba(0, 180, 238, 0.35)); }
.sync .node-g.on text, .sync .node-g:hover text { fill: var(--frost); }
.sync-info {
  width: 100%; max-width: 440px; min-height: 120px;
  padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--ink); display: grid; gap: 6px; align-content: start;
}
.sync-k { font-family: var(--f-mono); font-size: var(--s-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blade); }
.sync-info p { color: var(--frost); font-size: var(--s-sm); }
.sync-hint { font-family: var(--f-mono); font-size: 0.66rem; color: var(--frost-dim); letter-spacing: 0.06em; }
@media (prefers-reduced-motion: reduce) { .sync .flow, .sync .halo, .sync .orbit { animation: none; } }

/* ---------- clients page ---------- */
.layers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.layers li { list-style: none; font-family: var(--f-mono); font-size: var(--s-xs); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--frost-dim); }
.clients-sec { padding-block: clamp(28px, 4vw, 48px); }
.clients-sec .section-head { margin-bottom: 20px; }
.client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.client {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 20px;
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--ink-2); text-decoration: none; min-width: 0; overflow: hidden;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(.2,.7,.2,1), background 0.3s;
}
.client::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(360px circle at var(--cx, 50%) var(--cy, 0%), rgba(0, 180, 238, 0.12), transparent 70%);
}
.client:hover { border-color: rgba(0, 180, 238, 0.45); transform: translateY(-3px); }
.client:hover::before { opacity: 1; }
.client-logo {
  height: 96px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink); display: grid; place-items: center; padding: 18px 24px; position: relative;
}
.client-logo img {
  max-height: 52px; max-width: 78%; object-fit: contain;
  filter: brightness(0) invert(1); opacity: 0.78; transition: opacity 0.3s;
}
.client:hover .client-logo img { opacity: 1; }
.client-word { font-family: var(--f-display); font-variation-settings: "wdth" 118; font-weight: 700; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--frost); }
.client-logo img + .client-word { display: none; }
.client-body { display: grid; gap: 10px; align-content: start; }
.client-body h3 { font-size: var(--s-lg); }
.client-full { display: block; margin-top: 4px; font-family: var(--f-body); font-size: var(--s-sm); font-weight: 400; color: var(--frost-dim); letter-spacing: 0; }
.client-body p { color: var(--frost-dim); font-size: var(--s-sm); }
.client-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.client-tags li { list-style: none; font-family: var(--f-mono); font-size: 0.7rem; padding: 4px 10px; border-radius: 6px; background: var(--blade-soft); color: var(--blade); }
.client-note { border-left: 2px solid var(--blade); padding-left: 12px; color: var(--frost) !important; }
.client-link { font-family: var(--f-mono); font-size: var(--s-xs); color: var(--frost-dim); }
.client:hover .client-link { color: var(--frost); }
.client:hover .arrow { transform: translate(2px, -2px); }
.client .arrow { display: inline-block; transition: transform 0.25s; }
.nda {
  display: grid; gap: 14px; padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--line-strong); border-radius: 16px;
}
.nda-k { font-family: var(--f-mono); font-size: var(--s-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blade); }
.nda p { color: var(--frost); max-width: 62ch; }
.nda-bars { display: flex; flex-wrap: wrap; gap: 10px; }
.nda-bars span { height: 14px; border-radius: 3px; background: var(--ink-3); width: 90px; position: relative; overflow: hidden; }
.nda-bars span:nth-child(2n) { width: 130px; } .nda-bars span:nth-child(3n) { width: 64px; }
.nda-bars span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(235,255,255,0.08), transparent); transform: translateX(-100%); animation: redact 2.6s ease-in-out infinite; }
.nda-bars span:nth-child(2)::after { animation-delay: 0.3s; } .nda-bars span:nth-child(3)::after { animation-delay: 0.6s; }
.nda-bars span:nth-child(4)::after { animation-delay: 0.9s; } .nda-bars span:nth-child(5)::after { animation-delay: 1.2s; } .nda-bars span:nth-child(6)::after { animation-delay: 1.5s; }
@keyframes redact { to { transform: translateX(100%); } }
@media (max-width: 760px) { .client-grid { grid-template-columns: minmax(0, 1fr); } }
/* own logo files: already white, keep the glow on Tencent's mark */
.client-logo { height: 112px; }
.client-logo img { filter: none; max-height: 64px; }
.client-logo { height: 124px; }
.client-logo img { max-width: 60%; }
/* "many more creators" card */
.client-more { border-style: dashed; }
.client-more:hover { transform: none; }
.avatars { display: flex; }
.avatars span {
  width: 44px; height: 44px; border-radius: 50%; margin-left: -10px;
  border: 2px solid var(--ink); background: linear-gradient(135deg, var(--ink-3), #2a3636);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.avatars span:first-child { margin-left: 0; }
.avatars span:nth-child(2) { background: linear-gradient(135deg, #22302f, #1a4a5a); }
.avatars span:nth-child(4) { background: linear-gradient(135deg, #22302f, #17607a); }
.avatars .plus { display: grid; place-items: center; background: var(--blade-soft); color: var(--blade); font-family: var(--f-mono); font-size: 1rem; }
.client-more:hover .avatars span { transform: translateY(-4px); }
.client-more:hover .avatars span:nth-child(2) { transition-delay: 0.04s; } .client-more:hover .avatars span:nth-child(3) { transition-delay: 0.08s; }
.client-more:hover .avatars span:nth-child(4) { transition-delay: 0.12s; } .client-more:hover .avatars span:nth-child(5) { transition-delay: 0.16s; } .client-more:hover .avatars span:nth-child(6) { transition-delay: 0.2s; }

/* ---------- Ø/01 diagram v2: cleaner core ---------- */
.sync .halo, .sync .orbit { display: none; }
.sync .ring-outer { stroke: rgba(235,255,255,0.06); }
.sync .spoke { stroke: rgba(235,255,255,0.14); stroke-dasharray: 2 6; }
.sync .spoke.on { stroke: rgba(0, 180, 238, 0.25); }
.sync .flow { stroke-width: 1.6; stroke-dasharray: 5 9; stroke-linecap: round; }
.sync .pulse { fill: var(--blade); }
.sync.focus .pulse { opacity: 0.35; }
.sync.focus .pulse.on { opacity: 1; r: 3.6; }
.sync .glow { animation: glow 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glow { 50% { opacity: 0.6; transform: scale(0.94); } }
.sync .track { fill: none; stroke: rgba(235,255,255,0.08); stroke-width: 1; }
.sync .arc {
  fill: none; stroke: var(--blade); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 46 344; transform-box: fill-box; transform-origin: center;
  animation: arc 7s linear infinite;
}
@keyframes arc { to { transform: rotate(360deg); } }
.sync .pointer { transform-origin: 240px 240px; transition: transform 0.7s cubic-bezier(.65,0,.35,1); }
.sync .pointer path { fill: var(--blade); }
.sync .core { fill: var(--ink); stroke: rgba(0, 180, 238, 0.55); stroke-width: 1.2; }
.sync .core-id { font-family: var(--f-display); font-variation-settings: "wdth" 118; font-weight: 700; font-size: 22px; fill: var(--frost); letter-spacing: 0.02em; }
.sync .core-sub { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.18em; fill: var(--frost-dim); }
.sync .core-live { fill: var(--ok); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.sync .node { fill: var(--ink); stroke: rgba(235,255,255,0.14); }
.sync .node-dot { fill: rgba(235,255,255,0.25); transition: fill 0.3s; }
.sync .node-g.on .node-dot, .sync .node-g:hover .node-dot { fill: var(--blade); }
.sync text { font-size: 10.5px; }
@media (prefers-reduced-motion: reduce) { .sync .arc, .sync .glow, .sync .core-live { animation: none; } }
.sync .core { fill: #0f1515; }
.sync .core-mark { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); transform-box: fill-box; transform-origin: center; }
.sync:hover .core-mark { transform: rotate(-12deg); }
/* the blue arc is driven by main.js: it spins on its own and swings to follow the mouse */
.sync .arc { animation: none; }
/* click click hint: always shows, even after the secret has been found */
.found .tap-hint { display: block; }
@media (prefers-reduced-motion: reduce) { .tap-hint { opacity: 1; } .tap-hint .ring { opacity: 0.6; transform: none; } }

/* ===================== wide layout: fill the screen with an Aaru-style margin ===================== */
:root {
  --max: 1400px;
  --s-hero: clamp(2.4rem, 5vw, 5.4rem);
  --s-xl: clamp(1.7rem, 2.8vw, 2.9rem);
  --s-lg: clamp(1.3rem, 1.4vw, 1.6rem);
}
.wrap { padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px)); padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px)); }
@media (min-width: 1500px) { .wrap { padding-left: 24px; padding-right: 24px; } }
.hero h1 { max-width: 12ch; }
.lead { max-width: 40ch; }
.console { max-width: 540px; }
.console-body { height: 200px; font-size: 0.78rem; }
.section-head { max-width: 860px; }
.sync { max-width: 600px; }
.hero-mark { width: 640px; right: -160px; }

/* ---------- products page ---------- */
.product-no { font-family: var(--f-display); font-variation-settings: "wdth" 118; font-weight: 700; font-size: 3rem; color: var(--blade); letter-spacing: -0.02em; }
.redact { display: inline-block; background: var(--frost); color: transparent; border-radius: 3px; line-height: 1; padding: 0 2px; user-select: none; font-size: 0.9em; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blade); margin-right: 6px; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ===================== v3 polish ===================== */

/* scroll progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 80; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blade), #7fe3ff); box-shadow: 0 0 12px rgba(0,180,238,.6); pointer-events: none; }

/* header tightens once you scroll */
.site-header { transition: background .3s, box-shadow .3s; }
.site-header.scrolled { background: color-mix(in srgb, var(--ink) 94%, transparent); box-shadow: 0 10px 30px -18px rgba(0,0,0,.8); }
.site-header .nav { transition: height .3s; }
.site-header.scrolled .nav { height: 58px; }

/* nav links: sliding underline */
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--blade);
  transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.nav-links a:not(.btn):hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* hero: drifting aurora light + headline wipe-in */
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 1100px; max-height: 1100px;
  background: radial-gradient(closest-side, rgba(0,180,238,.16), rgba(0,180,238,.05) 55%, transparent 75%);
  filter: blur(20px); pointer-events: none; z-index: -1; animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-12vw, 8vh) scale(1.15); } 100% { transform: translate(-4vw, 18vh) scale(.95); } }
.hero h1.reveal { animation: wipe 1.1s cubic-bezier(.7,0,.2,1) .05s both; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.hero h1 .slash { background: linear-gradient(90deg, var(--blade), #7fe3ff, var(--blade)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; padding-right: .08em; }
@keyframes shine { to { background-position: -200% 0; } }

/* buttons: magnetic pull + light sweep on the white ones */
.btn { will-change: transform; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(0,180,238,.35) 50%, transparent 70%); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.btn-primary:hover::after { transform: translateX(120%); }

/* ticker band */
.marquee { border-bottom: 1px solid var(--line); overflow: hidden; padding: 18px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--f-mono); font-size: var(--s-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--frost-dim); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--blade); font-size: .7rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* cards: 3D tilt + cursor glow (set by main.js) */
.service, .client { transform-style: preserve-3d; transition: transform .25s ease, border-color .3s, background .3s; }
.service { position: relative; }
.service::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 0%), rgba(0,180,238,.10), transparent 70%); }
.service:hover::before { opacity: 1; }

/* section labels: the blue dash draws in */
.sr .label::before, .section-head .label::before { transition: width .8s cubic-bezier(.2,.7,.2,1) .2s; }
.sr-on .sr:not(.in) .label::before { width: 0; }

/* faint film grain for depth */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 70; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .hero::before, .marquee-track, .hero h1 .slash { animation: none !important; }
  .progress { display: none; }
}
/* sub-page headlines (Products, Clients, Lore, Privacy): smaller than the homepage hero */
.page-hero h1 { font-size: clamp(2rem, 3.4vw, 3.6rem); max-width: 22ch; }
/* client logo strip under the ticker */
.logo-strip { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.logo-strip-k { flex: none; padding: 0 22px 0 max(16px, 4vw); font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--frost-dim); white-space: nowrap; }
.logo-strip .marquee { flex: 1; border-bottom: 0; padding: 22px 0; }
.marquee-rev .marquee-track { animation-direction: reverse; animation-duration: 45s; gap: 64px; align-items: center; }
.lg { display: inline-flex; align-items: center; opacity: .55; transition: opacity .3s; }
.lg:hover { opacity: 1; }
.lg img { width: auto; display: block; }
@media (max-width: 760px) { .logo-strip-k { display: none; } }
/* Aaru-style logo band: logos scroll at the edges, one line of text sits in the middle */
.logo-strip { position: relative; display: block; background: color-mix(in srgb, var(--ink-2) 70%, transparent); }
.logo-strip .marquee { padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 24%, transparent 34%, transparent 66%, #000 76%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 24%, transparent 34%, transparent 66%, #000 76%, #000 94%, transparent 100%); }
.logo-strip-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; white-space: nowrap;
  font-family: var(--f-display); font-variation-settings: "wdth" 112; font-weight: 600; font-size: 0.86rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--frost); text-decoration: none; }
.logo-strip-msg .arrow { display: inline-block; color: var(--blade); transition: transform .25s; }
.logo-strip-msg:hover .arrow { transform: translateX(4px); }
@media (max-width: 900px) {
  .logo-strip .marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-strip-msg { position: static; transform: none; display: block; text-align: center; padding: 16px 16px 0; white-space: normal; font-size: .75rem; }
}
.logo-strip .marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 18%, transparent 27%, transparent 73%, #000 82%, #000 95%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 18%, transparent 27%, transparent 73%, #000 82%, #000 95%, transparent 100%); }


/* ================= v5: mono "AI lab" type + 3D figure ================= */
:root {
  --f-display: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
h1, h2, h3 {
  font-family: var(--f-display); font-stretch: normal; font-variation-settings: normal;
  font-weight: 500; letter-spacing: -0.045em; line-height: 1.05;
}
h1 { font-weight: 500; }
h2 { letter-spacing: -0.04em; }
h3 { letter-spacing: -0.03em; font-weight: 500; }
.hero h1 { max-width: 14ch; }
.hero h1 .slash { transform: none; font-weight: 500; }
.label { letter-spacing: 0.06em; }

.stealth .dotfig { margin-top: clamp(40px, 6vw, 72px); }
.dotfig {
  margin: 0; position: relative; border: 1px solid var(--line); border-radius: 18px;
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 180, 238, 0.05), transparent 65%), var(--ink-2);
  overflow: hidden;
}
.dotfig::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(235, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%); mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%);
}
.dotfig canvas { display: block; width: 100%; height: clamp(320px, 52vw, 560px); cursor: crosshair; touch-action: pan-y; position: relative; }
.dotfig canvas.grab { cursor: grabbing; }
.dotfig-top, .dotfig-foot {
  position: absolute; left: 22px; right: 22px; display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--frost-dim); z-index: 1; pointer-events: none;
}
.dotfig-top { top: 18px; }
.dotfig-foot { bottom: 18px; }
.dotfig-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--frost); }
.dotfig-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--blade); box-shadow: 0 0 0 4px var(--blade-soft); }
@media (max-width: 560px) { .dotfig-hint { display: none; } .dotfig-top, .dotfig-foot { left: 16px; right: 16px; } }


/* ================= v6: blog list, compact mobile console, one-screen stats ================= */
.posts-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.posts { list-style: none; margin: 0; padding: 0; }
.post {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px 28px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line); transition: background .25s, padding .3s;
}
.post:hover { background: color-mix(in srgb, var(--ink-2) 70%, transparent); padding-left: 12px; padding-right: 12px; }
.post-tag { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blade); }
.post-body { min-width: 0; display: grid; gap: 6px; }
.post-body h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
.post-body p { color: var(--frost-dim); font-size: var(--s-sm); }
.post-state { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--frost-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
@media (max-width: 640px) {
  .post { grid-template-columns: minmax(0, 1fr) auto; }
  .post-body { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 700px) {
  /* hero console: a slim live terminal */
  .console { border-radius: 12px; opacity: 1; }
  .console-bar { padding: 9px 14px; font-size: .68rem; }
  .console-body {
    height: 66px; padding: 8px 14px; font-size: .7rem; line-height: 1.6;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  }
  .log { grid-template-columns: 52px 1fr; gap: 8px; }
  .console-foot { display: flex; }
  .console-foot div { flex: 1; padding: 8px 12px; display: flex; align-items: baseline; gap: 6px; }
  .console-foot strong { font-size: .9rem; }
  .console-foot small { font-size: .58rem; letter-spacing: .04em; }
  .console-foot div:nth-child(2) small, .console-foot div:nth-child(3) small { display: none; }
  .console-foot div:nth-child(2)::after { content: "servers"; font-family: var(--f-mono); font-size: .58rem; color: var(--frost-dim); text-transform: uppercase; }
  .console-foot div:nth-child(3)::after { content: "manual"; font-family: var(--f-mono); font-size: .58rem; color: var(--frost-dim); text-transform: uppercase; }
  .console-foot div:first-child small { white-space: nowrap; }

  /* stats + logo band: one screen */
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 16px 16px 14px; gap: 2px; }
  .fact:nth-child(odd) { padding-left: 0; }
  .fact strong { font-size: 1.6rem; }
  .fact small { font-size: .6rem; letter-spacing: .06em; }
  .logo-strip-msg { position: static; transform: none; display: block; text-align: center; padding: 14px 16px 0; font-size: .66rem; white-space: normal; }
  .logo-strip .marquee { padding: 14px 0 16px; }
  .logo-strip .marquee img { max-height: 26px; }
  .marquee-rev .marquee-track { gap: 40px; }
}


/* ================= v7: front page revamp ================= */
/* hero headline: a size down */
.hero .hero-copy h1 { font-size: clamp(2rem, 4.1vw, 3.3rem); max-width: 15ch; }

/* console: playable */
.console-actions { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 50%, transparent); }
.console-actions button {
  flex: 1; min-width: 0; font: 500 .68rem/1 var(--f-mono); letter-spacing: .02em; color: var(--frost);
  background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 8px;
  cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s;
  display: block; text-align: center; overflow: hidden; text-overflow: ellipsis;
}
.console-actions button::before { content: "▸"; color: var(--blade); margin-right: 6px; }
.console-actions button:hover { border-color: var(--blade); background: var(--blade-soft); }
.console-actions button.running { color: var(--blade); border-color: var(--blade); }
.console-actions button.running::before { content: "●"; animation: blink 0.6s steps(2) infinite; }
.console-actions button:disabled { cursor: progress; }
.ca-m { display: none; }
#stat-tasks.bump { animation: bump .45s ease-out; }
@keyframes bump { 0% { color: var(--blade); } 100% { color: inherit; } }
@keyframes blink { 50% { opacity: 0; } }

/* facts: telemetry */
.fact { position: relative; transition: background .25s; }
.fact::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--blade); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.fact:first-child::after { left: 0; }
.fact:hover { background: color-mix(in srgb, var(--ink-3) 55%, transparent); }
.fact:hover::after { transform: scaleX(1); }
.fact small { display: inline-flex; align-items: center; gap: 8px; }
.fact small::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); flex: none; opacity: .85; animation: pulse 2.4s infinite; }
.fact:nth-child(2) small::before { animation-delay: .6s; }
.fact:nth-child(3) small::before { animation-delay: 1.2s; }
.fact:nth-child(4) small::before { animation-delay: 1.8s; }

/* what we do: bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cell {
  position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0;
  padding: 22px; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--ink-2) 80%, transparent); transition: border-color .3s;
}
.cell:hover { border-color: var(--line-strong); }
.cell-agents { grid-column: span 4; }
.cell-community { grid-column: span 2; grid-row: span 2; }
.cell-infra { grid-column: span 4; }
.cell-copy { display: grid; gap: 8px; }
.cell h3 { font-size: 1.15rem; }
.cell p { color: var(--frost-dim); font-size: var(--s-sm); }
.replaces {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-strong);
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .04em; color: var(--blade);
}
.vis { border: 1px solid var(--line); border-radius: 12px; background: var(--ink); overflow: hidden; }

/* mini terminal */
.vt-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: .66rem var(--f-mono); color: var(--frost-dim); }
.vt-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.vt-bar span { margin-left: 6px; }
.vt-state { margin-left: auto; font-style: normal; color: var(--ok); }
.vt-code { padding: 14px 16px; font: .78rem/1.85 var(--f-mono); color: var(--frost); white-space: nowrap; overflow: hidden; }
.vt-c { color: var(--frost-dim); opacity: .6; }
.vt-k { color: var(--blade); font-weight: 600; }
.vt-s { padding: 1px 5px; border-radius: 4px; transition: background .2s; animation: fire 3.6s infinite; }
.vt-s.s2 { animation-delay: .5s; } .vt-s.s3 { animation-delay: 1s; }
@keyframes fire { 0%, 6% { background: transparent; color: var(--frost); } 10%, 26% { background: var(--blade-soft); color: var(--blade); } 34%, 100% { background: transparent; color: var(--frost); } }
.cur { display: inline-block; width: 7px; height: 1em; margin-left: 4px; vertical-align: -2px; background: var(--blade); animation: blink 1s steps(2) infinite; }
.vt-ok { color: var(--ok); font-size: .72rem; }
.vt-ok b { font-weight: 600; }

/* node cascade */
.vis-nodes { padding: 14px 10px 6px; display: flex; align-items: center; flex: 1; min-height: 210px; }
.vis-nodes svg { width: 100%; height: auto; display: block; }
.vis-nodes text { font: 10px var(--f-mono); fill: var(--frost-dim); text-anchor: middle; }
.vn-l { fill: none; stroke: var(--line-strong); stroke-dasharray: 3 4; }
.vn-f { fill: none; stroke: var(--blade); stroke-width: 1.6; stroke-dasharray: 26 200; stroke-dashoffset: 26; opacity: 0; animation: travel 3.2s infinite; }
.vn-src rect { fill: var(--blade-soft); stroke: var(--blade); }
.vn-src circle { fill: var(--blade); }
.vn-src text { fill: var(--frost); }
.vn-n rect { fill: var(--ink-2); stroke: var(--line-strong); animation: light 3.2s infinite; }
.vn-n text { animation: lightt 3.2s infinite; }
.f2, .n2 rect, .n2 text { animation-delay: .25s; }
.f3, .n3 rect, .n3 text { animation-delay: .5s; }
.f4, .n4 rect, .n4 text { animation-delay: .75s; }
.vn-cap { font-size: 9px !important; letter-spacing: .08em; opacity: .7; }
@keyframes travel { 0% { stroke-dashoffset: 26; opacity: 0; } 4% { opacity: 1; } 22% { stroke-dashoffset: -110; opacity: 1; } 26%, 100% { stroke-dashoffset: -110; opacity: 0; } }
@keyframes light { 0%, 18% { fill: var(--ink-2); stroke: var(--line-strong); } 22%, 52% { fill: var(--blade-soft); stroke: var(--blade); } 70%, 100% { fill: var(--ink-2); stroke: var(--line-strong); } }
@keyframes lightt { 0%, 18% { fill: var(--frost-dim); } 22%, 52% { fill: var(--frost); } 70%, 100% { fill: var(--frost-dim); } }

/* telemetry wave */
.vis-wave { padding: 12px 0 8px; }
.vw-read { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; font: .72rem var(--f-mono); color: var(--frost-dim); }
.vw-read b { color: var(--frost); font-weight: 500; font-variant-numeric: tabular-nums; }
.vw-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.vis-wave svg { width: 100%; height: 78px; display: block; }
.vw-line { fill: none; stroke: var(--blade); stroke-width: 1.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(0,180,238,.55)); transition: filter .3s; }
.vw-area { fill: url(#vwFill); }
.cell-infra.hot .vw-line { filter: drop-shadow(0 0 9px rgba(0,180,238,.9)); }
.vw-axis { display: flex; justify-content: space-between; padding: 4px 14px 0; font: .6rem var(--f-mono); color: var(--frost-dim); opacity: .6; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-agents, .cell-infra { grid-column: 1 / -1; }
  .cell-community { grid-column: 1 / -1; grid-row: auto; }
  .vis-nodes { min-height: 0; }
  .vis-nodes svg { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 700px) {
  .console-actions { padding: 8px 10px; gap: 5px; }
  .console-actions button { font-size: .62rem; padding: 8px 4px; }
  .console-actions button::before { margin-right: 4px; }
  .ca-x { display: none; }
  .ca-m { display: inline; }
  .cell { padding: 16px; gap: 14px; }
  .vt-code { font-size: .7rem; padding: 12px; }
  .fact small { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-s, .cur, .vn-f, .vn-n rect, .vn-n text, .fact small::before, .vw-dot { animation: none !important; }
}

/* v7b: use the width of big screens */
:root {
  --max: 1560px;
  --gutter-l: max(16px, 4vw, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, 4vw, env(safe-area-inset-right, 0px));
}
@media (min-width: 1100px) {
  .console { max-width: 520px; }
  .hero .hero-copy h1 { font-size: clamp(2.6rem, 3.6vw, 3.6rem); }
  .lead { max-width: 40ch; }
}

/* v8: two-line hero headline */
.hero .hero-copy h1 { max-width: none; line-height: 1.04; letter-spacing: -0.05em; font-size: clamp(1.9rem, 3vw, 3.1rem); }
.hero .hero-copy h1 .h1-a { white-space: nowrap; }
.hero .hero-copy h1 .slash { display: block; margin-top: .06em; }
@media (min-width: 1100px) { .hero .hero-copy h1 { font-size: clamp(2.4rem, 3vw, 3.4rem); } }
@media (max-width: 560px) { .hero .hero-copy h1 .h1-a { white-space: normal; } }

/* v9: one column system + matching headline scale on the home page */
:root { --col-gap: 24px; --hl: clamp(1.9rem, 3vw, 3.1rem); }
@media (min-width: 1100px) { :root { --hl: clamp(2.4rem, 3vw, 3.4rem); } }
.hero .hero-copy h1 { font-size: var(--hl); }
.section-head h2, .stealth-copy h2, .cta h2 {
  font-size: var(--hl); line-height: 1.04; letter-spacing: -0.05em; font-weight: 500; max-width: 22ch;
}
@media (min-width: 1001px) {
  .hero-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--col-gap); }
  .hero-grid .console { max-width: none; justify-self: stretch; }
  .bento { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--col-gap); }
  .cell-agents, .cell-infra { grid-column: span 3; }
  .cell-community { grid-column: span 2; grid-row: span 2; }
}
.section-head h2, .stealth-copy h2, .cta h2 { max-width: none; }
@media (max-width: 700px) { .section-head h2 br { display: none; } }
@media (min-width: 901px) {
  .logo-strip-msg { font-size: .76rem; letter-spacing: .06em; }
  .logo-strip .marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 13%, transparent 20%, transparent 80%, #000 87%, #000 96%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 13%, transparent 20%, transparent 80%, #000 87%, #000 96%, transparent 100%);
  }
}

/* v10: panel visual + api node */
.vn-api rect { fill: var(--ink-3); stroke: var(--line-strong); animation: light 3.2s infinite; animation-delay: .15s; }
.vn-api text { fill: var(--frost); }
.vn-f.f0 { stroke-dasharray: 14 200; stroke-dashoffset: 14; animation-name: travel0; }
.f1, .n1 rect, .n1 text { animation-delay: .35s; }
.f2, .n2 rect, .n2 text { animation-delay: .5s; }
.f3, .n3 rect, .n3 text { animation-delay: .65s; }
.f4, .n4 rect, .n4 text { animation-delay: .8s; }
@keyframes travel0 { 0% { stroke-dashoffset: 14; opacity: 0; } 3% { opacity: 1; } 12% { stroke-dashoffset: -50; opacity: 1; } 15%, 100% { stroke-dashoffset: -50; opacity: 0; } }
.vp-rows { padding: 6px 0; }
.vp-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 9px 14px; font: .72rem var(--f-mono); color: var(--frost-dim); transition: background .2s;
}
.vp-row + .vp-row { border-top: 1px solid var(--line); }
.vp-row:hover { background: color-mix(in srgb, var(--ink-3) 70%, transparent); }
.vp-row > span:first-child { color: var(--frost); }
.vp-row b { font-weight: 500; color: var(--frost); font-variant-numeric: tabular-nums; }
.vp-note { grid-column: span 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.vp-bar i { display: block; height: 100%; width: 0; background: var(--blade); box-shadow: 0 0 8px rgba(0,180,238,.6); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.pill { font-style: normal; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--frost-dim); white-space: nowrap; justify-self: end; transition: color .3s, border-color .3s; }
.pill.on { color: var(--blade); border-color: var(--blade); }
.pill.warn { color: #f0c46b; border-color: #f0c46b; }
@media (max-width: 560px) { .vp-row { grid-template-columns: 96px minmax(0, 1fr) auto; } .vp-row b { display: none; } .vp-note { grid-column: span 1; } }
.vis-nodes .vn-n text { font-size: 8.5px; letter-spacing: -.02em; }
.stealth .dotfig { margin-top: 0; }
/* track record ledger */
@media (min-width: 701px) { .record-list li { grid-template-columns: 210px minmax(0, 1fr); } }
.record-list .k { color: var(--blade); }
.record-top { margin-bottom: clamp(20px, 3vw, 36px); }
.record-top h2 { max-width: none; }
.record-head { align-content: start; }
#work .section-head { max-width: none; }
#work .section-head { width: fit-content; }
#work .section-head p { max-width: none; width: 0; min-width: 100%; font-size: var(--s-lg); line-height: 1.5; }
.foot-li { display: inline-flex; align-items: center; gap: 6px; }

/* v11: simple three-card row */
.bento { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: var(--col-gap, 24px); }
.bento .cell { grid-column: auto !important; grid-row: auto !important; padding: 28px; gap: 14px; }
.cell-n { font: 500 .78rem var(--f-mono); color: var(--blade); letter-spacing: .08em; }
.cell h3 { font-size: 1.3rem; }
.cell p { font-size: var(--s-md, 1rem); line-height: 1.6; }
.replaces { font-size: .74rem; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr !important; } .bento .cell { padding: 22px; } }

/* v12: the O as the hero visual */
.hero-fig { min-width: 0; position: relative; }
.hero-fig canvas { display: block; width: 100%; height: clamp(320px, 36vw, 540px); cursor: crosshair; touch-action: pan-y; }
.hero-mark { display: none; }
@media (max-width: 1000px) { .hero-fig canvas { height: clamp(260px, 70vw, 420px); } }
/* phones/tablets: skip the hero O, go straight to the content */
@media (max-width: 1000px) { .hero-fig { display: none; } }
/* phones: hero + stats + client logos all on the first screen */
@media (max-width: 700px) {
  .hero { padding-block: 26px 26px; }
  .hero-copy { gap: 16px; }
  .hero .lead { font-size: 1rem; line-height: 1.5; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 10px 16px; font-size: .88rem; }
}
@media (max-width: 700px) {
  .hero-copy > .label { display: none; }
  .hero .lead { font-size: .95rem; }
  .fact { padding-top: 12px !important; padding-bottom: 11px !important; }
  .fact strong { font-size: 1.45rem !important; }
  .logo-strip-msg { font-size: .58rem !important; letter-spacing: .04em !important; padding-top: 12px !important; white-space: nowrap !important; }
  .logo-strip .marquee { padding: 10px 0 12px !important; }
}
@media (max-width: 900px) {
  .logo-strip .marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent) !important; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent) !important; }
}
.cell-infra .cell-copy { margin-bottom: auto; }

/* v13: tidy hero spacing on desktop - first screen = hero + stats + logos, no dead bands */
.hero-copy > .label { display: none; }
@media (min-width: 1001px) {
  .hero { display: flex; align-items: center; min-height: max(480px, calc(100svh - 69px - 119px - 91px)); padding-block: 40px; }
  .hero > .wrap { width: 100%; }
  .hero-copy { gap: 24px; }
  .hero-fig canvas { height: clamp(340px, min(34vw, 100svh - 340px), 520px); }
  .hero-fig { margin-left: -14%; margin-right: calc(-1 * var(--gutter-r)); }
}
:root { --max: 1840px; }
/* soft edges on the hero O canvas so nothing ever shows a hard box */
.hero-fig canvas {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
/* hero O hint, same look as the one on the lower figure */
.hero-hint {
  position: absolute; right: 8%; bottom: 6%; pointer-events: none;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; color: var(--frost-dim);
  opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease;
}
.hero-hint.show { opacity: 1; transform: none; }

/* ================= lore v2: sticky year + focused chapters ================= */
.rail-fill { position: absolute; left: 150px; top: 0; bottom: 0; width: 2px; margin-left: -.5px; background: var(--blade);
  box-shadow: 0 0 10px rgba(0,180,238,.6); transform-origin: top; transform: scaleY(0); pointer-events: none; z-index: 0; }
.lore-on .chapter { transition: opacity .5s ease; }
.lore-on .chapter:not(.is-active) { opacity: .4; }
.lore-on .chapter.is-active::after, .lore-on .chapter.is-past::after { border-color: var(--blade); }
.lore-on .chapter.is-active::after { background: var(--blade); box-shadow: 0 0 0 6px var(--blade-soft); }
.chapter .body h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
.lore-sticky { display: none; }
@media (min-width: 1001px) {
  .lore-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
  .lore-sticky { display: grid; gap: 14px; position: sticky; top: 130px; padding-top: 4px; }
  .ls-ch { font: 500 .78rem var(--f-mono); letter-spacing: .12em; color: var(--frost-dim); text-transform: uppercase; }
  .ls-ch b { color: var(--blade); font-weight: 600; }
  .ls-year { font-family: var(--f-display); font-weight: 500; font-size: clamp(4.5rem, 9vw, 9rem); line-height: .9; letter-spacing: -.06em; color: var(--frost); }
  .ls-year.now { color: var(--blade); text-shadow: 0 0 40px rgba(0,180,238,.35); }
  .ls-year.next { -webkit-text-stroke: 1.5px var(--blade); color: transparent; }
  .ls-year.swap { animation: yswap .5s cubic-bezier(.2,.7,.2,1); }
  @keyframes yswap { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  .ls-title { font: 500 1.05rem var(--f-mono); color: var(--frost-dim); }
  .ls-bar { display: block; height: 2px; width: min(320px, 80%); background: var(--line); margin-top: 10px; overflow: hidden; }
  .ls-bar i { display: block; height: 100%; background: var(--blade); transform-origin: left; transform: scaleX(0); }
  .lore-grid .timeline::before, .lore-grid .rail-fill { left: 110px; }
  .lore-grid .chapter { grid-template-columns: 110px minmax(0, 1fr); gap: 0 40px; padding-bottom: clamp(56px, 7vw, 96px); }
  .lore-grid .chapter::after { left: 105px; }
}
@media (max-width: 700px) {
  .rail-fill { left: 5px; }
  .lore-on .chapter:not(.is-active) { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) { .ls-year.swap { animation: none; } }

/* lore: year jump buttons */
.ls-years { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; max-width: 360px; }
.ls-years button {
  font: 500 .74rem var(--f-mono); letter-spacing: .04em; color: var(--frost-dim);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  transition: color .25s, border-color .25s, background .25s;
}
.ls-years button:hover { color: var(--frost); border-color: var(--frost-dim); }
.ls-years button.on { color: var(--blade); border-color: var(--blade); background: var(--blade-soft); }
/* lore: hollow rings sit above the line so it passes behind them */
.chapter::after { background: var(--ink); z-index: 2; }
.lore-on .chapter.is-active::after { background: var(--blade); }
/* founder: normal pill buttons */
.founder .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.founder .hero-actions .btn { width: fit-content; }
.ls-year { white-space: nowrap; }
.ls-year.long { font-size: clamp(3.8rem, 7.4vw, 7.4rem); }
/* hero copy: breathe vertically on desktop (headline up, buttons down) */
@media (min-width: 1001px) { .hero-copy { gap: clamp(28px, 5.2vh, 56px); } }

/* ================= products v2 ================= */
.prod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.prod-head .product-no { font: 500 .8rem var(--f-mono); letter-spacing: .1em; color: var(--blade); }
.prod-status { font: .72rem var(--f-mono); letter-spacing: .04em; color: var(--frost-dim); white-space: nowrap; }
.prod-status .status-dot { width: 6px; height: 6px; box-shadow: 0 0 0 0 rgba(0,180,238,.5); animation: pulse 2s infinite; }
.codename-badge {
  display: inline-flex; align-items: center; padding: 3px 9px; margin-right: 6px; vertical-align: 2px;
  font: 600 .78rem var(--f-mono); letter-spacing: .08em; color: var(--blade);
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--ink);
  min-width: 7ch; justify-content: center; cursor: default; transition: border-color .25s;
}
.product:hover .codename-badge { border-color: var(--blade); }
.product .replaces { margin-top: auto; }
.product.client { display: flex; flex-direction: column; gap: 14px; }
.product .client-body { display: grid; gap: 10px; }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.more-copy { display: grid; gap: 8px; flex: 1 1 380px; min-width: 0; }
.more-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.more-actions .btn { width: fit-content; }
.btn.copy-mail { cursor: pointer; background: transparent; color: var(--frost); font-family: var(--f-body); font-size: var(--s-sm); font-weight: 500; }
/* products: real card headline under the codename tag */
.product .client-body h3 .client-full { display: block; margin-top: 10px; font-size: 1.2rem; color: var(--frost); font-weight: 500; }
/* sub-page titles: one straight line, same scale as the home page headings */
.page-hero h1 { max-width: none; font-size: var(--hl); line-height: 1.04; letter-spacing: -0.05em; font-weight: 500; }
/* sub-page intro text: run wide under the one-line title */
@media (min-width: 701px) { .page-hero .lead { max-width: 64rem; } }
/* clients: private work in three columns */
.nda-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; margin: 6px 0 4px; }
.nda-cols h4 { font: 500 .92rem var(--f-mono); color: var(--frost); margin: 0 0 6px; letter-spacing: -.01em; }
.nda-cols p { color: var(--frost-dim); font-size: var(--s-sm); margin: 0; }
@media (max-width: 800px) { .nda-cols { grid-template-columns: 1fr; } }
.cta .more-actions { flex-shrink: 0; }

/* clients v3 */
.sec-head-row { display: flex !important; align-items: center; gap: 16px; max-width: none !important; }
.sec-head-row::after { content: ""; order: 1; flex: 1; height: 1px; background: var(--line); }
.sec-head-row .sec-count { order: 2; font: 500 .74rem var(--f-mono); letter-spacing: .1em; color: var(--blade); }
@media (min-width: 1200px) {
  .client-grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .client-grid.grid-4 .client-logo { height: 104px; }
  .client-grid.grid-4 .client-logo img { max-width: 70%; }
}
.client-logo { position: relative; overflow: hidden; }
.client-logo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 50%, rgba(0,180,238,.14), transparent 70%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.client:hover .client-logo::after { opacity: 1; }
.client-grid > .client:nth-child(2) { transition-delay: .06s; }
.client-grid > .client:nth-child(3) { transition-delay: .12s; }
.client-grid > .client:nth-child(4) { transition-delay: .18s; }
.client:hover { transition-delay: 0s !important; }

/* ================= publications ================= */
.pub-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pub-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-tabs button {
  font: 500 .8rem var(--f-mono); letter-spacing: .02em; color: var(--frost-dim); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.pub-tabs button span { color: var(--frost-dim); opacity: .6; margin-left: 4px; }
.pub-tabs button:hover { color: var(--frost); border-color: var(--frost-dim); }
.pub-tabs button.on { color: var(--blade); border-color: var(--blade); background: var(--blade-soft); }
.pub-tabs button.on span { color: var(--blade); }
.pub-sort { font: .74rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--frost-dim); }
.pub-table { border-top: 1px solid var(--line-strong); }
.pub-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 160px 24px; gap: 24px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub-th span { font: .72rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--frost-dim); }
.pub-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: clamp(56px, 8vw, 110px) 16px; border-bottom: 1px solid var(--line); }
.pub-empty-k { font: 500 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blade); }
.pub-empty h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.pub-empty p { color: var(--frost-dim); max-width: 46ch; }
.pub-empty .more-actions { justify-content: center; margin-top: 8px; }
@media (max-width: 700px) { .pub-row { grid-template-columns: 90px minmax(0, 1fr); } .pub-th span:nth-child(n+3) { display: none; } }
/* publications sign-up */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sub-form { display: flex; gap: 8px; width: min(460px, 100%); margin-top: 10px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--ink-2); transition: border-color .2s; }
.sub-form:focus-within { border-color: var(--blade); }
.sub-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--frost); font: 400 .95rem var(--f-body); padding: 0 14px; }
.sub-form input::placeholder { color: var(--frost-dim); opacity: .7; }
.sub-form .btn { padding: 10px 18px; flex-shrink: 0; }
.sub-form .btn:disabled { cursor: default; }
.sub-form.done { border-color: var(--ok); }
.sub-note { font: .74rem var(--f-mono); letter-spacing: .03em; color: var(--frost-dim); }
.sub-note.ok { color: var(--ok); }
.sub-note.err { color: #f0c46b; }
@media (min-width: 1001px) { #building { display: none; } }   /* lower O: phones/tablets only */
/* desktop: tighter hand-off from What we do to Track record, with a divider */
@media (min-width: 1001px) {
  #work { padding-bottom: clamp(48px, 5vw, 72px); }
  #building + section { padding-top: clamp(48px, 5vw, 72px); border-top: 1px solid var(--line); }
}
.sec-head-row .sec-count { display: none; }

/* ================= mobile: every page matches the landing page scale ================= */
@media (max-width: 700px) {
  body { font-size: 15px; }
  section { padding-block: 44px; }
  .page-hero { padding-block: 26px 22px !important; }
  .page-hero .wrap { gap: 14px; }
  .page-hero .label, .page-hero > .wrap > .label { display: none; }
  .lead, .page-hero .lead, #work .section-head p { font-size: .95rem !important; line-height: 1.5 !important; }
  main p, .chapter .body p, .client p, .cell p, .record-list p, .nda p, .nda-cols p, .pub-empty p, .more-copy p, .cta p, .founder p { font-size: .9rem; line-height: 1.55; }
  main h3, .chapter .body h3, .client h3, .cell h3, .pub-empty h3, .founder h3 { font-size: 1.1rem; }
  .product .client-body h3 .client-full { font-size: 1.05rem; }
  .section-head { margin-bottom: 22px; gap: 10px; }
  .label { font-size: .7rem; }
  .btn { padding: 10px 16px; font-size: .88rem; }
  .layers li, .ls-years button, .pub-tabs button { font-size: .68rem; padding: 6px 10px; }
  .client-tags li, .pill { font-size: .62rem; }
  .client { padding: 16px; gap: 14px; }
  .client-logo, .client-grid.grid-4 .client-logo { height: 84px !important; }
  .client-logo img { max-height: 38px !important; max-width: 55% !important; }
  .avatars span { width: 34px !important; height: 34px !important; }
  .client-link, .replaces { font-size: .66rem; }
  .chapter { padding-bottom: 32px !important; }
  .chapter .when { font-size: .7rem; }
  .aside { font-size: .82rem; }
  .founder-mark { width: 64px !important; height: 64px !important; }
  .founder-mark img { width: 34px !important; }
  .cta { padding: 22px !important; gap: 18px; }
  .nda { padding: 20px !important; }
  .nda-cols { gap: 14px; }
  .nda-cols h4 { font-size: .85rem; }
  .prod-head { padding-bottom: 10px; }
  .prod-status { font-size: .62rem; }
  .codename-badge { font-size: .7rem; }
  .pub-bar { margin-bottom: 10px; }
  .pub-empty { padding: 40px 0; gap: 10px; }
  .sub-form input { font-size: .9rem; }
  .record-list li { padding: 14px 0; }
  .record-list .k { font-size: .66rem; }
  .post { padding: 16px 0; }
  .legal h2 { font-size: 1.05rem; }
}
