/* baglings.app. Colors are src/theme.ts, same names. Pet colors are
   src/petColors.ts. Spacing on a 4 px grid. Clay-toy slabs: 3 px outline,
   radius 20, a solid bottom shadow, squash on press. */

/* the theme hex values stay uppercase, byte-identical to src/theme.ts */
/* prettier-ignore */
:root {
  --bg: #0B0B12;
  --surface: #15142A;
  --border: #3A3760;
  --text: #FFFFFF;
  --textMuted: #C9C6E0;
  --accent: #7C5CFF;
  --accentText: #FFFFFF;
  --happy: #4ADE80;
  --sad: #F87171;
  --track: #26244A;
  --energy: #FBBF24;

  --pet-grape: #7C5CFF;
  --pet-teal: #2DD4BF;
  --pet-ember: #FF7A59;
  --pet-slate: #8B93A7;
  --pet-midnight: #3B2A8F;
  --pet-gold: #F5C451;
  --pet-rose: #F472B6;
  --pet-genesis: #DDF7F2;

  --grass: color-mix(in srgb, var(--happy) 72%, var(--bg));
  --grass-hi: color-mix(in srgb, var(--happy) 88%, var(--text));
  --grass-dark: color-mix(in srgb, var(--happy) 36%, var(--bg));
  --dirt: color-mix(in srgb, var(--track) 88%, var(--energy));

  --outline: 3px;
  --radius: 20px;
  --lift: 6px;
  --gutter: 16px;
  --max: 1120px;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--happy);
  outline-offset: 4px;
  border-radius: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- shared pieces ---------- */

/* The renders are cutouts (scripts/build-site-assets.js removes the art's
   dark backdrop). The creature fills about half of each frame. */
.render {
  scale: 1.3;
  user-select: none;
  -webkit-user-drag: none;
}

.slab {
  background: var(--surface);
  border: var(--outline) solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 var(--lift) 0 var(--bg),
    0 var(--lift) 0 var(--outline) var(--border),
    inset 0 3px 0 color-mix(in srgb, var(--text) 7%, transparent);
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--happy);
  margin-bottom: 12px;
}

.body {
  color: var(--textMuted);
  font-size: 1.0625rem;
  max-width: 60ch;
}

/* fat game buttons: a thick base under a glossy face; press squashes the
   face down onto the base */
.btn {
  --base: color-mix(in srgb, var(--accent) 45%, var(--bg));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 28px;
  border-radius: 999px;
  border: var(--outline) solid color-mix(in srgb, var(--accent) 55%, var(--bg));
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 8px 0 var(--base),
    inset 0 4px 0 color-mix(in srgb, var(--text) 24%, transparent),
    inset 0 -4px 0 color-mix(in srgb, var(--bg) 18%, transparent);
  transition:
    transform 140ms var(--ease-spring),
    box-shadow 140ms var(--ease-out),
    background-color 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 0 var(--base),
    inset 0 4px 0 color-mix(in srgb, var(--text) 24%, transparent),
    inset 0 -4px 0 color-mix(in srgb, var(--bg) 18%, transparent);
}

.btn:active {
  transform: translateY(6px) scale(1.04, 0.92);
  box-shadow:
    0 2px 0 var(--base),
    inset 0 4px 0 color-mix(in srgb, var(--text) 24%, transparent),
    inset 0 -4px 0 color-mix(in srgb, var(--bg) 18%, transparent);
}

.btn-primary {
  background: var(--accent);
  color: var(--accentText);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}

.btn-ghost {
  --base: var(--track);
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--track);
}

.btn-small {
  --base: var(--track);
  min-height: 48px;
  padding: 8px 20px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-small:hover {
  background: var(--track);
}

/* ---------- top bar ---------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
}

/* the HUD strip: one chunky pill holding the brand and the button */
.hud {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: var(--outline) solid var(--border);
  box-shadow:
    0 6px 0 var(--bg),
    inset 0 3px 0 color-mix(in srgb, var(--text) 8%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.btn-hud {
  min-height: 48px;
  padding: 8px 20px;
  font-size: 1.0625rem;
  box-shadow:
    0 5px 0 var(--base),
    inset 0 3px 0 color-mix(in srgb, var(--text) 24%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--border);
}

/* the cursor sparkle trail over the hero (mouse only) */
.sparkle {
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  margin: -9px;
  pointer-events: none;
  background: var(--spark, var(--energy));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle 760ms var(--ease-out) forwards;
}

/* ---------- hero: a little game scene ---------- */

/* Night sky from --bg down to --surface at the horizon, three parallax
   layers (far clouds, near clouds, coins), the approved night-hills art far
   behind, a grass strip with a ground band under it. The creature stands on
   the grass inside .stage; site.js moves it with hero-physics.js. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(max(12px, env(safe-area-inset-top)) + 80px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom, var(--bg), var(--surface) 70%);
}

/* the approved night-hills art in a 520 px band at the top, under a 72% --bg
   tint so the clouds and the copy stay readable, fading out at its foot */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--bg) 72%, transparent),
      color-mix(in srgb, var(--bg) 72%, transparent)
    ),
    url("assets/bg-hero-1344.jpg");
  background-size: cover, cover;
  background-position:
    center,
    center bottom;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* clouds: a pill with two puffs on top, flat clay with a darker belly */
.cloud {
  position: absolute;
  width: var(--w);
  height: calc(var(--w) * 0.3);
  border-radius: 999px;
  background: var(--cloud);
  box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--bg) 22%, transparent);
  animation: drift var(--drift, 24s) ease-in-out infinite alternate;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 30%;
  border-radius: 50%;
  background: var(--cloud);
}

.cloud::before {
  width: 44%;
  aspect-ratio: 1;
  left: 16%;
}

.cloud::after {
  width: 32%;
  aspect-ratio: 1;
  left: 50%;
}

.cloud-far {
  --cloud: color-mix(in srgb, var(--track) 70%, var(--border));
  --w: 110px;
  opacity: 0.8;
}

.cloud-near {
  --cloud: color-mix(in srgb, var(--border) 70%, var(--textMuted));
  --w: 170px;
  --drift: 16s;
  opacity: 0.5;
}

.cloud-1 {
  top: 14%;
  left: 6%;
}
.cloud-2 {
  top: 8%;
  left: 58%;
  --w: 80px;
  animation-delay: -8s;
}
.cloud-3 {
  top: 34%;
  left: 78%;
  animation-delay: -15s;
}
.cloud-4 {
  top: 24%;
  left: -40px;
}
.cloud-5 {
  top: 46%;
  left: 64%;
  animation-delay: -6s;
}

/* coins: gold discs that bob and flip now and then */
.coin {
  position: absolute;
  width: 28px;
  height: 28px;
  animation: coin-float 3.6s ease-in-out infinite;
}

.coin::before,
.coin-pop {
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 34% 30%,
      color-mix(in srgb, var(--energy) 40%, var(--text)) 0 16%,
      transparent 18%
    ),
    var(--energy);
  border: 3px solid color-mix(in srgb, var(--energy) 50%, var(--bg));
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--energy) 78%, var(--bg));
}

.coin::before {
  content: "";
  position: absolute;
  inset: 0;
  animation: coin-flip 4.8s ease-in-out infinite;
}

.coin-1 {
  top: 20%;
  left: 30%;
}
.coin-2 {
  top: 12%;
  left: 86%;
  animation-delay: -1.2s;
}
.coin-3 {
  top: 40%;
  left: 10%;
  width: 22px;
  height: 22px;
  animation-delay: -2.1s;
}
.coin-4 {
  top: 30%;
  left: 68%;
  width: 20px;
  height: 20px;
  animation-delay: -0.6s;
}
.coin-5 {
  top: 52%;
  left: 90%;
  width: 18px;
  height: 18px;
  animation-delay: -2.8s;
}

.coin-2::before {
  animation-delay: -2s;
}
.coin-4::before {
  animation-delay: -3.4s;
}

.hero-grid {
  display: grid;
}

/* ---------- the stage ---------- */

/* The stage's bottom edge is the top of the grass. --pet is the size of the
   creature's square render box; the creature fills about 60% of its width
   and its feet sit 13.5% above the box bottom. */
.stage {
  --pet: 168px;
  position: relative;
  height: clamp(260px, 40svh, 340px);
  margin-top: 8px;
}

.pet {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pet) * -0.135);
  z-index: 2;
  width: var(--pet);
  height: var(--pet);
  margin-left: calc(var(--pet) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.pet.is-held {
  cursor: grabbing;
}

.pet-squash,
.pet-lean,
.pet-bob {
  display: block;
  position: relative;
  transform-origin: 50% 86.5%;
}

.pet-lean {
  transition: transform 320ms var(--ease-out);
}

.pet-bob {
  animation: idle-bob 2.6s ease-in-out infinite;
}

.pet.is-airborne .pet-bob,
.hero.is-away .pet-bob {
  animation-play-state: paused;
}

.hero-img,
.hero-video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  /* the creature fills about half its render; scale it up inside the box */
  scale: 1.35;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  /* the loop is opaque with its own navy backdrop; fade its square edges out
     past the creature so the sky shows around it */
  -webkit-mask-image: radial-gradient(closest-side, #000 66%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 66%, transparent 100%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}

.has-video .hero-video {
  opacity: 1;
}

/* Blink for the still render (the video loop blinks on its own). Two lids
   in the render's body color over the eyes of idle-512.png, placed for the
   1.35 scale, each with the closed-eye line. */
.lid {
  position: absolute;
  top: 53.4%;
  width: 10.4%;
  height: 10.1%;
  background: linear-gradient(to bottom, #8e73fb 0 58%, #17132b 58% 76%, #8e73fb 76%);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: 50% 0;
  animation: blink 5.2s steps(1, end) infinite;
}

.lid-left {
  left: 36.5%;
}

.lid-right {
  left: 60.2%;
}

.has-video .lid {
  display: none;
}

.pet-shadow {
  position: absolute;
  left: 50%;
  bottom: -7px;
  z-index: 1;
  width: calc(var(--pet) * 0.5);
  height: 14px;
  margin-left: calc(var(--pet) * -0.25);
  pointer-events: none;
}

.pet-shadow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  animation: shadow 2.6s ease-in-out infinite;
}

.hero.is-away .pet-shadow::before,
.pet.is-airborne ~ .pet-shadow::before {
  animation-play-state: paused;
}

/* the slingshot band while the creature is pulled back */
.band {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms var(--ease-out);
}

.band.is-on {
  opacity: 1;
}

.band line {
  stroke: color-mix(in srgb, var(--energy) 70%, var(--bg));
  stroke-width: 8;
  stroke-linecap: round;
}

.band-post {
  fill: var(--energy);
  stroke: color-mix(in srgb, var(--energy) 50%, var(--bg));
  stroke-width: 3;
}

/* the aim: dots along the path the creature will fly */
.aim {
  fill: none;
  stroke: var(--text);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 0 22;
  opacity: 0.7;
}

/* the hops counter, a chunky badge in the stage corner */
.hops {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 16px 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: var(--outline) solid var(--border);
  box-shadow:
    0 4px 0 var(--bg),
    inset 0 3px 0 color-mix(in srgb, var(--text) 8%, transparent);
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
}

.hops::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--energy);
  border: 3px solid color-mix(in srgb, var(--energy) 50%, var(--bg));
}

.hops-label {
  color: var(--textMuted);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hops-count {
  min-width: 2ch;
  color: var(--energy);
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}

.hops.is-bump {
  animation: pop 360ms var(--ease-spring);
}

/* the first-visit hint bubble above the creature */
.hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pet) * 0.92);
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 8px 16px;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  translate: -50% 0;
  animation: hint-float 2.4s ease-in-out infinite;
  transition:
    opacity 240ms var(--ease-out),
    visibility 240ms;
}

.hint::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--text);
  border-radius: 3px;
  transform: rotate(45deg);
}

.hint.is-gone {
  opacity: 0;
  visibility: hidden;
}

/* a coin pops out of the creature on every hop */
.coin-pop {
  position: absolute;
  z-index: 3;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  pointer-events: none;
  animation: coin-pop 720ms var(--ease-out) forwards;
}

/* a Flappy-style pipe at the right edge of the stage on wide screens; the
   creature bounces off it (site.js takes its width off the stage bounds) */
.pipe {
  display: none;
}

/* grass with a striped top and a ground band that fades into the page */
.grass {
  position: absolute;
  top: 100%;
  /* wider than any screen; .hero clips it, so it spans the whole hero from
     inside the stage column */
  left: -100vw;
  right: -100vw;
  z-index: 0;
  height: 1600px;
  pointer-events: none;
  border-top: var(--outline) solid var(--grass-dark);
  background:
    repeating-linear-gradient(-60deg, var(--grass) 0 12px, var(--grass-hi) 12px 24px) 0 0 / 100% 18px
      no-repeat,
    linear-gradient(var(--grass-dark), var(--grass-dark)) 0 18px / 100% 5px no-repeat,
    linear-gradient(to bottom, var(--dirt), var(--bg) 160px) 0 23px / 100% calc(100% - 23px) no-repeat;
}

/* grass tufts above the strip */
.grass::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 10px;
  background: radial-gradient(circle at 10px 12px, var(--grass-hi) 9px, transparent 10px) 0 0 / 20px 10px
    repeat-x;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 48px 0 64px;
  text-align: center;
}

.chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--happy);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.3rem + 4.4vw, 4.25rem);
  text-wrap: balance;
}

/* the hook: the hero's second line, under the h1 and above the lead */
.lead-hook {
  margin: 12px auto 0;
  max-width: 30ch;
  color: var(--energy);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.3;
  text-wrap: balance;
}

/* it rises in once on load, after the h1; reduced motion stops every animation */
.js .lead-hook {
  animation: rise-in 640ms var(--ease-spring) 240ms both;
}

.lead {
  margin: 16px auto 0;
  color: var(--textMuted);
  font-size: 1.0625rem;
  max-width: 52ch;
}

.lead-ore {
  margin-top: 12px;
}

/* large bold text (19 px bold clears the 18.66 px bar), so the accent clears 3:1 on the night sky;
   kept under the hook's 1.25rem floor so the hook stays the hero's second-largest line */
.lead-ore a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 8px;
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1875rem;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.actions .btn {
  flex: 1 1 auto;
  white-space: nowrap;
}

/* ---------- sections ---------- */

.section {
  padding-block: 64px;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2,
.creature-copy h2,
.download h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.6vw, 3rem);
  text-wrap: balance;
}

.section-head .body {
  margin: 16px auto 0;
}

/* how it works */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

.step {
  position: relative;
  padding: 24px;
  text-align: center;
}

.step-num {
  position: absolute;
  top: -20px;
  left: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accentText);
  border: var(--outline) solid color-mix(in srgb, var(--accent) 55%, var(--bg));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 45%, var(--bg));
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
}

.step-art {
  width: 200px;
  margin: 0 auto 8px;
}

.step-pair {
  position: relative;
  width: 200px;
  margin-inline: auto;
}

.step-mini {
  position: absolute;
  width: 96px;
  right: -40px;
  bottom: 0;
  animation: nudge 4s ease-in-out infinite;
}

.step h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--textMuted);
}

/* the creature */

.creature-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.creature-stage {
  padding: 24px 24px 20px;
  max-width: 420px;
  width: 100%;
  margin-inline: auto;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    var(--surface);
}

.creature-img {
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}

.creature-img.pop {
  animation: pop 420ms var(--ease-spring);
}

.color-name {
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: -8px;
}

.creature-copy {
  text-align: center;
}

.creature-copy .body {
  margin: 16px auto 0;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 8px;
  margin-top: 28px;
  max-width: 400px;
  margin-inline: auto;
}

.swatch {
  --c: var(--pet-grape);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px;
  background: none;
  border: 0;
  color: var(--textMuted);
  font: 600 0.875rem/1.2 var(--body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.swatch .dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c);
  border: var(--outline) solid var(--bg);
  box-shadow:
    0 0 0 var(--outline) var(--border),
    0 5px 0 var(--outline) var(--track),
    inset 0 4px 0 color-mix(in srgb, var(--text) 30%, transparent);
  transition:
    transform 180ms var(--ease-spring),
    box-shadow 180ms var(--ease-out);
}

.swatch:hover .dot {
  transform: translateY(-3px);
}

.swatch:active .dot {
  transform: translateY(2px) scale(0.94);
}

.swatch[aria-pressed="true"] {
  color: var(--text);
}

.swatch[aria-pressed="true"] .dot {
  box-shadow:
    0 0 0 var(--outline) var(--text),
    0 5px 0 var(--outline) var(--accent),
    inset 0 4px 0 color-mix(in srgb, var(--text) 30%, transparent);
}

.swatch[data-color="grape"] {
  --c: var(--pet-grape);
}
.swatch[data-color="teal"] {
  --c: var(--pet-teal);
}
.swatch[data-color="ember"] {
  --c: var(--pet-ember);
}
.swatch[data-color="slate"] {
  --c: var(--pet-slate);
}
.swatch[data-color="midnight"] {
  --c: var(--pet-midnight);
}
.swatch[data-color="gold"] {
  --c: var(--pet-gold);
}
.swatch[data-color="rose"] {
  --c: var(--pet-rose);
}
.swatch[data-color="genesis"] {
  --c: var(--pet-genesis);
}

/* who can hatch the eighth color */
.swatch-note {
  margin-top: 12px;
  color: var(--textMuted);
  font-size: 0.875rem;
}

/* shop */

.scroller {
  list-style: none;
  margin: 0;
  padding: 12px 4px 28px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.item-card {
  flex: 0 0 176px;
  scroll-snap-align: start;
  padding: 12px 12px 16px;
  text-align: center;
  transition: transform 200ms var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}

.item-card img {
  width: 100%;
}

.item-card h3 {
  font-size: 1.125rem;
  margin-top: 4px;
}

.caption {
  color: var(--textMuted);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* gallery: the Loading halo floats over the slate Bagling's head and turns
   like a coin on its edge; the reduced-motion block stops it level */
.halo-stage {
  position: relative;
  display: block;
}

.item-card .halo {
  position: absolute;
  left: 28%;
  top: 0;
  width: 44%;
  pointer-events: none;
  animation:
    halo-spin 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite,
    halo-float 3.4s ease-in-out infinite;
}

/* rank */

.boards {
  display: grid;
  gap: 28px;
}

.board {
  position: relative;
  overflow: hidden;
  padding: 20px 24px 24px;
  text-align: center;
}

.board::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: var(--board, var(--accent));
}

.board-streak {
  --board: var(--happy);
}
.board-og {
  --board: var(--textMuted);
}
.board-drip {
  --board: var(--accent);
}

.board img {
  width: 150px;
  margin: 4px auto 0;
  transition: transform 260ms var(--ease-spring);
}

.board:hover img {
  transform: translateY(-6px) rotate(-3deg);
}

.board h3 {
  font-size: 2rem;
  color: var(--board);
}

.board p {
  margin-top: 8px;
  color: var(--textMuted);
}

/* ore: the gold Bagling beside a torn paper note that says what ORE does */

.ore-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

#ore .section-head {
  margin-bottom: 8px;
}

.ore-art {
  position: relative;
  width: min(200px, 60%);
  margin-inline: auto;
}

.ore-art .render {
  position: relative;
  animation: idle-bob 3.4s ease-in-out infinite;
}

.ore-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pet-gold) 45%, transparent), transparent 70%);
}

/* three gold nuggets bob around the creature */
.ore-nugget {
  position: absolute;
  width: 20px;
  height: 16px;
  border-radius: 40% 55% 45% 50%;
  background: var(--pet-gold);
  border: var(--outline) solid color-mix(in srgb, var(--pet-gold) 50%, var(--bg));
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--text) 45%, transparent);
  animation: coin-float 2.6s ease-in-out infinite;
}

.ore-nugget-1 {
  left: 2%;
  top: 30%;
}
.ore-nugget-2 {
  right: 4%;
  top: 18%;
  animation-delay: -0.9s;
  rotate: 24deg;
}
.ore-nugget-3 {
  right: 10%;
  bottom: 14%;
  animation-delay: -1.7s;
  rotate: -18deg;
}

/* the paper sits on a solid shadow; the wrapper draws it because the
   clip-path on the paper would cut a box-shadow off */
.torn-wrap {
  filter: drop-shadow(0 6px 0 var(--bg));
  rotate: -1deg;
}

.torn {
  --paper: color-mix(in srgb, var(--pet-gold) 14%, var(--text));
  --ink: var(--bg);
  padding: 36px 24px 32px;
  background:
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--pet-gold) 22%, transparent), transparent 45%),
    var(--paper);
  color: var(--ink);
  text-align: left;
  clip-path: polygon(
    0% 3px,
    4% 0px,
    8% 6px,
    12% 1px,
    16% 8px,
    20% 2px,
    24% 5px,
    28% 0px,
    32% 7px,
    36% 3px,
    40% 9px,
    44% 1px,
    48% 6px,
    52% 0px,
    56% 4px,
    60% 8px,
    64% 2px,
    68% 6px,
    72% 0px,
    76% 7px,
    80% 3px,
    84% 9px,
    88% 2px,
    92% 5px,
    96% 0px,
    100% 4px,
    100% calc(100% - 6px),
    96% calc(100% - 3px),
    92% calc(100% - 8px),
    88% calc(100% - 0px),
    84% calc(100% - 4px),
    80% calc(100% - 7px),
    76% calc(100% - 2px),
    72% calc(100% - 6px),
    68% calc(100% - 0px),
    64% calc(100% - 3px),
    60% calc(100% - 9px),
    56% calc(100% - 5px),
    52% calc(100% - 1px),
    48% calc(100% - 8px),
    44% calc(100% - 2px),
    40% calc(100% - 6px),
    36% calc(100% - 0px),
    32% calc(100% - 4px),
    28% calc(100% - 9px),
    24% calc(100% - 2px),
    20% calc(100% - 7px),
    16% calc(100% - 0px),
    12% calc(100% - 3px),
    8% calc(100% - 8px),
    4% calc(100% - 1px),
    0% calc(100% - 5px)
  );
}

/* the ORE logo inside a gold rim. The file is a white ring on an opaque
   black square, so the rim crops it to a round black disc. */
.ore-mark {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid var(--pet-gold);
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--pet-gold) 45%, var(--bg)),
    inset 0 3px 0 color-mix(in srgb, var(--text) 18%, transparent);
  rotate: -6deg;
}

.ore-mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  scale: 1.2;
}

.torn h2 {
  margin-top: 16px;
  font-size: clamp(1.875rem, 1.3rem + 2.6vw, 3rem);
}

.ore-lines {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ore-lines li {
  position: relative;
  padding-left: 32px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
}

/* a gold nugget for a bullet */
.ore-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 14px;
  border-radius: 40% 55% 45% 50%;
  background: var(--pet-gold);
  border: 2px solid color-mix(in srgb, var(--pet-gold) 45%, var(--bg));
}

.ore-note {
  margin-top: 20px;
  font-size: 1rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--paper));
}

/* game: a short course to fling the creature across, round bumpers on the
   way, a flag on the far side. site.js runs it with hero-physics.js. */

.game-grid {
  display: grid;
  gap: 28px;
}

.course {
  --cp: 84px; /* the creature's box */
  --turf: 28px; /* grass height */
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 18%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 42%),
    linear-gradient(to bottom, color-mix(in srgb, var(--track) 70%, var(--accent)), var(--track) 85%);
  touch-action: none;
  user-select: none;
}

.course-badge {
  top: 12px;
  right: auto;
  left: 12px;
}

.course-hint {
  position: absolute;
  left: 8px;
  bottom: calc(var(--turf) + var(--cp) * 0.86);
  z-index: 3;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  pointer-events: none;
  animation: hint-float 2.4s ease-in-out infinite;
  transition:
    opacity 240ms var(--ease-out),
    visibility 240ms;
}

.course-hint.is-gone {
  opacity: 0;
  visibility: hidden;
}

.course-grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--turf);
  border-top: var(--outline) solid var(--grass-dark);
  background:
    repeating-linear-gradient(-60deg, var(--grass) 0 12px, var(--grass-hi) 12px 24px) 0 0 / 100% 14px
      no-repeat,
    linear-gradient(to bottom, var(--dirt), var(--track)) 0 14px / 100% calc(100% - 14px) no-repeat;
}

/* site.js sets each bumper's left and bottom from its data-x, data-y, data-r */
.bumper {
  position: absolute;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--text) 70%, transparent) 0 14%, transparent 15%),
    var(--bump, var(--pet-rose));
  border: var(--outline) solid color-mix(in srgb, var(--bump, var(--pet-rose)) 45%, var(--bg));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--bump, var(--pet-rose)) 40%, var(--bg));
}

.bumper-2 {
  --bump: var(--pet-teal);
}

.bumper-3 {
  --bump: var(--energy);
}

.bumper.is-hit {
  animation: bumper-hit 320ms var(--ease-spring);
}

/* the far side: a little flag on the grass */
.flag {
  position: absolute;
  right: 18px;
  bottom: calc(var(--turf) - 2px);
  width: 4px;
  height: 56px;
  border-radius: 2px;
  background: var(--textMuted);
}

.flag::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 26px;
  height: 18px;
  background: var(--happy);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.course-pet {
  position: absolute;
  left: 50%;
  bottom: calc(var(--turf) - var(--cp) * 0.135);
  z-index: 2;
  width: var(--cp);
  height: var(--cp);
  margin-left: calc(var(--cp) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.course-pet.is-held {
  cursor: grabbing;
}

.course-squash {
  display: block;
  position: relative;
  transform-origin: 50% 86.5%;
}

/* the wink: the right lid closes once the creature lands */
.course-wink {
  animation: none;
  transition: transform 90ms var(--ease-out);
}

.course-pet.is-wink .course-wink {
  transform: scaleY(1);
}

.game-film {
  margin: 0;
}

.game-video {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 406;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}

.game-film figcaption {
  margin-top: 16px;
  color: var(--textMuted);
  font-size: 0.9375rem;
  text-align: center;
}

/* download */

.download {
  position: relative;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    var(--surface);
}

.download-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: var(--outline) solid var(--border);
  box-shadow: 0 6px 0 var(--bg);
}

.download .body {
  margin-inline: auto;
}

.stamp {
  margin: 12px 0 8px;
  padding: 12px 20px;
  border: 4px double var(--happy);
  border-radius: 12px;
  color: var(--happy);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-5deg);
  max-width: 100%;
}

.download .btn {
  width: 100%;
  max-width: 360px;
}

.note {
  color: var(--textMuted);
  font-size: 0.9375rem;
}

/* store badges: two clay pills side by side, stacked on a phone */
.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-top: 8px;
}

/* download: ORE meets a reader who jumps straight to the store pills */
.download-ore {
  margin: 0;
  color: var(--energy);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  text-wrap: balance;
}

.store-pill {
  --base: var(--bg);
  flex: 1 1 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 20px 10px 12px;
  border-radius: 20px;
  border: var(--outline) solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow:
    0 6px 0 var(--base),
    inset 0 3px 0 color-mix(in srgb, var(--text) 10%, transparent);
  transition:
    transform 140ms var(--ease-spring),
    box-shadow 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.store-pill-dapp {
  --base: color-mix(in srgb, var(--accent) 45%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--bg));
  cursor: pointer;
}

.store-pill-dapp:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 var(--base),
    inset 0 3px 0 color-mix(in srgb, var(--text) 10%, transparent);
}

.store-pill-dapp:active {
  transform: translateY(5px) scale(1.02, 0.96);
  box-shadow:
    0 1px 0 var(--base),
    inset 0 3px 0 color-mix(in srgb, var(--text) 10%, transparent);
}

/* the store Baglings is not on yet: a quiet plate, never a button */
.store-pill-soon {
  padding-left: 20px;
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 70%, var(--track));
  cursor: default;
}

.store-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.store-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.store-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}

.store-sub {
  color: var(--textMuted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.store-tag {
  flex: none;
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--energy);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: 4deg;
}

/* APK download: the how-to line, then the note or (after a release) the button */
.apk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 2px dashed var(--border);
}

.apk-line {
  max-width: 44ch;
  color: var(--text);
  font-weight: 700;
}

.apk-facts {
  max-width: 100%;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

/* footer */

.footer {
  padding-block: 32px max(32px, env(safe-area-inset-bottom));
  border-top: 2px solid var(--track);
  color: var(--textMuted);
  font-size: 0.9375rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  text-align: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 8px;
  color: var(--text);
  font-weight: 700;
}

/* ---------- privacy page ---------- */

.doc {
  padding-top: calc(max(16px, env(safe-area-inset-top)) + 88px);
  padding-bottom: 64px;
}

.doc-card {
  max-width: 760px;
  margin-inline: auto;
  padding: 32px 24px;
}

.doc h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  margin-bottom: 20px;
}

.doc h2 {
  font-size: 1.375rem;
  margin: 32px 0 8px;
  color: var(--happy);
}

.doc p {
  color: var(--textMuted);
  font-size: 1.0625rem;
}

.doc .doc-date {
  margin: -12px 0 24px;
  color: var(--textMuted);
  font-size: 0.875rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 32px;
  font-weight: 700;
  color: var(--text);
}

/* ---------- what ships ---------- */

/* how: two more wallet reactions as clay chips that pop in after the step lands */
.react-chips {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.react-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
}

.react-skr {
  border-color: var(--happy);
}

.react-ore {
  border-color: var(--pet-gold);
}

.js .step.is-in .react-chip {
  animation: chip-pop 520ms var(--ease-spring) 900ms both;
}

.js .step.is-in .react-chip + .react-chip {
  animation-delay: 1040ms;
}

/* how: a price sticker slapped on the mint step, wiggling now and then */
.price-sticker {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--energy);
  color: var(--bg);
  border: var(--outline) solid color-mix(in srgb, var(--energy) 50%, var(--bg));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--energy) 40%, var(--bg));
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  rotate: 10deg;
  animation: sticker-wiggle 3.2s ease-in-out infinite;
}

.step-note {
  margin-bottom: 8px;
  color: var(--textMuted);
  font-size: 0.875rem;
}

/* how: the mint step shows the copy set the body names (data-pricing), so the
   price wording switches in one place and the page never mixes free and paid */
body[data-pricing="free"] [data-pricing-set="paid"] {
  display: none;
}

body[data-pricing="paid"] [data-pricing-set="free"] {
  display: none;
}

/* how: the Every day strip, the daily loop in one place under the three steps */
.daily {
  margin-top: 40px;
  padding: 24px;
}

.daily h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  text-align: center;
}

.daily-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 12px;
}

.daily-list li {
  padding: 12px 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--textMuted);
  font-size: 1rem;
  line-height: 1.5;
}

.daily-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--energy);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
}

/* the five items rise in one after another once the strip reveals; no loop */
.js .daily.is-in li {
  animation: rise-in 560ms var(--ease-spring) var(--d, 0ms) both;
}

.js .daily li:nth-child(2) {
  --d: 120ms;
}

.js .daily li:nth-child(3) {
  --d: 240ms;
}

.js .daily li:nth-child(4) {
  --d: 360ms;
}

.js .daily li:nth-child(5) {
  --d: 480ms;
}

/* creature: the arrival beat, two joy hops and a Yipee! bubble, on a loop */
.arrival {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  text-align: left;
}

.arrival-stage {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
}

.arrival-pet {
  width: 96px;
  transform-origin: 50% 80%;
  animation: joy-hop 3.2s var(--ease-out) infinite;
}

.yipee-bubble {
  position: absolute;
  top: -20px;
  right: -12px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.875rem;
  transform-origin: 0% 100%;
  animation: yipee-pop 3.2s var(--ease-spring) infinite;
}

.arrival-copy {
  color: var(--textMuted);
}

/* gallery: the five prestige tiers as a ladder, Mythic on top; a row of
   stairs on a wide screen */
.prestige {
  margin-top: 24px;
  text-align: center;
}

.prestige h3 {
  font-size: 1.5rem;
}

.prestige .body {
  margin: 8px auto 0;
}

.tiers {
  list-style: none;
  margin: 20px auto 0;
  padding: 0;
  max-width: 320px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

.tier {
  --tc: var(--textMuted);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  width: var(--tw, 100%);
  margin-inline: auto;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: var(--outline) solid color-mix(in srgb, var(--tc) 55%, var(--border));
  box-shadow: 0 4px 0 var(--bg);
  font-family: var(--display);
  font-weight: 600;
}

.tier-1 {
  --tw: 60%;
}
.tier-2 {
  --tw: 70%;
  --tc: var(--pet-teal);
}
.tier-3 {
  --tw: 80%;
  --tc: var(--pet-gold);
}
.tier-4 {
  --tw: 90%;
  --tc: var(--energy);
}
.tier-5 {
  --tw: 100%;
  --tc: var(--accent);
}

.tier-gem {
  flex: none;
  width: 16px;
  height: 16px;
  rotate: 45deg;
  border-radius: 3px;
  background: var(--tc);
  border: 2px solid color-mix(in srgb, var(--tc) 50%, var(--bg));
}

.tier-5 .tier-gem {
  animation: gem-glow 2.4s ease-in-out infinite;
}

/* shop: the daily deal and the seasonal items */
.shop-extras {
  display: grid;
  gap: 24px;
  margin-top: 16px;
}

.extra {
  position: relative;
  padding: 24px;
  text-align: left;
}

.extra h3 {
  font-size: 1.375rem;
}

.extra p {
  margin-top: 8px;
  color: var(--textMuted);
}

.deal-tag {
  position: absolute;
  top: -16px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--energy);
  color: var(--bg);
  border: var(--outline) solid color-mix(in srgb, var(--energy) 50%, var(--bg));
  font-family: var(--display);
  font-weight: 700;
  transform-origin: 50% -12px;
  animation: tag-swing 2.6s ease-in-out infinite;
}

.extra-deal {
  display: grid;
  gap: 16px;
  padding-top: 32px;
}

/* a worked example: the Ball on a little plate, its full price struck and
   the deal price popping in beside it */
.deal-example {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas:
    "art price"
    "note note";
  gap: 8px 12px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 2px solid var(--border);
}

.deal-art {
  grid-area: art;
  width: 72px;
  animation: idle-bob 3s ease-in-out infinite;
}

.deal-price {
  grid-area: price;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
}

.deal-was {
  color: var(--textMuted);
  font-size: 1.375rem;
  text-decoration-thickness: 2px;
}

.deal-now {
  display: inline-block;
  color: var(--energy);
  font-size: 1.75rem;
  animation: price-pop 2.6s var(--ease-spring) infinite;
}

.deal-example figcaption {
  grid-area: note;
  color: var(--textMuted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.extra-season {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  column-gap: 12px;
  align-items: center;
  align-content: center;
}

.season-art {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 88px;
  animation: idle-bob 3s ease-in-out infinite;
}

.extra-season h3,
.extra-season p {
  grid-column: 1;
}

/* ore: the owner's hook on a gold plate that thumps now and then */
.ore-hook {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--pet-gold);
  color: var(--bg);
  border: var(--outline) solid color-mix(in srgb, var(--pet-gold) 50%, var(--bg));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--pet-gold) 40%, var(--bg));
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.0625rem, 0.95rem + 0.8vw, 1.5rem);
  line-height: 1.2;
  text-wrap: balance;
  rotate: -2deg;
  animation: hook-pulse 2.4s ease-in-out infinite;
}

/* seeker: three perk cards, each with its own little motion */
.perks {
  display: grid;
  gap: 28px;
}

.perk {
  padding: 20px 24px 24px;
  text-align: center;
}

.perk h3 {
  font-size: 1.75rem;
  margin-top: 8px;
}

.perk p {
  margin-top: 8px;
  color: var(--textMuted);
}

.perk-stage {
  position: relative;
  display: block;
  width: 160px;
  height: 140px;
  margin-inline: auto;
}

.perk-dancer {
  width: 132px;
  margin: 0 auto;
  transform-origin: 50% 80%;
  animation: dance 1.6s ease-in-out infinite;
}

.token-coin {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  border: var(--outline) solid var(--text);
  box-shadow: 0 4px 0 var(--border);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.875rem;
  animation:
    coin-flip 2.6s ease-in-out infinite,
    token-bob 2.6s ease-in-out infinite;
}

.perk-pet {
  width: 160px;
  margin-inline: auto;
}

/* the Genesis render's creature fills less of its frame than the others */
.perk-genesis .perk-pet {
  scale: 1.25;
}

.perk-ore .perk-pet {
  width: 128px;
  padding-top: 24px;
}

/* the visor sits over the Genesis Bagling's eyes and bobs with it */
.perk-visor {
  position: absolute;
  top: 54px;
  left: calc(50% - 40px);
  width: 80px;
  filter: drop-shadow(0 4px 0 var(--bg));
  animation: visor-float 3s ease-in-out infinite;
}

.perk-pick {
  position: absolute;
  right: -4px;
  bottom: 8px;
  width: 72px;
  transform-origin: 50% 90%;
  animation: pick-swing 1.8s ease-in-out infinite;
}

/* rank: the Bagling of the week on torn paper, three stars twinkling */
.potw {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 32px 24px 28px;
  text-align: center;
}

.potw-stage {
  position: relative;
  display: block;
  width: 140px;
  height: 140px;
}

.potw-pet {
  width: 140px;
  animation: idle-bob 3.4s ease-in-out infinite;
}

.potw-star {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--pet-gold);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2.2s ease-in-out infinite;
}

.potw-star-1 {
  top: 4px;
  left: 4px;
}
.potw-star-2 {
  top: 0;
  right: 8px;
  animation-delay: -0.7s;
}
.potw-star-3 {
  bottom: 24px;
  right: -4px;
  animation-delay: -1.4s;
}

.potw h3 {
  font-size: 1.75rem;
}

.potw p {
  margin-top: 8px;
  max-width: 48ch;
  color: color-mix(in srgb, var(--ink) 78%, var(--paper));
}

/* ---------- scroll reveal (only once js is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition:
    opacity 600ms var(--ease-out),
    transform 700ms var(--ease-spring);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .stamp {
  opacity: 0;
  transform: rotate(-5deg) scale(1.6);
}

.js .download.is-in .stamp {
  animation: stamp 520ms 360ms var(--ease-spring) forwards;
}

/* ---------- game panels ---------- */

/* Each section sits on a board: a thick border, a lighter top edge, a solid
   base under it. The cards inside stay --surface, so they read as set into
   the board. */
.panel {
  position: relative;
  padding: 40px 16px 32px;
  border-radius: 32px;
  border: 4px solid var(--border);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--track) 90%, var(--text)), var(--track) 96px),
    var(--track);
  box-shadow:
    0 10px 0 var(--bg),
    0 10px 0 4px var(--border),
    inset 0 4px 0 color-mix(in srgb, var(--text) 12%, transparent),
    inset 0 -6px 0 color-mix(in srgb, var(--bg) 25%, transparent);
}

/* the download board glows from the icon down */
.panel.download {
  padding: 40px 24px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%),
    var(--track);
}

/* scrollers run to the panel edges so cards slide in from under the border */
.panel .scroller {
  margin-inline: -16px;
  padding-inline: 16px;
  scroll-padding-inline: 16px;
}

/* the section title on a ribbon banner with folded tails */
.eyebrow.ribbon {
  position: relative;
  padding: 8px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accentText);
  border: var(--outline) solid color-mix(in srgb, var(--accent) 55%, var(--bg));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 45%, var(--bg));
  rotate: -2deg;
}

.eyebrow.ribbon::before,
.eyebrow.ribbon::after {
  content: "";
  position: absolute;
  top: 10px;
  z-index: -1;
  width: 20px;
  height: 100%;
  background: color-mix(in srgb, var(--accent) 50%, var(--bg));
}

.eyebrow.ribbon::before {
  left: -16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%);
}

.eyebrow.ribbon::after {
  right: -16px;
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%);
}

/* ---------- section motion (only once js is running) ---------- */

/* how: the three steps drop in one after another and bounce once */
.js [data-motion="drop"].is-in {
  animation: drop-in 860ms var(--ease-out) var(--d, 0ms) both;
}

.js .steps [data-motion="drop"]:nth-child(2) {
  --d: 160ms;
}

.js .steps [data-motion="drop"]:nth-child(3) {
  --d: 320ms;
}

/* creature: the render slides in from the side and wobbles to a stop */
.js [data-motion="slide"].is-in {
  animation: slide-in 1000ms var(--ease-out) both;
}

/* gallery: the looks fan out like a hand of cards and straighten on hover */
[data-motion="fan"] .item-card {
  rotate: var(--fan, 0deg);
  translate: 0 var(--lift-y, 0px);
}

.js [data-motion="fan"] .item-card {
  transition:
    translate 760ms var(--ease-spring) var(--d, 0ms),
    opacity 420ms var(--ease-out) var(--d, 0ms),
    rotate 260ms var(--ease-spring),
    transform 200ms var(--ease-out);
}

.js [data-motion="fan"]:not(.is-in) .item-card {
  translate: calc(var(--k, 0) * -100%) 24px;
  opacity: 0;
}

[data-motion="fan"] .item-card:hover,
[data-motion="fan"] .item-card:focus-within {
  rotate: 0deg;
  translate: 0 -6px;
}

.js [data-motion="fan"] .item-card:nth-child(1) {
  --k: 0;
  --d: 0ms;
  --fan: -5deg;
  --lift-y: 8px;
}
.js [data-motion="fan"] .item-card:nth-child(2) {
  --k: 1;
  --d: 80ms;
  --fan: -3deg;
  --lift-y: 3px;
}
.js [data-motion="fan"] .item-card:nth-child(3) {
  --k: 2;
  --d: 160ms;
  --fan: -1deg;
}
.js [data-motion="fan"] .item-card:nth-child(4) {
  --k: 3;
  --d: 240ms;
  --fan: 1deg;
}
.js [data-motion="fan"] .item-card:nth-child(5) {
  --k: 4;
  --d: 320ms;
  --fan: 3deg;
  --lift-y: 3px;
}
.js [data-motion="fan"] .item-card:nth-child(6) {
  --k: 5;
  --d: 400ms;
  --fan: 5deg;
  --lift-y: 8px;
}

/* shop: items fall in from above with a small bounce; the pointer tilt
   (site.js, on transform) still works because the fall uses translate and
   rotate */
.js [data-motion="fall"].is-in .item-card {
  animation: fall-in 760ms var(--ease-out) var(--d, 0ms) both;
}

.js [data-motion="fall"] .item-card:nth-child(2) {
  --d: 70ms;
}
.js [data-motion="fall"] .item-card:nth-child(3) {
  --d: 140ms;
}
.js [data-motion="fall"] .item-card:nth-child(4) {
  --d: 210ms;
}
.js [data-motion="fall"] .item-card:nth-child(5) {
  --d: 280ms;
}
.js [data-motion="fall"] .item-card:nth-child(6) {
  --d: 350ms;
}
.js [data-motion="fall"] .item-card:nth-child(7) {
  --d: 420ms;
}

/* rank: the boards climb up from below in three steps, one after another */
.js [data-motion="climb"].is-in {
  animation: climb-in 900ms var(--ease-out) var(--d, 0ms) both;
}

.js .boards [data-motion="climb"]:nth-child(2) {
  --d: 180ms;
}

.js .boards [data-motion="climb"]:nth-child(3) {
  --d: 360ms;
}

/* ore: the three lines rise in one after another */
.js [data-motion="rise"].is-in {
  animation: rise-in 640ms var(--ease-spring) var(--d, 0ms) both;
}

.js .ore-lines [data-motion="rise"]:nth-child(2) {
  --d: 140ms;
}

.js .ore-lines [data-motion="rise"]:nth-child(3) {
  --d: 280ms;
}

/* download: the panel pops and a burst of stars flies out of the icon */
.js [data-motion="pop"].is-in {
  animation: pop-in 680ms var(--ease-spring) both;
}

.burst {
  position: absolute;
  left: 50%;
  top: 88px;
  width: 0;
  height: 0;
  pointer-events: none;
}

.burst span {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px;
  background: var(--energy);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0;
}

.js .download.is-in .burst span {
  animation: burst 1100ms var(--ease-out) 260ms both;
}

.burst span:nth-child(1) {
  --bx: 0px;
  --by: -120px;
}
.burst span:nth-child(2) {
  --bx: 110px;
  --by: -80px;
  background: var(--happy);
}
.burst span:nth-child(3) {
  --bx: 150px;
  --by: 10px;
}
.burst span:nth-child(4) {
  --bx: 100px;
  --by: 90px;
  background: var(--pet-rose);
}
.burst span:nth-child(5) {
  --bx: -100px;
  --by: 90px;
}
.burst span:nth-child(6) {
  --bx: -150px;
  --by: 10px;
  background: var(--happy);
}
.burst span:nth-child(7) {
  --bx: -110px;
  --by: -80px;
}
.burst span:nth-child(8) {
  --bx: 50px;
  --by: -140px;
  background: var(--pet-rose);
}

/* seeker: the perk cards flip in one after another */
.js [data-motion="flip"].is-in {
  animation: flip-in 760ms var(--ease-spring) var(--d, 0ms) both;
}

.js .perks [data-motion="flip"]:nth-child(2) {
  --d: 160ms;
}

.js .perks [data-motion="flip"]:nth-child(3) {
  --d: 320ms;
}

/* gallery: the tiers stack up from Plain to Mythic */
.js [data-motion="stack"].is-in .tier {
  animation: rise-in 560ms var(--ease-spring) var(--d, 0ms) both;
}

.js [data-motion="stack"] .tier:nth-child(2) {
  --d: 120ms;
}
.js [data-motion="stack"] .tier:nth-child(3) {
  --d: 240ms;
}
.js [data-motion="stack"] .tier:nth-child(4) {
  --d: 360ms;
}
.js [data-motion="stack"] .tier:nth-child(5) {
  --d: 480ms;
}

/* shop: the deal and seasonal cards drop in */
.js [data-motion="tag"].is-in {
  animation: drop-in 860ms var(--ease-out) var(--d, 0ms) both;
}

.js .shop-extras [data-motion="tag"]:nth-child(2) {
  --d: 140ms;
}

/* rank: the week's Bagling pops onto its paper */
.js [data-motion="spot"].is-in {
  animation: pop-in 680ms var(--ease-spring) both;
}

/* ---------- keyframes ---------- */

@keyframes idle-bob {
  0%,
  100% {
    transform: translateY(0) scale(1.03, 0.97);
  }
  50% {
    transform: translateY(-8px) scale(0.98, 1.02);
  }
}

@keyframes halo-spin {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@keyframes halo-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scaleY(0);
  }
  94% {
    transform: scaleY(1);
  }
  97% {
    transform: scaleY(0);
  }
}

@keyframes drift {
  from {
    translate: -16px 0;
  }
  to {
    translate: 28px 0;
  }
}

@keyframes coin-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes coin-flip {
  0%,
  80%,
  100% {
    transform: scaleX(1);
  }
  88% {
    transform: scaleX(0.12);
  }
}

@keyframes coin-pop {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.5);
  }
  45% {
    opacity: 1;
    transform: translateY(-72px) scale(1.1, 1) rotateY(180deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-96px) scale(0.9) rotateY(360deg);
  }
}

@keyframes hint-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes shadow {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.9);
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(-6deg) translateY(-4px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.82);
  }
  60% {
    transform: scale(1.06, 0.96);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes drop-in {
  0% {
    opacity: 0;
    transform: translateY(-110px) rotate(-6deg);
  }
  55% {
    opacity: 1;
    transform: translateY(10px) rotate(1deg) scale(1.03, 0.95);
  }
  78% {
    transform: translateY(-8px) rotate(0) scale(0.99, 1.02);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes slide-in {
  0% {
    opacity: 0;
    transform: translateX(-140px) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: translateX(12px) rotate(5deg);
  }
  66% {
    transform: translateX(-4px) rotate(-3deg);
  }
  82% {
    transform: rotate(1.5deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fall-in {
  0% {
    opacity: 0;
    translate: 0 -140px;
    rotate: -8deg;
  }
  60% {
    opacity: 1;
    translate: 0 8px;
    rotate: 2deg;
  }
  80% {
    translate: 0 -4px;
    rotate: 0deg;
  }
  100% {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
  }
}

@keyframes climb-in {
  0% {
    opacity: 0;
    transform: translateY(150px);
  }
  18% {
    opacity: 1;
    transform: translateY(100px);
  }
  28% {
    transform: translateY(100px);
  }
  46% {
    transform: translateY(50px);
  }
  56% {
    transform: translateY(50px);
  }
  82% {
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    opacity: 1;
    transform: scale(1.05);
  }
  80% {
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes bumper-hit {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.22, 0.86);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rise-in {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes burst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.3) rotate(0deg);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--bx), var(--by)) scale(1) rotate(200deg);
  }
}

@keyframes sparkle {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(18px) scale(0.2) rotate(90deg);
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-12deg) scale(1.6);
  }
  70% {
    opacity: 1;
    transform: rotate(-4deg) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: rotate(-5deg) scale(1);
  }
}

/* the deal price thumps once per swing of the tag, then rests */
@keyframes price-pop {
  0%,
  30%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.18) rotate(-4deg);
  }
  20% {
    transform: scale(0.96);
  }
}

@keyframes chip-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes sticker-wiggle {
  0%,
  80%,
  100% {
    transform: rotate(0);
  }
  86% {
    transform: rotate(-8deg) scale(1.06);
  }
  92% {
    transform: rotate(6deg);
  }
}

/* two hops in the first 900 ms, squash on each landing, then rest */
@keyframes joy-hop {
  0% {
    transform: none;
  }
  6% {
    transform: translateY(0) scale(1.08, 0.9);
  }
  12% {
    transform: translateY(-22px) scale(0.94, 1.06);
  }
  18% {
    transform: translateY(0) scale(1.1, 0.88);
  }
  22% {
    transform: translateY(-14px) scale(0.96, 1.04);
  }
  28% {
    transform: translateY(0) scale(1.06, 0.94);
  }
  34%,
  100% {
    transform: none;
  }
}

@keyframes yipee-pop {
  0%,
  6% {
    opacity: 0;
    transform: scale(0.3);
  }
  14% {
    opacity: 1;
    transform: scale(1.1);
  }
  20%,
  52% {
    opacity: 1;
    transform: scale(1);
  }
  60%,
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes gem-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 12px 4px color-mix(in srgb, var(--accent) 70%, transparent);
  }
}

@keyframes tag-swing {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

@keyframes hook-pulse {
  0%,
  30%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.07);
  }
  20% {
    transform: scale(0.98);
  }
}

@keyframes dance {
  0%,
  100% {
    transform: rotate(-8deg) scale(1.02, 0.98);
  }
  25% {
    transform: translateY(-8px) rotate(0) scale(0.97, 1.03);
  }
  50% {
    transform: rotate(8deg) scale(1.02, 0.98);
  }
  75% {
    transform: translateY(-8px) rotate(0) scale(0.97, 1.03);
  }
}

@keyframes token-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes visor-float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-4px) rotate(3deg);
  }
}

@keyframes pick-swing {
  0%,
  100% {
    transform: rotate(20deg);
  }
  45% {
    transform: rotate(-28deg);
  }
  55% {
    transform: rotate(-24deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.7) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(20deg);
  }
}

@keyframes flip-in {
  0% {
    opacity: 0;
    transform: perspective(800px) rotateY(80deg) translateY(24px);
  }
  60% {
    opacity: 1;
    transform: perspective(800px) rotateY(-8deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
  .course {
    --cp: 104px;
    height: 320px;
  }

  .ore-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 40px;
  }

  .ore-art {
    width: 100%;
    max-width: 300px;
  }

  .torn {
    padding: 48px 40px 40px;
  }

  .section {
    padding-block: 96px;
  }

  .steps,
  .boards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .swatches {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: none;
  }

  .item-card {
    flex-basis: 200px;
  }

  .panel {
    padding: 56px 40px 48px;
  }

  .panel .scroller {
    margin-inline: -40px;
    padding-inline: 40px;
    scroll-padding-inline: 40px;
  }

  /* the three boards stand like a podium: OG in the middle is tallest */
  .boards {
    align-items: end;
  }

  .board-streak {
    padding-bottom: 56px;
  }

  .board-og {
    padding-bottom: 88px;
  }

  .doc-card {
    padding: 48px;
  }
}

@media (min-width: 960px) {
  .hero {
    padding-bottom: 88px;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: end;
  }

  .stage {
    --pet: 240px;
    grid-column: 2;
    grid-row: 1;
    height: min(560px, 64svh);
    margin-top: 0;
  }

  .pipe {
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 64px;
    height: 34%;
    border: var(--outline) solid var(--grass-dark);
    border-bottom: 0;
    background: linear-gradient(
      to right,
      var(--grass) 0 18%,
      var(--grass-hi) 18% 34%,
      var(--grass) 34% 78%,
      var(--grass-dark) 78%
    );
  }

  .pipe::before {
    content: "";
    position: absolute;
    left: -11px;
    right: -11px;
    top: -3px;
    height: 32px;
    border: var(--outline) solid var(--grass-dark);
    border-radius: 6px;
    background: inherit;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding: 0 0 48px;
    text-align: left;
  }

  .lead,
  .lead-hook {
    margin-left: 0;
  }

  .actions {
    justify-content: flex-start;
  }

  .creature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .creature-copy {
    text-align: left;
  }

  .creature-copy .body {
    margin-left: 0;
  }

  .swatches {
    margin-left: 0;
  }

  .panel.download {
    padding: 56px 48px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
}

/* what ships, on wider screens */
@media (min-width: 720px) {
  .perks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-extras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .extra-deal {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  .deal-example {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "art"
      "price"
      "note";
    justify-items: center;
    row-gap: 4px;
    text-align: center;
  }

  .potw {
    grid-template-columns: 160px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 32px;
    padding: 40px;
    text-align: left;
  }

  /* the tiers stand as stairs, Plain low on the left, Mythic tall on the right */
  .tiers {
    max-width: 640px;
    flex-direction: row;
    align-items: flex-end;
  }

  .tier {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: flex-end;
    width: auto;
    height: var(--th);
    padding: 12px 8px;
  }

  .tier-1 {
    --th: 72px;
  }
  .tier-2 {
    --th: 92px;
  }
  .tier-3 {
    --th: 112px;
  }
  .tier-4 {
    --th: 132px;
  }
  .tier-5 {
    --th: 152px;
  }
}

/* narrow phones: the arrival card stacks so its words keep a readable width */
@media (max-width: 479px) {
  .arrival {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 28px;
    text-align: center;
  }
}

/* ---------- reduced motion: everything still ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal,
  .js .stamp {
    opacity: 1;
    transform: none;
  }

  .js .stamp {
    transform: rotate(-5deg);
  }

  .layer,
  .item-card,
  .cloud,
  .coin,
  .course-pet,
  .course-squash,
  .pet,
  .pet-lean,
  .pet-squash,
  .pet-shadow {
    transform: none !important;
    translate: none !important;
  }

  .coin-pop,
  .band,
  .hint,
  .course-hint,
  .burst,
  .sparkle {
    display: none !important;
  }

  .js [data-motion],
  .js [data-motion] .item-card,
  .item-card {
    opacity: 1 !important;
    translate: none !important;
  }

  .pet {
    cursor: pointer;
  }
}
