/* =====================================================================
   DUM-E Labs — site styles
   Palette is taken from the logo: pure black + warm bone white.
   ===================================================================== */

:root {
  --ink: #050505;
  --ink-2: #0a0a0a;
  --panel: #0d0d0c;
  --panel-2: #121211;
  --bone: #ece8e1;
  --bone-2: #d9d4cb;
  --dim: #a29e96;
  --mute: #6f6c66;
  --faint: #3a3936;
  --line: rgba(236, 232, 225, 0.12);
  --line-2: rgba(236, 232, 225, 0.2);
  --glow: rgba(255, 250, 240, 0.9);

  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 44px);
  --radius: 18px;
  --nav-h: 68px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--bone); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--bone); color: var(--ink); padding: 8px 14px; border-radius: 8px;
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ */
/* Backdrops                                                           */
/* ------------------------------------------------------------------ */

#brain3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.2s linear;
}

.grain {
  position: fixed; inset: -50%;
  z-index: 1; pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .foot { position: relative; z-index: 2; }

/* ------------------------------------------------------------------ */
/* Brain-mesh mark (rendered by main.js from mark-data.js)             */
/* ------------------------------------------------------------------ */

.mark { display: inline-block; width: 34px; height: 34px; flex: none; }
.mark--md { width: 56px; height: 56px; }
.mark--lg { width: 72px; height: 72px; }
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark .m-edges { stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; fill: none; opacity: 0.92; }
.mark .m-outline { stroke: var(--bone); stroke-width: 3; stroke-linejoin: round; fill: none; }
.mark .m-pulse { fill: #fff; filter: drop-shadow(0 0 2px #fff); }
.mark--md .m-edges, .mark--lg .m-edges { stroke-width: 1.8; }
.mark--md .m-outline, .mark--lg .m-outline { stroke-width: 2.2; }

/* ------------------------------------------------------------------ */
/* Nav                                                                 */
/* ------------------------------------------------------------------ */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter);
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__word {
  font-family: var(--f-display); font-weight: 500; font-size: 15px;
  letter-spacing: 0.16em; white-space: nowrap;
}
.nav__word b { font-weight: 300; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--dim);
  padding: 8px 12px; border-radius: 99px;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--bone); background: rgba(236, 232, 225, 0.07); }
.nav__toggle { display: none; }
.nav__icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav__icon:hover { color: var(--bone); border-color: var(--bone); background: rgba(236,232,225,0.06); }
.nav__icon svg { width: 18px; height: 18px; }
.btn__icon { width: 16px; height: 16px; flex: none; }

/* ------------------------------------------------------------------ */
/* Buttons & small type                                                */
/* ------------------------------------------------------------------ */

.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  border-radius: 99px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--bone);
  transition: background 0.25s, color 0.25s, transform 0.25s, border-color 0.25s;
}
.btn--sm { --h: 40px; padding: 0 18px; font-size: 12px; }
.btn--solid { background: var(--bone); color: var(--ink); }
.btn--solid:hover { background: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--bone); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--bone); background: rgba(236, 232, 225, 0.06); }
.btn[aria-pressed="true"] { border-color: var(--bone); background: rgba(236, 232, 225, 0.1); }

.eyebrow, .sec-num, .mini, .badge, .tag {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim);
}
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.hero .eyebrow, .hero .lede { text-shadow: 0 0 14px #050505, 0 0 6px #050505, 0 0 2px #050505; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bone);
  box-shadow: 0 0 0 0 rgba(236, 232, 225, 0.6);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(236, 232, 225, 0.55); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(236, 232, 225, 0); }
}
.mini { font-size: 11px; margin-bottom: 8px; }
.mini--on { color: var(--bone); }
.badge {
  display: inline-block; font-size: 11px; padding: 6px 12px;
  border: 1px dashed var(--line-2); border-radius: 99px;
}
.tag {
  font-size: 10.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-2); margin-right: 10px;
}
.tag--on { background: var(--bone); color: var(--ink); border-color: var(--bone); }

em { font-style: normal; color: var(--dim); }
strong, b { font-weight: 500; color: var(--bone); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 28px;
  max-width: 1400px;
  margin: 0 auto;
  cursor: crosshair;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,5,5,0.82) 0%, rgba(5,5,5,0.55) 38%, rgba(5,5,5,0) 62%);
}
.hero__inner { align-self: center; max-width: 760px; }
.display {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 10.5vw, 9.6rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 26px 0 30px;
}
.display em {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bone);
  font-weight: 400;
}
.lede {
  max-width: 560px;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--bone-2);
}
.lede em { color: var(--bone); font-style: italic; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 56px;
}
.hero__stats > div { padding: 18px 18px 6px 0; }
.hero__stats > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.hero__stats dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }
.hero__stats dd {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap;
}
.hero__stats small { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--dim); margin-left: 6px; }

.scroll-cue {
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
}
.scroll-cue span {
  width: 1px; height: 34px; background: linear-gradient(var(--bone), transparent);
  animation: cue 2s ease-in-out infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ------------------------------------------------------------------ */
/* Marquee (infinite horizontal scroll)                                */
/* ------------------------------------------------------------------ */

.marquee {
  position: relative; z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 22px 0;
  user-select: none;
}
.marquee__track {
  display: flex; align-items: center; gap: 40px;
  width: max-content;
  will-change: transform;
}
.marquee span {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(1.9rem, 5vw, 4.4rem);
  letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap;
  line-height: 1;
}
.marquee i {
  width: 14px; height: 14px; flex: none;
  border: 1.5px solid var(--bone); transform: rotate(45deg);
}
.marquee--outline span { color: transparent; -webkit-text-stroke: 1px var(--bone); }
.marquee--outline span:nth-of-type(2n) { color: var(--bone); -webkit-text-stroke: 0; }

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section {
  position: relative;
  padding: clamp(96px, 15vh, 170px) 0;
}
.section + .section { border-top: 1px solid var(--line); }

.sec-head { max-width: 880px; margin-bottom: clamp(48px, 7vw, 84px); }
.sec-head h2, .lab h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.06; letter-spacing: -0.03em;
  margin: 18px 0 26px;
}
.sec-lede { font-size: clamp(1rem, 1.25vw, 1.12rem); color: var(--bone-2); max-width: 720px; }

h3 {
  font-family: var(--f-display); font-weight: 500; font-size: 1.28rem; letter-spacing: -0.01em; line-height: 1.25;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- 01 the wall ---------------- */

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vs__card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  padding: 24px;
}
.vs__card--us { border-color: var(--line-2); box-shadow: 0 0 0 1px rgba(236,232,225,0.04), 0 30px 80px -40px rgba(236,232,225,0.25); }
.vs__label { display: flex; align-items: center; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; }
.vs__card svg { width: 100%; height: auto; margin: 18px 0 8px; }
.vs__foot { font-size: 0.95rem; color: var(--dim); }

.vn__box { fill: var(--ink); stroke: var(--line-2); stroke-width: 1.5; }
.vn__t { fill: var(--bone); font: 500 13px var(--f-mono); letter-spacing: 0.14em; text-anchor: middle; }
.vn__s { fill: var(--mute); font: 11px var(--f-mono); letter-spacing: 0.06em; text-anchor: middle; }
.vn__cells rect { fill: rgba(236,232,225,0.12); stroke: var(--line-2); }
.vn__bus { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 5; }
.pk { fill: var(--bone); }
.pk--out { animation: pkOut 1.6s linear infinite; }
.pk--back { animation: pkBack 1.6s linear infinite; }
.pk.d2 { animation-delay: -0.8s; }
@keyframes pkOut { from { transform: translateX(128px); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translateX(0); opacity: 0; } }
@keyframes pkBack { from { transform: translateX(-124px); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translateX(0); opacity: 0; } }

.cim rect { fill: rgba(236,232,225,0.08); stroke: var(--line-2); stroke-width: 1; transition: fill 0.5s; }
.cim rect.on { fill: var(--bone); transition: fill 0.05s; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
.fact { padding: 28px 28px 0 0; }
.fact + .fact { padding-left: 28px; border-left: 1px solid var(--line); }
.fact__n { font-family: var(--f-display); font-weight: 300; font-size: clamp(2.8rem, 5vw, 4.4rem); letter-spacing: -0.04em; line-height: 1; }
.fact__n small { font-size: 0.45em; margin-left: 4px; color: var(--dim); }
.fact__l { margin-top: 14px; color: var(--bone-2); }
.fact__src { margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute); }

/* ---------------- 02 brain ---------------- */

.brainmap { display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px; align-items: stretch; }
.brainmap__stage {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(236,232,225,0.06), transparent 70%),
    var(--ink-2);
  overflow: hidden;
}
#brainMap { width: 100%; aspect-ratio: 1.3; cursor: pointer; }
.brainmap__hint {
  position: absolute; left: 18px; bottom: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--mute);
}
.brainmap__panel { display: flex; flex-direction: column; gap: 16px; }
.regions { display: flex; flex-wrap: wrap; gap: 8px; }
.regions button {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line-2); border-radius: 99px;
  padding: 8px 13px; cursor: pointer; color: var(--dim);
  transition: all 0.2s;
}
.regions button:hover { color: var(--bone); border-color: var(--bone); }
.regions button[aria-selected="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.region-card {
  flex: 1;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.region-card__kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.region-card h3 { font-size: 1.6rem; font-weight: 400; }
.region-card__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 0.95rem; color: var(--bone-2); }
.region-card__stat {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; color: var(--dim); letter-spacing: 0.04em;
}
.region-card.swap { animation: swap 0.45s ease; }
@keyframes swap { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.brainfacts {
  display: grid; grid-template-columns: repeat(6, 1fr);
  margin-top: 28px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.brainfacts > div { padding: 22px 20px; }
.brainfacts > div + div { border-left: 1px solid var(--line); }
.brainfacts b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; letter-spacing: -0.02em; }
.brainfacts span { display: block; margin-top: 4px; font-size: 0.85rem; color: var(--dim); line-height: 1.4; }

.neuron {
  margin-top: clamp(64px, 9vw, 120px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  padding: clamp(20px, 3vw, 36px);
}
.neuron__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.neuron__head h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 400; }
.neuron__head p { max-width: 460px; color: var(--dim); }
.neuron__viz { margin-top: 20px; }
#neuronSvg { width: 100%; height: auto; }
.nr-dend path, .nr-term path { fill: none; stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; opacity: 0.85; }
.nr-soma { fill: var(--ink); stroke: var(--bone); stroke-width: 2.4; transition: fill 0.15s; }
.nr-soma.fire { fill: var(--bone); }
.nr-axon { stroke: var(--bone); stroke-width: 2.4; opacity: 0.85; }
.nr-myelin rect { fill: var(--panel-2); stroke: var(--bone); stroke-width: 1.6; }
.nr-term circle { fill: var(--ink); stroke: var(--bone); stroke-width: 2; transition: fill 0.2s; }
.nr-term circle.hit { fill: var(--bone); }
.nr-labels text { fill: var(--mute); font: 11px var(--f-mono); letter-spacing: 0.18em; text-anchor: middle; }
#neuronPulses circle { fill: #fff; filter: drop-shadow(0 0 4px #fff); }

.scope { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.scope__head { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--mute); text-transform: uppercase; }
.scope__legend i { display: inline-block; width: 18px; border-top: 1px dashed var(--dim); vertical-align: middle; margin-right: 8px; }
#lifScope { width: 100%; height: 120px; margin-top: 8px; }

.map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.map li {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 0.9rem;
}
.map__b { font-weight: 500; white-space: nowrap; }
.map__arrow { color: var(--mute); }
.map__c { color: var(--dim); line-height: 1.4; }

/* ---------------- 03 chip story ---------------- */

.section--chip {
  background:
    linear-gradient(var(--ink), transparent 140px),
    repeating-linear-gradient(0deg, rgba(236,232,225,0.025) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(236,232,225,0.025) 0 1px, transparent 1px 64px);
}
.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter);
}
.story__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  grid-column: 2; grid-row: 1;
}
#chip3d { width: 100%; height: 100%; }
.story__steps { grid-column: 1; grid-row: 1; padding: 10vh 0 30vh; }
.step {
  min-height: 78vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 440px;
  opacity: 0.25; transition: opacity 0.5s;
}
.step.is-active { opacity: 1; }
.step__n { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--mute); }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; margin: 10px 0 16px; letter-spacing: -0.02em; }
.step p:last-child { color: var(--bone-2); }

.chip-labels span {
  position: absolute; left: 0; top: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bone); white-space: nowrap;
  padding: 5px 10px 5px 26px;
  background: rgba(5,5,5,0.7); border: 1px solid var(--line-2); border-radius: 99px;
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.chip-labels span::before {
  content: ""; position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--bone);
}
.chip-labels.show span { opacity: 1; }
.chip-hud {
  position: absolute; right: 20px; bottom: 24px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line); background: rgba(5,5,5,0.6); padding: 8px 14px; border-radius: 99px;
}
.chip-hud__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bone); animation: ping 2.4s infinite; }

/* crossbar demo */
.xbar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(40px, 6vw, 80px);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  padding: clamp(20px, 3vw, 40px);
}
.xbar__intro h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; margin: 12px 0 14px; }
.xbar__intro > p { color: var(--bone-2); }
.xbar__ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.xbar__meter { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border-top: 1px solid var(--line); }
.xbar__meter > div { padding-top: 12px; }
.xbar__meter dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.xbar__meter dd { font-family: var(--f-display); font-size: 1.4rem; }

.xbar__grid {
  --cols: 4;
  display: grid;
  grid-template-columns: 74px repeat(var(--cols), minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  width: 100%;
  max-width: 540px;
  justify-self: center;
  user-select: none;
}
.xb-in {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; color: var(--dim);
  background: transparent; border: 1px solid var(--line-2); border-radius: 99px;
  padding: 0 10px; height: 34px; cursor: pointer; align-self: center;
}
.xb-in i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--dim); flex: none; }
.xb-in.on { color: var(--ink); background: var(--bone); border-color: var(--bone); }
.xb-in.on i { background: var(--ink); border-color: var(--ink); }
.xb-cell {
  position: relative; aspect-ratio: 1.6; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-2);
  background: rgba(236,232,225, var(--g, 0.3));
  transition: background 0.3s, box-shadow 0.2s;
}
.xb-cell::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.85), 0 0 12px rgba(255,255,255,0.28);
  opacity: 0; transition: opacity 0.35s;
}
.xb-cell.flow::after { opacity: 1; transition: opacity 0.05s; }
.xb-cell.learn { animation: learn 0.6s ease; }
@keyframes learn { 50% { transform: scale(0.86); } }
.xb-corner { font-family: var(--f-mono); font-size: 10px; color: var(--mute); align-self: end; letter-spacing: 0.08em; }
.xb-neuron {
  position: relative; height: 110px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--ink);
}
.xb-neuron .v { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, var(--bone-2), rgba(236,232,225,0.35)); }
.xb-neuron .th { position: absolute; left: 0; right: 0; top: 18%; border-top: 1px dashed var(--dim); }
.xb-neuron .lbl { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--f-mono); font-size: 10px; color: var(--mute); mix-blend-mode: difference; }
.xb-neuron.fire { box-shadow: 0 0 0 2px #fff, 0 0 30px rgba(255,255,255,0.7); }
.xb-neuron.fire .v { background: #fff; }
.xb-cur { font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); text-align: center; }

/* spec */
.spec { margin-top: clamp(40px, 6vw, 80px); }
.spec__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.spec__head h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; }
.spec__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.spec__grid > div { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec__grid > div:nth-child(4n) { border-right: 0; }
.spec__grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.spec__grid dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.spec__grid dd { margin-top: 8px; font-size: 0.98rem; line-height: 1.45; }

/* compare */
.compare { margin-top: clamp(40px, 6vw, 80px); }
.compare h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; margin-bottom: 20px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.95rem; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-family: var(--f-mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
thead th small { color: var(--mute); font-size: 10px; margin-left: 4px; }
tbody th { font-weight: 500; color: var(--bone); width: 24%; }
td { color: var(--bone-2); }
.us { background: rgba(236,232,225,0.06); color: var(--bone); }
thead th.us { color: var(--bone); }

/* ---------------- 04 SOMA ---------------- */

.soma { display: grid; grid-template-columns: 1fr; gap: 14px; }
.soma__stage {
  position: relative;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: radial-gradient(70% 70% at 50% 50%, rgba(236,232,225,0.05), transparent 70%), var(--ink-2);
  overflow: hidden;
}
#somaNet { width: 100%; aspect-ratio: 2.1; cursor: crosshair; }
.soma__hud {
  position: absolute; top: 16px; left: 16px;
  display: flex; flex-wrap: wrap; gap: 8px;
  pointer-events: none;
}
.soma__hud > div {
  background: rgba(5,5,5,0.72); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.soma__hud span { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.soma__hud b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.soma__ctrl { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.soma__ctrl .btn--ghost { background: rgba(5,5,5,0.6); }
.soma__hint { font-family: var(--f-mono); font-size: 11px; color: var(--mute); letter-spacing: 0.08em; margin-left: 6px; }
.soma__stage.reward { box-shadow: inset 0 0 120px rgba(255,250,240,0.18); }
.soma__legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.85rem; color: var(--dim); }
.lg { display: inline-block; vertical-align: middle; margin-right: 8px; }
.lg--n { width: 10px; height: 10px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 8px #fff; }
.lg--s { width: 22px; height: 3px; background: var(--bone); opacity: 0.6; }
.lg--g { width: 22px; border-top: 2px dashed var(--bone); }
.lg--p { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(255,255,255,.7); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  background: linear-gradient(180deg, var(--panel), transparent);
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card__k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }
.card h3 { margin: 12px 0 10px; }
.card p:last-child { color: var(--dim); font-size: 0.95rem; }

.duel {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0;
  margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.duel__col { padding: 28px; }
.duel__col--us { background: rgba(236,232,225,0.06); }
.duel__h { font-family: var(--f-display); font-size: 1.2rem; font-weight: 500; margin-bottom: 14px; }
.duel li { padding: 9px 0; border-top: 1px solid var(--line); color: var(--dim); }
.duel__col--us li { color: var(--bone); }
.duel__vs {
  display: grid; place-items: center; padding: 0 18px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}

/* ---------------- 05 roadmap ---------------- */

.road { position: relative; display: grid; gap: 0; padding-left: 40px; }
.road::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2);
}
.road::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 1px;
  height: var(--fill, 0%); background: var(--bone);
  box-shadow: 0 0 10px rgba(255,255,255,0.7);
}
.road__item { position: relative; padding: 6px 0 52px; max-width: 760px; }
.road__item::before {
  content: ""; position: absolute; left: -40px; top: 10px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink); border: 1.5px solid var(--bone); z-index: 1;
}
.road__item.is-now::before { background: var(--bone); box-shadow: 0 0 0 6px rgba(236,232,225,0.15); }
.road__phase { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.road__item h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 400; margin: 8px 0 10px; letter-spacing: -0.02em; }
.road__item p:last-child { color: var(--dim); }
.road__item--horizon h3 { font-weight: 300; }
.road__item--horizon::before { width: 21px; height: 21px; left: -43px; top: 7px; border-style: dashed; }

/* ---------------- 06 lab ---------------- */

.lab { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.lab__copy .sec-lede { margin-bottom: 0; }
.lab__side {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
}
.who { display: flex; gap: 18px; align-items: center; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.who__name { font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; }
.who__role { color: var(--dim); font-size: 0.92rem; }
.who__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.who__links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--bone); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px 6px 10px;
  transition: border-color 0.2s, background 0.2s;
}
.who__links a:hover { border-color: var(--bone); background: rgba(236,232,225,0.06); }
.who__links svg { width: 14px; height: 14px; }
.roles li { padding: 9px 0; border-top: 1px solid var(--line); color: var(--bone-2); }
.roles li::before { content: "◇"; margin-right: 10px; color: var(--mute); }
.agent { margin-top: 22px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--bone-2); font-size: 0.95rem; }

/* ------------------------------------------------------------------ */
/* Footer & back-to-top                                                */
/* ------------------------------------------------------------------ */

.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--ink); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.foot__brand { display: flex; align-items: center; gap: 16px; }
.foot__word { font-family: var(--f-display); font-weight: 500; letter-spacing: 0.16em; font-size: 1.1rem; }
.foot__word b { font-weight: 300; }
.foot__tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot__links a { color: var(--dim); text-decoration: none; font-size: 0.95rem; }
.foot__links a:hover { color: var(--bone); }
.foot__social { display: flex; gap: 10px; }
.foot__social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.foot__social a:hover { color: var(--bone); border-color: var(--bone); background: rgba(236,232,225,0.06); }
.foot__social svg { width: 18px; height: 18px; }
.foot__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; font-size: 0.82rem; color: var(--mute); }
.foot__loop { font-family: var(--f-mono); letter-spacing: 0.08em; }

.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 70;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--bone); color: var(--ink); border: 0;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(236, 232, 225, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s, transform 0.3s, visibility 0s linear 0.3s, background 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s, transform 0.3s, background 0.2s; }
.to-top:hover { background: #fff; transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .nav__cta { display: none; }
  .brainfacts { grid-template-columns: repeat(3, 1fr); }
  .brainfacts > div:nth-child(4) { border-left: 0; }
  .brainfacts > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .spec__grid { grid-template-columns: repeat(2, 1fr); }
  .spec__grid > div:nth-child(4n) { border-right: 1px solid var(--line); }
  .spec__grid > div:nth-child(2n) { border-right: 0; }
  .spec__grid > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .spec__grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .map { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  .nav { gap: 12px; }
  .nav__icon { margin-left: auto; width: 44px; height: 44px; background: rgba(5,5,5,0.6); }
  .nav__toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(5,5,5,0.6); cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--bone); transition: transform 0.3s; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    background: rgba(5,5,5,0.96); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all 0.25s;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: 14px; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }

  .hero::before { background: linear-gradient(180deg, rgba(5,5,5,0) 0%, rgba(5,5,5,0.5) 42%, rgba(5,5,5,0.78) 100%); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }

  .vs, .brainmap, .xbar, .lab { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 24px 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); }

  .story { grid-template-columns: 1fr; padding: 0; }
  .story__stage {
    grid-column: 1; grid-row: 1;
    top: var(--nav-h); height: 46vh; height: 46svh; z-index: 3;
    background: linear-gradient(var(--ink) 82%, rgba(5,5,5,0));
  }
  .story__steps { grid-column: 1; grid-row: 2; padding: 0 var(--gutter) 30vh; position: relative; z-index: 1; }
  .step {
    min-height: 60vh; justify-content: flex-start; max-width: none; opacity: 1;
  }
  .step > * { position: relative; }
  .step { padding: 22px; margin-bottom: 30vh; background: rgba(10,10,10,0.88); border: 1px solid var(--line); border-radius: var(--radius); min-height: 0; }
  .chip-hud { right: auto; left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; font-size: 10px; }

  #somaNet { aspect-ratio: 0.95; }
  .soma__hud > div { padding: 5px 9px; }
  .soma__hint { display: none; }
  .duel { grid-template-columns: 1fr; }
  .duel__vs { padding: 10px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brainfacts { grid-template-columns: repeat(2, 1fr); }
  .brainfacts > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .brainfacts > div:nth-child(2n) { border-left: 1px solid var(--line); }
  .brainfacts > div:nth-child(-n+2) { border-top: 0; }
  .map { grid-template-columns: 1fr; }
  .spec__grid { grid-template-columns: 1fr; }
  .spec__grid > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .spec__grid > div:last-child { border-bottom: 0 !important; }
  .region-card__cols { grid-template-columns: 1fr; }
  .xbar__grid { grid-template-columns: 62px repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
  .xb-in { padding: 0 8px; font-size: 10px; }
  .nav__word { font-size: 13px; }
  .foot__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .chip-hud__dot, .scroll-cue span, .pk { animation: none; }
  .card:hover { transform: none; }
}
