/* STACK UP'S HOME PAGE: "Climb the sky".
 * The page is the tower. It starts in the daylight sky of Sunny Hills and
 * climbs through the game's own painted worlds, in game order, to Starry Night
 * at the bottom. Every picture is the game's art (art/worlds layers, bosses,
 * badges, real screenshots). The game's look is kept on purpose: Lilita One
 * with a thick ink outline, chunky ink edges under things you can press.
 * Mobile first. Motion lives in no-preference blocks, so reduced motion is
 * simply the finished, still page. */

@font-face { font-family: 'Lilita One'; src: url('/fonts/lilita-one.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url('/fonts/baloo2-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  /* colours sampled from the game art */
  --ink: #1c1a33;
  --white: #ffffff;
  --sky: #4bcaff;        /* Sunny Hills mid sky */
  --sky-hi: #12a2fe;     /* Sunny Hills upper sky */
  --sky-low: #97e7fe;    /* Sunny Hills horizon */
  --pale: #d2f0f9;       /* Snowy Peaks horizon: above the snow line */
  --grass: #8fe05a;
  --gold: #ffc629;
  --red: #ff5a4a;
  --ice: #9fe5fa;
  --pink: #facee4;       /* Candy horizon */
  --dusk: #10379a;       /* Starry Night lower sky */
  --night: #040a3d;      /* Starry Night upper sky */
  --navy: #23263d;       /* night world only */

  --disp: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;

  /* five sizes, fluid */
  --s-hero: clamp(44px, 7.4vw, 124px);
  --s-h2: clamp(34px, 4.6vw, 70px);
  --s-h3: clamp(23px, 1.9vw, 30px);
  --s-body: clamp(17px, 0.5vw + 15px, 20px);
  --s-small: 15px;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1320px;
  --r: 22px;
  --edge: 4px;              /* the game's ink outline */
  --lift: 0 6px 0 var(--ink); /* the game's chunky edge under pressables */
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--gold); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; background: var(--sky-hi); scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; overflow-x: clip; background: var(--sky); color: var(--ink); font: 800 var(--s-body)/1.5 var(--body); }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--disp); font-weight: 400; line-height: 1; letter-spacing: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 12px 18px; background: var(--gold); color: var(--ink); border-radius: 12px; font-family: var(--disp); text-decoration: none; }
.skip:focus { top: 12px; }

/* The game's outline: a 16-copy text-shadow ring (not text-stroke, which eats
   into the letters), plus the chunky drop under it. White fill, ink edge. */
.stroke {
  --ow: .1em; --oc: var(--ink);
  color: var(--white);
  text-shadow: /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
    var(--ow) 0 0 var(--oc), calc(var(--ow) * .92) calc(var(--ow) * .38) 0 var(--oc), calc(var(--ow) * .71) calc(var(--ow) * .71) 0 var(--oc), calc(var(--ow) * .38) calc(var(--ow) * .92) 0 var(--oc),
    0 var(--ow) 0 var(--oc), calc(var(--ow) * -.38) calc(var(--ow) * .92) 0 var(--oc), calc(var(--ow) * -.71) calc(var(--ow) * .71) 0 var(--oc), calc(var(--ow) * -.92) calc(var(--ow) * .38) 0 var(--oc),
    calc(var(--ow) * -1) 0 0 var(--oc), calc(var(--ow) * -.92) calc(var(--ow) * -.38) 0 var(--oc), calc(var(--ow) * -.71) calc(var(--ow) * -.71) 0 var(--oc), calc(var(--ow) * -.38) calc(var(--ow) * -.92) 0 var(--oc),
    0 calc(var(--ow) * -1) 0 var(--oc), calc(var(--ow) * .38) calc(var(--ow) * -.92) 0 var(--oc), calc(var(--ow) * .71) calc(var(--ow) * -.71) 0 var(--oc), calc(var(--ow) * .92) calc(var(--ow) * -.38) 0 var(--oc),
    0 calc(var(--ow) * 1.7) 0 var(--oc);
}
.h2 { font-size: var(--s-h2); line-height: .98; }
.h3 { font-size: var(--s-h3); line-height: 1.05; }

/* ---- buttons: flat gold, ink edge, the game's chunky lift -------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 22px;
  border: var(--edge) solid var(--ink); border-radius: 999px; box-shadow: var(--lift); /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
  font: 400 var(--s-body)/1 var(--disp); color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms;
}
.btn--gold { background: var(--gold); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); background: #ffd64f; } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */

/* Apple's own "Download on the App Store" artwork, unaltered (img/app-store-badge.svg,
   from developer.apple.com). Clear space around it, never under 40px tall. */
.appstore { display: inline-block; line-height: 0; padding: 6px; margin: -6px; border-radius: 14px; transition: transform 160ms var(--ease); }
.appstore img { height: 56px; width: auto; }
.appstore:hover { transform: translateY(-2px); }
.appstore:active { transform: translateY(2px); }
.appstore--foot img { height: 40px; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
/* Android is coming, so it is said plainly - and it is not a link. */
.soon { font: 400 var(--s-small)/1.2 var(--disp); color: var(--ink); background: rgba(255, 255, 255, .78); padding: 10px 14px; border-radius: 999px; }
.soon--night { background: rgba(255, 255, 255, .14); color: var(--white); }
.fine { font-size: var(--s-small); }

/* ---- header: a plain bar over the sky ------------------------------------ */
.top {
  position: absolute; z-index: 20; inset: 0 0 auto 0;
  display: flex; align-items: center; gap: 16px; padding: 14px var(--gutter);
  max-width: var(--max); margin: 0 auto;
}
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 var(--s-h3)/1 var(--disp); min-height: 48px; }
.mark img { width: 40px; height: 40px; border-radius: 11px; border: 3px solid var(--ink); }
.nav { margin-left: auto; position: relative; }
.nav__toggle {
  min-height: 48px; padding: 6px 18px; border: var(--edge) solid var(--ink); border-radius: 999px; background: var(--white);
  font: 400 var(--s-body)/1 var(--disp); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink); /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
}
.nav__toggle:hover { background: var(--pale); }
.nav__links {
  display: none; position: absolute; right: 0; top: calc(100% + 12px); min-width: 210px; padding: 10px;
  background: var(--white); border: var(--edge) solid var(--ink); border-radius: var(--r);
  box-shadow: 0 10px 0 var(--ink); /* it floats above the page, so it may cast */ /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
}
.nav__links.is-open { display: block; }
.nav__links a { display: flex; align-items: center; min-height: 48px; padding: 4px 14px; border-radius: 12px; font: 400 var(--s-body)/1 var(--disp); text-decoration: none; }
.nav__links a:hover, .nav__links a:focus-visible { background: var(--sky-low); }
.top__get { display: none; }
@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__links { display: flex; position: static; gap: 4px; padding: 0; min-width: 0; background: none; border: 0; box-shadow: none; }
  .nav__links a { padding: 4px 14px; }
  .nav__links a:hover, .nav__links a:focus-visible { background: rgba(255, 255, 255, .55); }
  .top__get { display: inline-flex; }
}

/* ---- 1. hero --------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--sky-low); }
.hero__sky { position: absolute; inset: 0; z-index: -1; }
.hero__skyimg { position: absolute; inset: -6% 0 0; width: 100%; height: 112%; object-fit: cover; object-position: 50% 0; }
.hero__inner {
  max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 40px;
  display: grid; gap: 26px; align-items: center;
}
.hero__title { font-size: var(--s-hero); line-height: .95; --ow: .085em; }
.hero__lede { margin-top: 20px; max-width: 34ch; }
.hero__copy .get { margin-top: 26px; }
.hero__copy .fine { margin-top: 14px; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); padding-top: 120px; min-height: 100svh; }
  .hero__title { font-size: min(var(--s-hero), 12svh); }
}

/* the playable tower */
.play { justify-self: center; width: min(100%, 440px); }
.play__stage { position: relative; aspect-ratio: 440 / 460; }
.play__canvas { width: 100%; height: 100%; }
.play__still { display: none; }
html:not(.js) .play__canvas, html:not(.js) .play__hit, html:not(.js) .play__score, html:not(.js) .play__help { display: none; }
html:not(.js) .play__still { display: block; width: 60%; margin: 0 auto; border: var(--edge) solid var(--ink); border-radius: var(--r); }
.play__hit {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; border-radius: var(--r);
}
.play__hit:focus-visible { outline: 4px solid var(--ink); outline-offset: -4px; }
.play__score {
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%); pointer-events: none;
  padding: 6px 16px; border-radius: 999px; background: var(--white); border: 3px solid var(--ink);
  font: 400 var(--s-small)/1 var(--disp); white-space: nowrap; opacity: 0; transition: opacity 200ms;
}
.play__score.is-on { opacity: 1; }
.play__call { position: absolute; left: 0; right: 0; top: 18%; text-align: center; pointer-events: none; font: 400 var(--s-h3)/1 var(--disp); opacity: 0; }
.play__call.is-on { animation: call 900ms var(--ease) both; }
@keyframes call { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 20% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
.play__help { margin-top: 8px; text-align: center; font-size: var(--s-small); }
@media (max-width: 899px) { .play__stage { aspect-ratio: 440 / 380; } }

/* ---- critters: the game's own sprite sheets, four frames each --------------
   Flying is a transform on the critter; flapping is a transform on a strip
   inside a clipped window (steps), so nothing repaints while they fly. */
.critter { position: absolute; pointer-events: none; width: calc(var(--w, 96px) * var(--s, 1)); aspect-ratio: var(--ar); top: var(--top, 18%); left: 0; transform: translate3d(-30vw, 0, 0); }
.critter i { display: block; width: 100%; height: 100%; overflow: hidden; }
.critter b { display: block; width: 400%; height: 100%; background: 0 0 / 100% 100% no-repeat; }
/* sprite sheets load only once their band comes near */
.hero .critter b, .is-live .critter b { background-image: var(--sheet); }
.critter--bird { --sheet: url('/img/w/sunny-bird.webp'); --ar: 240 / 259; --w: clamp(56px, 5vw, 84px); }
.critter--hero { --top: 22%; }
.critter--gull { --sheet: url('/img/w/beach-gull.webp'); --ar: 240 / 306; --w: clamp(60px, 5.4vw, 92px); }
.critter--goose { --sheet: url('/img/w/sunset-goose.webp'); --ar: 240 / 247; --w: clamp(60px, 5vw, 88px); }
.critter--balloons { --sheet: url('/img/w/candy-balloons.webp'); --ar: 220 / 301; --w: clamp(64px, 6vw, 100px); }
.critter--owl { --sheet: url('/img/w/night-owl.webp'); --ar: 240 / 289; --w: clamp(60px, 5vw, 88px); }
@media (max-width: 699px) { .critter--hero { --top: 57%; } }
@media (prefers-reduced-motion: reduce) { .critter { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .critter { animation: fly var(--dur, 22s) linear var(--delay, 0s) infinite; animation-play-state: paused; }
  .critter b { animation: flap .5s steps(4) infinite; animation-play-state: paused; }
  .is-live .critter, .is-live .critter b, .hero .critter, .hero .critter b { animation-play-state: running; will-change: transform; }
  .critter--balloons { animation-name: float; }
  .critter--balloons b { animation-duration: 1.6s; }
}
@keyframes fly { from { transform: translate3d(-15vw, 0, 0); } 50% { transform: translate3d(50vw, -18px, 0); } to { transform: translate3d(115vw, 6px, 0); } }
@keyframes float { from { transform: translate3d(70vw, 50%, 0); } to { transform: translate3d(40vw, -340%, 0); } }
@keyframes flap { to { transform: translate3d(-100%, 0, 0); } }

/* ---- how it plays ------------------------------------------------------------ */
.run { background: var(--sky-low); padding: 40px var(--gutter) 120px; }
.run__inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 48px; align-items: center; }
.run__steps { margin-top: 36px; display: grid; gap: 28px; }
.run__steps li { display: grid; gap: 6px; }
.run__steps .h3 { display: flex; align-items: center; gap: 12px; }
.run__steps .h3::before { /* a tiny block from the game, one per step */
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 6px; border: 3px solid var(--ink); background: var(--gold);
}
.run__steps li:nth-child(2) .h3::before { background: var(--grass); }
.run__steps li:nth-child(3) .h3::before { background: var(--red); }
.run__steps p { max-width: 38ch; }
.clip { margin: 0; justify-self: center; width: min(300px, 78vw); }
.clip__frame { position: relative; border: var(--edge) solid var(--ink); border-radius: 34px; overflow: hidden; box-shadow: 0 10px 0 var(--ink); background: var(--navy); } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
.clip__video { width: 100%; height: auto; aspect-ratio: 332 / 720; object-fit: cover; }
.clip__btn {
  position: absolute; right: 14px; bottom: 14px; width: 64px; height: 64px; border-radius: 50%;
  border: var(--edge) solid var(--ink); background: var(--gold); box-shadow: 0 5px 0 var(--ink); cursor: pointer; /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
  display: grid; place-items: center; transition: transform 160ms var(--ease);
}
.clip__btn:hover { transform: translateY(-2px) scale(1.04); }
.clip__btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
.clip__icon { width: 0; height: 0; border-left: 20px solid var(--ink); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px; }
.clip__btn[data-state="playing"] .clip__icon { width: 20px; height: 22px; margin: 0; border: 0; border-left: 7px solid var(--ink); border-right: 7px solid var(--ink); }
.clip figcaption { margin-top: 18px; text-align: center; font-size: var(--s-small); }
.clip.is-paused-poster .clip__btn { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: 84px; height: 84px; }
.clip.is-paused-poster .clip__btn:hover { transform: translate(50%, 50%) scale(1.06); }
@media (min-width: 900px) {
  .run__inner { grid-template-columns: 1.3fr 1fr; }
  .run__steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .run__steps li { align-content: start; }
  .clip { width: 330px; }
}

/* ---- 2. worlds -------------------------------------------------------------- */
.worlds__intro { background: var(--sky-low); padding: 0 var(--gutter) 64px; max-width: none; }
.worlds__intro > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.worlds__intro > p { margin-top: 18px; max-width: min(var(--max), 52ch); margin-left: max(0px, calc((100% - var(--max)) / 2)); }
.worlds__intro .h2 { margin-left: max(0px, calc((100% - var(--max)) / 2)); }
.route { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.route a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; border-radius: 999px; background: var(--white);
  border: 3px solid var(--ink); font: 400 var(--s-body)/1 var(--disp); text-decoration: none; transition: transform 160ms var(--ease), background-color 160ms;
}
.route a:hover, .route a:focus-visible { background: var(--gold); transform: translateY(-2px); }

.band { position: relative; overflow: hidden; isolation: isolate; height: clamp(640px, 100svh, 1000px); background: var(--sky); }
.band__art { position: absolute; inset: 0; z-index: -1; }
.L { position: absolute; max-width: none; will-change: auto; }
.sky { inset: -16% 0 auto 0; width: 100%; height: 132%; object-fit: cover; object-position: 50% 30%; }
.strip { left: 0; width: 100%; object-fit: cover; object-position: 50% 0; }
.ground { bottom: -2px; height: 26%; }
.side { bottom: 14%; height: 56%; width: auto; }
.side-l { left: 0; }
.side-r { right: 0; }
.corner { bottom: -2px; width: clamp(150px, 26vw, 460px); }
.corner-l { left: 0; }
.corner-r { right: 0; }
.band__copy { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(56px, 12svh, 130px) var(--gutter) 0; }
.band__copy > p:not(.band__boss) { margin-top: 18px; max-width: 30ch; line-height: 1.4; }
.world { font-size: var(--s-hero); line-height: .92; --ow: .075em; }
@media (max-width: 899px) {
  .band--beach .side { height: 42%; bottom: 24%; }
  .band--night .moon { top: 44%; right: 8%; }
  .sheet { min-height: 62svh; }
  .side { height: 44%; bottom: 18%; }
  .side-l { left: -9vw; }
  .side-r { right: -9vw; }
  .band__copy { padding-top: 72px; }
}

/* per world: where each painted layer sits */
.band--sunny .far { bottom: 18%; height: 36%; }
.band--sunny .ground { height: 25%; }
.band--sunny .side-r { bottom: 12%; height: 50%; }
.band--sunny .corner-r { width: clamp(150px, 24vw, 420px); }

.band--beach { background: #78dcfb; }
.band--beach .far { bottom: 26%; height: 26%; }
.band--beach .ground { height: 30%; }
.band--beach .side { bottom: 20%; height: 76%; }
.band--beach .corner { bottom: 3%; width: clamp(110px, 15vw, 250px); }
.band--beach .corner-l { left: 4%; }
.band--beach .corner-r { right: 5%; }

.band--sunset { background: #fdb27a; }
.band--sunset .sun { left: 30%; bottom: 44%; width: clamp(70px, 8vw, 130px); }
.band--sunset .far { bottom: 40%; height: 10%; object-fit: fill; }
.band--sunset .mid { bottom: 17%; height: 30%; }
.band--sunset .ground { height: 25%; }
.band--sunset .side { bottom: 0; height: 84%; }

.band--candy { background: #f5c4e2; }
.band--candy .far { bottom: 22%; height: 34%; }
.band--candy .ground { height: 28%; }
.band--candy .mound { bottom: 15%; width: clamp(130px, 22vw, 380px); }
.band--candy .mound-l { left: 0; }
.band--candy .mound-r { right: 0; }
.band--candy .side { bottom: 20%; height: 58%; }
.band--candy .corner { width: clamp(140px, 22vw, 380px); }

.band--snowy { background: #79dafd; }
.band--snowy .far { bottom: 22%; height: 46%; }
.band--snowy .mid { bottom: 19%; height: 18%; }
.band--snowy .ground { height: 26%; }
.band--snowy .side { bottom: 12%; height: 68%; }
.snow { position: absolute; inset: -100px 0 0; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27260%27%20height%3D%27300%27%3E%3Cg%20fill%3D%27white%27%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2730%27%20r%3D%273%27/%3E%3Ccircle%20cx%3D%27140%27%20cy%3D%2712%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27230%27%20cy%3D%2770%27%20r%3D%272.6%27/%3E%3Ccircle%20cx%3D%2790%27%20cy%3D%2795%27%20r%3D%271.8%27/%3E%3Ccircle%20cx%3D%27180%27%20cy%3D%27140%27%20r%3D%273.2%27/%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%27170%27%20r%3D%272.2%27/%3E%3Ccircle%20cx%3D%27120%27%20cy%3D%27210%27%20r%3D%272.8%27/%3E%3Ccircle%20cx%3D%27215%27%20cy%3D%27240%27%20r%3D%271.8%27/%3E%3Ccircle%20cx%3D%2770%27%20cy%3D%27265%27%20r%3D%272.4%27/%3E%3Ccircle%20cx%3D%27250%27%20cy%3D%27190%27%20r%3D%271.5%27/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27260%27%20height%3D%27300%27%3E%3Cg%20fill%3D%27white%27%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2730%27%20r%3D%273%27/%3E%3Ccircle%20cx%3D%27140%27%20cy%3D%2712%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27230%27%20cy%3D%2770%27%20r%3D%272.6%27/%3E%3Ccircle%20cx%3D%2790%27%20cy%3D%2795%27%20r%3D%271.8%27/%3E%3Ccircle%20cx%3D%27180%27%20cy%3D%27140%27%20r%3D%273.2%27/%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%27170%27%20r%3D%272.2%27/%3E%3Ccircle%20cx%3D%27120%27%20cy%3D%27210%27%20r%3D%272.8%27/%3E%3Ccircle%20cx%3D%27215%27%20cy%3D%27240%27%20r%3D%271.8%27/%3E%3Ccircle%20cx%3D%2770%27%20cy%3D%27265%27%20r%3D%272.4%27/%3E%3Ccircle%20cx%3D%27250%27%20cy%3D%27190%27%20r%3D%271.5%27/%3E%3C/g%3E%3C/svg%3E"); background-size: 260px 300px, 190px 220px; background-position: 0 0, 97px 61px; opacity: .85; }
@media (prefers-reduced-motion: no-preference) { .is-live .snow { animation: snow 9s linear infinite; } }
@keyframes snow { to { transform: translateY(210px); } }

.band--night { background: var(--night); color: var(--white); height: auto; min-height: clamp(760px, 112svh, 1180px); }
.band--night .sky { object-position: 50% 0; }
.band--night .moon { right: 9%; top: 9%; width: clamp(84px, 9vw, 150px); }
.band--night .far { bottom: 26%; height: 16%; }
.band--night .ground { height: 34%; }
.band--night .side-l { bottom: 20%; height: 58%; }
.band--night .cottage { right: 3%; bottom: 22%; height: 30%; width: auto; }
.band--night .corner { width: clamp(150px, 22vw, 380px); }

/* ---- the climb: one block per world, desktop only --------------------------- */
.climb { display: none; }
@media (min-width: 1100px) {
  .climb { display: block; position: fixed; right: 18px; bottom: 22px; z-index: 15; opacity: 0; transform: translateX(20px); transition: opacity 300ms, transform 300ms var(--ease); pointer-events: none; }
  .climb.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .climb ol { display: flex; flex-direction: column; align-items: center; }
  .climb li + li { margin-top: -14px; }
  .climb a { position: relative; display: block; width: 58px; height: 44px; text-decoration: none; }
  .climb__b { /* one block: front face in the world colour, top face lighter, ink outline */
    position: absolute; inset: 10px 4px 10px; border: 3px solid var(--ink); border-radius: 8px; background: var(--c);
    opacity: .25; transform: translateY(-40px); transition: transform 520ms var(--ease), opacity 200ms;
  }
  .climb__b::before { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 8px; border-radius: 4px; background: var(--t); }
  .climb a.is-reached .climb__b { opacity: 1; transform: none; }
  .climb a.is-here .climb__b { outline: 3px solid var(--white); outline-offset: 0; }
  .climb a:hover .climb__b, .climb a:focus-visible .climb__b { opacity: 1; transform: translateX(-4px); }
  .climb__label {
    position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap;
    padding: 6px 12px; border-radius: 999px; background: var(--white); border: 3px solid var(--ink);
    font: 400 var(--s-small)/1 var(--disp); opacity: 0; pointer-events: none; transition: opacity 160ms;
  }
  .climb a:hover .climb__label, .climb a:focus-visible .climb__label, .climb a.is-here .climb__label { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .climb__b { transition: none; transform: none !important; } }

/* ---- 3. bosses: above the snow line ----------------------------------------- */
.bosses { background: var(--pale); padding: 120px 0 140px; }
.bosses__head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.bosses__head p { margin-top: 18px; max-width: 46ch; }
.pill { margin-top: 20px; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 18px; border-radius: 999px; background: var(--white); border: 3px solid var(--ink); font: 400 var(--s-small)/1 var(--disp); color: var(--ink); cursor: pointer; transition: background-color 160ms, transform 160ms var(--ease); }
.pill:hover { background: var(--gold); transform: translateY(-2px); }
.pill[hidden] { display: none; }
.swipe { display: none; }
.lineup { margin-top: 56px; }
.boss { position: relative; display: grid; justify-items: center; text-align: center; }
.boss__art { width: min(340px, 100%); aspect-ratio: 1; transition: transform 300ms var(--ease); }
.boss .h3 { margin-top: 4px; }
.boss__where { margin-top: 6px; font-size: var(--s-small); max-width: 26ch; }
.bubble {
  position: relative; max-width: 26ch; margin-bottom: 10px; padding: 12px 18px; border-radius: 20px;
  background: var(--white); border: var(--edge) solid var(--ink); font-size: var(--s-small); line-height: 1.35;
}
.bubble::after { /* the tail */
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 22px; height: 22px; background: var(--white);
  border: var(--edge) solid var(--ink); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 6px 0;
}
@media (max-width: 699px) {
  .swipe { display: flex; gap: 8px; align-items: center; max-width: var(--max); margin: 28px auto 0; padding: 0 var(--gutter); font: 400 var(--s-body)/1 var(--disp); }
  .lineup {
    margin-top: 18px; display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 4px var(--gutter) 14px;
    scroll-padding: 0 var(--gutter); scrollbar-width: none;
  }
  .lineup::-webkit-scrollbar { display: none; }
  .boss { scroll-snap-align: start; align-content: start; }
  .boss__art { width: 220px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 699px) {
  .swipe__arrow { display: inline-block; animation: nudge 1.4s var(--ease) infinite; }
}
@keyframes nudge { 50% { transform: translateX(8px); } }
@media (min-width: 700px) {
  .lineup { max-width: var(--max); margin: 64px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 72px 24px; }
}
@media (min-width: 900px) {
  .boss:nth-child(3n+2) { transform: translateY(56px); }
}

/* ---- 4. blocks: sheets stack like blocks on a tower ------------------------- */
.blocks { background: var(--pale); padding-bottom: 0; }
.blocks__head { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 56px; }
.blocks__head p { margin-top: 18px; max-width: 44ch; }
.sheet {
  position: sticky; top: calc(var(--i) * 64px); min-height: 78svh; padding: 22px var(--gutter) 40px;
  border-top: var(--edge) solid var(--ink); border-radius: 28px 28px 0 0;
  display: grid; gap: 22px; align-content: start;
}
.sheet--speed { --i: 0; background: var(--gold); }
.sheet--ice { --i: 1; background: var(--ice); }
.sheet--ghost { --i: 2; background: var(--pink); }
.sheet--bomb { --i: 3; background: var(--red); min-height: 84svh; }
.sheet__name { color: var(--ink); font-size: var(--s-h3); line-height: 1; min-height: 40px; }
.sheet__text { max-width: 36ch; }
.sheet__boss { display: flex; align-items: center; gap: 14px; max-width: 44ch; font-size: var(--s-small); line-height: 1.35; }
.sheet__boss img { width: 76px; height: 76px; flex: none; }
.sheet__pic { width: 100%; border: var(--edge) solid var(--ink); border-radius: var(--r); box-shadow: var(--lift); } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
@media (max-width: 899px) {
  .sheet { top: calc(var(--i) * 52px); }
  .sheet__pic { order: -1; margin-top: 30px; }
  .sheet__name { order: -2; }
}
@media (min-width: 900px) {
  .sheet { top: calc(var(--i) * 100px); min-height: 70svh; grid-template-columns: 5fr 7fr; grid-template-rows: auto auto 1fr auto; padding: 18px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) 56px; column-gap: 56px; }
  .sheet--bomb { min-height: 76svh; }
  .sheet__name { grid-column: 1; font-size: var(--s-h2); }
  .sheet__text { grid-column: 1; margin-top: 18px; max-width: 30ch; }
  .sheet__boss { grid-column: 1; align-self: end; margin-bottom: 8px; }
  .sheet__boss img { width: 110px; height: 110px; }
  .sheet__pic { grid-column: 2; grid-row: 1 / 5; margin-top: 64px; max-width: 760px; justify-self: end; }
}

/* ---- 5. extras strip ------------------------------------------------------ */
.extras { background: var(--grass); padding: 120px var(--gutter) 130px; border-top: var(--edge) solid var(--ink); position: relative; z-index: 1; }
.extras > .h2 { max-width: var(--max); margin: 0 auto; }
.perks { max-width: var(--max); margin: 48px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 18px; }
.perks img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: var(--edge) solid var(--ink); border-radius: var(--r); box-shadow: var(--lift); } /* taste-skill-ignore: the game's own ink outline / chunky edge, a brand feature kept on purpose */
.perks .h3 { margin-top: 18px; }
.perks p { margin-top: 6px; font-size: var(--s-small); line-height: 1.45; }
.perks__awards { grid-column: 1 / -1; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; aspect-ratio: auto; }
.badges img { border: 0; box-shadow: none; border-radius: 0; aspect-ratio: 1; object-fit: contain; }
@media (min-width: 700px) { .perks { grid-template-columns: repeat(3, 1fr); } .perks__awards { grid-column: auto; } }
@media (min-width: 1100px) {
  .perks { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .badges { aspect-ratio: 3 / 4; align-content: center; }
}

/* ---- 6. FAQ: dusk ----------------------------------------------------------- */
.faq { background: var(--dusk); color: var(--white); padding: 120px var(--gutter) 140px; display: grid; gap: 40px; }
.faq > * { max-width: var(--max); }
.faq__list { display: grid; gap: 14px; }
.faq details { background: rgba(255, 255, 255, .1); border-radius: var(--r); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 14px 22px; font: 400 var(--s-h3)/1.15 var(--disp); border-radius: var(--r);
  transition: background-color 160ms;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); font: 400 var(--s-h3)/1 var(--disp); transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: rgba(255, 255, 255, .1); }
.faq summary:focus-visible { outline-color: var(--gold); }
.faq details p { padding: 0 22px 22px; max-width: 60ch; }
@media (min-width: 900px) {
  .faq { grid-template-columns: 1fr 2fr; gap: 48px; padding-left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }
  .faq > * { max-width: none; }
}

/* ---- 7. finale: Starry Night ------------------------------------------------ */
.finale__copy { padding-bottom: 46svh; }
.finale__copy > p { color: var(--white); }
.finale__get p { margin: 0; }
.finale__get { margin-top: clamp(48px, 9svh, 96px); display: grid; gap: 12px; justify-items: start; }
.finale__out { font-size: var(--s-h2); }
.finale__free { margin-bottom: 14px; }
.finale .appstore:focus-visible, .foot :focus-visible { outline-color: var(--gold); }

/* ---- footer: the name first, under the night ------------------------------ */
.foot { background: var(--navy); color: var(--white); padding: 72px var(--gutter) 40px; overflow: hidden; }
.foot > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.foot__name { font: 400 var(--s-hero)/.9 var(--disp); --ow: .07em; }
.foot__row { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: center; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot__links a { display: inline-flex; align-items: center; min-height: 48px; font: 400 var(--s-h3)/1 var(--disp); color: var(--gold); text-decoration: none; }
.foot__links a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.foot__legal { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: var(--s-small); color: #e3e6f7; }
.foot__legal a { color: #e3e6f7; min-height: 44px; display: inline-flex; align-items: center; }
.foot__legal a:hover { color: var(--white); }


/* ---- world band contents: the boss who rules it, a real in-game shot, a tower */
.band__boss { display: flex; align-items: center; gap: 12px; margin-top: 22px; max-width: 34ch; padding: 8px 18px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .82); width: fit-content; font-size: var(--s-small); line-height: 1.3; }
.band__boss img { width: 56px; height: 56px; flex: none; }
.band--night .band__boss { background: rgba(255, 255, 255, .14); color: var(--white); }
.band__shot { position: absolute; margin: 0; right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); top: clamp(80px, 15svh, 150px); width: clamp(116px, 17vw, 240px); }
.band__shot img { width: 100%; border: var(--edge) solid var(--ink); border-radius: clamp(16px, 2vw, 28px); background: var(--navy); box-shadow: var(--lift); /* taste-skill-ignore: the game's chunky edge */ }
@media (max-width: 899px) {
  .band__shot { top: auto; bottom: 30%; right: var(--gutter); }
}
@media (min-width: 900px) {
  .band--sunny .band__shot { right: max(14vw, calc((100% - var(--max)) / 2 + 12vw)); }
  .band--night .band__shot { top: 36%; right: max(24vw, calc((100% - var(--max)) / 2 + 22vw)); }
}

/* the tower in each band, in that world's real block colours; it grows as
   you scroll through the band (scroll-driven, so it rides the compositor) */
.tower { position: absolute; left: 50%; bottom: 13%; width: clamp(92px, 9vw, 150px); display: flex; flex-direction: column-reverse; align-items: center; transform: translateX(-50%); }
.tower i, .tower__base { display: block; width: 100%; height: clamp(15px, 1.5vw, 24px); margin-top: -3px; background: var(--c); border: 3px solid var(--ink); border-radius: 6px; }
.tower i:nth-of-type(odd) { width: 96%; }
.tower__base { --c: var(--gold); width: 118%; height: clamp(12px, 1.1vw, 18px); }
.band--night .tower { bottom: 12%; left: 44%; }
@media (max-width: 899px) { .tower { left: 38%; bottom: 12%; } }

/* ---- the scroll-driven layer: parallax + the growing tower ---------------------
   Runs on the compositor in browsers that support scroll timelines. Elsewhere
   the layers simply sit still (desktop gets a light rAF fallback in home.js). */
.band { view-timeline: --band block; }
@keyframes px { from { transform: translate3d(0, calc(var(--d, 0) * 45vh), 0); } to { transform: translate3d(0, calc(var(--d, 0) * -45vh), 0); } }
@keyframes grow { from { transform: translate3d(0, -90px, 0); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes skydrift { to { transform: translate3d(0, 30vh, 0); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* only the bands near the screen carry running animations */
    .is-live [data-depth] { animation: px linear both; animation-timeline: --band; animation-range: cover 0% cover 100%; will-change: transform; }
    .tower i { opacity: 0; }
    .is-live .tower i { opacity: 1; animation: grow linear both; animation-timeline: --band; animation-range: cover calc(18% + var(--k) * 3.5%) cover calc(24% + var(--k) * 3.5%); }
    .hero__skyimg { animation: skydrift linear both; animation-timeline: scroll(root block); animation-range: 0 100vh; }
  }
}
.snow--far { background-size: 150px 170px, 110px 130px; opacity: .55; }
@media (prefers-reduced-motion: no-preference) { .is-live .snow--far { animation: snow 16s linear infinite; } .is-live .snow { will-change: transform; } }

/* ---- bosses as autoplaying clips (muted, inline, on the lineup's own colour) */
video.boss__art { height: auto; background: transparent; object-fit: contain; }

/* ---- entrances: once, per part, staggered (script adds .is-in) ------------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
}
