/* =============================================================
   Spinative landing — v16 (2026-11 redesign)
   -------------------------------------------------------------
   Served with public/landing.html. Behaviour lives in landing.js,
   which writes scroll progress into CSS custom properties:
     --p      0→1 progress through a [data-scene] element
     --intro  hero copy leaving (0→1)
     --rise   hero stage arriving (0→1)
     --e      layers explode amount (0→1)
   and toggles classes (.in, .s1…s5, .lit, .show). Nothing here
   depends on JS to be readable: without html.js every element is
   visible and static, and prefers-reduced-motion gets the same.
   ============================================================= */

:root {
  --bg: #050506;
  --bg-2: #0a0a0c;
  --card: #0f0f12;
  --card-2: #15151a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --muted-2: #6e6e76;
  --gold: #d7a84f;
  --gold-2: #f0ca79;
  --gold-3: #b9842c;
  --grad: linear-gradient(100deg, #fbe3a6 0%, #f0ca79 30%, #d7a84f 62%, #b9842c 100%);
  --teal: #4fc3c9;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1180px;
  --gutter: clamp(20px, 4.2vw, 48px);
  --r-xl: 32px;
  --r-l: 24px;
  --r-m: 16px;
  --nav-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
section[id], .anchor { scroll-margin-top: calc(var(--nav-h) + 12px); }
.anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 300;
  background: var(--gold-2); color: #111; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; position: relative; }
.center { text-align: center; margin-inline: auto; }

/* ---------- Type ---------- */
.display {
  font-size: clamp(46px, 8vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.052em;
  font-weight: 700;
}
.display .line { display: block; }
.h-chapter {
  text-wrap: balance;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.048em;
  max-width: 17ch;
}
.ch-head.center .h-chapter, .ch-head.center .h-section { margin-inline: auto; }
.h-section {
  font-size: clamp(34px, 4.8vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.lead {
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 44ch;
  letter-spacing: -0.012em;
}
.lead.center { max-width: 52ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--gold-2);
}
.ch-head.center .eyebrow { justify-content: center; }
.ch-n {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--muted-2); letter-spacing: 0.04em;
  padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 999px;
}
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--muted); padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  margin-left: 8px; vertical-align: middle;
}
.eyebrow .tag { margin-left: 0; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.grad.is-split { background: none; color: inherit; }
.grad.is-split .w > span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: .08em;
}
.footnote { color: var(--muted-2); font-size: 14px; margin-top: 22px; }
.card-label {
  font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.card-label .tag { margin-left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease-out), background .2s, border-color .2s, box-shadow .25s, color .2s;
}
.btn:active { transform: scale(.98); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn-gold {
  background: var(--grad); color: #17110a;
  box-shadow: 0 8px 30px -10px rgba(240, 202, 121, .55), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover { box-shadow: 0 12px 40px -10px rgba(240, 202, 121, .75), inset 0 1px 0 rgba(255,255,255,.5); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }

/* ---------- Nav ---------- */
.nav-wrap {
  position: fixed; inset: 12px 0 auto; z-index: 100;
  display: flex; justify-content: center; pointer-events: none;
  padding-inline: 12px;
}
.nav {
  pointer-events: auto;
  width: min(1180px, 100%);
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 10px 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .35s, border-color .35s, backdrop-filter .35s, box-shadow .35s;
}
.nav-wrap.scrolled .nav, .nav-wrap.open .nav {
  background: rgba(14, 14, 17, .72);
  border-color: var(--line);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 40px -18px rgba(0,0,0,.8);
}
.brand img { height: 24px; width: auto; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-links .nav-mobile { display: none; }
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-signin { font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 10px; white-space: nowrap; }
.nav-signin:hover { color: var(--text); }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease-out), top .3s var(--ease-out);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.nav-wrap.open .nav-toggle span:first-child { top: 19.5px; transform: rotate(45deg); }
.nav-wrap.open .nav-toggle span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Reveal ---------- */
html.js [data-reveal] {
  opacity: 0; transform: translateY(28px); filter: blur(8px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
html.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
.w { display: inline-block; white-space: nowrap; }
html.js [data-split] .w > span {
  display: inline-block; opacity: 0; transform: translateY(.38em); filter: blur(12px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s var(--ease-out);
  transition-delay: calc(var(--wi) * 55ms);
}
html.js [data-split].in .w > span { opacity: 1; transform: none; filter: none; }

/* =============================================================
   HERO
   ============================================================= */
.hero { position: relative; height: 580vh; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate;
  --intro: 0; --rise: 0;
}
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 120%;
  background:
    radial-gradient(42% 38% at 50% 30%, rgba(215, 168, 79, .22), transparent 70%),
    radial-gradient(30% 30% at 20% 60%, rgba(79, 195, 201, .08), transparent 70%),
    radial-gradient(30% 30% at 82% 60%, rgba(165, 139, 255, .08), transparent 70%);
  z-index: -2; mix-blend-mode: screen;
  opacity: calc(.7 - var(--intro) * .5);
}
.hero-copy {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--nav-h) + clamp(48px, 11vh, 120px)) var(--gutter) 0;
  text-align: center;
  opacity: calc(1 - var(--intro) * 1.4);
  transform: translateY(calc(var(--intro) * -80px)) scale(calc(1 - var(--intro) * .05));
  pointer-events: none;
}
.hero-copy a, .hero-copy button { pointer-events: auto; }
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-sub { margin-top: 26px; max-width: 46ch; text-wrap: balance; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; letter-spacing: -0.012em; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--muted-2); }

/* The game, exploded. Seven planes (background, reel window, targets, symbols,
   character, logo, interface) float apart in 3D under the headline. landing.js
   sets --x3 (1 = exploded, 0 = assembled) on .stage-wrap and --k (0→1, landed)
   on each plane as the visitor scrolls; once every plane has landed the game
   is live (.final) and its reels spin. Positions inside the planes are
   measured from Pharaoh's Fortune's own gameplay frame. */
.stage-wrap {
  --x3: 1;
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: min(1180px, 100vw - 2 * var(--gutter), (100svh - 290px) * 16 / 9);
  perspective: 2200px; perspective-origin: 50% 0%;
  container-type: inline-size;
  transform:
    translate(-50%, calc(-50% + 22px + (1 - var(--rise)) * 72svh))
    scale(calc(.94 + var(--rise) * .06));
  transform-origin: 50% 0;
  will-change: transform;
}
.stage3d {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--x3) * 52deg)) rotateZ(calc(var(--x3) * -30deg)) scale(calc(1 - var(--x3) * .16));
  transform-origin: 50% 50%;
}
.floor {
  position: absolute; inset: -35% -25%;
  transform: translateZ(-60px);
  background-image:
    linear-gradient(rgba(240, 202, 121, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 202, 121, .1) 1px, transparent 1px);
  background-size: 5.5% 9.8%;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
  mask-image: radial-gradient(closest-side, #000 30%, transparent);
  opacity: var(--x3);
  pointer-events: none;
}
.plane {
  --k: 0;
  position: absolute; inset: 0;
  border-radius: clamp(12px, 1.8vw, 26px); overflow: hidden;
  transform: translateZ(calc(var(--zi) * clamp(26px, 4.6cqi, 62px) * (1 - var(--k))));
  outline: 1px solid rgba(240, 202, 121, calc(var(--x3) * .5));
  outline-offset: -1px;
  background: rgba(255, 255, 255, calc(var(--x3) * .03));
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, calc(var(--x3) * .9));
}
.plane > * { position: absolute; }
.pl-bg {
  background: radial-gradient(80% 90% at 50% 40%, #17140f 0%, #0a0a0c 70%);
  box-shadow: 0 60px 140px -40px rgba(0,0,0,.9), 0 0 120px -30px rgba(215,168,79,.25);
  outline: 1px solid rgba(240, 202, 121, calc(.2 + var(--x3) * .3));
}
.pl-tag {
  left: 2.4%; top: 3.6%; z-index: 9;
  display: inline-flex; align-items: center; gap: .6em;
  font-size: clamp(9px, 1.15cqi, 14px); font-weight: 600; white-space: nowrap;
  padding: .45em .95em; border-radius: 999px;
  background: rgba(10, 10, 12, .84); border: 1px solid rgba(240, 202, 121, .5);
  color: var(--muted);
  opacity: clamp(0, calc(var(--x3) * 1.8 - .5), 1);
}
.pl-tag b { color: var(--gold-2); }

.st-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-shade { inset: 0; background: radial-gradient(70% 70% at 55% 45%, transparent 40%, rgba(0,0,0,.45)); }
.st-grid, .st-reels { left: 24.4%; top: 22.9%; width: 51%; height: 51.4%; }
.st-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
/* Five reel strips. Each column shows exactly three cells (33.333cqh); during
   a spin landing.js fills the strip with the result, a run of passing symbols
   and the current symbols, then slides it down with the Web Animations API. */
.st-reels { display: flex; }
/* While a reel spins, its symbols fade out at the top and bottom of the
   window; the fade clears as the reel stops (landing.js toggles .is-spinning). */
@property --fade { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.st-col {
  flex: 1 1 0; height: 100%; overflow: hidden; container-type: size;
  --fade: 0%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  transition: --fade .35s var(--ease-out);
}
.st-col.is-spinning { --fade: 13%; transition-duration: .2s; }
.st-strip { display: flex; flex-direction: column; will-change: transform; }
.st-strip img { flex: none; width: 100%; height: 33.333cqh; object-fit: contain; padding: 5% 7%; }
.st-grid { gap: 1.4%; opacity: calc(var(--x3) * 1.4 - .2); }
.st-grid span { border: 1px dashed rgba(240, 202, 121, .45); border-radius: 10px; background: rgba(240, 202, 121, .04); }
.st-panel { left: 23.3%; top: 19.4%; width: 53.4%; height: 59.6%; background: url('/landing/v2/pharaoh/reel-bg.webp') center / cover; opacity: .94; }
.st-frame { left: 20.9%; top: 15.2%; width: 58.3%; height: auto; }
/* The game's own reel separators, drawn behind the symbols as in the game. */
.st-sep { top: 22.4%; height: 54%; width: auto; left: var(--x); transform: translateX(-50%); filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.st-strip img.win { animation: winpop 1.2s var(--ease) infinite; }
@keyframes winpop { 0%, 60%, 100% { transform: scale(1); filter: none; } 20% { transform: scale(1.14); filter: drop-shadow(0 0 14px rgba(255, 215, 120, .9)) brightness(1.15); } }
.st-winline {
  left: 24.4%; width: 51%; top: 48.6%; height: 3px; margin-top: -1.5px; z-index: 2;
  background: linear-gradient(90deg, transparent, #ffd878 12%, #fff4cc 50%, #ffd878 88%, transparent);
  box-shadow: 0 0 18px rgba(255, 200, 90, .95);
  transform: scaleX(0); opacity: 0; transition: transform .6s var(--ease-out), opacity .3s;
  pointer-events: none;
}
.hero.won .st-winline { transform: scaleX(1); opacity: 1; }
.st-rig { left: -4.6%; top: 3.5%; height: 84%; aspect-ratio: 644 / 960; transform-origin: 50% 100%; }
/* The queen plays her saved Motion idle on a canvas (landing.js mounts
   /landing/motion-player.js on it). .q-rig is her full 1024x1536 art canvas;
   the motion canvas reaches 3.125% past it on every side (the player's view
   pad) so the cape and arms are never cut. Her layers stand in until the first
   frame draws, and stay if scripts or the file are unavailable. */
.q-rig { position: absolute; left: 0; top: 0; width: 102.4%; height: 103%; }
.q-still, .q-still img { position: absolute; inset: 0; width: 100%; height: 100%; }
.q-motion { position: absolute; inset: -3.125%; width: 106.25%; height: 106.25%; opacity: 0; transition: opacity .25s; }
.q-rig.has-motion .q-motion { opacity: 1; }
.q-rig.has-motion .q-still { visibility: hidden; }
.st-bones { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; }
.st-bones path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 1.8s var(--ease-out); }
.st-bones .bone-under { stroke: rgba(10, 8, 4, .7); stroke-width: 17; }
.st-bones .bone { stroke: #ffe9b0; stroke-width: 8; filter: drop-shadow(0 0 8px rgba(255, 200, 90, .95)); }
.st-bones circle { fill: #17110a; stroke: #ffe9b0; stroke-width: 6; }
.hero.s4:not(.live) .st-bones { opacity: .95; }
.hero.s4 .st-bones path { stroke-dashoffset: 0; }
.st-logo { left: 50%; top: 0; width: 20.7%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.hero.live .st-logo { animation: logopulse 3.2s ease-in-out infinite; }
@keyframes logopulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.03); } }
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 30%; opacity: clamp(0, calc(var(--x3) * 2 - .2), 1); }
.st-tags span {
  font-size: clamp(9px, 1.25cqi, 13px); font-weight: 600; letter-spacing: -0.005em;
  padding: .55em .95em; border-radius: 999px;
  background: rgba(16, 16, 20, .82); border: 1px solid rgba(240, 202, 121, .32); color: var(--text);
}
.st-tags span b { color: var(--gold-2); font-weight: 700; }
.st-design { left: 24.4%; bottom: 6%; max-width: 52%; }
.st-math { right: 2.5%; top: 21%; flex-direction: column; align-items: flex-end; max-width: 18%; }
.st-hud { inset: 0; pointer-events: none; }
.st-hud::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5.6%; background: rgba(0, 0, 0, .86); }
.st-meter { position: absolute; bottom: .4%; text-align: center; line-height: 1.05; transform: translateX(-50%); }
.st-meter:nth-child(1) { left: 16.6%; } .st-meter:nth-child(2) { left: 50%; } .st-meter:nth-child(3) { left: 83.2%; }
.st-meter small { display: block; font-size: clamp(6px, .75cqi, 10px); color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.st-meter b { font-size: clamp(8px, 1.05cqi, 14px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-2); }
.st-spin {
  position: absolute; right: 7.4%; bottom: 6.2%; width: 15.5%; padding: 0; border: 0; background: none;
  border-radius: 50%; cursor: default; pointer-events: none;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.6));
  transition: transform .25s var(--ease-out), filter .25s;
}
.st-spin img { width: 100%; height: auto; }
.hero.live .st-spin { pointer-events: auto; cursor: pointer; animation: spinhint 2.4s ease-in-out infinite; }
.hero.live .st-spin:hover { filter: drop-shadow(0 8px 24px rgba(255, 200, 90, .6)) brightness(1.08); }
.hero.live .st-spin:active { transform: scale(.94); }
.hero.spinning .st-spin { animation: none; filter: brightness(.8); }
@keyframes spinhint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.stage-steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  margin-top: 22px; position: relative;
  opacity: var(--rise);
}
.stage-steps::before, .stage-steps::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px;
  background: var(--line);
}
.stage-steps::after { background: var(--grad); right: auto; width: calc(var(--steps-p, 0) * 100%); transition: width .2s linear; }
.stage-steps li { padding-top: 14px; opacity: .35; transition: opacity .5s; }
.stage-steps li.on { opacity: 1; }
.stage-steps .n { font-family: var(--mono); font-size: 11px; color: var(--gold-2); display: block; margin-bottom: 4px; }
.stage-steps b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.stage-steps .t { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

/* =============================================================
   INTRO + CHAPTER INDEX
   ============================================================= */
.intro { padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px); text-align: center; }
.intro .eyebrow { justify-content: center; margin-bottom: 18px; max-width: 40ch; }
.intro .lead { margin-top: 22px; }
.chapter-index {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: clamp(40px, 6vw, 72px); text-align: left;
}
.chapter-index a {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .25s, transform .35s var(--ease-out), background .25s;
}
.chapter-index a:hover { border-color: rgba(240, 202, 121, .35); background: var(--card-2); transform: translateY(-3px); }
.chapter-index img { grid-row: span 2; width: 44px; height: 44px; object-fit: contain; }
.chapter-index b { font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chapter-index b .tag { margin: 0; font-size: 10px; padding: 1px 6px; }
.intro-note { margin-top: 26px; color: var(--muted-2); font-size: 15px; }
.ws { font-size: 13px; font-weight: 500; color: var(--muted-2); }
.chapter-index span { font-size: 13px; color: var(--muted); }

/* ---------- Chapter rail ---------- */
.rail {
  position: fixed; right: 18px; top: 50%; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 8px; border-radius: 999px;
  background: rgba(14,14,17,.6); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform: translate(calc(100% + 30px), -50%); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .4s;
}
.rail.show { transform: translate(0, -50%); opacity: 1; }
.rail a { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.28); transition: height .35s var(--ease-out), background .3s; }
.rail a.on { height: 22px; background: var(--gold-2); }

/* =============================================================
   CHAPTERS — shared
   ============================================================= */
.ch { position: relative; padding: clamp(90px, 13vw, 180px) 0 clamp(40px, 6vw, 80px); }
.ch-head { display: grid; gap: 22px; margin-bottom: clamp(44px, 6vw, 80px); }
.ch-head.center { justify-items: center; text-align: center; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 26px;
}
:where(.card) p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.window {
  border-radius: var(--r-l); overflow: hidden;
  background: linear-gradient(180deg, #121216, #0c0c0f);
  border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px -50px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.05) inset;
}
.window-bar {
  height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02);
  font-size: 12.5px; color: var(--muted-2); font-weight: 500;
}
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.12); }
.window-bar span { margin-left: 10px; }
.specs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  margin-top: clamp(40px, 5vw, 64px); padding-top: 32px; border-top: 1px solid var(--line);
}
.specs b { display: block; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 8px; }
.specs span { color: var(--muted); font-size: 15px; line-height: 1.45; display: block; max-width: 26ch; }

/* =============================================================
   01 GAME DESIGN
   ============================================================= */
.gd-body { display: grid; grid-template-columns: 220px 1fr 260px; min-height: 460px; }
.gd-features { padding: 18px 14px; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 4px; }
.gd-features li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px; border-radius: 10px; font-size: 14px; color: var(--muted);
  transition: background .4s, color .4s;
}
.gd-features li i {
  width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.1);
  position: relative; flex: none; transition: background .4s;
}
.gd-features li i::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #cfcfd4; transition: transform .45s var(--ease-out), background .4s;
}
.gd-features li.lit { color: var(--text); background: rgba(240, 202, 121, .06); }
.gd-features li.lit i { background: var(--gold); }
.gd-features li.lit i::after { transform: translateX(14px); background: #fff; }
html:not(.js) .gd-features li.on i { background: var(--gold); }
html:not(.js) .gd-features li.on i::after { transform: translateX(14px); }

/* Pharaoh's Fortune's 5x3 grid with its 25 real paylines; landing.js lights
   them one at a time. Line coordinates are cell centres in a 500x300 box. */
.gd-grid {
  position: relative; display: grid; align-content: center; justify-items: center; gap: 14px;
  padding: 30px 30px 56px;
  background: url('/landing/v2/pharaoh/bg.webp') center / cover;
  box-shadow: inset 0 0 0 1000px rgba(8, 6, 14, .52);
}
.gd-reels {
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 5 / 3;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 18, 50, .9), rgba(18, 12, 30, .94));
  border: 2px solid rgba(240, 202, 121, .6);
  box-shadow: 0 0 0 4px rgba(120, 80, 20, .35), 0 24px 50px rgba(0, 0, 0, .5);
}
.gd-reels img { width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 7%; }
.gd-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gd-lines polyline {
  fill: none; stroke: rgba(240, 202, 121, .13); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round; transition: stroke .35s, stroke-width .35s;
}
.gd-lines polyline.on { stroke: #ffd878; stroke-width: 4; filter: drop-shadow(0 0 6px rgba(255, 200, 90, .9)); }
.gd-line { font-size: 13px; color: #d8cfe8; }
.gd-line b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.gd-caption {
  position: absolute; left: 0; right: 0; bottom: 16px; text-align: center;
  font-size: 13px; color: #d8cfe8; font-weight: 500;
}
.gd-rules { padding: 18px; border-left: 1px solid var(--line); display: grid; align-content: start; gap: 12px; }
.gd-rule { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.gd-rule b { display: block; font-size: 14px; }
.gd-rule span { font-size: 13px; color: var(--muted); }
.gd-plaques { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.gd-plaques img { width: 100%; height: auto; }

/* =============================================================
   02 MATH
   ============================================================= */
.math { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.math-rtp { grid-row: span 2; display: flex; flex-direction: column; }
.math-big {
  font-size: clamp(64px, 9vw, 132px); font-weight: 700; letter-spacing: -0.06em; line-height: .95;
  color: var(--text); margin: 4px 0 30px; font-variant-numeric: tabular-nums;
}
.card .math-big { color: var(--text); font-size: clamp(64px, 9vw, 132px); }
.math-big small { font-size: .45em; color: var(--gold-2); margin-left: 4px; letter-spacing: -0.02em; }
.math-split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 3px; background: rgba(255,255,255,.05); }
.math-split i {
  flex: var(--w) 0 0; background: var(--c); border-radius: 3px;
  transform-origin: left; transform: scaleX(1);
}
html.js .math-split i { transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
html.js .math-rtp.in .math-split i { transform: scaleX(1); }
.math-split i:nth-child(2) { transition-delay: .15s; } .math-split i:nth-child(3) { transition-delay: .3s; } .math-split i:nth-child(4) { transition-delay: .45s; }
.math-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 20px; }
.math-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.math-legend li b { color: var(--text); margin-left: auto; font-variant-numeric: tabular-nums; }
.math-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.math-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; grid-column: span 2; }
.math-val { font-size: clamp(34px, 3.4vw, 48px); font-weight: 700; letter-spacing: -0.04em; color: var(--text) !important; line-height: 1; font-variant-numeric: tabular-nums; }
.math-meter { display: flex; gap: 5px; margin-top: 16px; }
.math-meter i { flex: 1; height: 8px; border-radius: 3px; background: var(--gold); }
.math-meter i:nth-child(1) { opacity: .45; } .math-meter i:nth-child(2) { opacity: .6; } .math-meter i:nth-child(3) { opacity: .78; }
.math-meter i.off { background: rgba(255,255,255,.1); }
.math-pay { grid-column: span 2; }
.math-pay table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.math-pay th, .math-pay td { padding: 6px 8px; text-align: right; font-size: 15px; }
.math-pay thead th { color: var(--muted-2); font-weight: 600; font-size: 13px; }
.math-pay tbody tr + tr { border-top: 1px solid var(--line); }
.math-pay tbody th { text-align: left; }
.math-pay tbody th img { width: 40px; height: 40px; object-fit: contain; }
.math-pay td { color: var(--text); }

/* =============================================================
   03 ART
   ============================================================= */
.art-wall { display: grid; gap: 18px; overflow: hidden; padding: 10px 0 30px; --p: .5; }
.art-row {
  display: flex; gap: 18px; width: max-content; align-items: center;
  transform: translateX(calc(-18% + var(--dir) * (var(--p) - .5) * 26%));
  will-change: transform;
}
.art-row img {
  height: clamp(110px, 13vw, 190px); width: auto; flex: none;
  padding: 16px; border-radius: 22px;
  background: radial-gradient(80% 80% at 50% 40%, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid var(--line);
}
.art-row img.wide { padding: 18px 26px; }
.art-dna { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: clamp(30px, 4vw, 56px); }
.dna { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.dna > img { width: 96px; height: 120px; object-fit: contain; }
.dna-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dna-chips span {
  font-size: 12.5px; color: var(--text); padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.dna-edit { grid-template-columns: 1fr 84px; }
.dna-edit .card-label { grid-column: 1 / -1; margin-bottom: 0; }
.prompt { display: flex; gap: 8px; align-items: flex-start; color: var(--text) !important; font-size: 15px; }
.spark { color: var(--gold-2); }
.dna-before-after img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 0 0 rgba(255,210,110,0)); }
html.js .dna-edit.in .dna-before-after img { animation: shine 3.6s ease-in-out 1.2s infinite; }
@keyframes shine { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255,210,110,0)); } 50% { filter: drop-shadow(0 0 16px rgba(255,210,110,.85)) brightness(1.12); } }
/* "Typed" prompts: revealed left to right once their card is on screen. */
html.js [data-reveal] .typed { clip-path: inset(0 100% 0 0); }
html.js [data-reveal].in .typed { animation: type 2.2s steps(38, end) .6s forwards; }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* =============================================================
   04 LAYERS
   ============================================================= */
.ch-layers { padding: 0; height: 340vh; --e: 0; }
.layers-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.layers-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.layers-copy { margin: 0; }
.layers-count { display: grid; gap: 2px; margin-top: 8px; }
.layers-count b { font-size: clamp(30px, 3vw, 42px); letter-spacing: -0.035em; color: var(--text); }
.layers-count > span { color: var(--muted); font-size: 15px; }
.layers-stage {
  position: relative; height: min(70svh, 680px); aspect-ratio: 641 / 900; justify-self: center;
  perspective: 1600px; perspective-origin: 50% 40%;
}
.layers-stage::before {
  content: ''; position: absolute; inset: 10% -10%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79, 195, 201, .16), transparent);
  filter: blur(20px);
}
.layers-stack {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(var(--e) * 16deg)) rotateY(calc(var(--e) * -34deg)) rotateZ(calc(var(--e) * 4deg)) scale(calc(1 - var(--e) * .14));
}
.layers-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: translateZ(calc((var(--z) - 7) * var(--e) * 36px));
  border-radius: 14px;
  outline: 1px solid rgba(240, 202, 121, calc(var(--e) * .28));
  outline-offset: -1px;
  background: rgba(255, 255, 255, calc(var(--e) * .018));
}
.layers-tags li {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%) translateZ(calc((var(--z) - 7) * var(--e) * 36px + 2px));
  font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(10, 10, 12, .82); border: 1px solid rgba(240, 202, 121, .5); color: var(--gold-2);
  opacity: clamp(0, calc((var(--e) - .7) * 3.4), 1);
}
.layers-tags { position: absolute; inset: 0; transform-style: preserve-3d; }
.layers-stack .layers-tags { pointer-events: none; }

.ch-layers-more { padding-top: clamp(40px, 6vw, 80px); }
.layers-more { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.layer-card { margin: 0; display: grid; gap: 18px; }
.layer-card figcaption b { display: block; font-size: 16px; margin-bottom: 4px; }
.layer-card figcaption span { color: var(--muted); font-size: 14.5px; }
.layer-fan { position: relative; aspect-ratio: 3 / 2; perspective: 900px; }
.layer-fan img {
  position: absolute; inset: 6% 8%; width: 84%; height: 88%; object-fit: contain;
  border-radius: 10px; outline: 1px solid rgba(240, 202, 121, .22); background: rgba(255,255,255,.015);
  transform: rotateX(52deg) rotateZ(-30deg) translateZ(calc(var(--i) * 26px)) translateY(calc(var(--i) * -6px));
  transition: transform .9s var(--ease-out);
}
.layer-card:hover .layer-fan img { transform: rotateX(52deg) rotateZ(-30deg) translateZ(calc(var(--i) * 42px)) translateY(calc(var(--i) * -8px)); }
.layer-points ul { display: grid; gap: 18px; }
.layer-points li { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.layer-points li b { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }

/* =============================================================
   05 MOTION
   ============================================================= */
.motion { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.motion-stage { position: relative; aspect-ratio: 16 / 10; background: #0b0a0e; }
.motion-stage video { width: 100%; height: 100%; object-fit: cover; }
.motion-chips {
  position: absolute; left: 14px; right: 14px; top: 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.motion-chips span {
  font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px;
  background: rgba(10,10,12,.7); border: 1px solid var(--line-2); color: var(--muted);
  backdrop-filter: blur(6px);
}
.motion-chips span.is-on { color: #17110a; background: var(--grad); border-color: transparent; }
.motion-prompt {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-top: 1px solid var(--line); font-size: 15px;
}
.motion-prompt .typed { flex: 1; color: var(--text); }
.motion-go {
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  background: rgba(240, 202, 121, .14); color: var(--gold-2); border: 1px solid rgba(240, 202, 121, .3);
}
.motion-sheet { position: relative; padding: 12px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.mt { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; }
.mt code { font-size: 11.5px; color: var(--muted-2); }
.lane { position: relative; height: 18px; border-radius: 6px; background: rgba(255,255,255,.04); }
.lane i { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--gold-2); transform: rotate(45deg); border-radius: 2px; }
.playhead {
  position: absolute; top: 8px; bottom: 10px; left: calc(16px + 80px); width: 2px; background: #fff; border-radius: 2px;
  box-shadow: 0 0 10px rgba(255,255,255,.6);
  animation: playhead 2.4s linear infinite;
}
@keyframes playhead { from { transform: translateX(0); } to { transform: translateX(calc(var(--lane-w, 520px))); } }
.motion-side { display: grid; gap: 16px; align-content: start; }
.rig-card .rig { position: relative; height: 230px; margin-bottom: 16px; display: flex; justify-content: center; }
.rig-card .rig img { height: 100%; width: auto; opacity: .9; }
.rig-card .rig svg {
  position: absolute; height: 100%; width: auto; aspect-ratio: 762 / 900;
  left: 50%; transform: translateX(-50%);
  fill: var(--gold-2); stroke: var(--gold-2); stroke-width: .9;
}
.rig-card .rig svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(240,202,121,.8)); }
html.js .rig-card .rig svg path { stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 2s var(--ease-out) .4s; }
html.js .rig-card.in .rig svg path { stroke-dashoffset: 0; }
.rig-card .rig svg circle { animation: joint 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes joint { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.motion-library ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.motion-library li { font-size: 13.5px; color: var(--muted); }
.motion-library li b { display: block; font-size: 26px; color: var(--text); letter-spacing: -0.03em; }

/* =============================================================
   06 MARKETING
   ============================================================= */
.mkt {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr 1.2fr;
  grid-template-areas:
    "rail hero hero"
    "rail square rect"
    "strip strip strip";
}
.mkt-tile { margin: 0; position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.mkt-tile figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600;
}
.mkt-tile figcaption span, .mkt-tile figcaption code {
  padding: 5px 10px; border-radius: 999px; background: rgba(8,8,10,.72); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
}
.mkt-tile figcaption code { font-size: 11.5px; color: var(--gold-2); }
.mkt-rail { grid-area: rail; }
.mkt-rail video { width: 100%; height: 100%; object-fit: cover; }
.mkt-hero { grid-area: hero; aspect-ratio: 16 / 9; }
.mkt-square { grid-area: square; aspect-ratio: 1; }
.mkt-rect { grid-area: rect; }
.mkt-strip { grid-area: strip; aspect-ratio: 728 / 90; }
.mk-art { position: absolute; inset: 0; }
.mk-art img { position: absolute; }
.mk-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkt-hero .mk-char { right: 6%; bottom: -4%; height: 96%; width: auto; }
.mkt-hero .mk-logo { left: 6%; top: 18%; width: 46%; }
.mkt-square .mk-logo { left: 50%; top: 14%; width: 74%; transform: translateX(-50%); }
.mkt-square .mk-coin { left: 50%; bottom: 14%; width: 30%; transform: translateX(-50%); filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.mkt-rect .mk-char { left: 4%; bottom: -6%; height: 100%; width: auto; }
.mkt-rect .mk-logo { right: 4%; top: 22%; width: 52%; }
.mkt-strip .mk-bg { filter: brightness(.8); }
.mkt-strip .mk-bg { object-position: 50% 60%; }
.mkt-strip .mk-logo { left: 3%; top: 8%; height: 84%; width: auto; }
.mkt-strip .mk-syms { position: absolute; right: 3%; top: 14%; height: 72%; display: flex; gap: 1.2%; justify-content: flex-end; width: 52%; }
.mkt-strip .mk-syms img { position: static; height: 100%; width: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.mkt-strip figcaption { left: auto; right: 12px; top: 12px; bottom: auto; width: auto; }
html.js .mkt-tile .mk-art > img:not(.mk-bg), html.js .mkt-tile .mk-syms { opacity: 0; transform-origin: 50% 100%; transition: opacity .8s var(--ease-out) .25s, translate 1s var(--ease-out) .25s; translate: 0 24px; }
html.js .mkt-tile.in .mk-art > img:not(.mk-bg), html.js .mkt-tile.in .mk-syms { opacity: 1; translate: 0 0; }

/* =============================================================
   07 GAME PREVIEW
   ============================================================= */
.preview { display: flex; justify-content: center; padding: clamp(0px, 6vw, 110px) var(--gutter); --p: 0; }
.preview-frame {
  position: relative; width: min(var(--max), 100%); aspect-ratio: 16 / 9;
  border-radius: var(--r-xl); overflow: hidden; background: #000;
  border: 1px solid rgba(240, 202, 121, .22);
  box-shadow: 0 60px 140px -40px rgba(0,0,0,.95), 0 0 140px -40px rgba(215, 168, 79, .3);
  transform-origin: 50% 50%;
  will-change: transform;
}
.preview-frame video { width: 100%; height: 100%; object-fit: cover; }
.gameplay-toggle {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(8,8,10,.6); border: 1px solid var(--line-2); cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(8px);
}
.gameplay-toggle svg { width: 16px; height: 16px; fill: #fff; }
.gameplay-toggle .icon-play { display: none; }
.gameplay-toggle[aria-pressed="true"] .icon-play { display: block; }
.gameplay-toggle[aria-pressed="true"] .icon-pause { display: none; }
.gameplay-chapters {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(8,8,10,.62); border: 1px solid var(--line-2); backdrop-filter: blur(12px);
  max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none;
}
.gameplay-chapters::-webkit-scrollbar { display: none; }
.gameplay-chip {
  position: relative; flex: none; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; overflow: hidden;
  transition: color .25s, background .25s;
}
.gameplay-chip span { position: relative; z-index: 1; }
.gameplay-chip i { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--gold-2); }
.gameplay-chip.is-on { color: var(--text); background: rgba(255,255,255,.08); }
.gameplay-chip:hover { color: var(--text); }
.preview-share { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.share-url {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); margin-bottom: 14px;
  color: var(--text) !important; font-family: var(--mono); font-size: 13.5px !important;
}
.share-url .lock { width: 10px; height: 12px; border: 1.5px solid var(--gold-2); border-radius: 2px; position: relative; flex: none; }
.share-url .lock::before { content: ''; position: absolute; left: 1px; right: 1px; top: -6px; height: 6px; border: 1.5px solid var(--gold-2); border-bottom: 0; border-radius: 4px 4px 0 0; }
.share-url .copied {
  margin-left: auto; font-family: var(--font); font-size: 12px; font-weight: 600; color: #17110a;
  background: var(--grad); padding: 3px 9px; border-radius: 999px;
  opacity: 0; transform: scale(.8);
}
html.js .share-link.in .copied { animation: copied 4s var(--ease-out) 1s infinite; }
@keyframes copied { 0%, 8% { opacity: 0; transform: scale(.8); } 14%, 60% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(.9); } }

/* =============================================================
   08 SPINATIVE AI + MCP
   ============================================================= */
.ai { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; }
.mode { margin-left: auto !important; display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.mode b { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: var(--muted); }
.mode b.is-on { background: rgba(255,255,255,.1); color: var(--text); }
.chat-body { padding: 22px; display: grid; gap: 14px; min-height: 420px; align-content: start; }
.msg { display: flex; gap: 12px; align-items: flex-start; max-width: 92%; }
html.js .msg { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
html.js .msg.show { opacity: 1; transform: none; }
.msg img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.msg b { display: block; font-size: 13px; margin-bottom: 3px; }
.msg p { font-size: 15px; line-height: 1.45; color: var(--text); }
.msg > div { padding: 12px 14px; border-radius: 16px; border-top-left-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--line); position: relative; }
.msg.me { margin-left: auto; }
.msg.me p { padding: 12px 15px; border-radius: 18px; border-bottom-right-radius: 6px; background: var(--grad); color: #17110a; font-weight: 500; }
.msg.task > div { padding-right: 64px; }
.done {
  position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 700; color: #7fe0b1;
  padding: 2px 8px; border-radius: 999px; background: rgba(87, 215, 161, .12); border: 1px solid rgba(87, 215, 161, .3);
}
.chat-input {
  margin: 0 16px 16px; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 12px 18px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted-2);
}
.call { font-size: 12.5px; font-weight: 600; color: #7fe0b1; padding: 6px 12px; border-radius: 999px; background: rgba(87,215,161,.1); border: 1px solid rgba(87,215,161,.28); }
.ai-side { display: grid; gap: 16px; align-content: start; }
.crew ul { display: grid; gap: 10px; }
.crew li { display: grid; grid-template-columns: 40px auto 1fr; align-items: center; gap: 12px; }
.crew li img { width: 40px; height: 40px; border-radius: 50%; }
.crew li b { font-size: 15px; }
.crew li span { color: var(--muted); font-size: 14px; }
.crew-note { margin-top: 14px; font-size: 13.5px !important; }

.mcp { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 5vw, 70px); align-items: center; margin-top: clamp(80px, 11vw, 150px); }
.mcp-head { display: grid; gap: 20px; }
.terminal { border-radius: var(--r-l); overflow: hidden; background: #0b0b0d; border: 1px solid var(--line-2); box-shadow: 0 50px 120px -50px rgba(0,0,0,.9); }
.term-body { padding: 22px; display: grid; gap: 14px; font-size: 14px; min-height: 330px; align-content: start; }
.t-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; color: var(--text); line-height: 1.5; }
html.js .terminal .t-line { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
html.js .terminal .t-line.show { opacity: 1; transform: none; }
.t-prompt { color: var(--gold-2); font-family: var(--mono); }
.t-you { font-weight: 500; }
.t-tool code { font-size: 12.5px; color: #c9c2ff; background: rgba(165, 139, 255, .1); padding: 2px 8px; border-radius: 6px; }
.t-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fe0b1; flex: none; align-self: center; }
.t-dot.gold { background: var(--gold-2); }
.t-ok { color: var(--muted); font-size: 13px; }
.t-say { color: var(--muted); padding-left: 18px; }
.t-quote { color: var(--text); padding: 12px 14px; border-radius: 12px; background: rgba(240, 202, 121, .07); border: 1px solid rgba(240, 202, 121, .25); }

/* =============================================================
   EVERYTHING AROUND THE GAME
   ============================================================= */
.more { padding: clamp(90px, 13vw, 170px) 0 clamp(60px, 8vw, 110px); }
.bento { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.bento h3 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 10px; }
.bento-wide { grid-column: span 2; overflow: hidden; }
.bento-full { grid-column: 1 / -1; }
.bento-marquee { margin-top: 18px; display: flex; width: max-content; white-space: nowrap; color: var(--muted-2) !important; font-size: 14px; animation: marquee 34s linear infinite; }
.bento-marquee span { padding-right: 6px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logos { color: var(--text) !important; line-height: 1.8 !important; }

/* =============================================================
   PRINCIPLE
   ============================================================= */
.principle { padding: clamp(100px, 14vw, 200px) 0; --p: 0; }
.principle-text {
  font-size: clamp(32px, 4.6vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.12;
  max-width: 22ch; margin-inline: auto; text-align: center;
}
html.js .principle-text .w > span { opacity: .16; transition: opacity .35s; }
html.js .principle-text .w.lit > span { opacity: 1; }

/* =============================================================
   PRICING
   ============================================================= */
.pricing { padding: clamp(60px, 8vw, 120px) 0 clamp(80px, 10vw, 140px); }
.trial {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 26px; border-radius: var(--r-l);
  background: linear-gradient(100deg, rgba(240, 202, 121, .12), rgba(240, 202, 121, .03));
  border: 1px solid rgba(240, 202, 121, .28); margin-bottom: 16px;
}
.trial b { display: block; font-size: 19px; letter-spacing: -0.015em; margin-bottom: 4px; }
.trial span { color: var(--muted); font-size: 15px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan {
  display: flex; flex-direction: column; gap: 14px; padding: 28px 24px;
  border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line);
}
.plan h3 { font-size: 20px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.pop { font-size: 11px; font-weight: 700; color: #17110a; background: var(--grad); padding: 3px 9px; border-radius: 999px; letter-spacing: 0; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-size: 46px; letter-spacing: -0.045em; line-height: 1; }
.price span { color: var(--muted); font-size: 14px; }
.plan-desc { color: var(--muted); font-size: 15px; }
.plan ul { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); flex: 1; }
.plan li { font-size: 14.5px; line-height: 1.4; padding-left: 24px; position: relative; color: var(--text); }
.plan li::before {
  content: ''; position: absolute; left: 2px; top: 4px; width: 11px; height: 6px;
  border-left: 2px solid var(--gold-2); border-bottom: 2px solid var(--gold-2); transform: rotate(-45deg);
}
.plan li.no { color: var(--muted-2); }
.plan li.no::before { width: 11px; height: 0; border-left: 0; border-bottom: 2px solid var(--muted-2); transform: none; top: 9px; }
.plan .btn { width: 100%; margin-top: 8px; white-space: normal; text-align: center; line-height: 1.2; }
.plan-pop {
  background: linear-gradient(180deg, #17140e, #0f0f12 60%);
  border-color: rgba(240, 202, 121, .4);
  box-shadow: 0 30px 80px -40px rgba(215, 168, 79, .4);
}
.pricing-note { margin-top: 22px; text-align: center; color: var(--muted); font-size: 15px; }
.founding {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  margin-top: clamp(48px, 6vw, 80px); padding: clamp(28px, 4vw, 52px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 90% at 0% 0%, rgba(215, 168, 79, .18), transparent 60%),
    linear-gradient(180deg, #131216, #0d0d10);
  border: 1px solid rgba(240, 202, 121, .25);
}
.founding h3 { font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -0.04em; line-height: 1.05; margin: 14px 0 16px; }
.founding-copy p:last-child { color: var(--muted); font-size: 17px; max-width: 46ch; }
.founding-offer { display: grid; gap: 16px; padding: 26px; border-radius: var(--r-l); background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.founding-offer ul { display: grid; gap: 9px; }
.founding-offer li { font-size: 15px; padding-left: 24px; position: relative; }
.founding-offer li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 11px; height: 6px; border-left: 2px solid var(--gold-2); border-bottom: 2px solid var(--gold-2); transform: rotate(-45deg); }
.founding-call { text-align: center; font-size: 14px; color: var(--muted); }
.founding-call:hover { color: var(--text); }

/* =============================================================
   TRUST
   ============================================================= */
.trust { padding: 0 0 clamp(80px, 10vw, 140px); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust h3 { font-size: 20px; letter-spacing: -0.02em; margin: 16px 0 8px; }
.trust a { color: var(--gold-2); }
.trust-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(240, 202, 121, .1); border: 1px solid rgba(240, 202, 121, .25); }
.trust-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* =============================================================
   FAQ
   ============================================================= */
.faq { padding: clamp(60px, 8vw, 120px) 0; border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--nav-h) + 40px); display: grid; gap: 18px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.015em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg);
  transition: transform .35s var(--ease-out), margin .35s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-body { padding: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 62ch; }
.faq-body a { color: var(--gold-2); }
.faq-head .lead { font-size: 17px; }

/* =============================================================
   FINAL
   ============================================================= */
.final { position: relative; padding: clamp(140px, 18vw, 260px) 0 clamp(120px, 14vw, 200px); overflow: hidden; text-align: center; --p: 0; }
.final-art { position: absolute; inset: 0; z-index: -1; }
.final-bg { width: 100%; height: 100%; object-fit: cover; opacity: .55; transform: scale(calc(1.15 - var(--p) * .12)); }
.final-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(5,5,6,.35) 35%, rgba(5,5,6,.55) 70%, var(--bg) 100%); }
.final-char {
  position: absolute; right: 4%; bottom: 0; height: 78%; width: auto; z-index: 1; opacity: .9;
  transform: translateY(calc((1 - var(--p)) * 80px));
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
}
.final-copy { position: relative; z-index: 2; display: grid; gap: 24px; justify-items: center; }
.final .h-chapter { max-width: 15ch; margin-inline: auto; }

/* =============================================================
   FOOTER
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-brand img { height: 22px; width: auto; margin-bottom: 14px; }
.footer-brand small { display: block; color: var(--muted-2); font-size: 13.5px; line-height: 1.55; max-width: 34ch; }
.footer-col { display: grid; gap: 9px; align-content: start; }
.footer-col span { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-col a { font-size: 13.5px; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted-2); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1360px) and (min-width: 961px) {
  .nav-links a[href="/docs"] { display: none; }
}
@media (max-width: 1120px) {
  .nav-links a { padding: 8px 9px; }
  .gd-body { grid-template-columns: 190px 1fr; }
  .gd-rules { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); grid-template-columns: 1fr 1fr 2fr; align-items: start; }
  .gd-plaques { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
  .rail { display: none; }
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 10px;
    background: rgba(14,14,17,.96); border: 1px solid var(--line); border-radius: 22px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s, transform .35s var(--ease-out);
  }
  .nav { position: relative; }
  .nav-wrap.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { font-size: 17px; padding: 13px 14px; color: var(--text); }
  .nav-links .nav-mobile { display: block; }
  .nav-signin, .nav-free { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: auto; }

  .chapter-index { grid-template-columns: repeat(2, 1fr); }
  .intro-note { font-size: 14px; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .math { grid-template-columns: 1fr 1fr; }
  .math-rtp { grid-row: auto; grid-column: 1 / -1; }
  .math-side { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .math-pay { grid-column: 1 / -1; }
  .art-dna { grid-template-columns: 1fr; }
  .layers-grid { grid-template-columns: 1fr; gap: 10px; align-content: center; }
  .layers-copy .lead { display: none; }
  .layers-copy { gap: 10px; text-align: center; justify-items: center; }
  .layers-count { display: none; }
  .layers-stage { height: min(58svh, 560px); }
  .layers-more { grid-template-columns: 1fr; }
  .motion { grid-template-columns: 1fr; }
  .motion-side { grid-template-columns: 1fr 1fr; }
  .mkt { grid-template-columns: 1fr 1fr; grid-template-areas: "hero hero" "rail square" "rail rect" "strip strip"; }
  .mkt-hero { aspect-ratio: 16 / 9; }
  .mkt-square, .mkt-rect { aspect-ratio: 1; }
  .preview-share { grid-template-columns: 1fr; }
  .ai { grid-template-columns: 1fr; }
  .mcp { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .founding { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .stage-steps .t { display: none; }
  .st-tags { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .nav { padding: 0 8px 0 18px; }
  .nav-cta .btn-gold { height: 36px; padding: 0 14px; font-size: 13.5px; }
  .hero { height: 440vh; }
  .hero-copy { padding-top: calc(var(--nav-h) + 56px); }
  .hero-actions .btn { flex: 1 1 auto; }
  .stage-wrap { width: calc(100vw - 2 * var(--gutter)); }
  .stage-steps { grid-template-columns: 1fr; gap: 0; min-height: 76px; }
  .stage-steps li { position: absolute; left: 0; right: 0; top: 0; opacity: 0; text-align: center; }
  .stage-steps li.on { opacity: 1; }
  .stage-steps .t { display: block; }
  .chapter-index { grid-template-columns: 1fr; }
  .chapter-index a { grid-template-columns: 44px 1fr; }
  .chapter-index img { width: 44px; height: 44px; }
  .specs { grid-template-columns: 1fr 1fr; gap: 22px; }
  .card { padding: 20px; }
  .gd-body { grid-template-columns: 1fr; min-height: 0; }
  .gd-features { grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .gd-grid { padding: 18px 12px 50px; }
  .gd-rules { grid-template-columns: 1fr; }
  .math-side { grid-template-columns: 1fr 1fr; }
  .motion-side { grid-template-columns: 1fr; }
  .mkt { grid-template-columns: 1fr; grid-template-areas: "hero" "square" "rail" "rect" "strip"; }
  .mkt-rail { aspect-ratio: 1 / 1.6; }
  .mkt-strip { aspect-ratio: 728 / 120; }
  .mkt-strip .mk-syms { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: auto; }
  .plans { grid-template-columns: 1fr; }
  .trial { flex-direction: column; align-items: flex-start; }
  .preview { padding: 0 12px; }
  .preview-frame { border-radius: 18px; }
  .gameplay-chapters { position: static; transform: none; margin: 10px auto 0; max-width: 100%; background: transparent; border: 0; padding: 0; }
  .preview-frame { overflow: visible; aspect-ratio: auto; background: transparent; border: 0; box-shadow: none; }
  .preview-frame video { aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid rgba(240, 202, 121, .22); }
  .final-char { height: 46%; right: -6%; opacity: .5; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .msg { max-width: 100%; }
}

/* ---------- Reduced motion: everything visible, nothing moving ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js [data-reveal], html.js [data-split] .w > span, html.js .msg, html.js .terminal .t-line { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero { height: auto; }
  .hero-sticky { position: relative; height: auto; overflow: visible; padding-bottom: 60px; }
  .hero-copy { position: relative; inset: auto; opacity: 1; transform: none; padding-bottom: 50px; }
  .stage-wrap { position: relative; left: auto; top: auto; transform: none; margin: 0 auto; --x3: 0; }
  .plane { --k: 1; }
  .stage-steps { opacity: 1; }
  .stage-steps li { opacity: 1; position: static; }
  .ch-layers { height: auto; }
  .layers-sticky { position: relative; height: auto; padding: 100px 0; }
  .layers-copy .lead, .layers-count { display: grid; }
  .art-row { transform: translateX(-10%); }
  html.js .principle-text .w > span { opacity: 1; }
  .preview-frame { transform: none !important; }
}
