/* Fit Pixel landing page (3D). Colors and fonts come from the app:
   constants/app-colors.ts (navy shell), the lime action button, XP yellow,
   streak tier colors, Press Start 2P + Pixeloid Sans.
   Shape rule: UI is square-cornered pixel art; only phones are rounded. */

@font-face { font-family: "Press Start 2P"; src: url("/assets/3d/fonts/PressStart2P.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Pixeloid Sans"; src: url("/assets/3d/fonts/PixeloidSans.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #021a36;
  --bg-2: #02284f;
  --line: #03418c;
  --ink: #f4f8ff;
  --muted: #a9bddb;
  --lime: #b4f000;
  --lime-deep: #4f7a00;
  --yellow: #ffd23f;
  --orange: #ff8a1f;
  --display: "Press Start 2P", ui-monospace, monospace;
  --body: "Pixeloid Sans", ui-monospace, monospace;
  --pad: clamp(16px, 4.4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
.px img, .sc-figure img, .sc-item, .prop, .pod-px, .bubble img, .row img, .xpbar img, .hud img, .stat img, .ring img, .parade img {
  image-rendering: pixelated;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--lime); color: #031400; padding: 8px 12px; font-family: var(--display); font-size: 11px; }
.skip:focus { left: 8px; }

/* Fixed scanlines over everything (pointer-events none, never on a scroller). */
.crt {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: 0.5;
}

/* ---------- Type ---------- */
.h2 {
  font: 400 clamp(22px, 3vw, 40px)/1.25 var(--display);
  letter-spacing: 0.01em;
  text-shadow: 0 3px 0 #04306a, 0 6px 0 #021d44, 0 10px 18px rgb(0 0 0 / 0.45);
}
.body { color: var(--muted); max-width: 46ch; font-size: clamp(15px, 1.15vw, 17px); }
.fine { color: var(--muted); font-size: 13px; }
.fine b { color: var(--yellow); }
.center { text-align: center; margin-inline: auto; }
.lime { color: var(--lime); }
.orange { color: var(--orange); }
.eyebrow {
  font: 11px/1 var(--display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--yellow);
  display: inline-flex; gap: 10px; align-items: center;
}
.blink { color: var(--lime); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Voxel headline: stacked offsets fake an extruded pixel block. */
.voxel {
  font: 400 clamp(28px, 4.3vw, 64px)/1.14 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.voxel .line { display: block; }
.voxel, .voxel .line {
  text-shadow:
    0 2px 0 #0b4fb0, 0 4px 0 #0a45a0, 0 6px 0 #083a8a, 0 8px 0 #062f72,
    0 10px 0 #04245a, 0 12px 0 #031a44, 0 18px 24px rgb(0 0 0 / 0.55);
}
.voxel .lime {
  text-shadow:
    0 2px 0 #7fb800, 0 4px 0 #6fa300, 0 6px 0 #5e8c00, 0 8px 0 #4d7400,
    0 10px 0 #3c5c00, 0 12px 0 #2a4200, 0 18px 24px rgb(0 0 0 / 0.55);
}
.voxel .w { display: inline-block; white-space: nowrap; }
.voxel .ch { display: inline-block; white-space: pre; }
.voxel.small { font-size: clamp(26px, 4vw, 54px); }

/* ---------- Buttons ---------- */
.btn {
  --b: #021a36;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  font: 12px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 0;
  box-shadow: 0 0 0 3px var(--b), 0 6px 0 3px var(--b);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), filter 0.15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 3px var(--b), 0 2px 0 3px var(--b); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }
.btn-lime { background: var(--lime); color: #0b1a00; --b: #2f4a00; }
.btn-ghost { background: #062b5c; color: var(--ink); --b: #0a5ac2; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 10px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--pad);
  background: linear-gradient(180deg, rgb(2 20 44 / 0.92), rgb(2 20 44 / 0.6));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgb(3 65 140 / 0.7);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 13px/1 var(--display); }
.brand img { image-rendering: auto; }
.brand b { color: var(--lime); font-weight: 400; }
.nav nav { display: flex; gap: 28px; }
.nav nav a { font: 10px/1 var(--display); text-decoration: none; color: var(--muted); text-transform: uppercase; padding: 8px 0; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav nav { display: none; } .nav { height: 58px; } }
@media (max-width: 480px) { .brand span { display: none; } }

/* =======================================================================
   HERO
   ======================================================================= */
.hero { position: relative; min-height: 100dvh; overflow: hidden; isolation: isolate; background: #010f22; }
.stage { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 50% 52%; }
.world {
  --rx: 0deg; --ry: 0deg; --dolly: 0px;
  position: absolute; left: 50%; top: 50%;
  width: max(108vw, 151dvh); aspect-ratio: 1484 / 1060;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) translateZ(var(--dolly)) rotateX(var(--rx)) rotateY(var(--ry));
}
/* Back wall pushed into depth, scaled up so it still fills the frame. */
.plane.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: translateZ(-320px) scale(1.291);
  filter: saturate(1.05) brightness(0.9);
}
.floor-glow {
  position: absolute; left: 10%; right: 10%; top: 78%; height: 22%;
  background: radial-gradient(50% 60% at 60% 30%, rgb(34 140 255 / 0.28), transparent 70%);
  transform: translateZ(-40px) rotateX(80deg); transform-origin: 50% 0;
}
.cast { position: absolute; inset: 0; transform-style: preserve-3d; }
/* Same figure size as the app's scene (features/pixel/figure-geometry.ts). */
.px {
  position: absolute; margin: 0;
  left: var(--x); bottom: 16.5%; height: 44%; aspect-ratio: 330 / 700;
  transform: translateX(-50%) translateZ(calc(var(--z) * 1px));
  transform-style: preserve-3d;
}
.px::after {
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -1.5%; height: 5%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent);
  z-index: -1;
}
.px img {
  width: 100%; height: 100%; transform-origin: 50% 100%;
  animation: drop 1s var(--spring) both, breathe 3.4s ease-in-out infinite;
  animation-delay: calc(0.55s + var(--i) * 0.13s), calc(var(--i) * -0.7s);
}
@keyframes drop {
  0% { translate: 0 -115vh; scale: 0.92 1.12; }
  70% { translate: 0 0; scale: 1.08 0.9; }
  100% { translate: 0 0; scale: 1 1; }
}
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(0.994, 1.014); } }
.px.hop img { animation: hop 0.6s var(--spring), breathe 3.4s ease-in-out infinite; }
@keyframes hop { 0% { translate: 0 0; } 35% { translate: 0 -9%; } 100% { translate: 0 0; } }

.prop { position: absolute; transform-style: preserve-3d; }
.prop-l { left: 50%; top: 72%; height: 8.5%; transform: translateZ(240px); animation: bob 4s ease-in-out infinite; }
.prop-r { left: 69%; top: 74%; height: 8%; transform: translateZ(300px); }
@keyframes bob { 50% { translate: 0 -6%; } }

.chips { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.chip {
  position: absolute; left: var(--x); top: var(--y);
  font: 400 clamp(11px, 1.05vw, 16px)/1 var(--display); color: var(--lime);
  padding: 8px 10px; background: rgb(2 20 44 / 0.85);
  box-shadow: 0 0 0 3px var(--lime-deep), 0 4px 0 3px #1a2a00;
  transform: translateZ(calc(var(--z) * 1px));
  animation: chip 1.9s var(--ease) forwards;
  white-space: nowrap;
}
.chip.gold { color: var(--yellow); box-shadow: 0 0 0 3px #8a6400, 0 4px 0 3px #3e2c00; }
@keyframes chip {
  0% { translate: -50% 20%; opacity: 0; scale: 0.6; }
  15% { opacity: 1; scale: 1.08; }
  30% { scale: 1; }
  100% { translate: -50% -260%; opacity: 0; }
}

.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hero-shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(1 15 34 / 0.94) 0%, rgb(1 15 34 / 0.72) 30%, rgb(1 15 34 / 0.1) 56%, transparent 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 18%),
    linear-gradient(180deg, rgb(1 15 34 / 0.7) 0%, transparent 16%);
}
.hero-copy {
  position: relative; z-index: 4;
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 24px;
  padding: 88px var(--pad) 72px; max-width: min(680px, 52vw);
}
.hero-copy .lede { color: #d3e1f7; max-width: 34ch; font-size: clamp(15px, 1.25vw, 19px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; }
.hero-copy > * { animation: rise 0.9s var(--ease) both; }
.hero-copy > :nth-child(1) { animation-delay: 0.15s; }
.hero-copy > :nth-child(3) { animation-delay: 1.15s; }
.hero-copy > :nth-child(4) { animation-delay: 1.3s; }
.hero-copy > h1 { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.voxel .ch { animation: assemble 0.8s var(--spring) both; animation-delay: calc(0.3s + var(--n) * 0.035s); }
@keyframes assemble {
  0% { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--dr)) scale(0.4); }
  100% { opacity: 1; transform: none; }
}

.hud {
  position: absolute; z-index: 4; right: var(--pad); top: 92px; width: min(340px, 28vw);
  padding: 14px 16px 12px; background: rgb(2 26 60 / 0.82);
  box-shadow: 0 0 0 3px #0a5ac2, 0 0 0 6px #021a36, 0 18px 40px rgb(0 0 0 / 0.5);
  animation: rise 0.9s var(--ease) 1.6s both;
}
.hud-top { display: flex; justify-content: space-between; align-items: center; font: 11px/1 var(--display); margin-bottom: 10px; }
.hud-lv { display: inline-flex; gap: 8px; align-items: center; }
.hud-lv img { width: 18px; }
.hud-streak { display: inline-flex; gap: 6px; align-items: center; color: var(--orange); }
.hud-xp { display: block; text-align: right; font: 10px/1 var(--display); color: var(--muted); margin-top: 8px; }
.hud-xp b { color: var(--ink); font-weight: 400; }
.hud.flash { animation: hudflash 0.7s var(--ease); }
@keyframes hudflash { 30% { box-shadow: 0 0 0 3px var(--lime), 0 0 0 6px #021a36, 0 0 40px rgb(180 240 0 / 0.6); } }

/* XP bar built from the app's two sprites (1555x133). */
.xpbar { position: relative; width: 100%; aspect-ratio: 1555 / 133; container-type: inline-size; }
.xpbar .xp-track { position: absolute; inset: 0; width: 100%; height: 100%; }
.xp-fill { position: absolute; inset: 0 auto 0 0; width: var(--p, 10%); overflow: hidden; transition: width 0.6s var(--ease); }
.xp-fill img { width: 100cqw; max-width: none; height: 100%; }
.flame { display: block; }

@media (max-width: 820px) {
  .world { width: 118dvh; top: 66%; }
  .px:nth-child(1) { --x: 31% !important; }
  .px:nth-child(2) { --x: 42% !important; }
  .px:nth-child(3) { --x: 53% !important; }
  .px:nth-child(4) { --x: 63% !important; }
  .px:nth-child(5) { --x: 72% !important; }
  .prop-l { left: 36%; }
  .prop-r { left: 58%; }
  .hero-copy { max-width: none; justify-content: flex-start; padding-top: 96px; gap: 18px; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgb(1 15 34 / 0.96) 0%, rgb(1 15 34 / 0.75) 34%, transparent 56%),
      linear-gradient(0deg, var(--bg) 0%, transparent 14%);
  }
  .hud { display: none; }
}

/* ---------- Phone frame (real screenshots) ---------- */
.phone {
  position: relative; width: min(300px, 70vw); aspect-ratio: 603 / 1311;
  padding: 3.4%; border-radius: 13% / 6%;
  background: linear-gradient(145deg, #2a3446, #0b0f18 40%, #1b2230);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.12), inset 0 0 0 6px #05070c, 0 40px 80px rgb(0 0 0 / 0.55), 0 0 0 1px #000;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.5% / 4.9%; }

/* =======================================================================
   XP (pinned)
   ======================================================================= */
.xp { position: relative; height: 340vh; background: linear-gradient(180deg, var(--bg), var(--bg-2) 60%, var(--bg)); }
.pin { position: sticky; top: 0; height: 100dvh; overflow: hidden; }
.xp .pin {
  display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: clamp(24px, 5vw, 80px);
  max-width: 1280px; margin: 0 auto; padding: 72px var(--pad) 24px;
}
.xp-phone { perspective: 1200px; display: grid; place-items: center; }
.xp-phone .phone {
  width: min(310px, 26vw);
  transform: rotateY(var(--pry, -26deg)) rotateX(var(--prx, 10deg)) rotateZ(var(--prz, -3deg));
  transform-style: preserve-3d;
}
.xp-side { display: grid; gap: 16px; }
.xp-meter { position: relative; padding: 14px 16px; background: rgb(2 20 44 / 0.7); box-shadow: 0 0 0 3px var(--line); max-width: 560px; }
.xp-meter-top { display: flex; justify-content: space-between; font: 11px/1 var(--display); margin-bottom: 10px; }
.xp-meter-top img { width: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.xp-gain { color: var(--lime); }
.lvup {
  position: absolute; right: 12px; top: -34px;
  font: 18px/1 var(--display); color: var(--yellow); padding: 8px 10px; background: #2a1d00;
  box-shadow: 0 0 0 3px #8a6400; opacity: 0; transform: scale(0.4) rotate(-8deg);
  transition: opacity 0.2s, transform 0.45s var(--spring);
}
.lvup.on { opacity: 1; transform: scale(1) rotate(-4deg); }
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; max-width: 620px; }

/* One row of the app's Actions tab, positioned like promo-videos/src/lib/ui.tsx. */
.row { position: relative; container-type: inline-size; aspect-ratio: 1 / 0.235; transition: transform 0.4s var(--spring); }
.row > * { position: absolute; }
.row-card { inset: 0; width: 100%; height: 100%; }
.row-glow { inset: 5%; box-shadow: inset 0 0 30px var(--tint), 0 0 24px var(--tint); opacity: 0; transition: opacity 0.4s; }
.row.done .row-glow { opacity: 0.8; }
.row.done { transform: translateY(-2px); }
.row-icon { left: 6%; top: 20%; height: 60%; width: 16%; object-fit: contain; transition: transform 0.4s var(--spring); }
.row.done .row-icon { transform: scale(1.15); }
.row-name { left: 27%; top: 12%; font: 5.4cqw/1 var(--display); color: #fff; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000; }
.row-val { left: 27%; top: 69%; font: 2.9cqw/1 var(--display); color: #9fb4d6; }
.row-val b { color: var(--tint); font-weight: 400; }
.abar { left: 26.5%; top: 41%; width: 42%; aspect-ratio: 872 / 141; container-type: inline-size; }
.abar > * { position: absolute; }
.abar-bg { inset: 8%; background: #0b1a2e; border-radius: 99px; }
.abar-fill { left: 0; top: 0; height: 100%; width: var(--f, 4%); overflow: hidden; }
.abar-fill img { width: 100cqw; max-width: none; height: 100%; }
.abar-frame { inset: 0; width: 100%; height: 100%; }
.row-gear { right: 16.5%; top: 26%; height: 48%; }
.row-add { right: 4%; top: 26%; height: 48%; }
.fly {
  position: fixed; z-index: 60; pointer-events: none;
  font: 12px/1 var(--display); color: var(--lime); padding: 6px 8px; background: #061a00;
  box-shadow: 0 0 0 2px var(--lime-deep);
}

@media (max-width: 820px) {
  .xp { height: 300vh; }
  .xp .pin { grid-template-columns: 1fr; align-content: center; padding-top: 76px; }
  .xp-phone { display: none; }
  .rows { grid-template-columns: 1fr; gap: 8px; }
  .row { aspect-ratio: 1 / 0.2; }
}

/* =======================================================================
   BUILD YOUR PIXEL
   ======================================================================= */
.build {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  max-width: 1320px; margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--pad);
}
.build-stage { perspective: 1400px; position: relative; }
.select-card {
  --tx: 6deg; --ty: -10deg;
  position: relative; aspect-ratio: 1484 / 1060;
  transform-style: preserve-3d;
  transform: rotateX(var(--tx)) rotateY(var(--ty));
  transition: transform 0.25s var(--ease);
  box-shadow: 0 0 0 4px #0a5ac2, 0 0 0 8px #021a36, 0 50px 90px rgb(0 0 0 / 0.6);
}
.sc-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); transition: opacity 0.35s; }
.sc-bg.swap { opacity: 0.2; }
.sc-item { position: absolute; transform: translateZ(55px); transition: opacity 0.25s; }
.sc-figure {
  position: absolute; left: 38.97%; top: 24.09%; width: 20.79%; height: 61.76%;
  transform: translateZ(80px); transform-style: preserve-3d;
}
.sc-figure img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-figure .stack { position: absolute; inset: 0; transform-origin: 50% 100%; animation: breathe 3.4s ease-in-out infinite; }
.sc-figure::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -1%; height: 5%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.6), transparent); transform: translateZ(-60px);
}
.sc-figure.pop .stack { animation: pop 0.45s var(--spring), breathe 3.4s ease-in-out infinite; }
@keyframes pop { 0% { scale: 1; } 35% { scale: 1.06 0.95; } 100% { scale: 1; } }
.sc-sparkle { position: absolute; inset: 0; transform: translateZ(120px); pointer-events: none; }
.spark {
  position: absolute; width: 8px; height: 8px; background: var(--c, #fff);
  box-shadow: 0 0 10px var(--c, #fff);
  animation: spark 0.7s var(--ease) forwards;
}
@keyframes spark { to { translate: var(--sx) var(--sy); opacity: 0; scale: 0.3; } }
.select-shadow {
  position: absolute; left: 8%; right: 8%; bottom: -12%; height: 14%;
  background: radial-gradient(closest-side, rgb(10 90 194 / 0.35), transparent);
  filter: blur(6px);
}
.build-panel { display: grid; gap: 18px; }
.picker { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: 92px 40px 1fr 40px; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 6px 4px 12px; background: #031f45; box-shadow: 0 0 0 2px var(--line);
}
.opt-label { font: 9px/1.2 var(--display); text-transform: uppercase; color: var(--muted); }
.opt-val { font: 10px/1.3 var(--display); text-align: center; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-val small { display: block; color: var(--yellow); font-size: 8px; margin-top: 3px; }
.arrow {
  width: 40px; height: 36px; border: 0; cursor: pointer; background: #0a3f86; color: var(--ink);
  font: 12px/1 var(--display); box-shadow: inset 0 -4px 0 #062a5c;
  transition: transform 0.12s, background 0.12s;
}
.arrow:hover { background: #0d52ad; }
.arrow:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 #062a5c; }
.arrow:focus-visible, .swatch:focus-visible, .seg button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.opt.swatches, .opt.segs { grid-template-columns: 92px 1fr; }
.swatch-row, .seg { display: flex; gap: 8px; }
.swatch { width: 34px; height: 30px; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.25); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--lime); outline-offset: 2px; }
.seg button {
  flex: 1; min-height: 34px; border: 0; cursor: pointer; background: #0a3f86; font: 9px/1 var(--display); text-transform: uppercase;
  box-shadow: inset 0 -4px 0 #062a5c;
}
.seg button[aria-pressed="true"] { background: var(--lime); color: #0b1a00; box-shadow: inset 0 -4px 0 #6f9c00; }
.build-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.build-foot .fine { flex: 1; min-width: 220px; }

@media (max-width: 900px) {
  .build { grid-template-columns: 1fr; }
  .select-card { --tx: 4deg; --ty: -6deg; }
}

/* =======================================================================
   STREAK (pinned horizontal pan)
   ======================================================================= */
.streak { position: relative; height: 420vh; background: radial-gradient(70% 60% at 30% 50%, #2a1200 0%, var(--bg) 70%); }
.streak .pin {
  display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr;
  gap: 8px clamp(24px, 4vw, 64px); align-items: center;
  max-width: 1360px; margin: 0 auto; padding: 96px var(--pad) 40px;
}
.streak-head { grid-column: 1 / -1; display: grid; gap: 12px; }
.streak-flame { position: relative; display: grid; justify-items: center; gap: 10px; align-self: center; }
.streak-flame::before {
  content: ""; position: absolute; left: 50%; top: 38%; width: 520px; height: 520px; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgb(255 210 63 / 0.16) 0 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%);
  opacity: var(--rays, 0); animation: spin 18s linear infinite; z-index: -1; transition: opacity 0.5s;
}
@keyframes spin { to { rotate: 360deg; } }
.flame.big { filter: drop-shadow(0 0 var(--glow, 10px) rgb(255 138 31 / 0.75)); transition: filter 0.4s; }
.streak-count { display: flex; align-items: baseline; gap: 12px; font-family: var(--display); }
.streak-count b { font-size: clamp(44px, 6vw, 84px); font-weight: 400; color: var(--yellow); text-shadow: 0 4px 0 #8a5a00, 0 8px 0 #3e2900; }
.streak-count span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.streak-tier {
  font: 14px/1 var(--display); letter-spacing: 0.2em; color: var(--tc, #fff); padding: 10px 14px;
  box-shadow: 0 0 0 3px currentColor; transition: color 0.3s;
}
.streak-view {
  min-width: 0; overflow: hidden; margin-block: -40px; padding-block: 40px;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent); mask: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent);
}
.streak-track { padding-inline: 40px; display: flex; gap: 22px; align-items: center; min-width: 0; padding: 30px 0; will-change: transform; transform: translateX(var(--tx, 0px)); }
.tier {
  flex: 0 0 250px; min-height: 270px; padding: 22px 20px; display: grid; align-content: start; gap: 12px;
  background: linear-gradient(180deg, #072b5a, #031a3a); box-shadow: 0 0 0 3px #0a4fa8, 0 0 0 6px #021a36;
  transition: transform 0.45s var(--spring), box-shadow 0.3s, opacity 0.3s; opacity: 0.55;
}
.tier b { font: 400 44px/1 var(--display); color: var(--c); }
.tier h3 { font: 14px/1.2 var(--display); text-transform: uppercase; color: var(--c); }
.tier p { color: var(--muted); font-size: 14px; }
.tier.on { opacity: 1; transform: translateY(-14px) scale(1.04); box-shadow: 0 0 0 3px var(--c), 0 0 0 6px #021a36, 0 0 40px color-mix(in srgb, var(--c) 40%, transparent); }
.tier.legend.on { background: linear-gradient(180deg, #4a3200, #1f1400); }
.tier-shot { flex: 0 0 auto; padding: 0 40px; }
.tier-shot .phone { width: 240px; transform: rotate(4deg); }

@media (max-width: 820px) {
  .streak { height: 380vh; }
  .streak .pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding-top: 76px; gap: 14px; align-content: start; }
  .flame.big { width: 84px !important; height: auto !important; }
  .streak-flame { grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 6px 16px; justify-items: start; }
  .streak-flame canvas { grid-row: span 2; }
  .streak-flame::before { width: 260px; height: 260px; left: 50px; }
  .tier { flex-basis: 220px; min-height: 220px; }
  .tier-shot .phone { width: 180px; }
}

/* =======================================================================
   TRAINING
   ======================================================================= */
.train {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 6vw, 96px); align-items: center;
  max-width: 1240px; margin: 0 auto; padding: clamp(90px, 12vw, 160px) var(--pad);
}
.train-copy { display: grid; gap: 20px; }
.train-stats { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto auto; gap: 12px; margin-top: 10px; }
.stat { padding: 18px; display: grid; gap: 6px; align-content: end; box-shadow: 0 0 0 3px var(--line); background: #031f45; }
.stat b { font: 400 clamp(26px, 3vw, 40px)/1 var(--display); color: var(--lime); }
.stat span { font-size: 14px; color: var(--muted); }
.stat.s1 { grid-row: span 2; background: linear-gradient(160deg, #0a3d12, #031f45 70%); box-shadow: 0 0 0 3px #3a7a00; }
.stat.s1 b { font-size: clamp(40px, 5vw, 68px); }
.stat.s3 { grid-template-columns: 44px 1fr; align-items: center; }
.stat.s3 img { width: 44px; }
.train-art { position: relative; perspective: 1200px; display: grid; place-items: center; }
.tilt-target { --tx: 0deg; --ty: 0deg; transform: rotateX(var(--tx)) rotateY(var(--ty)); transition: transform 0.3s var(--ease); transform-style: preserve-3d; }
.train-art .phone { width: min(320px, 72vw); }
.float-chip {
  position: absolute; font: 12px/1 var(--display); padding: 10px 12px; background: #061a00; color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-deep), 0 6px 0 3px #1a2a00; animation: float 5s ease-in-out infinite;
}
.float-chip.c1 { right: 6%; top: 18%; }
.float-chip.c2 { left: 0; bottom: 22%; animation-delay: -2.4s; color: #e8ffb0; }
@keyframes float { 50% { translate: 0 -14px; } }
@media (max-width: 900px) { .train { grid-template-columns: 1fr; } .float-chip.c2 { left: 4%; } }

/* =======================================================================
   RANKS (3D podium)
   ======================================================================= */
.ranks {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 60px); align-items: center;
  max-width: 1280px; margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--pad);
}
.ranks-copy { display: grid; gap: 18px; }
.podium-scene { position: relative; perspective: 1300px; min-height: 680px; display: grid; place-items: end center; padding-bottom: 40px; }
.podium {
  --tx: 12deg; --ty: -20deg;
  display: flex; align-items: flex-end; gap: 0; transform-style: preserve-3d;
}
.spot { position: relative; transform-style: preserve-3d; display: grid; justify-items: center; }
.spot .pod-px { width: clamp(110px, 12vw, 172px); margin-bottom: -4px; transform: translateZ(30px); filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.4)); }
.p1 .pod-px { animation: breathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
.block { --w: clamp(120px, 12vw, 170px); --d: 120px; position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; }
.p1 .block { --h: 190px; --f: #1d78ff; }
.p2 .block { --h: 130px; --f: #0d58c8; }
.p3 .block { --h: 92px; --f: #0a49a8; }
.block i { position: absolute; display: block; }
.block .f { inset: 0; background: linear-gradient(180deg, var(--f), #052a66); transform: translateZ(calc(var(--d) / 2)); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.12); }
.block .t { left: 0; top: 0; width: var(--w); height: var(--d); background: #5aa2ff; transform-origin: 50% 0; transform: translateZ(calc(var(--d) / 2)) rotateX(-90deg); }
.block .s { left: var(--w); top: 0; width: var(--d); height: var(--h); background: #04224f; transform-origin: 0 50%; transform: translateZ(calc(var(--d) / 2)) rotateY(90deg); }
.pl { position: absolute; inset: 0; display: grid; place-items: center; font: 400 44px/1 var(--display); color: #fff; transform: translateZ(calc(var(--d) / 2 + 1px)); text-shadow: 0 4px 0 #031a44; }
.p1 .pl { color: var(--yellow); }
.who { position: absolute; bottom: -38px; left: 50%; translate: -50% 0; font: 10px/1.4 var(--display); text-align: center; white-space: nowrap; transform: translateZ(70px); }
.who small { display: block; color: var(--lime); font-size: 9px; }
.crown {
  position: absolute; top: -26px; left: 50%; width: 34px; height: 22px; translate: -50% 0; transform: translateZ(40px);
  background: var(--yellow);
  clip-path: polygon(0 100%, 0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%);
  animation: bob 2.4s ease-in-out infinite;
}
.bubble {
  position: absolute; z-index: 2; display: flex; gap: 10px; align-items: center; max-width: 270px; padding: 10px 14px 10px 10px;
  background: #062b5c; box-shadow: 0 0 0 3px #0a5ac2, 0 10px 30px rgb(0 0 0 / 0.45);
  animation: float 6s ease-in-out infinite;
}
.bubble img { width: 40px; height: 40px; background: #03418c; flex: none; }
.bubble p { font-size: 13px; line-height: 1.35; color: #dce8fb; }
.bubble b { display: block; font: 9px/1.4 var(--display); color: var(--lime); font-weight: 400; }
.b1 { left: 0; top: 0; }
.b2 { right: 0; top: 0; animation-delay: -2s; }
.b3 { right: 4%; top: 84px; animation-delay: -4s; }
@media (max-width: 900px) {
  .ranks { grid-template-columns: 1fr; }
  .podium-scene { min-height: 560px; }
  .b2 { top: 74px; }
  .b3 { display: none; }
}

/* =======================================================================
   GYMS (3D ring)
   ======================================================================= */
.gyms { padding: clamp(80px, 10vw, 140px) var(--pad); display: grid; gap: 16px; overflow: hidden; }
.ring-wrap { height: clamp(380px, 44vw, 600px); perspective: 1500px; perspective-origin: 50% 20%; cursor: grab; touch-action: pan-y; user-select: none; margin-top: 20px; }
.ring-wrap:active { cursor: grabbing; }
.ring { --card: clamp(200px, 22vw, 330px); position: relative; width: var(--card); height: calc(var(--card) * 1060 / 1484 + 44px); margin: 20px auto 0; transform-style: preserve-3d; }
.gcard {
  position: absolute; inset: 0; transform-style: preserve-3d;
  background: #031a3a; box-shadow: 0 0 0 3px #0a5ac2, 0 0 0 6px #021a36;
}
.gcard img { width: 100%; aspect-ratio: 1484 / 1060; object-fit: cover; }
.gcard span { backface-visibility: hidden; -webkit-backface-visibility: hidden; display: block; padding: 12px; font: 10px/1.2 var(--display); text-transform: uppercase; text-align: center; }
.gcard::after { content: ""; position: absolute; inset: 0; background: #010f22; opacity: var(--dim, 0); pointer-events: none; }

/* =======================================================================
   FINAL / WAITLIST
   ======================================================================= */
.final { position: relative; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; padding: 120px var(--pad) 200px; }
.final-bg { position: absolute; inset: 0; }
.final-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; filter: brightness(0.55) saturate(1.1); image-rendering: pixelated; }
.final-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgb(2 26 54 / 0.3) 30%, rgb(2 26 54 / 0.2) 70%, rgb(2 26 54 / 0.85) 100%); }
.parade { position: absolute; left: 0; right: 0; bottom: 18px; height: 190px; z-index: 1; pointer-events: none; }
.parade img { position: absolute; bottom: 0; height: 100%; animation: march 22s linear infinite, step 0.5s steps(2) infinite; animation-delay: var(--d), 0s; left: -140px; }
@keyframes march { to { translate: calc(100vw + 280px) 0; } }
@keyframes step { 50% { margin-bottom: 4px; } }
.final-card {
  position: relative; z-index: 2; width: min(560px, 100%); display: grid; gap: 18px; justify-items: center; text-align: center;
  padding: clamp(24px, 4vw, 44px); background: rgb(2 20 44 / 0.88);
  box-shadow: 0 0 0 4px #0a5ac2, 0 0 0 8px #021a36, 0 40px 80px rgb(0 0 0 / 0.55);
}
.final-card .voxel { animation: none; }
.wl { width: 100%; display: grid; grid-template-columns: 1fr 140px; gap: 14px 12px; text-align: left; margin-top: 6px; }
.wl .btn { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field label { font: 9px/1 var(--display); text-transform: uppercase; color: #c9d8f0; }
.field input, .field select {
  height: 48px; padding: 0 12px; font: 15px var(--body); color: var(--ink); background: #031f45;
  border: 0; box-shadow: inset 0 0 0 2px #2a6bc4; border-radius: 0; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input::placeholder { color: #8aa3c7; }
.field input:focus, .field select:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.form-msg { grid-column: 1 / -1; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form-msg.ok { color: var(--lime); }
.form-msg.err { color: #ff9a8a; }
.store-soon { display: inline-flex; gap: 8px; align-items: center; font: 9px/1 var(--display); text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .wl { grid-template-columns: 1fr; } }

/* ---------- Footer + modal ---------- */
.foot {
  display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between;
  padding: 36px var(--pad); border-top: 2px solid var(--line); background: #010f22;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.modal { width: min(960px, 94vw); padding: 0; border: 0; background: #000; box-shadow: 0 0 0 4px #0a5ac2; }
.modal::backdrop { background: rgb(1 10 24 / 0.85); }
.modal video { width: 100%; display: block; }
.modal .btn { position: absolute; top: 12px; right: 12px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion: everything lands in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .xp, .streak { height: auto; }
  .pin { position: relative; height: auto; }
  .streak-track { flex-wrap: wrap; transform: none !important; }
  .tier { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .parade { display: none; }
}
