@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #03060b;
  --panel: rgba(6, 9, 15, .82);
  --white: #f5f7fb;
  --muted: rgba(235, 242, 250, .56);
  --line: rgba(255, 255, 255, .14);
  --cyan: #68d8ff;
  --gold: #e9b96a;
  --violet: #b89cff;
  --ease: cubic-bezier(.22, .78, .2, 1);
  --wrap: min(1420px, calc(100vw - 96px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; overflow-x: hidden; color: var(--white); background: var(--bg); font-family: Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

#stars { position: fixed; z-index: 20; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; opacity: .7; }

.mark {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 32px;
  width: 38px;
  height: 38px;
  color: rgba(255,255,255,.9);
  filter: drop-shadow(0 0 14px rgba(104,216,255,.35));
}
.mark svg { width: 100%; height: 100%; overflow: visible; }

.formula-nav {
  position: fixed;
  z-index: 90;
  top: 18px;
  left: 50%;
  width: min(920px, calc(100vw - 180px));
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(4,7,12,.62);
  box-shadow: 0 16px 50px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(18px) saturate(1.25);
  transform: translateX(-50%);
}
.formula-nav a {
  min-width: 0;
  height: 50px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}
.formula-nav a b { color: var(--cyan); font: 18px/1 "Cambria Math", Cambria, serif; }
.formula-nav a.active, .formula-nav a:hover {
  color: #fff;
  background: rgba(104,216,255,.1);
  box-shadow: inset 0 0 0 1px rgba(104,216,255,.2), 0 0 24px rgba(104,216,255,.08);
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  overflow: hidden;
  background: #03060b;
}
.hero-image {
  position: absolute;
  inset: 0;
  background: url("assets/apollo-gaia-hero.webp") center center / cover no-repeat;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2,5,10,.36), transparent 23%, transparent 70%, rgba(2,5,10,.75)),
    linear-gradient(90deg, rgba(2,5,10,.28), transparent 42%, rgba(2,5,10,.12));
}
.hero-orbits { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.hero-orbit {
  position: absolute;
  left: 72%;
  top: 42%;
  width: min(72vw, 1020px);
  aspect-ratio: 2.1 / 1;
  border: 1px solid rgba(104,216,255,.24);
  border-radius: 50%;
  transform: translate(-50%,-50%) rotate(-12deg);
  animation: orbit-spin 24s linear infinite;
}
.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(233,185,106,.18);
  border-radius: inherit;
}
.hero-orbit i {
  position: absolute;
  left: 8%;
  top: 50%;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #aeeaff, #23718d 45%, #07131e 72%);
  box-shadow: 0 0 25px rgba(104,216,255,.48);
  transform: translate(-50%,-50%);
}
.hero-orbit.orbit-two { width: min(54vw,760px); animation-duration: 16s; animation-direction: reverse; transform: translate(-50%,-50%) rotate(27deg); }
.hero-orbit.orbit-two i { left: 84%; width: 22px; background: radial-gradient(circle at 30% 28%, #fff5ca, #bd7628 45%, #1b0b04 74%); box-shadow: 0 0 22px rgba(233,185,106,.6); }
.hero-orbit.orbit-three { width: min(88vw,1260px); animation-duration: 38s; transform: translate(-50%,-50%) rotate(8deg); }
.hero-orbit.orbit-three i { left: 62%; top: 0; width: 52px; background: radial-gradient(circle at 35% 30%, #d9c5ff, #503f7e 43%, #080612 73%); }

.atom { position: absolute; left: 20%; top: 38%; width: 220px; aspect-ratio: 1; transform: translate(-50%,-50%); opacity: .72; }
.atom i { position: absolute; inset: 34% 0; border: 1px solid rgba(104,216,255,.6); border-radius: 50%; animation: atom-spin 9s linear infinite; }
.atom i::after { content:""; position:absolute; left:5%; top:50%; width:8px; height:8px; border-radius:50%; background:#c7f4ff; box-shadow:0 0 13px var(--cyan); transform:translate(-50%,-50%); }
.atom i:nth-child(2) { transform: rotate(60deg); animation-duration: 7s; animation-direction: reverse; }
.atom i:nth-child(3) { transform: rotate(120deg); animation-duration: 11s; }
.atom b { position:absolute; left:50%; top:50%; width:20px; height:20px; border-radius:50%; background:var(--gold); box-shadow:0 0 34px rgba(233,185,106,.9); transform:translate(-50%,-50%); }

.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: 28px; width: 32px; height: 52px; border: 1px solid rgba(255,255,255,.35); border-radius: 20px; transform: translateX(-50%); }
.scroll-cue i { position:absolute; left:50%; top:9px; width:4px; height:4px; border-radius:50%; background:var(--cyan); box-shadow:0 0 10px var(--cyan); animation:scroll-dot 1.8s ease-in-out infinite; }

.domain-deck {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding: 118px 38px 78px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%,rgba(54,104,147,.2),transparent 38%),
    radial-gradient(circle at 16% 80%,rgba(101,67,150,.18),transparent 30%),
    #03060b;
}
.domain-deck::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: radial-gradient(circle,rgba(255,255,255,.75) 0 1px,transparent 1.5px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(transparent,#000 20%,#000 82%,transparent);
  mask-image: linear-gradient(transparent,#000 20%,#000 82%,transparent);
}
.deck-grid {
  position: relative;
  z-index: 2;
  width: min(1500px,100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: clamp(14px,1.8vw,28px);
  align-items: start;
}
.domain-choice {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  perspective: 900px;
}
.playing-card {
  --card-accent: var(--cyan);
  position: relative;
  width: 100%;
  aspect-ratio: .69;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--card-accent) 24%,transparent),transparent 42%),
    linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.01) 36%,rgba(0,0,0,.34)),
    #080d15;
  box-shadow: 0 24px 60px rgba(0,0,0,.4),inset 0 0 50px rgba(255,255,255,.025);
  transform-style: preserve-3d;
  transition: transform .5s var(--ease),border-color .35s ease,box-shadow .35s ease;
}
.playing-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb,var(--card-accent) 48%,transparent);
  border-radius: 10px;
  pointer-events: none;
}
.playing-card::after {
  content: "";
  position: absolute;
  left: -70%;
  top: -30%;
  width: 65%;
  height: 160%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.13),transparent);
  transform: rotate(18deg);
  transition: left .65s var(--ease);
}
.domain-choice:hover .playing-card,.domain-choice:focus-visible .playing-card {
  border-color: color-mix(in srgb,var(--card-accent) 78%,white);
  box-shadow: 0 38px 80px rgba(0,0,0,.55),0 0 34px color-mix(in srgb,var(--card-accent) 25%,transparent);
  transform: translateY(-14px) rotateX(5deg) rotateY(-3deg);
}
.domain-choice:hover .playing-card::after,.domain-choice:focus-visible .playing-card::after { left: 120%; }
.suit-diamond,.suit-heart { --card-accent: var(--gold); }
.suit-club { --card-accent: var(--violet); }
.card-corner {
  position: absolute;
  left: 18px;
  top: 16px;
  color: var(--card-accent);
  font: 600 clamp(14px,1.4vw,21px)/.92 "Cambria Math",serif;
  text-align: center;
}
.card-corner.bottom { left: auto; right: 18px; top: auto; bottom: 16px; transform: rotate(180deg); }
.card-core {
  position: absolute;
  inset: 20% 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: center;
}
.card-core b {
  color: var(--card-accent);
  font: clamp(38px,4.2vw,72px)/1 "Cambria Math",Cambria,serif;
  text-shadow: 0 0 28px color-mix(in srgb,var(--card-accent) 55%,transparent);
}
.card-core b sub { font-size: .42em; }
.card-core strong { font-size: clamp(10px,1vw,14px); letter-spacing: .08em; text-transform: uppercase; }
.card-core small { color: rgba(255,255,255,.58); font: clamp(12px,1.15vw,18px)/1.25 "Cambria Math",Cambria,serif; }
.card-core small sub,.card-core small sup { font-size:.55em; }

.die {
  width: clamp(54px,5.2vw,76px);
  aspect-ratio: 1;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  grid-template-rows: repeat(3,1fr);
  gap: 5px;
  border: 1px solid rgba(255,255,255,.54);
  border-radius: 15px;
  background: linear-gradient(145deg,#f8fbff,#aebbc8);
  box-shadow: 0 12px 0 #65717d,0 25px 34px rgba(0,0,0,.5),inset 4px 4px 8px #fff,inset -5px -5px 10px rgba(28,44,58,.2);
  transform: rotateX(8deg) rotateZ(-3deg);
  transition: transform .55s var(--ease),box-shadow .45s ease;
}
.die i {
  align-self: center;
  justify-self: center;
  width: clamp(7px,.7vw,10px);
  aspect-ratio: 1;
  visibility: hidden;
  border-radius: 50%;
  background: #08121d;
  box-shadow: inset 1px 1px 2px #000,0 0 6px rgba(104,216,255,.45);
}
.die-1 i:nth-child(5),
.die-2 i:nth-child(1),.die-2 i:nth-child(9),
.die-3 i:nth-child(1),.die-3 i:nth-child(5),.die-3 i:nth-child(9),
.die-4 i:nth-child(1),.die-4 i:nth-child(3),.die-4 i:nth-child(7),.die-4 i:nth-child(9),
.die-5 i:nth-child(1),.die-5 i:nth-child(3),.die-5 i:nth-child(5),.die-5 i:nth-child(7),.die-5 i:nth-child(9),
.die-6 i:nth-child(1),.die-6 i:nth-child(3),.die-6 i:nth-child(4),.die-6 i:nth-child(6),.die-6 i:nth-child(7),.die-6 i:nth-child(9) { visibility: visible; }
.domain-choice:hover .die,.domain-choice:focus-visible .die {
  transform: translateY(-7px) rotateX(28deg) rotateY(26deg) rotateZ(8deg);
  box-shadow: 10px 16px 0 #65717d,0 30px 42px rgba(0,0,0,.52),inset 4px 4px 8px #fff,inset -5px -5px 10px rgba(28,44,58,.2);
}

.formula-section {
  --scene: none;
  --focus: center;
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 130px 0 86px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.formula-section::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;
  background: var(--scene) var(--focus) / cover no-repeat;
}
.formula-section::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2,5,10,.9) 0%, rgba(2,5,10,.66) 49%, rgba(2,5,10,.58) 100%),
    linear-gradient(0deg, rgba(2,5,10,.82), transparent 42%, rgba(2,5,10,.52));
}
.quantum-scene { --scene: url("assets/humanoid-quantum.webp"); --focus: center; }
.cosmos-scene { --scene: url("assets/humanoid-spacetime.webp"); --focus: center; }
.deep-scene { --scene: url("assets/humanoid-deep-learning.webp"); --focus: center; }
.imitation-scene { --scene: url("assets/humanoid-imitation.webp"); --focus: center; }
.reinforcement-scene { --scene: url("assets/humanoid-reinforcement.webp"); --focus: center; }
.vla-scene { --scene: url("assets/humanoid-vla.webp"); --focus: center; }

.formula-shell {
  position: relative;
  z-index: 3;
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  align-items: center;
  gap: clamp(48px, 7vw, 118px);
}
.formula-cluster { min-width: 0; text-shadow: 0 2px 22px rgba(0,0,0,.88); }
.formula {
  font-family: "Cambria Math", Cambria, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.formula.primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .18em;
  font-size: clamp(42px, 5.45vw, 88px);
  line-height: 1.08;
}
.deep-scene .formula.primary, .imitation-scene .formula.primary, .reinforcement-scene .formula.primary { font-size: clamp(32px, 3.8vw, 62px); }
.vla-scene .formula.primary { font-size: clamp(38px, 4.8vw, 76px); }
.accent { color: var(--cyan); text-shadow: 0 0 30px rgba(104,216,255,.48); }
.frac { display:inline-flex; min-width:1.2em; flex-direction:column; align-items:center; vertical-align:middle; line-height:1; }
.frac b { padding:.05em .14em; font-weight:400; }
.frac b:first-child { border-bottom:2px solid currentColor; }
.frac.small { font-size:.75em; }
.frac.small b:first-child { border-bottom-width:1px; }
.formula sub, .formula sup, .formula-bank sub, .formula-bank sup { font-size:.56em; }
.formula-bank {
  margin-top: clamp(44px,5.5vw,82px);
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  border-top: 1px solid rgba(255,255,255,.19);
  border-left: 1px solid rgba(255,255,255,.09);
  font: clamp(20px,1.8vw,30px)/1.35 "Cambria Math",Cambria,serif;
}
.formula-bank > div {
  min-height: 94px;
  padding: 23px 26px;
  display:flex;
  align-items:center;
  border-right:1px solid rgba(255,255,255,.09);
  border-bottom:1px solid rgba(255,255,255,.09);
  background:rgba(4,8,14,.26);
  backdrop-filter: blur(2px);
}
.formula-bank > div:last-child:nth-child(odd) { grid-column: 1 / 3; }

.control-panel {
  position: relative;
  padding: clamp(26px,3vw,42px);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(4,7,12,.82);
  box-shadow: 0 28px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.control-panel::before { content:""; position:absolute; inset:0; border-left:2px solid var(--cyan); pointer-events:none; opacity:.82; }
.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 18px;
  color: rgba(255,255,255,.86);
  font: 22px/1 "Cambria Math",Cambria,serif;
}
.control-row + .control-row { margin-top: 27px; }
.control-row output { color: var(--cyan); font: 600 14px/1.2 Consolas,monospace; }
.control-row input { grid-column: 1 / 3; width:100%; margin-top:13px; appearance:none; height:2px; border:0; background:linear-gradient(90deg,var(--cyan) var(--progress,50%),rgba(255,255,255,.2) var(--progress,50%)); outline:none; }
.control-row input::-webkit-slider-thumb { appearance:none; width:17px; height:17px; border:2px solid var(--cyan); border-radius:50%; background:#081019; box-shadow:0 0 0 4px rgba(104,216,255,.12),0 0 18px rgba(104,216,255,.45); cursor:pointer; }
.control-row input::-moz-range-thumb { width:14px; height:14px; border:2px solid var(--cyan); border-radius:50%; background:#081019; box-shadow:0 0 0 4px rgba(104,216,255,.12); cursor:pointer; }
.mini-plot { width:100%; height:142px; margin-top:30px; display:block; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.readouts { margin-top:28px; display:grid; grid-template-columns:repeat(3,1fr); border:1px solid var(--line); }
.readouts > div { min-width:0; min-height:72px; padding:16px 12px; display:flex; flex-direction:column; justify-content:center; gap:8px; border-right:1px solid var(--line); }
.readouts > div:last-child { border-right:0; }
.readouts small { color:rgba(255,255,255,.38); font:10px/1.1 Inter,sans-serif; letter-spacing:.02em; }
.readouts strong { overflow:hidden; color:#fff; font:500 clamp(13px,1.3vw,18px)/1.1 Consolas,monospace; text-overflow:ellipsis; }

.field-orbits { position:absolute; z-index:0; left:67%; top:50%; width:min(84vw,1240px); aspect-ratio:1; opacity:.2; transform:translate(-50%,-50%); pointer-events:none; }
.field-orbits i { position:absolute; left:50%; top:50%; width:84%; height:34%; border:1px solid var(--cyan); border-radius:50%; transform:translate(-50%,-50%) rotate(14deg); animation:field-spin 28s linear infinite; }
.field-orbits i::after { content:""; position:absolute; left:7%; top:50%; width:14px; height:14px; border-radius:50%; background:var(--cyan); box-shadow:0 0 24px var(--cyan); transform:translate(-50%,-50%); }
.field-orbits i:nth-child(2) { width:60%; height:60%; transform:translate(-50%,-50%) rotate(62deg); animation-duration:18s; animation-direction:reverse; }
.field-orbits i:nth-child(3) { width:38%; height:78%; transform:translate(-50%,-50%) rotate(116deg); animation-duration:35s; }
.field-orbits.warm i,.field-orbits.gold i { border-color:var(--gold); }.field-orbits.warm i::after,.field-orbits.gold i::after { background:var(--gold); box-shadow:0 0 24px var(--gold); }
.field-orbits.violet i { border-color:var(--violet); }.field-orbits.violet i::after { background:var(--violet); box-shadow:0 0 24px var(--violet); }

.spacetime-visual { position:relative; height:150px; margin-top:30px; overflow:hidden; border-block:1px solid var(--line); perspective:450px; }
.spacetime-visual i { position:absolute; left:50%; top:52%; width:180px; height:180px; border:1px solid var(--cyan); transform:translate(-50%,-50%) rotateX(66deg) rotateZ(45deg); animation:grid-warp 8s ease-in-out infinite alternate; }
.spacetime-visual i:nth-child(2) { width:110px; height:110px; border-color:var(--gold); animation-direction:alternate-reverse; }
.spacetime-visual b { position:absolute; left:50%; top:50%; width:28px; height:28px; border-radius:50%; background:#020307; box-shadow:0 0 30px 12px rgba(104,216,255,.18); transform:translate(-50%,-50%); }

.neural-visual { position:relative; height:150px; margin-top:28px; border-block:1px solid var(--line); }
.neural-visual::before,.neural-visual::after { content:""; position:absolute; inset:18px 8%; background:repeating-linear-gradient(14deg,transparent 0 15px,rgba(184,156,255,.2) 16px 17px,transparent 18px 30px); clip-path:polygon(0 45%,20% 10%,42% 67%,62% 20%,82% 73%,100% 35%,100% 65%,82% 100%,62% 48%,42% 95%,20% 38%,0 76%); }
.neural-visual::after { transform:scaleY(-1); opacity:.6; }
.neural-visual i { position:absolute; z-index:2; width:10px; height:10px; border-radius:50%; background:var(--violet); box-shadow:0 0 16px var(--violet); animation:node-pulse 2.4s ease-in-out infinite; }
.neural-visual i:nth-child(1){left:8%;top:47%}.neural-visual i:nth-child(2){left:22%;top:20%;animation-delay:.2s}.neural-visual i:nth-child(3){left:22%;top:74%;animation-delay:.4s}.neural-visual i:nth-child(4){left:43%;top:38%;animation-delay:.6s}.neural-visual i:nth-child(5){left:43%;top:72%;animation-delay:.8s}.neural-visual i:nth-child(6){left:63%;top:22%;animation-delay:1s}.neural-visual i:nth-child(7){left:63%;top:68%;animation-delay:1.2s}.neural-visual i:nth-child(8){left:82%;top:38%;animation-delay:1.4s}.neural-visual i:nth-child(9){left:92%;top:52%;animation-delay:1.6s}

.mirror-visual { position:relative; height:150px; margin-top:28px; border-block:1px solid var(--line); }
.mirror-visual i,.mirror-visual b { position:absolute; top:50%; width:64px; height:90px; border:1px solid var(--cyan); border-radius:32px 32px 20px 20px; transform:translateY(-50%); }
.mirror-visual i { left:18%; }.mirror-visual b { right:18%; border-color:var(--gold); }
.mirror-visual i::before,.mirror-visual b::before { content:""; position:absolute; left:50%; top:16px; width:18px; height:18px; border-radius:50%; background:currentColor; box-shadow:0 0 14px currentColor; transform:translateX(-50%); }
.mirror-visual span { position:absolute; left:33%; right:33%; top:50%; border-top:1px dashed rgba(255,255,255,.45); animation:pulse-line 2s ease-in-out infinite; }

.trajectory-visual { width:100%; height:140px; margin-top:28px; border-block:1px solid var(--line); overflow:visible; }
.trajectory-visual path { fill:none; stroke:var(--cyan); stroke-width:2; stroke-dasharray:9 8; vector-effect:non-scaling-stroke; animation:dash 2.6s linear infinite; }
.trajectory-visual circle { fill:#071019; stroke:var(--gold); stroke-width:2; vector-effect:non-scaling-stroke; }

.vla-visual { position:relative; height:150px; margin-top:28px; border-block:1px solid var(--line); overflow:hidden; }
.vla-visual i { position:absolute; left:10%; top:30%; width:64px; height:64px; border:1px solid var(--cyan); transform:rotate(45deg); }
.vla-visual i:nth-child(2) { left:43%; width:78px; height:78px; border-radius:50%; border-style:dashed; animation:orbit-spin 7s linear infinite; }
.vla-visual b { position:absolute; right:12%; top:33%; width:80px; height:58px; border:1px solid var(--gold); border-radius:50% 50% 18px 18px; }
.vla-visual span { position:absolute; left:26%; right:21%; top:50%; border-top:2px dashed rgba(104,216,255,.72); animation:dash 2.4s linear infinite; }

.reveal { opacity:0; transform:translateY(30px); transition:opacity .9s var(--ease),transform .9s var(--ease); }
.reveal.visible { opacity:1; transform:translateY(0); }
.control-panel.reveal { transition-delay:.12s; }

@keyframes orbit-spin { to { transform:translate(-50%,-50%) rotate(348deg); } }
@keyframes atom-spin { to { transform:rotate(360deg); } }
@keyframes field-spin { to { transform:translate(-50%,-50%) rotate(374deg); } }
@keyframes scroll-dot { 0%{transform:translate(-50%,0);opacity:0}35%{opacity:1}100%{transform:translate(-50%,27px);opacity:0} }
@keyframes grid-warp { to { transform:translate(-50%,-50%) rotateX(58deg) rotateZ(135deg) scale(1.12); } }
@keyframes node-pulse { 0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:1;transform:scale(1.25)} }
@keyframes pulse-line { 0%,100%{opacity:.2;transform:scaleX(.3)}50%{opacity:1;transform:scaleX(1)} }
@keyframes dash { to { stroke-dashoffset:-68; } }

@media (max-width: 1120px) {
  :root { --wrap: calc(100vw - 56px); }
  .formula-nav { width:min(850px,calc(100vw - 150px)); }
  .formula-shell { grid-template-columns:minmax(0,1fr) minmax(310px,.65fr); gap:42px; }
  .formula.primary { font-size:clamp(38px,5vw,66px); }
  .formula-bank { font-size:clamp(18px,1.8vw,24px); }
  .domain-deck { padding-inline:56px; }
  .deck-grid { grid-template-columns:repeat(3,1fr); gap:52px 28px; }
  .playing-card { max-width:260px; justify-self:center; }
  .domain-choice { gap:24px; }
}

@media (max-width: 780px) {
  :root { --wrap: calc(100vw - 32px); }
  .mark { top:18px; left:16px; width:32px; height:32px; }
  .formula-nav { top:12px; left:66px; width:calc(100vw - 78px); grid-template-columns:repeat(6,minmax(44px,1fr)); overflow:hidden; transform:none; border-radius:14px; }
  .formula-nav a { height:44px; padding:0 8px; }
  .formula-nav a span { display:none; }
  .hero { min-height:760px; }
  .hero-image { background-position:66% center; }
  .hero-orbit { left:66%; width:150vw; }
  .hero-orbit.orbit-two { width:112vw; }
  .hero-orbit.orbit-three { width:185vw; }
  .atom { left:22%; top:37%; width:140px; }
  .formula-section { min-height:0; padding:104px 0 78px; }
  .formula-section::before { background-position:68% center; }
  .formula-section::after { background:linear-gradient(180deg,rgba(2,5,10,.55),rgba(2,5,10,.78) 48%,rgba(2,5,10,.92)),linear-gradient(90deg,rgba(2,5,10,.74),transparent); }
  .formula-shell { grid-template-columns:1fr; gap:56px; }
  .formula.primary,.deep-scene .formula.primary,.imitation-scene .formula.primary,.reinforcement-scene .formula.primary,.vla-scene .formula.primary { font-size:clamp(31px,9vw,48px); }
  .formula-bank { margin-top:42px; grid-template-columns:1fr; font-size:clamp(18px,5vw,24px); }
  .formula-bank > div { min-height:76px; padding:18px; }
  .formula-bank > div:last-child:nth-child(odd) { grid-column:1; }
  .control-panel { padding:24px 18px; }
  .readouts { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .readouts > div { min-height:66px; padding:13px 8px; }
  .readouts strong { font-size:12px; }
  .field-orbits { left:72%; width:170vw; opacity:.15; }
  .domain-deck { padding:92px 18px 70px; }
  .deck-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:42px 16px; }
  .playing-card { max-width:180px; border-radius:13px; }
  .card-corner { left:13px; top:12px; }.card-corner.bottom { right:13px; bottom:12px; }
  .card-core { inset:18% 9%; gap:9px; }
  .card-core b { font-size:44px; }
  .card-core strong { font-size:9px; }
  .card-core small { font-size:11px; }
  .die { width:58px; padding:10px; border-radius:13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
