/* index.html: the big, drenched, scroll-story homepage. Same voice and fonts as the game's Tavern kit. */

@font-face { font-family: "Lilita One"; src: url("../fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #3b2314;
  --ink-2: #24150c;
  --cream: #fff3d6;
  --paper: #fffaf0;
  --gold: #ffcc33;
  --red: #e5483b;
  --red-dark: #b8321f;

  /* section grounds: the page re-colours as you scroll */
  --green: #3b9a31;
  --sky: #2a7fc4;
  --purple: #6a36c9;
  --goldbg: #ffc21a;
  --night: #173c3a;
  --ks: #05ce78;
  --redbg: #d33b2f;

  --bg: var(--green);
  --fg: var(--cream);
  --lip: var(--ink);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
body[data-bg="green"] { --bg: var(--green); }
body[data-bg="sky"] { --bg: var(--sky); }
body[data-bg="purple"] { --bg: var(--purple); }
body[data-bg="gold"] { --bg: var(--goldbg); }
body[data-bg="night"] { --bg: var(--night); }
body[data-bg="ks"] { --bg: var(--ks); }
body[data-bg="red"] { --bg: var(--redbg); }

* , *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 800 1.08rem/1.5 "Nunito", ui-rounded, system-ui, sans-serif;
  color: var(--cream);
  background: var(--bg);
  transition: background-color .7s var(--ease-out);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; border-radius: 8px; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* chunky display type with the kit's ink lip */
.hero__title, .say, .mega, .ks__title, .explore__title {
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: .005em;
  margin: 0;
  color: var(--cream);
  text-shadow: 0 .06em 0 var(--ink);
  text-wrap: balance;
}
.sec[data-ink="dark"] .say, .sec[data-ink="dark"] .ks__title { color: var(--ink); text-shadow: 0 .06em 0 rgba(255, 250, 240, .55); }

/* ---------- pills (buttons, nav, the morphing words) ---------- */
.pill {
  --pf: var(--cream);
  --pt: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font: 400 1rem/1 "Lilita One", sans-serif;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pt);
  background: var(--pf);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .7em 1.15em .62em;
  box-shadow: 0 5px 0 var(--ink);
  cursor: pointer;
  transition: transform .18s var(--ease-spring), box-shadow .18s, background-color .2s;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 8px 0 var(--ink); }
.pill:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.pill small { font: 800 .62rem/1 "Nunito", sans-serif; text-transform: none; opacity: .8; }
.pill--cream { --pf: var(--cream); }
.pill--ink { --pf: var(--ink); --pt: var(--cream); }
.pill--ks { --pf: var(--ks); --pt: var(--ink); }
.pill--ghost { --pf: rgba(36, 21, 12, .55); --pt: var(--cream); border-color: rgba(59, 35, 20, .55); box-shadow: 0 4px 0 rgba(59, 35, 20, .45); backdrop-filter: blur(6px); }
.sec[data-ink="dark"] ~ * .pill--ghost, body[data-bg="gold"] .pill--ghost, body[data-bg="ks"] .pill--ghost { --pt: var(--ink); }
.pill--big { font-size: 1.25rem; padding: .85em 1.4em .78em; }
.sound-toggle[aria-pressed="true"] { --pf: var(--gold); --pt: var(--ink); }

/* ---------- header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 3vw, 36px);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.top__logo { flex: none; }
.top__logo img { width: clamp(92px, 9vw, 132px); filter: drop-shadow(0 5px 0 rgba(36, 21, 12, .45)); transition: transform .3s var(--ease-spring); }
.top__logo:hover img { transform: rotate(-4deg) scale(1.06); }
.top__nav { display: flex; gap: 10px; align-items: center; }
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .top__logo img { width: 74px; }
}
@media (max-width: 480px) {
  .hide-xs { display: none; }
  .loot { z-index: 1 !important; }
  .loot-field[data-field="ks"], .loot-field[data-field="world"] { display: none; }
  .top__nav .pill { font-size: .78rem; padding: .62em .8em .55em; }
  .top__nav { gap: 6px; }
}

/* ---------- sections ---------- */
.sec { position: relative; }
.story { height: 360vh; }
.bite { height: 520vh; }
.story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; padding: 0 clamp(16px, 5vw, 80px); }

/* floating voxel loot (positions set by JS) */
.loot-field { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.loot {
  position: absolute;
  width: calc(var(--size, 90) * 1px * var(--k, 1));
  will-change: transform;
}
.loot img { width: 100%; filter: drop-shadow(0 10px 0 rgba(36, 21, 12, .28)); animation: drift var(--dur, 6s) ease-in-out infinite alternate; animation-delay: var(--del, 0s); }
@keyframes drift { from { transform: translateY(-10px) rotate(var(--r0, -10deg)); } to { transform: translateY(12px) rotate(var(--r1, 12deg)); } }
@media (max-width: 760px) { .loot { --k: .62; } }

/* ---------- 1. hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 110px 16px 22vh; }
.hero__title { position: relative; z-index: 3; }
.hero__small { display: block; font-size: clamp(1.5rem, 4.2vw, 3.6rem); margin-bottom: .18em; }
.hero__big { display: block; font-size: clamp(5.4rem, 21vw, 19rem); line-height: .86; letter-spacing: -.01em; white-space: nowrap; }
.hero__big span { display: inline-block; transform-origin: 50% 90%; animation: letter-in .9s var(--ease-spring) both; animation-delay: calc(var(--i) * 70ms + .2s); transition: transform .25s var(--ease-spring); }
.hero__big span:hover { transform: translateY(-.08em) rotate(-6deg) scale(1.06); color: var(--gold); }
@keyframes letter-in { from { transform: translateY(60%) scale(.4) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
.peek {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  width: clamp(170px, 20vw, 300px);
  translate: -50% 52%;
  animation: peek-up 1.1s 1s var(--ease-spring) both;
  cursor: pointer;
  filter: drop-shadow(0 -4px 0 rgba(36, 21, 12, .25));
}
@keyframes peek-up { from { translate: -50% 100%; } to { translate: -50% 52%; } }
.peek.duck { transition: translate .25s ease-in; translate: -50% 90%; animation: none; }
.peek.pop { transition: translate .45s var(--ease-spring); translate: -50% 38%; animation: none; }
.scroll-cue {
  position: absolute;
  z-index: 5;
  left: clamp(16px, 4vw, 40px);
  bottom: 26px;
  width: 30px;
  height: 48px;
  border: 3px solid var(--cream);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
}
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--cream); animation: wheel 1.4s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- morphing chips (inline pills inside the giant sentences) ---------- */
.say { position: relative; z-index: 3; font-size: clamp(2.6rem, 8.2vw, 8rem); line-height: 1.04; text-align: center; max-width: 13ch; }
.say--center { max-width: 14ch; }
.chip {
  display: inline-block;
  vertical-align: .04em;
  margin: .16em .14em;
  padding: .2em .52em .15em;
  font-size: .8em;
  line-height: 1;
  border: .05em solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 .06em 0 var(--ink);
  text-decoration: none;
  transform: rotate(-2deg);
  transition: transform .3s var(--ease-spring), background-color .3s;
}
.chip--red { background: var(--red); color: var(--cream); transform: rotate(2deg); animation: chomp .9s steps(2) infinite; }
@keyframes chomp { 50% { transform: rotate(-1deg) scale(1.03); } }
.chip--ink { background: var(--ink); color: var(--gold); }
.chip--ink:hover { transform: rotate(0) scale(1.06); }
.chip__label { display: block; line-height: 1; }
.chip.morphed { background: var(--ink); color: var(--gold); transform: rotate(-2deg) scale(1.04); }
.chip.morphed:hover { background: var(--red); color: var(--cream); }

/* the pill that grows into a full video card and shrinks back */
.grow-card {
  position: fixed;
  z-index: 5;
  left: 0;
  top: 0;
  border: 4px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 10px 0 rgba(36, 21, 12, .35);
  opacity: 0;
  pointer-events: none;
  will-change: transform, width, height, border-radius;
}
.grow-card video { width: 100%; height: 100%; object-fit: cover; }
.story__note {
  position: absolute;
  z-index: 3;
  bottom: 7vh;
  left: 50%;
  translate: -50% 0;
  width: min(560px, calc(100% - 32px));
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  color: var(--cream);
  background: rgba(36, 21, 12, .82);
  border-radius: 18px;
  padding: 12px 18px;
  opacity: var(--note, 0);
  transform: translateY(calc((1 - var(--note, 0)) * 20px));
}

/* ---------- 3. fly-through ---------- */
.bite__stage { perspective: 900px; }
.fly { position: absolute; inset: 0; transform-style: preserve-3d; z-index: 1; }
.fly__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(260px, 36vw, 560px);
  aspect-ratio: 16 / 10;
  margin: calc(clamp(260px, 36vw, 560px) * -.3125) 0 0 calc(clamp(260px, 36vw, 560px) * -.5);
  border: 4px solid var(--ink);
  border-radius: 34px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 14px 0 rgba(36, 21, 12, .35);
  will-change: transform, opacity;
}
.fly__card video, .fly__card img { width: 100%; height: 100%; object-fit: cover; }
.fly__card--art, .fly__card--loot { background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.fly__card--art img, .fly__card--loot img { object-fit: contain; filter: drop-shadow(0 12px 0 rgba(36, 21, 12, .3)); }
.fly__card--loot { width: clamp(110px, 12vw, 190px); aspect-ratio: 1; margin: calc(clamp(110px, 12vw, 190px) / -2); }
.bite .say { pointer-events: none; }

/* ---------- 4. burst ---------- */
.burst { position: absolute; inset: 0; z-index: 1; }
.burst__item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(clamp(160px, 21vw, 320px) * var(--s, 1));
  translate: -50% -50%;
  filter: drop-shadow(0 12px 0 rgba(36, 21, 12, .25));
  will-change: transform;
}

/* ---------- 5. trailer ---------- */
.trailer { padding: 120px clamp(16px, 5vw, 80px) 140px; display: grid; justify-items: center; gap: 40px; overflow: hidden; }
.mega { font-size: clamp(3.2rem, 11vw, 10rem); text-align: center; position: relative; z-index: 2; }
.wobble { display: inline-block; color: var(--gold); animation: wob 1.6s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-.04em); } }
.tv {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  border: 5px solid var(--ink);
  border-radius: clamp(24px, 4vw, 56px);
  overflow: hidden;
  background: #0b1a19;
  box-shadow: 0 16px 0 rgba(0, 0, 0, .35);
  transform: perspective(1200px) rotateX(calc(var(--tilt, 1) * 14deg)) scale(calc(.9 + (1 - var(--tilt, 1)) * .1));
  transform-origin: 50% 100%;
}
.tv video { width: 100%; height: 100%; object-fit: cover; }
.tv__play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; border: 0; background: radial-gradient(closest-side, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)); cursor: pointer; transition: opacity .3s; }
.tv__btn {
  display: grid;
  place-items: center;
  width: clamp(84px, 9vw, 120px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 0 7px 0 var(--ink);
  padding-left: 6px;
  transition: transform .25s var(--ease-spring);
}
.tv__play:hover .tv__btn { transform: scale(1.1) rotate(-6deg); }
.tv__note { font: 800 .9rem/1 "Nunito", sans-serif; color: var(--cream); background: rgba(36, 21, 12, .85); padding: .5em .9em; border-radius: 999px; }
.tv.playing .tv__play { opacity: 0; pointer-events: none; }
.loot-field--low { top: auto; height: 60%; }

/* ---------- 6. kickstarter ---------- */
.ks { padding: 130px clamp(16px, 5vw, 80px) 150px; overflow: hidden; display: grid; justify-items: center; text-align: center; }
.ks__title { position: relative; z-index: 2; }
.ks__small { display: block; font-size: clamp(1.6rem, 4.4vw, 3.8rem); }
.ks__big { display: block; font-size: clamp(3.4rem, 12.5vw, 12rem); line-height: .88; }
.ks__lede { position: relative; z-index: 2; max-width: 46ch; margin: 26px auto 0; color: var(--ink); font-size: 1.15rem; }
.ks__meter { position: relative; z-index: 2; width: min(760px, 100%); margin: 46px auto 0; }
.meterbar {
  position: relative;
  height: 44px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 250, 240, .55);
  box-shadow: 0 6px 0 var(--ink);
}
.meterbar__fill { position: absolute; inset: 4px auto 4px 4px; width: calc(var(--m, .1) * (100% - 8px)); border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, #ffdb5e 14px 28px); border: 3px solid var(--ink); animation: march 1s linear infinite; background-size: 40px 40px; }
@keyframes march { to { background-position: 40px 0; } }
.meterbar__pusher { position: absolute; bottom: 14px; left: calc(var(--m, .1) * 100% - 54px); height: 74px; width: auto; animation: push .3s ease-in-out infinite alternate; }
.meterbar__coin { position: absolute; bottom: 14px; left: calc(var(--m, .1) * 100% - 10px); width: 54px; rotate: calc(var(--m, .1) * 720deg); }
@keyframes push { from { rotate: 8deg; } to { rotate: 14deg; translate: 0 -3px; } }
.ks__status { margin: 16px 0 0; color: var(--ink); }
.ks__actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; margin-top: 42px; }
.notify {
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 0 var(--ink);
  width: min(520px, 100%);
}
.notify__title { margin: 0 0 12px; font: 400 1.5rem/1 "Lilita One", sans-serif; text-transform: uppercase; }
.notify form { display: flex; gap: 10px; flex-wrap: wrap; }
.notify input {
  flex: 1 1 200px;
  min-width: 0;
  font: 800 1.05rem/1.2 "Nunito", sans-serif;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .8em 1.1em;
  caret-color: var(--red);
}
.notify input::placeholder { color: #7f6247; }
.notify input:focus { outline: none; box-shadow: 0 0 0 4px rgba(5, 206, 120, .5); }
.slip__msg { margin: 10px 0 0; min-height: 1.4em; font-weight: 900; }
.slip__msg[data-state="error"] { color: var(--red-dark); }
.slip__msg[data-state="ok"] { color: #0a7a46; }
.notify__fine { margin: 6px 0 0; font-size: .8rem; color: #6b4a30; }
.notify.stamped { animation: thunk .5s var(--ease-spring); }
@keyframes thunk { 30% { transform: scale(.97) rotate(-1deg); } }
.ks__follow { flex-direction: column; gap: .3em; }
.ks__gribble { position: absolute; z-index: 1; right: clamp(-40px, 2vw, 60px); bottom: -30px; width: clamp(140px, 17vw, 250px); rotate: -8deg; animation: wave 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes wave { 50% { rotate: 2deg; } }
@media (max-width: 760px) { .ks__gribble { display: none; } }

/* ---------- 7. explore ---------- */
.explore { padding: 140px clamp(16px, 5vw, 80px) 120px; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 30px; min-height: 100vh; }
.explore__title { font-size: clamp(3.6rem, 13vw, 12rem); grid-column: 1; z-index: 2; position: relative; }
.explore__rider { position: absolute; width: clamp(200px, 26vw, 400px); left: auto; right: 6%; top: 11%; animation: soar 3.6s ease-in-out infinite; z-index: 1; }
@keyframes soar { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(30px, -26px) rotate(3deg); } }
.explore__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; justify-items: start; position: relative; z-index: 2; }
.explore__links li:nth-child(2) { margin-left: 30px; }
.explore__links li:nth-child(3) { margin-left: 12px; }
.explore__links li:nth-child(4) { margin-left: 44px; }
@media (max-width: 760px) {
  .explore { grid-template-columns: 1fr; }
  .explore__rider { left: auto; right: -20px; top: 6%; width: 48vw; }
  .explore { padding-top: 46vw; }
  .explore__links li { margin-left: 0 !important; }
}

.foot { display: flex; align-items: center; gap: 12px; padding: 20px clamp(16px, 3vw, 36px) 28px; background: var(--ink-2); color: #e9dcc0; font-size: .9rem; }
.foot img { width: 72px; height: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45)); }
.foot p { margin: 0; }

/* coin bursts and game sounds come from stall.js */
.coin { position: fixed; z-index: 300; width: 12px; height: 12px; background: var(--gold); border: 2px solid var(--ink); box-shadow: inset -3px -3px 0 #e0a81e; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .story { height: auto; }
  .story__stage { position: relative; min-height: 100vh; }
  .grow-card { display: none; }
  .story__note { --note: 1; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ===================== round 3: hero sub, stats, showcase ===================== */
body[data-bg="teal"] { --bg: #0f7f86; }

.hero { align-content: center; gap: 0; padding: 120px 16px 26vh; }
.hero__sub {
  position: relative;
  z-index: 3;
  max-width: 52ch;
  margin: clamp(18px, 2.4vw, 30px) auto 0;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.45;
  color: var(--cream);
  background: rgba(36, 21, 12, .62);
  border-radius: 18px;
  padding: 12px 18px;
}
.hero__ctas { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }

/* ---------- by the numbers: text left, a little scene right ---------- */
.stats { height: var(--stats-h, 1500vh); }
.stats__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stats__bg { position: absolute; inset: 0; background: var(--stat-bg, var(--night)); transition: background-color .5s var(--ease-out); }
.stats__kicker {
  position: absolute;
  top: clamp(84px, 12vh, 118px);
  left: clamp(16px, 6vw, 90px);
  margin: 0;
  z-index: 4;
  font: 400 clamp(1rem, 1.6vw, 1.4rem)/1 "Lilita One", sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--stat-fg, var(--cream));
  opacity: .85;
}
.stats__list { position: absolute; z-index: 4; left: clamp(16px, 6vw, 90px); top: 0; bottom: 0; width: min(40vw, 560px); list-style: none; margin: 0; padding: 0; }
.stat {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  color: var(--stat-fg, var(--cream));
  opacity: 0;
  transform: translateY(12vh);
  transition: opacity .3s var(--ease-out), transform .55s var(--ease-spring);
  pointer-events: none;
}
.stat.on { opacity: 1; transform: none; }
.stat.gone { opacity: 0; transform: translateY(-12vh); }
.stat__n {
  font: 400 clamp(5rem, 13vw, 13rem)/.85 "Lilita One", sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 .05em 0 var(--stat-lip, var(--ink));
}
.stat__label { margin-top: .2em; font: 400 clamp(1.6rem, 3.2vw, 3rem)/1 "Lilita One", sans-serif; text-transform: uppercase; text-shadow: 0 .07em 0 var(--stat-lip, var(--ink)); }
.stat__quip { max-width: 34ch; margin: 18px 0 0; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.45; color: #fff3d6; background: rgba(36, 21, 12, .66); border-radius: 18px; padding: 12px 18px; }
.stat--inf .stat__n { font-size: clamp(7rem, 17vw, 17rem); }

.stats__scenes { position: absolute; z-index: 3; inset: 0 0 0 44%; }
.sc { position: absolute; inset: 10% 4% 6% 0; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.sc.on { opacity: 1; visibility: visible; transition: opacity .35s; }
.sc img { max-width: none; }
.stats__dots { position: absolute; z-index: 5; right: clamp(10px, 1.6vw, 22px); top: 50%; translate: 0 -50%; display: grid; gap: 9px; }
.stats__dots span { width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--stat-fg, var(--cream)); opacity: .5; transition: transform .3s var(--ease-spring), background .3s, opacity .3s; }
.stats__dots span.on { background: var(--stat-fg, var(--cream)); opacity: 1; transform: scale(1.35); }

/* races: a crowd that grows one at a time, newest waving */
.racer { position: absolute; bottom: calc(4% + var(--row) * 12%); left: calc(-3% + var(--i) * 5.25%); width: 21%; z-index: calc(20 - var(--row)); transform: translateY(40%) scale(.6); opacity: 0; transition: transform .5s var(--ease-spring), opacity .25s; transform-origin: 50% 100%; }
.racer img { width: 100%; height: auto; filter: drop-shadow(0 8px 0 rgba(36, 21, 12, .3)) brightness(calc(1 - var(--row) * .12)); }
.racer.in { transform: none; opacity: 1; }
.racer.newest { z-index: 30; transform: translateY(-6%) scale(1.12); }
.racer__tag { position: absolute; left: 50%; top: -12%; translate: -50% 0; white-space: nowrap; font: 400 clamp(.85rem, 1.1vw, 1.05rem)/1 "Lilita One", sans-serif; text-transform: uppercase; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; padding: .4em .7em .35em; box-shadow: 0 4px 0 var(--ink); opacity: 0; transform: scale(.6); transition: transform .35s var(--ease-spring), opacity .2s; }
.racer.newest .racer__tag { opacity: 1; transform: none; }

/* callings: name chips pile in */
.sc--callings { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 12px; padding: 0 4%; }
.calling { font: 400 clamp(1rem, 1.6vw, 1.5rem)/1 "Lilita One", sans-serif; text-transform: uppercase; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; padding: .55em .9em .48em; box-shadow: 0 5px 0 var(--ink); transform: rotate(var(--r)) scale(0); transition: transform .4s var(--ease-spring); }
.calling.in { transform: rotate(var(--r)) scale(1); }
.calling:nth-child(3n) { background: var(--gold); }
.calling:nth-child(4n) { background: #9fd8ff; }
.calling__prop { position: absolute; width: clamp(70px, 8vw, 120px); filter: drop-shadow(0 8px 0 rgba(36, 21, 12, .3)); animation: drift 5s ease-in-out infinite alternate; }
.calling__prop.p0 { left: 2%; top: 4%; } .calling__prop.p1 { right: 4%; top: 2%; } .calling__prop.p2 { left: 4%; bottom: 0; } .calling__prop.p3 { right: 2%; bottom: 2%; }

/* mounts: a side-on gallop over scrolling ground; the steed changes as you scroll */
.ride__sky { position: absolute; inset: 0 0 26% 0; border-radius: 30px; background: linear-gradient(rgba(255, 255, 255, .18), transparent); }
.ride__ground {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  height: 22%;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 40px, transparent 40px 80px),
    linear-gradient(#6fbf45 0 26%, #8a5a34 26%);
  background-size: 80px 100%, 100% 100%;
  animation: ground 0.5s linear infinite;
  box-shadow: 0 8px 0 rgba(36, 21, 12, .35);
}
.ride__ground--slow { animation-duration: 2.4s; }
@keyframes ground { to { background-position: -80px 0, 0 0; } }
.ride__mount { position: absolute; left: 50%; bottom: calc(6% + 22% * .74); width: min(62%, 520px); translate: -50% 0; }
.ride__mount img { width: 100%; height: auto; filter: drop-shadow(0 10px 0 rgba(36, 21, 12, .3)); animation: gallop .32s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes gallop { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-7%) rotate(1.5deg); } }
.ride__mount.swap img { animation: swapin .45s var(--ease-spring), gallop .32s .45s ease-in-out infinite alternate; }
@keyframes swapin { from { transform: scale(.4) translateY(20%); opacity: 0; } to { transform: none; opacity: 1; } }
.ride__dust { position: absolute; left: 30%; bottom: 20%; width: 30%; aspect-ratio: 2; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 243, 214, .9), transparent); opacity: 0; }
.ride__dust.puff { animation: puff .6s ease-out; }
@keyframes puff { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.8) translateX(-30%); } }
.ride__name, .window__name, .pedestal__name { position: absolute; left: 50%; bottom: -2%; translate: -50% 0; margin: 0; font: 400 clamp(1.1rem, 1.8vw, 1.6rem)/1 "Lilita One", sans-serif; text-transform: uppercase; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; padding: .45em .9em .4em; box-shadow: 0 5px 0 var(--ink); white-space: nowrap; }

/* biomes: a window that stays put while the world scrolls past */
.window { position: absolute; left: 6%; right: 6%; top: 8%; bottom: 16%; border: 10px solid #8a4d22; outline: 4px solid var(--ink); border-radius: 36px; overflow: hidden; box-shadow: 0 14px 0 rgba(36, 21, 12, .35), inset 0 0 0 4px var(--ink); background: #222; }
.window__track { display: flex; height: 100%; will-change: transform; }
.biome { position: relative; flex: none; width: 100%; height: 100%; }
.biome__far, .biome__near { position: absolute; inset: 0; }
.b-sun { position: absolute; right: 12%; top: 10%; width: 11%; aspect-ratio: 1; background: #ffe27a; border: 4px solid var(--ink); border-radius: 18%; box-shadow: 0 0 0 10px rgba(255, 226, 122, .25); }
.b-cloud { position: absolute; left: var(--x); top: var(--y); width: 18%; height: 7%; background: #fffaf0; border: 3px solid var(--ink); border-radius: 8px; }
.b-cloud::before { content: ""; position: absolute; left: 20%; bottom: 90%; width: 45%; height: 90%; background: #fffaf0; border: 3px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.b-water { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: repeating-linear-gradient(90deg, #3a8fd0 0 30px, #4aa0e0 30px 60px); border-top: 4px solid var(--ink); opacity: .9; }
.tree { position: absolute; left: var(--x); bottom: 28%; width: calc(9% * var(--s)); height: calc(30% * var(--s)); }
.tree::before { content: ""; position: absolute; left: 42%; bottom: 0; width: 16%; height: 45%; background: #6b4426; border: 3px solid var(--ink); }
.tree::after { content: ""; position: absolute; left: 0; right: 0; bottom: 38%; height: 62%; background: var(--c); border: 3px solid var(--ink); border-radius: 6px; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .15); }
.tree--pine::after { clip-path: polygon(50% 0, 70% 30%, 60% 30%, 85% 65%, 72% 65%, 100% 100%, 0 100%, 28% 65%, 15% 65%, 40% 30%, 30% 30%); border-radius: 0; }
.tree--spire::after { left: 30%; right: 30%; height: 90%; bottom: 0; clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); border-radius: 0; }
.tree--spire::before, .tree--stone::before { display: none; }
.tree--stone::after { left: 25%; right: 25%; bottom: 0; height: 70%; border-radius: 4px; }
.tree--cap::after { height: 40%; bottom: 45%; border-radius: 40% 40% 8px 8px; }
.tree--flat::after { height: 28%; bottom: 55%; left: -20%; right: -20%; }
.tree--droop::after { border-radius: 40% 40% 8px 8px; }
.tree--bare::after { left: 20%; right: 20%; height: 50%; background: transparent; border: 0; box-shadow: none; border-left: 6px solid var(--c); border-right: 6px solid var(--c); }
.tree--palm::before { height: 70%; transform: rotate(6deg); }
.tree--palm::after { height: 20%; bottom: 66%; left: -15%; right: -15%; border-radius: 50% 50% 4px 4px; }
.biome__label { position: absolute; left: 50%; bottom: 10%; translate: -50% 0; font: 400 clamp(1.4rem, 2.6vw, 2.4rem)/1 "Lilita One", sans-serif; text-transform: uppercase; color: var(--cream); text-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.window__name { display: none; }

/* beasts: a parade walking along */
.parade { position: absolute; left: 0; right: 0; bottom: calc(6% + 22% * .74); height: 50%; display: flex; align-items: flex-end; gap: 1%; animation: parade 18s linear infinite; }
@keyframes parade { from { transform: translateX(10%); } to { transform: translateX(-60%); } }
.beast { flex: none; width: 22%; transform: scale(0); transform-origin: 50% 100%; transition: transform .45s var(--ease-spring); }
.beast img { width: 100%; height: auto; animation: gallop .5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.13s); filter: drop-shadow(0 8px 0 rgba(36, 21, 12, .3)); }
.beast.in { transform: scale(1); }

/* enemies: the horde fills up */
.grunt { position: absolute; left: var(--x); bottom: calc(4% + var(--y) * 13%); width: 11%; z-index: calc(10 - var(--y)); transform: translateY(30%) scale(0); transform-origin: 50% 100%; transition: transform .4s var(--ease-spring); }
.grunt img { width: 100%; height: auto; animation: hop .34s ease-in-out infinite alternate; animation-delay: var(--d); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .3)) brightness(calc(1 - var(--y) * .1)); }
.grunt.in { transform: none; }

/* bosses: posters slam onto the pile */
.slam { position: absolute; left: var(--x); top: var(--y); width: clamp(140px, 17vw, 250px); translate: -50% -50%; transform: rotate(var(--r)) scale(2.4); opacity: 0; transition: transform .35s cubic-bezier(.5, 0, .75, 0), opacity .15s; }
.slam img { width: 100%; height: auto; filter: drop-shadow(0 12px 0 rgba(0, 0, 0, .35)); }
.slam.in { transform: rotate(var(--r)) scale(1); opacity: 1; }

/* loot: it rains, and the heap grows */
.drop { position: absolute; left: var(--x); top: -12%; width: clamp(44px, 5vw, 70px); animation: fall var(--t) linear infinite; animation-delay: var(--d); }
.drop img { width: 100%; height: auto; }
@keyframes fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(540deg); } }
.heap { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; }
.heap__item { position: absolute; width: clamp(54px, 6.6vw, 96px); translate: -50% 0; transform: rotate(var(--r)) translateY(-120%) scale(.6); opacity: 0; transition: transform .45s var(--ease-spring), opacity .2s; }
.heap__item img { width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(36, 21, 12, .3)); }
.heap__item.in { transform: rotate(var(--r)); opacity: 1; }

/* legendaries: one at a time, spinning on a pedestal */
.pedestal { position: absolute; left: 50%; bottom: 10%; width: min(60%, 420px); height: 82%; translate: -50% 0; perspective: 900px; }
.pedestal__block { position: absolute; left: 18%; right: 18%; bottom: 0; height: 18%; background: linear-gradient(#9a9aa8, #5c5c6a); border: 4px solid var(--ink); border-radius: 12px; box-shadow: inset 0 6px 0 rgba(255, 255, 255, .3), 0 8px 0 rgba(0, 0, 0, .35); }
.pedestal__glow { position: absolute; left: 50%; bottom: 14%; width: 90%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 215, 90, .55), transparent); animation: legend-glow 2s ease-in-out infinite alternate; }
@keyframes legend-glow { to { opacity: .55; transform: scale(1.1); } }
.pedestal__spin { position: absolute; left: 50%; bottom: 22%; width: 70%; height: 72%; translate: -50% 0; transform-style: preserve-3d; animation: turntable 4s linear infinite; }
.pedestal__spin img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)); }
@keyframes turntable { to { transform: rotateY(360deg); } }
.pedestal__spin.swap { animation: legend-in .5s var(--ease-spring), turntable 4s .5s linear infinite; }
@keyframes legend-in { from { transform: translateY(-40%) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.sc--legends .pedestal__name { bottom: -3%; }

/* music: an equaliser that dances (for real, if you press play) */
.eq { position: absolute; left: 6%; right: 6%; bottom: 22%; height: 55%; display: flex; align-items: flex-end; gap: 1.2%; }
.eq span { flex: 1; height: var(--h); background: linear-gradient(#ffd34a, #ff8a3d); border: 3px solid var(--ink); border-radius: 8px 8px 4px 4px; animation: eq .5s ease-in-out infinite alternate; animation-delay: var(--d); transform-origin: 50% 100%; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.sc--music.live .eq span { animation: none; height: var(--live, 10%); transition: height .08s; }
.eq__play { position: absolute; left: 50%; bottom: 2%; translate: -50% 0; }
.note { position: absolute; left: var(--x); bottom: 30%; font: 400 clamp(1.6rem, 2.6vw, 2.6rem)/1 "Lilita One", sans-serif; color: var(--cream); text-shadow: 0 3px 0 var(--ink); animation: float-note 4s ease-in infinite; animation-delay: var(--d); opacity: 0; }
@keyframes float-note { 0% { transform: translateY(0) rotate(-10deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-260%) rotate(14deg); opacity: 0; } }

/* infinity: worlds flicker past while the seed rolls */
.worlds { position: absolute; inset: 4% 4% 22% 4%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.worlds img { width: 100%; height: 100%; object-fit: cover; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 rgba(36, 21, 12, .35); filter: saturate(.4) brightness(.8); transition: filter .2s, transform .3s var(--ease-spring); }
.worlds img.on { filter: none; transform: scale(1.06) rotate(-2deg); z-index: 1; }
.seed { position: absolute; left: 50%; bottom: 2%; translate: -50% 0; margin: 0; font: 400 clamp(1.2rem, 2vw, 1.8rem)/1 "Lilita One", sans-serif; text-transform: uppercase; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; padding: .5em 1em .45em; box-shadow: 0 5px 0 var(--ink); white-space: nowrap; }
.seed b { font-variant-numeric: tabular-nums; font-weight: 400; color: #0a7a46; }

/* the pack, living inside the cards stat */
.stats .pack__stage--inline { position: absolute; inset: 0; height: auto; background: none; animation: none; --cw: min(250px, 20vw); overflow: visible; }
.pack__stage--inline .booster, .pack__stage--inline .burstlight, .pack__stage--inline .pc, .pack__stage--inline .pack__rarity, .pack__stage--inline .pack__hint { left: 56%; }
.pack__stage--inline .pack__rarity { bottom: -2%; }
.pack__stage--inline .pack__hint { top: auto; bottom: 0; }

@media (max-width: 860px) {
  .stats__kicker { left: 16px; right: 16px; text-align: center; }
  .stats__list { left: 16px; right: 16px; width: auto; top: clamp(110px, 16vh, 140px); bottom: auto; height: 40%; }
  .stat { justify-items: center; text-align: center; align-content: start; }
  .stat__n { font-size: clamp(4rem, 21vw, 7rem); }
  .stat__label { font-size: clamp(1.3rem, 6vw, 2rem); }
  .stat__quip { margin-top: 10px; font-size: .95rem; padding: 10px 14px; }
  .stats__scenes { inset: 52% 0 0 0; }
  .sc { inset: 2% 3% 4% 3%; }
  .stats__dots { display: none; }
  .racer { width: 27%; left: calc(-7% + var(--i) * 4.8%); }
  .ride__mount { width: 76%; }
  .grunt { width: 13%; }
  .beast { width: 34%; }
  .stats .pack__stage--inline { --cw: min(42vw, 190px); }
  .pack__stage--inline .booster, .pack__stage--inline .burstlight, .pack__stage--inline .pc, .pack__stage--inline .pack__rarity, .pack__stage--inline .pack__hint { left: 50%; }
  .pack__stage--inline .booster, .pack__stage--inline .pc { top: 50%; }
  .pack__stage--inline .pack__rarity { top: auto; bottom: -1%; }
}
@media (prefers-reduced-motion: reduce) {
  .stats { height: auto; }
}

/* ---------- oh, and there's more (horizontal track) ---------- */
.more { height: var(--more-h, 500vh); }
.more__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; padding-top: clamp(96px, 13vh, 130px); }
.more__head { padding: 0 clamp(16px, 5vw, 80px); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 30px; }
.mega--left { text-align: left; font-size: clamp(2.4rem, 7.5vw, 7rem); min-width: 0; flex: 1 1 auto; }
.more__head p { margin: 0 0 .6em; max-width: 30ch; background: rgba(36, 21, 12, .5); border-radius: 14px; padding: 8px 14px; }
.more__track {
  list-style: none;
  margin: 0;
  padding: 3vh clamp(16px, 5vw, 80px) 0;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  width: max-content;
  align-self: center;
  padding-bottom: 4vh;
  will-change: transform;
}
.feat {
  flex: none;
  width: clamp(270px, 27vw, 420px);
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 30px;
  padding: 12px 12px 18px;
  box-shadow: 0 10px 0 rgba(36, 21, 12, .4);
  transform: rotate(var(--t, 0deg));
  transition: transform .35s var(--ease-spring);
}
.feat:hover { transform: rotate(0deg) translateY(-10px) scale(1.03); }
.feat__media { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--ink); border: 3px solid var(--ink); }
.feat__media img, .feat__media video { width: 100%; height: 100%; object-fit: cover; }
.feat--tall .feat__media { aspect-ratio: 4 / 4.6; }
.feat--art .feat__media { background: radial-gradient(circle at 50% 60%, #ffe58a, #ffc21a 70%); }
.feat--art .feat__media img { object-fit: contain; padding: 6px; transition: transform .4s var(--ease-spring); }
.feat--art:hover .feat__media img { transform: scale(1.08) rotate(-3deg); }
.feat__fan { position: relative; background: #2a1d4f; display: block; }
.feat__fan img { position: absolute; width: 42%; height: auto; left: 29%; top: 10%; border-radius: 8px; border: 2px solid var(--ink); box-shadow: 0 6px 0 rgba(0, 0, 0, .35); transform-origin: 50% 120%; transition: transform .45s var(--ease-spring); }
.feat__fan img:nth-child(1) { transform: rotate(-20deg) translateX(-34%); }
.feat__fan img:nth-child(2) { transform: rotate(-7deg) translateX(-12%); }
.feat__fan img:nth-child(3) { transform: rotate(7deg) translateX(12%); }
.feat__fan img:nth-child(4) { transform: rotate(20deg) translateX(34%); }
.feat--cards:hover .feat__fan img:nth-child(1) { transform: rotate(-28deg) translateX(-48%); }
.feat--cards:hover .feat__fan img:nth-child(2) { transform: rotate(-10deg) translateX(-18%) translateY(-6%); }
.feat--cards:hover .feat__fan img:nth-child(3) { transform: rotate(10deg) translateX(18%) translateY(-6%); }
.feat--cards:hover .feat__fan img:nth-child(4) { transform: rotate(28deg) translateX(48%); }
.feat h3 { margin: 14px 6px 6px; font: 400 1.55rem/1 "Lilita One", sans-serif; text-transform: uppercase; }
.feat p { margin: 0 6px; font-size: .98rem; line-height: 1.42; color: #5a3d27; }
.feat--end { background: transparent; border: 0; box-shadow: none; width: clamp(260px, 26vw, 380px); display: grid; gap: 20px; justify-items: start; }
.feat--end:hover { transform: none; }
.feat__endline { font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.05 "Lilita One", sans-serif !important; color: var(--cream) !important; text-transform: uppercase; text-shadow: 0 .06em 0 var(--ink); margin: 0 !important; }
@media (max-width: 760px) {
  .feat { width: 72vw; }
  .more__head p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .more { height: auto; }
  .more__stage { position: relative; height: auto; }
  .more__track { width: auto; overflow-x: auto; padding-bottom: 30px; }
}

/* ===================== Hoardbound: crack a pack ===================== */
body[data-bg="indigo"] { --bg: #241a4d; }
.pack { height: 760vh; }
.pack__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(70% 60% at 62% 50%, #3a2a7a, #241a4d 70%);
  --cw: min(300px, 26vw);
}
.pack__sparkles { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 12% 20%, #fff8 50%, transparent 51%), radial-gradient(2px 2px at 82% 30%, #fff6 50%, transparent 51%), radial-gradient(3px 3px at 30% 80%, #ffd76a99 50%, transparent 51%), radial-gradient(2px 2px at 70% 85%, #fff7 50%, transparent 51%), radial-gradient(2px 2px at 50% 12%, #c8a6ff88 50%, transparent 51%), radial-gradient(3px 3px at 92% 70%, #ffd76a88 50%, transparent 51%); animation: twinkle 3s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .4; } }
.pack__head { position: absolute; z-index: 5; left: clamp(16px, 6vw, 90px); top: 50%; translate: 0 -50%; max-width: min(430px, 32vw); }
.pack__title { margin: 0; font: 400 clamp(2.6rem, 6vw, 6rem)/.92 "Lilita One", sans-serif; text-transform: uppercase; color: var(--cream); text-shadow: 0 .06em 0 var(--ink); }
.pack__copy { margin: 20px 0 0; color: var(--cream); background: rgba(10, 6, 30, .55); border-radius: 18px; padding: 14px 18px; font-size: 1.05rem; line-height: 1.5; }
.pack__head { transition: opacity .4s; }
.pack.opened .pack__head { opacity: 0; pointer-events: none; }

.pack__scene { position: absolute; inset: 0; perspective: 1100px; z-index: 3; }
.booster {
  position: absolute;
  left: 62%;
  top: 50%;
  width: calc(var(--cw) * 1.02);
  aspect-ratio: 625 / 1000;
  translate: -50% -50%;
  transform-style: preserve-3d;
  transform: rotateY(var(--spin, 0deg)) rotateZ(var(--sway, 0deg));
  will-change: transform;
}
.booster__half, .booster__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.booster::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -9%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); transform: rotateY(calc(var(--spin, 0deg) * -1)); opacity: var(--bo, 1); }
.booster__half img, .booster__back img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.booster__half--top { clip-path: inset(0 0 84% 0); transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--tr, 0deg)); transform-origin: 90% 16%; }
.booster__half--bottom { clip-path: inset(16% 0 0 0); transform: translateY(var(--by, 0)); opacity: var(--bo, 1); }
.booster__back { transform: rotateY(180deg); }
.booster__back img { filter: brightness(.45) saturate(1.3) hue-rotate(20deg); }
.burstlight {
  position: absolute;
  left: 62%;
  top: 46%;
  width: calc(var(--cw) * 2.6);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 160, .95), rgba(255, 196, 60, .45) 30%, rgba(160, 110, 255, .2) 55%, transparent 70%);
  transform: scale(var(--glow, 0));
  opacity: var(--glow-o, 0);
  pointer-events: none;
  mix-blend-mode: screen;
}

.pulls { position: absolute; inset: 0; transform-style: preserve-3d; }
.pc {
  position: absolute;
  left: 62%;
  top: 50%;
  width: var(--cw);
  aspect-ratio: 750 / 1050;
  margin: calc(var(--cw) * -.7) 0 0 calc(var(--cw) * -.5);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  opacity: 0;
}
.pc__in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--flip, 180deg)); }
.pc__face, .pc__back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 4.5% / 3.2%; overflow: hidden; box-shadow: 0 18px 30px rgba(0, 0, 0, .45); }
.pc__face img, .pc__back img { width: 100%; height: 100%; object-fit: cover; }
.pc__back { transform: rotateY(180deg); }
.pc__holo {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .55) 38%, transparent 52%),
    linear-gradient(125deg, #ff5ec4 0%, #ffd34a 18%, #5cf0b4 36%, #4ab8ff 54%, #b46bff 72%, #ff5ec4 90%);
  background-size: 260% 260%, 300% 300%;
  background-position: var(--hx, 50%) 50%, calc(100% - var(--hx, 50%)) 50%;
  mix-blend-mode: color-dodge;
  transition: opacity .6s;
}
.pc.legend .pc__holo { opacity: .22; }
.pc.legend .pc__face { box-shadow: 0 0 0 3px #ffd34a, 0 0 40px 10px rgba(255, 205, 70, .75), 0 0 110px 30px rgba(255, 170, 40, .45); animation: legend-pulse 1.6s ease-in-out infinite; }
@keyframes legend-pulse { 50% { box-shadow: 0 0 0 3px #fff3b0, 0 0 60px 18px rgba(255, 220, 90, .9), 0 0 150px 50px rgba(255, 170, 40, .55); } }

.pack__rarity {
  position: absolute;
  z-index: 6;
  left: 62%;
  bottom: clamp(18px, 5vh, 50px);
  translate: -50% 0;
  margin: 0;
  font: 400 clamp(1.1rem, 1.8vw, 1.5rem)/1 "Lilita One", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pack__rarity span { display: inline-block; padding: .45em .9em .4em; border-radius: 999px; background: var(--rar-bg, transparent); color: var(--rar-fg, var(--cream)); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); opacity: 0; transform: scale(.6); transition: transform .4s var(--ease-spring), opacity .2s; }
.pack__rarity.on span { opacity: 1; transform: none; }
.pack__rarity.legend span { font-size: 1.4em; animation: legend-pulse 1.6s ease-in-out infinite; }
.pack__hint { position: absolute; z-index: 6; left: 62%; top: calc(50% + var(--cw) * .9); translate: -50% 0; margin: 0; color: #cdbfff; font-size: .95rem; opacity: var(--hint, 1); }
.pack__shard { position: absolute; z-index: 7; width: 10px; height: 10px; background: #ffd34a; border: 2px solid var(--ink); pointer-events: none; }

@media (max-width: 860px) {
  .pack__stage { --cw: min(60vw, 280px); }
  .pack__head { left: 16px; right: 16px; top: clamp(84px, 12vh, 110px); translate: none; max-width: none; text-align: center; }
  .pack__copy { display: none; }
  .booster, .burstlight, .pc, .pack__rarity, .pack__hint { left: 50%; }
  .pack__rarity { bottom: auto; top: clamp(84px, 12vh, 110px); }
  .pack__hint { top: auto; bottom: 5vh; }
  .booster, .pc { top: 56%; }
  .burstlight { top: 52%; }
}
@media (prefers-reduced-motion: reduce) {
  .pack { height: auto; }
  .pack__stage { position: relative; height: auto; min-height: 100vh; }
}

/* ---------- showcase cards: one size, a hook tag, and a bit of shine ---------- */
.feat { height: clamp(430px, 34vw, 520px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.feat__media, .feat--tall .feat__media { flex: none; aspect-ratio: 4 / 3; position: relative; }
.feat__media img, .feat__media video { transition: transform .5s var(--ease-out); }
.feat:hover .feat__media img, .feat:hover .feat__media video { transform: scale(1.07); }
.feat--art:hover .feat__media img { transform: scale(1.1) rotate(-3deg); }
.feat p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feat[data-tag]::before {
  content: attr(data-tag);
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  font: 400 .82rem/1 "Lilita One", sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cream);
  background: var(--tone, var(--ink));
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .45em .75em .4em;
  box-shadow: 0 3px 0 var(--ink);
  transform: rotate(-3deg);
}
.feat[data-tone="sky"] { --tone: #2a7fc4; }
.feat[data-tone="red"] { --tone: #d33b2f; }
.feat[data-tone="purple"] { --tone: #6a36c9; }
.feat[data-tone="teal"] { --tone: #0f7f86; }
.feat[data-tone="gold"] { --tone: #b8641f; }
.feat::after { /* a light sweep on hover */
  content: "";
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .7s var(--ease-out);
  pointer-events: none;
}
.feat:hover::after { left: 130%; }
.feat h3 { display: flex; align-items: baseline; gap: 8px; }
.feat--end { height: auto; overflow: visible; }
.feat--end::after { display: none; }
@media (max-width: 760px) { .feat { height: 410px; } }
.feat__media.feat__fan img { width: 42%; height: auto; object-fit: initial; }
.feat:hover .feat__media.feat__fan img:nth-child(1) { transform: rotate(-28deg) translateX(-48%); }
.feat:hover .feat__media.feat__fan img:nth-child(2) { transform: rotate(-10deg) translateX(-18%) translateY(-6%); }
.feat:hover .feat__media.feat__fan img:nth-child(3) { transform: rotate(10deg) translateX(18%) translateY(-6%); }
.feat:hover .feat__media.feat__fan img:nth-child(4) { transform: rotate(28deg) translateX(48%); }
