/* ==========================================================================
   RELIC RINGS LANDING PAGE
   Design system. Edit the tokens below to retheme the whole page.
   Shape rule: buttons are full pills, panels use --r-panel, media is cut as a temple arch.
   Z-index scale: stage content 1, getbar 40, nav 50, toast 60.
   ========================================================================== */

:root {
  color-scheme: dark;

  --night-0: #0A1238;
  --night-1: #0E1740;
  --night-2: #16235E;
  --night-3: #1F3189;
  --gold: #F6B93B;
  --gold-hi: #FFD877;
  --gold-lo: #B9780F;
  --ink: #FFF4D9;
  --ink-dim: #BAC2EE;
  --line: rgba(255, 216, 119, 0.28);

  --font: "Pally", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --fs-hero: clamp(2.5rem, 1rem + 4.6vw, 4.2rem);
  --fs-h2: clamp(2rem, 1.2rem + 3.2vw, 3.7rem);
  --fs-h3: clamp(1.15rem, 1.02rem + 0.6vw, 1.45rem);
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --r-panel: 28px;
  --nav-h: 64px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night-1);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.55 var(--font);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 70; padding: 12px 18px; border-radius: 999px; background: var(--gold); color: var(--night-1); font-weight: 700; transition: top 0.2s; }
.skip:focus { top: 12px; }
.noscript { margin: 0; padding: 10px var(--gutter); background: var(--night-3); text-align: center; font-size: 0.95rem; }

.wrap { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }
.h2 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; max-width: 20ch; text-shadow: 0 3px 0 rgba(4, 8, 32, 0.28); }
.h3 { font-size: var(--fs-h3); line-height: 1.15; font-weight: 700; letter-spacing: -0.005em; }

/* STAGE: every section is its own atmosphere. Washes and grain sit behind the content. */
.stage { position: relative; isolation: isolate; padding-block: clamp(72px, 10vw, 140px); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, var(--night-1) 0, transparent 16%, transparent 84%, var(--night-1) 100%); }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain); opacity: 0.06; }
.stage__wash { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; pointer-events: none; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--night-1);
  font: 700 1.05rem / 1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 5px 0 var(--gold-lo), 0 16px 22px -10px rgba(4, 8, 32, 0.75);
  transition: filter 0.2s, transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 2px 0 var(--gold-lo), 0 8px 14px -8px rgba(4, 8, 32, 0.75); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 0.95rem; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 4px 0 var(--gold-lo), 0 12px 18px -10px rgba(4, 8, 32, 0.75); }
.btn--store { min-height: 64px; padding: 0 30px 0 22px; gap: 14px; text-align: left; }
.btn--store img { width: 28px; height: 28px; flex: none; }
.btn__label { display: grid; gap: 4px; }
.btn__label small { font-size: 0.72rem; font-weight: 500; line-height: 1; opacity: 0.82; }
.btn__label strong { font-size: 1.22rem; line-height: 1; }

/* NAVIGATION */
.nav { position: fixed; z-index: 50; top: max(10px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; padding-inline: var(--gutter); pointer-events: none; }
.nav__bar, .menu { pointer-events: auto; width: min(100%, 1120px); }
.nav__bar {
  height: var(--nav-h); display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; border-radius: 999px;
  background: rgba(14, 23, 64, 0.64); border: 1px solid rgba(255, 216, 119, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 244, 217, 0.16), 0 14px 30px -14px rgba(4, 8, 32, 0.85);
}
@media (prefers-reduced-transparency: reduce) { .nav__bar { background: var(--night-2); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav__brand img { width: 40px; height: auto; }
.nav__links { display: flex; flex: 1; justify-content: center; gap: 2px; }
.nav__links a { display: block; padding: 10px 12px; border-radius: 999px; color: var(--ink-dim); font-size: 0.95rem; text-decoration: none; white-space: nowrap; transition: color 0.2s, background-color 0.2s; }
.nav__links a:hover { color: var(--ink); background: rgba(255, 244, 217, 0.08); }
.nav__links a[aria-current="true"] { color: var(--gold); }
.nav__toggle { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; background: rgba(255, 244, 217, 0.1); cursor: pointer; }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 3px; border-radius: 3px; background: var(--ink); transition: transform 0.25s var(--ease), top 0.25s var(--ease); }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.menu { margin-top: 8px; padding: 14px; border-radius: var(--r-panel); background: var(--night-2); border: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(4, 8, 32, 0.9); display: grid; gap: 10px; }
.menu[hidden] { display: none; }
.menu a:not(.btn) { display: block; padding: 14px 16px; border-radius: 16px; font-size: 1.15rem; text-decoration: none; }
.menu a:not(.btn):hover { background: rgba(255, 244, 217, 0.08); }
.menu .btn { width: 100%; }
@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__cta { margin-left: auto; }
  .nav__toggle { margin-left: 0; }
}
@media (max-width: 479px) { .nav__cta { display: none; } .nav__toggle { margin-left: auto; } }

/* HERO */
.hero { min-height: 100dvh; display: grid; align-items: center; padding-top: calc(var(--nav-h) + 44px); padding-bottom: clamp(40px, 5vw, 88px); background: var(--night-1); overflow: hidden; }
.hero::before { background: linear-gradient(90deg, rgba(10, 18, 56, 0.92) 0%, rgba(10, 18, 56, 0.6) 42%, rgba(10, 18, 56, 0.12) 72%), linear-gradient(180deg, transparent 70%, var(--night-1) 100%); }
.hero__sky { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__wash { position: absolute; top: 0; height: 100%; width: 64%; object-fit: cover; opacity: 0.85; }
.hero__wash--l { left: 0; -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent); mask-image: linear-gradient(90deg, #000 30%, transparent); }
.hero__wash--r { right: 0; -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent); mask-image: linear-gradient(270deg, #000 30%, transparent); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero__logo { width: clamp(112px, 14vw + 60px, 236px); height: auto; margin-bottom: clamp(8px, 1.4vw, 18px); filter: drop-shadow(0 12px 14px rgba(4, 8, 32, 0.5)); }
.hero__title { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; text-shadow: 0 4px 0 rgba(4, 8, 32, 0.3); max-width: 13ch; }
.hero__lede { margin-top: clamp(14px, 2vw, 22px); max-width: 34ch; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(22px, 3vw, 34px); }
.hero__cta .btn { flex: 1 1 210px; max-width: 260px; }

/* PORTAL: a live miniature of the game inside a temple arch. */
.portal { position: relative; width: min(100%, 480px); justify-self: center; container-type: inline-size; }
.portal__frame { position: relative; aspect-ratio: 5 / 8; }
.portal__arch {
  position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px 30px 30px; background: var(--night-2);
  box-shadow: 0 0 0 5px var(--gold), 0 0 0 9px rgba(120, 78, 12, 0.6), 0 34px 50px -22px rgba(3, 6, 28, 0.9);
}
.portal__art { position: absolute; left: -4%; top: -1%; width: 108%; max-width: none; height: auto; will-change: transform; }
.portal__palm { position: absolute; right: -10%; bottom: -3%; width: 34%; z-index: 3; filter: drop-shadow(0 10px 8px rgba(5, 8, 32, 0.5)); pointer-events: none; }
.portal__fox { position: absolute; left: -10%; bottom: -3%; width: 27%; z-index: 3; filter: drop-shadow(0 10px 8px rgba(5, 8, 32, 0.55)); transform-origin: 50% 100%; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .portal__fox { animation: breathe 4.2s ease-in-out infinite; } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.025) scaleX(0.99); } }
.portal__tip {
  position: absolute; z-index: 4; left: 20%; right: 24%; bottom: 1.5%; padding: 9px 14px; border-radius: 18px 18px 18px 4px;
  background: var(--ink); color: var(--night-1); font-size: clamp(0.74rem, 3.3cqw, 0.95rem); line-height: 1.28; font-weight: 500;
  box-shadow: 0 10px 16px -8px rgba(4, 8, 32, 0.7);
}

.seal { position: absolute; left: 50%; top: 61%; width: 86%; aspect-ratio: 435 / 416; translate: -50% -50%; }
.seal__board { display: block; width: 100%; height: 100%; filter: drop-shadow(0 14px 12px rgba(40, 20, 0, 0.4)); }
.seal__claps i { position: absolute; width: 13%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--gold-hi); opacity: 0; pointer-events: none; }
.seal__claps i { transition: opacity 0.2s, scale 0.3s var(--ease); }
.seal__claps i.is-hot { opacity: 1; scale: 1.18; }
.spark { position: absolute; z-index: 4; width: 11px; height: 11px; background: var(--gold-hi); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); pointer-events: none; translate: -50% -50%; }
.clasp--n { left: 43.5%; top: -2%; }
.clasp--e { right: -1%; top: 43.5%; }
.clasp--s { left: 43.5%; bottom: -2%; }
.clasp--w { left: -1%; top: 43.5%; }
.ring { position: absolute; left: calc(50% + var(--x) * 1%); top: calc(50% + var(--y) * 1%); width: calc(var(--s) * 1%); aspect-ratio: 1; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.ring img { display: block; width: 100%; height: 100%; object-fit: contain; transform: rotate(calc(var(--rot, 0) * 1deg)); pointer-events: none; filter: drop-shadow(0 6px 4px rgba(40, 20, 0, 0.38)); }
.ring.is-grab { cursor: grabbing; }
.ring:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ring.is-free { pointer-events: none; }

.result { position: absolute; z-index: 5; left: 50%; top: 58%; translate: -50% -50%; width: 78%; padding: 22px 16px 20px; border-radius: var(--r-panel); background: rgba(14, 23, 64, 0.95); border: 3px solid var(--gold); text-align: center; box-shadow: 0 24px 36px -18px rgba(3, 6, 28, 0.9); }
.result[hidden] { display: none; }
.result__title { font-size: clamp(1.4rem, 8cqw, 2.2rem); line-height: 1.05; color: var(--gold); letter-spacing: -0.01em; }
.result__stars { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin: 12px 0 6px; }
.result__stars i { width: 12cqw; aspect-ratio: 1; background: var(--gold); clip-path: polygon(50% 0, 62% 35%, 98% 36%, 69% 58%, 80% 92%, 50% 71%, 20% 92%, 31% 58%, 2% 36%, 38% 35%); }
.result__stars i:nth-child(2) { width: 16cqw; margin-bottom: 8px; background: var(--gold-hi); }
.result__praise { margin-bottom: 14px; font-size: clamp(0.95rem, 4cqw, 1.2rem); font-weight: 700; }

/* ABOUT */
.about { background: var(--night-1); }
.about__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr); gap: clamp(24px, 6vw, 96px); align-items: center; }
.about__main { display: grid; gap: 26px; }
.about__text { max-width: 46ch; font-size: clamp(1.12rem, 1rem + 0.7vw, 1.5rem); line-height: 1.5; }
.about__emblem { width: min(100%, 420px); justify-self: center; filter: drop-shadow(0 22px 22px rgba(3, 6, 28, 0.6)); will-change: transform; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 22px clamp(28px, 5vw, 72px); margin-top: 14px; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; }
.stat dd { font-size: clamp(2.6rem, 1.8rem + 3.6vw, 5rem); line-height: 1; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; text-shadow: 0 4px 0 rgba(4, 8, 32, 0.35); }
.stat dt { color: var(--ink-dim); font-size: 0.98rem; }

/* HOW TO PLAY */
.how { background: var(--night-0); }
.how::before { background: repeating-radial-gradient(circle at 82% 22%, transparent 0 54px, rgba(255, 216, 119, 0.07) 55px 56px); -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); }
.how__title { margin-bottom: clamp(28px, 4vw, 56px); }
.how__grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 8vw, 120px); align-items: start; }
.how__device { position: relative; height: 100%; }
.phone { position: relative; padding: 8px; border-radius: 36px; background: #E7A62E; box-shadow: inset 0 0 0 3px rgba(110, 70, 10, 0.6), 0 30px 44px -22px rgba(3, 6, 28, 0.9); }
.phone img { display: block; width: 100%; height: auto; border-radius: 29px; aspect-ratio: 600 / 1298; object-fit: cover; }
.phone--sticky { position: sticky; top: max(92px, calc(50dvh - 340px)); height: min(78dvh, 720px); width: auto; aspect-ratio: 600 / 1298; margin-inline: auto; }
.phone__shot { position: absolute; inset: 8px; width: calc(100% - 16px) !important; height: calc(100% - 16px) !important; opacity: 0; transition: opacity 0.5s var(--ease); }
.phone__shot.is-on { opacity: 1; }
.steps { display: grid; }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 24px; align-items: center; min-height: 62dvh; opacity: 0.5; transition: opacity 0.4s; }
.step.is-active { opacity: 1; }
.step__fox { height: clamp(110px, 13vw, 168px); width: auto; filter: drop-shadow(0 10px 8px rgba(3, 6, 28, 0.5)); }
.step p { margin-top: 10px; max-width: 38ch; }
.step .step__tip { margin-top: 16px; padding: 10px 16px; border-radius: 18px; background: rgba(255, 244, 217, 0.07); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-dim); font-size: 0.98rem; max-width: 34ch; }
.step__shot { display: none; }
@media (max-width: 899px) {
  .how__device { display: none; }
  .how__grid { grid-template-columns: minmax(0, 1fr); }
  .step { min-height: 0; opacity: 1; padding-bottom: 56px; }
  .step__shot { display: block; grid-column: 1 / -1; width: min(72%, 300px); margin: 6px auto 0; border-radius: 30px; border: 8px solid #E7A62E; box-shadow: 0 24px 34px -20px rgba(3, 6, 28, 0.9); aspect-ratio: 600 / 1298; object-fit: cover; }
}

/* WORLDS */
.worlds { --gw: clamp(220px, calc((100dvh - 500px) * 0.75), 380px); background: var(--night-0); padding-block: clamp(80px, 9vw, 120px) 0; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.worlds::before { background: linear-gradient(180deg, var(--night-1) 0, transparent 14%), radial-gradient(120% 80% at 50% 100%, rgba(31, 49, 137, 0.55), transparent 70%); }
.worlds__head { display: grid; gap: 12px; }
.worlds__sub { max-width: 52ch; color: var(--ink-dim); }
.worlds__viewport { overflow-x: auto; scroll-snap-type: x proximity; padding: clamp(18px, 3vw, 34px) var(--gutter) 22px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.worlds__track { display: flex; gap: clamp(16px, 3vw, 34px); width: max-content; padding-right: var(--gutter); }
.gate { flex: none; width: var(--gw); scroll-snap-align: center; display: grid; gap: 4px; align-content: start; }
.gate__arch { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 22px 22px; box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px rgba(120, 78, 12, 0.55), 0 26px 34px -20px rgba(3, 6, 28, 0.95); margin-bottom: 18px; background: var(--night-2); }
.gate__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; display: block; }
.gate__name { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); color: var(--gold); line-height: 1.1; letter-spacing: -0.01em; }
.gate__tag { color: var(--ink); font-size: 0.98rem; line-height: 1.35; min-height: 2.7em; }
.gate__range { color: var(--ink-dim); font-size: 0.88rem; }
.worlds__progress { height: 4px; margin: 6px var(--gutter) 26px; border-radius: 4px; background: rgba(255, 244, 217, 0.14); overflow: hidden; display: none; }
.worlds.is-pinned .worlds__progress { display: block; }
.worlds__progress i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0.1); }
.worlds.is-pinned .worlds__viewport { overflow: visible; scroll-snap-type: none; }

/* TWISTS */
.twists { background: var(--night-1); }
.twists__grid { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); margin-top: clamp(28px, 4vw, 52px); align-items: start; }
.twists__tabs { display: grid; gap: 6px; }
.tab { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 18px 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-dim); font-weight: 500; font-size: 1.05rem; text-align: left; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tab img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.tab:hover { background: rgba(255, 244, 217, 0.07); color: var(--ink); }
.tab[aria-selected="true"] { background: rgba(246, 185, 59, 0.13); color: var(--ink); box-shadow: inset 0 0 0 2px var(--gold); font-weight: 700; }
.twists__stage { border-radius: var(--r-panel); padding: clamp(18px, 3vw, 36px); background: linear-gradient(160deg, rgba(31, 49, 137, 0.6), rgba(14, 23, 64, 0.8)); box-shadow: inset 0 1px 0 rgba(255, 244, 217, 0.14), 0 30px 40px -28px rgba(3, 6, 28, 0.9); }
.twist { display: grid; grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); column-gap: clamp(20px, 4vw, 48px); row-gap: 10px; align-items: center; }
.js .twist[hidden] { display: none; }
.twist .demo { grid-row: 1 / span 2; }
.twist .h3 { align-self: end; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); color: var(--gold); }
.twist p { align-self: start; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); max-width: 30ch; }
.demo { position: relative; width: 100%; aspect-ratio: 1; container-type: inline-size; border-radius: 26px; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(10, 18, 56, 0.55) 0 64%, rgba(10, 18, 56, 0.9) 65%); }
.demo::before { content: ""; position: absolute; inset: 4%; background: url("../img/objects/board.webp") center / contain no-repeat; opacity: 0.95; }
.demo img { position: absolute; display: block; max-width: none; height: auto; }
.d-ring { width: 36cqw; filter: drop-shadow(0 4px 3px rgba(40, 20, 0, 0.4)); transform-origin: 50% 50%; }
.d-ice, .d-thaw, .d-free, .d-vine, .d-bare { filter: drop-shadow(0 4px 3px rgba(40, 20, 0, 0.4)); }

.demo--twin .d-a { left: 9cqw; top: 31cqw; }
.demo--twin .d-b { left: 55cqw; top: 31cqw; }
.demo--twin .d-rope { left: 30cqw; top: 46cqw; width: 40cqw; }
.demo--mirror .d-a { left: 9cqw; top: 31cqw; }
.demo--mirror .d-b { left: 55cqw; top: 31cqw; }
.demo--mirror .d-gear { left: 41cqw; top: 43cqw; width: 18cqw; }
.demo--frozen .d-ice, .demo--frozen .d-thaw { left: 28cqw; top: 29cqw; width: 42cqw; }
.demo--frozen .d-thaw { opacity: 0; }
.demo--frozen .d-free { left: 62cqw; top: 8cqw; width: 28cqw; }
.demo--notched .d-main { left: 26cqw; top: 25cqw; width: 48cqw; }
.demo--notched .d-clasp { left: 70cqw; top: 40cqw; width: 20cqw; }
.demo--lock .d-a { left: 6cqw; top: 12cqw; width: 34cqw; }
.demo--lock .d-b { left: 60cqw; top: 54cqw; width: 34cqw; }
.demo--lock .d-lock, .demo--lock .d-open { left: 38cqw; top: 41cqw; width: 24cqw; }
.demo--lock .d-open { opacity: 0; }
.demo--lock .d-key { left: 20cqw; top: 28cqw; width: 15cqw; }
.demo--vine .d-vine, .demo--vine .d-bare { left: 27cqw; top: 26cqw; width: 46cqw; }
.demo--vine .d-bare { opacity: 0; }
.demo--vine .d-mini { width: 22cqw; }
.demo--vine .d-m1 { left: 5cqw; top: 6cqw; }
.demo--vine .d-m2 { left: 73cqw; top: 70cqw; }
.d-count { position: absolute; left: 66cqw; top: 18cqw; width: 14cqw; aspect-ratio: 1; border-radius: 50%; background: var(--gold); color: var(--night-1); font-weight: 700; font-size: 9cqw; line-height: 14cqw; text-align: center; box-shadow: 0 4px 0 var(--gold-lo); }
.d-count i { position: absolute; inset: 0; font-style: normal; opacity: 0; }
.d-count i:first-child { opacity: 1; }
.demo--tide .d-main { left: 24cqw; top: 22cqw; width: 46cqw; }
.demo--tide .d-flow { left: 38cqw; top: 76cqw; width: 18cqw; }
.demo--phase .d-dial { left: 41cqw; top: 3cqw; width: 18cqw; }
.demo--phase .d-wrap { position: absolute; width: 38cqw; aspect-ratio: 1; top: 34cqw; }
.demo--phase .d-sun { left: 8cqw; }
.demo--phase .d-moon { left: 54cqw; }
.demo--phase .d-wrap .d-ring { left: 0; top: 0; width: 100%; }
.demo--phase .d-plug { left: 62%; top: 33%; width: 38%; }

@media (prefers-reduced-motion: no-preference) {
  .twist:not([hidden]) .demo--twin .d-a, .twist:not([hidden]) .demo--twin .d-b { animation: turn-fwd 3.6s var(--ease) infinite alternate; }
  .twist:not([hidden]) .demo--mirror .d-a { animation: turn-fwd 3.6s var(--ease) infinite alternate; }
  .twist:not([hidden]) .demo--mirror .d-b { animation: turn-back 3.6s var(--ease) infinite alternate; }
  .twist:not([hidden]) .demo--mirror .d-gear { animation: turn-back 3.6s var(--ease) infinite alternate; }
  .twist:not([hidden]) .demo--frozen .d-ice { animation: ice-out 7s ease-in-out infinite; }
  .twist:not([hidden]) .demo--frozen .d-thaw { animation: thaw-in 7s ease-in-out infinite; }
  .twist:not([hidden]) .demo--frozen .d-free { animation: free-leave 7s ease-in-out infinite; }
  .twist:not([hidden]) .demo--notched .d-main { animation: notch 6.4s steps(8, jump-end) infinite; }
  .twist:not([hidden]) .demo--lock .d-key { animation: key-go 6.4s ease-in-out infinite; }
  .twist:not([hidden]) .demo--lock .d-lock { animation: lock-out 6.4s ease-in-out infinite; }
  .twist:not([hidden]) .demo--lock .d-open { animation: lock-in 6.4s ease-in-out infinite; }
  .twist:not([hidden]) .demo--lock .d-b { animation: b-turn 6.4s ease-in-out infinite; }
  .twist:not([hidden]) .demo--vine .d-vine { animation: vine-out 7.2s ease-in-out infinite; }
  .twist:not([hidden]) .demo--vine .d-bare { animation: bare-in 7.2s ease-in-out infinite; }
  .twist:not([hidden]) .demo--vine .d-m1 { animation: mini-a 7.2s ease-in-out infinite; }
  .twist:not([hidden]) .demo--vine .d-m2 { animation: mini-b 7.2s ease-in-out infinite; }
  .twist:not([hidden]) .demo--vine .d-count i:nth-child(1) { animation: count-2 7.2s steps(1) infinite; }
  .twist:not([hidden]) .demo--vine .d-count i:nth-child(2) { animation: count-1 7.2s steps(1) infinite; }
  .twist:not([hidden]) .demo--vine .d-count i:nth-child(3) { animation: count-0 7.2s steps(1) infinite; }
  .twist:not([hidden]) .demo--tide .d-main { animation: tide-step 6.4s steps(4, jump-end) infinite; }
  .twist:not([hidden]) .demo--tide .d-flow { animation: flow 1.6s ease-in-out infinite; }
  .twist:not([hidden]) .demo--phase .d-dial { animation: dial 8s ease-in-out infinite; }
  .twist:not([hidden]) .demo--phase .d-sun { animation: sun-leave 8s ease-in-out infinite; }
  .twist:not([hidden]) .demo--phase .d-moon { animation: moon-leave 8s ease-in-out infinite; }
}
@keyframes turn-fwd { from { rotate: 0deg; } to { rotate: 150deg; } }
@keyframes turn-back { from { rotate: 0deg; } to { rotate: -150deg; } }
@keyframes ice-out { 0%, 54% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes thaw-in { 0%, 54% { opacity: 0; rotate: 0deg; } 62% { opacity: 1; rotate: 0deg; } 90%, 98% { opacity: 1; rotate: 120deg; } 100% { opacity: 0; rotate: 120deg; } }
@keyframes free-leave { 0%, 6% { translate: 0 0; rotate: 0deg; opacity: 1; } 20% { rotate: 140deg; translate: 0 0; opacity: 1; } 42% { translate: 44cqw 0; rotate: 140deg; opacity: 0; } 43%, 94% { translate: 44cqw 0; opacity: 0; } 95% { translate: 0 0; rotate: 0deg; opacity: 0; } 100% { translate: 0 0; rotate: 0deg; opacity: 1; } }
@keyframes notch { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes key-go { 0%, 8% { translate: 0 0; opacity: 1; } 34% { translate: 19cqw 14cqw; opacity: 1; } 40%, 94% { translate: 19cqw 14cqw; opacity: 0; } 95% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes lock-out { 0%, 38% { opacity: 1; } 44%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lock-in { 0%, 38% { opacity: 0; } 44%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes b-turn { 0%, 48% { rotate: 0deg; } 80%, 94% { rotate: 130deg; } 100% { rotate: 0deg; } }
@keyframes vine-out { 0%, 54% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes bare-in { 0%, 54% { opacity: 0; rotate: 0deg; } 62% { opacity: 1; rotate: 0deg; } 90%, 98% { opacity: 1; rotate: 130deg; } 100% { opacity: 0; rotate: 130deg; } }
@keyframes mini-a { 0%, 10% { translate: 0 0; opacity: 1; } 26% { translate: -14cqw -14cqw; opacity: 0; } 27%, 94% { opacity: 0; translate: -14cqw -14cqw; } 95% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes mini-b { 0%, 34% { translate: 0 0; opacity: 1; } 50% { translate: 14cqw 14cqw; opacity: 0; } 51%, 94% { opacity: 0; translate: 14cqw 14cqw; } 95% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes count-2 { 0% { opacity: 1; } 27%, 100% { opacity: 0; } }
@keyframes count-1 { 0%, 26% { opacity: 0; } 27%, 51% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes count-0 { 0%, 51% { opacity: 0; } 52%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }
@keyframes tide-step { from { rotate: 0deg; } to { rotate: 180deg; } }
@keyframes flow { 0%, 100% { translate: 0 0; opacity: 0.7; } 50% { translate: 12cqw 0; opacity: 1; } }
@keyframes dial { 0%, 44% { rotate: 0deg; } 50%, 94% { rotate: 180deg; } 100% { rotate: 360deg; } }
@keyframes sun-leave { 0%, 8% { translate: 0 0; opacity: 1; } 34% { translate: -34cqw 14cqw; opacity: 0; } 35%, 94% { translate: -34cqw 14cqw; opacity: 0; } 95% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes moon-leave { 0%, 56% { translate: 0 0; opacity: 1; } 84% { translate: 34cqw 14cqw; opacity: 0; } 85%, 94% { translate: 34cqw 14cqw; opacity: 0; } 95% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }

@media (max-width: 899px) {
  .twists__grid { grid-template-columns: minmax(0, 1fr); }
  .twists__tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; }
  .tab { flex: none; scroll-snap-align: start; white-space: nowrap; background: rgba(255, 244, 217, 0.07); }
  .twist { grid-template-columns: minmax(0, 1fr); }
  .twist .demo { grid-row: auto; width: min(100%, 360px); margin-inline: auto; }
  .twist .h3 { align-self: start; }
}

/* BENTO */
.tools { background: var(--night-0); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: clamp(28px, 4vw, 52px); }
.tile { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-panel); background: var(--night-2); box-shadow: inset 0 1px 0 rgba(255, 244, 217, 0.12), 0 26px 36px -26px rgba(3, 6, 28, 0.95); }
.tile p { color: var(--ink); max-width: 30ch; }
.tile__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 18, 56, 0.74), rgba(10, 18, 56, 0.35)); pointer-events: none; }
.tile--chain { grid-column: 1 / 6; grid-row: 1 / 3; min-height: 600px; padding-bottom: 0; }
.tile--chain .tile__bg { object-position: 50% 30%; }
.tile--chain::before { background: linear-gradient(180deg, rgba(10, 18, 56, 0.86) 0%, rgba(10, 18, 56, 0.4) 55%, rgba(10, 18, 56, 0.1)); }
.phone--tile { width: min(64%, 300px); margin: auto auto -14%; padding: 7px; border-radius: 32px; }
.phone--tile img { border-radius: 26px; }
.tile--tools { grid-column: 6 / 13; background: var(--night-3); }
.tile--tools::before { display: none; }
.tools__list { display: grid; gap: 14px; margin-top: 8px; }
.tools__list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; }
.tools__list img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 4px rgba(3, 6, 28, 0.5)); }
.tools__list strong { display: block; font-size: 1.15rem; color: var(--gold); }
.tools__list span { color: var(--ink); font-size: 1rem; }
.tile--relic { grid-column: 6 / 10; }
.tile--guard { grid-column: 10 / 13; }
.tile--relic::before { background: linear-gradient(180deg, rgba(10, 40, 30, 0.7), rgba(10, 18, 56, 0.8)); }
.tile--guard::before { background: linear-gradient(180deg, rgba(60, 38, 8, 0.55), rgba(10, 18, 56, 0.85)); }
.tile__art { width: clamp(88px, 10vw, 128px); height: auto; margin-bottom: 6px; filter: drop-shadow(0 12px 10px rgba(3, 6, 28, 0.55)); }
@media (max-width: 899px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--chain { grid-column: 1 / -1; grid-row: auto; min-height: 0; }
  .tile--tools { grid-column: 1 / -1; }
  .tile--relic, .tile--guard { grid-column: auto; }
}
@media (max-width: 520px) { .tile--relic, .tile--guard { grid-column: 1 / -1; } }

/* REWARDS */
.rewards { background: var(--night-1); }
.rewards__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.rewards__phones { position: relative; min-height: clamp(460px, 54vw, 660px); }
.phone--fan { position: absolute; width: min(56%, 270px); }
.phone--l { left: 2%; top: 7%; rotate: -6deg; }
.phone--r { right: 0; top: 0; rotate: 5deg; z-index: 2; }
.perks { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(24px, 3vw, 40px); }
.perks li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; }
.perks img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 4px rgba(3, 6, 28, 0.5)); }
.perks p { margin-top: 4px; color: var(--ink-dim); max-width: 44ch; }
@media (max-width: 899px) {
  .rewards__grid { grid-template-columns: minmax(0, 1fr); }
  .rewards__phones { order: 2; min-height: 460px; }
  .phone--fan { width: min(48%, 240px); }
}

/* GALLERY */
.gallery { background: var(--night-0); }
.gallery__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.gallery__nav { display: flex; gap: 10px; }
.round { position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--night-3); box-shadow: inset 0 0 0 2px var(--gold); cursor: pointer; transition: background-color 0.2s, transform 0.12s var(--ease); }
.round:hover { background: var(--night-2); }
.round:active { transform: scale(0.95); }
.round:disabled { opacity: 0.35; cursor: default; }
.round__arrow { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; border-top: 3px solid var(--gold); border-right: 3px solid var(--gold); rotate: 45deg; translate: -70% -50%; }
.round__arrow--l { rotate: -135deg; translate: -30% -50%; }
.gallery__rail { display: flex; gap: clamp(16px, 2.4vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; padding: clamp(28px, 4vw, 48px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 24px; scroll-padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.shot { flex: none; width: clamp(200px, 22vw, 262px); scroll-snap-align: start; display: grid; gap: 14px; }
.shot figcaption { text-align: center; color: var(--ink-dim); font-size: 0.95rem; }
.gallery__note { margin-top: 8px; color: var(--ink-dim); font-size: 0.88rem; }

/* FAQ */
.faq { background: var(--night-1); }
.faq__wrap { display: grid; gap: clamp(24px, 4vw, 44px); max-width: 880px; }
.faq__list { display: grid; gap: 10px; }
.faq details { border-radius: 22px; background: rgba(255, 244, 217, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 216, 119, 0.14); transition: background-color 0.2s; }
.faq details[open] { background: rgba(255, 244, 217, 0.1); box-shadow: inset 0 0 0 2px rgba(255, 216, 119, 0.42); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 22px; font-weight: 700; font-size: 1.1rem; cursor: pointer; border-radius: 22px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 3px solid var(--gold); border-bottom: 3px solid var(--gold); rotate: 45deg; translate: 0 -3px; transition: rotate 0.3s var(--ease), translate 0.3s var(--ease); }
.faq details[open] summary::after { rotate: -135deg; translate: 0 3px; }
.faq details p { padding: 0 22px 22px; max-width: 62ch; color: var(--ink); }
.faq a { color: var(--gold-hi); text-underline-offset: 3px; }

/* FINALE (download + footer) */
.finale { min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(36px, 6vw, 72px); padding-block: clamp(96px, 12vw, 160px) 0; overflow: hidden; background: var(--night-0); }
.finale::before { background: linear-gradient(180deg, rgba(14, 23, 64, 0.5) 0, rgba(10, 18, 56, 0.86) 56%, var(--night-0) 100%); }
.finale__art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; opacity: 0.6; max-width: none; }
.finale__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(16px, 4vw, 56px); align-items: end; }
.finale__copy { display: grid; gap: 18px; justify-items: start; }
.finale .h2 { font-size: clamp(2.3rem, 1rem + 5.6vw, 5.2rem); max-width: 12ch; }
.finale__lede { max-width: 36ch; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); }
.finale__fox { width: clamp(150px, 22vw, 300px); height: auto; margin-bottom: -6px; filter: drop-shadow(0 14px 12px rgba(3, 6, 28, 0.6)); }
.finale__links { display: grid; gap: 16px; }
.finale__links ul { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.finale__links a { color: var(--ink); text-underline-offset: 4px; }
.finale__links a:hover { color: var(--gold-hi); }
.finale__legal { max-width: 78ch; color: var(--ink-dim); font-size: 0.85rem; line-height: 1.5; }
.finale__mark { margin: 0; text-align: center; white-space: nowrap; user-select: none; font-weight: 700; font-size: 15.4vw; line-height: 0.74; letter-spacing: -0.03em; color: var(--gold); transform: translateY(10%); padding-top: 2vw; }

/* GET BAR + TOAST */
.getbar { position: fixed; z-index: 40; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; }
.getbar[hidden] { display: none; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: max(88px, calc(env(safe-area-inset-bottom) + 76px)); translate: -50% 20px; max-width: min(92vw, 420px); padding: 14px 22px; border-radius: 999px; background: var(--night-2); color: var(--ink); text-align: center; font-weight: 500; box-shadow: inset 0 0 0 2px var(--gold), 0 18px 28px -14px rgba(3, 6, 28, 0.9); opacity: 0; pointer-events: none; transition: opacity 0.25s, translate 0.35s var(--ease); }
.toast.is-on { opacity: 1; translate: -50% 0; }
@media (min-width: 768px) { .getbar { display: none; } }

/* RESPONSIVE LAYOUT */
@media (max-width: 899px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { align-items: start; }
  .hero__title { max-width: 14ch; }
  .hero__cta .btn { max-width: none; }
  .portal { width: min(88%, 440px); margin-top: 8px; }
  .about__wrap { grid-template-columns: minmax(0, 1fr); }
  .about__emblem { width: min(70%, 300px); justify-self: start; }
  .stats { grid-template-columns: repeat(2, auto); }
  .finale__inner { grid-template-columns: minmax(0, 1fr); }
  .finale__fox { justify-self: end; margin-top: -40px; width: clamp(120px, 36vw, 200px); }
}
@media (max-width: 560px) {
  .gallery__head { align-items: center; }
  .round { width: 46px; height: 46px; }
}

/* REDUCED MOTION: no loops, no parallax, no smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
