/* Compost Mortem — presentation website.
   The chunky look follows the game's ChunkyPalette (GameRender/Sprites/ChunkySprites.swift): a navy outline, a face
   that lightens upwards over a darker lip, and Lilita One for everything loud. The page digs from the sky of the
   game's menu down through the soil into the compost of the promotional art. */

@font-face {
  font-family: "Lilita One";
  src: url("../assets/fonts/LilitaOne-Regular.woff2") format("woff2"),
       url("../assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #10163A;
  --navy-face: #1F2C70;
  --navy-top: #3A4FAE;
  --navy-lip: #141B4D;
  --cream: #FFF2CE;
  --flash: #FFC33D;
  --moss: #9DBB38;
  --petrol: #087F70;
  --pine: #06352D;

  --sky-top: #8FE0FF;
  --sky: #1F8FF0;
  --sky-deep: #1260B4;
  --grass: #3CBF2E;

  --soil-1: #B4631F;
  --soil-2: #8E4819;
  --soil-3: #5C2D13;
  --soil-4: #2E1D11;
  --core-1: #0A2F28;
  --core-2: #06352D;
  --core-3: #04241F;

  --font-display: "Lilita One", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 22px;
  --border: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 76px;

  /* The tone a component paints with; .tone-* classes swap it. */
  --t-top: #FFF06A;
  --t-face: #FFC21A;
  --t-lip: #C26E00;
  --t-ink: var(--navy);
}

.tone-yellow { --t-top: #FFF06A; --t-face: #FFC21A; --t-lip: #C26E00; }
.tone-green { --t-top: #9EF56A; --t-face: #3CBF2E; --t-lip: #23861B; }
.tone-orange { --t-top: #FFC27A; --t-face: #FF7A1F; --t-lip: #C24E0C; }
.tone-blue { --t-top: #8FE0FF; --t-face: #1F8FF0; --t-lip: #1260B4; }
.tone-purple { --t-top: #D4A6FF; --t-face: #7B3FF2; --t-lip: #4F22B0; }
.tone-red { --t-top: #FF8A7A; --t-face: #E0302B; --t-lip: #9C1A17; }
.tone-navy { --t-top: #3A4FAE; --t-face: #1F2C70; --t-lip: #141B4D; }
.tone-pink { --t-top: #FFC2D6; --t-face: #F06A9B; --t-lip: #B23A68; }
.tone-lavender { --t-top: #D9C8FF; --t-face: #9479E0; --t-lip: #5E46A8; }
.tone-petrol { --t-top: #6FE3D0; --t-face: #0FA08C; --t-lip: #087060; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--sky);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.95rem + 0.2vw, 18px);
  line-height: 1.55;
  color: var(--cream);
  background: var(--core-3);
  overflow-x: hidden;
}

/* Animations start from offsets that may reach past the edges; clipping (not hiding) keeps sticky and pins working. */
main, .footer { overflow-x: hidden; }
@supports (overflow: clip) {
  body, main, .footer { overflow-x: clip; }
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--flash);
  color: var(--navy);
  font-family: var(--font-display);
  text-decoration: none;
  border: var(--border) solid var(--navy);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 8px var(--navy);
  border-radius: 10px;
}

/* ---------- Outlined display text, as OutlinedTextRenderer draws it ---------- */

.title, .section-title, .tagline, .headline, .btn__label, .stat dd, .notice__text b, .sub-title,
.mode h3, .plan__head h3, .creature h3, .feature h3, .wordmark__text, .callout h3, .stamp h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  -webkit-text-stroke: var(--stroke, 0.14em) var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 var(--depth, 0.08em) 0 var(--navy);
}

/* ---------- Chunky components ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.7em 1.35em 0.95em;
  border: var(--border) solid var(--navy);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--t-top) 0%, var(--t-face) 58%);
  box-shadow: inset 0 -0.36em 0 var(--t-lip), 0 0.3em 0 var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 5px;
  height: 26%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0.22em); box-shadow: inset 0 -0.18em 0 var(--t-lip), 0 0.08em 0 var(--navy); }
.btn__label { position: relative; color: #fff; --stroke: 0.2em; --depth: 0.07em; }
.btn--small { font-size: 0.95rem; padding: 0.6em 1em 0.8em; border-radius: 14px; }
.btn--hero { font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem); padding: 0.55em 1.1em 0.75em 0.8em; border-radius: 24px; border-width: 5px; }
.btn__icon { width: 1.5em; height: 1.5em; flex: none; color: #fff; filter: drop-shadow(0 0.08em 0 var(--navy)) drop-shadow(0 0 1.5px var(--navy)) drop-shadow(0 0 1.5px var(--navy)); position: relative; }
.btn__stack { display: grid; gap: 0.25em; text-align: left; }
.btn__sub { font-size: 0.5em; color: var(--navy); letter-spacing: 0.04em; }

.panel {
  position: relative;
  border: var(--border) solid var(--navy);
  border-radius: 26px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-face) 42%);
  box-shadow: inset 0 -10px 0 var(--navy-lip), 0 8px 0 rgba(16, 22, 58, 0.55);
  padding: clamp(20px, 3vw, 34px);
}

.chip, .pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  width: fit-content;
  border: 3px solid var(--navy);
  border-radius: 999px;
  font-family: var(--font-display);
  line-height: 1;
}
.chip { padding: 0.45em 0.85em 0.5em; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.chip--navy { background: var(--navy-face); color: #fff; box-shadow: inset 0 -3px 0 var(--navy-lip); }
.chip--free { background: linear-gradient(#9EF56A, #3CBF2E 60%); color: #fff; box-shadow: inset 0 -3px 0 #23861B; text-shadow: 0 1px 0 var(--navy), 0 0 2px var(--navy); }
.chip--full { background: linear-gradient(#D4A6FF, #7B3FF2 60%); color: #fff; box-shadow: inset 0 -3px 0 #4F22B0; text-shadow: 0 1px 0 var(--navy), 0 0 2px var(--navy); }
.pill { padding: 0.65em 1.1em; background: rgba(16, 22, 58, 0.78); color: #fff; font-family: var(--font-body); font-weight: 700; border-color: rgba(16, 22, 58, 0.9); }
.pill--soon::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--flash); box-shadow: 0 0 0 3px rgba(255, 195, 61, 0.3); }
.tag { padding: 0.45em 0.8em; background: var(--flash); color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

.badge-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  border: var(--border) solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, var(--t-top), var(--t-face) 62%);
  box-shadow: inset 0 -6px 0 var(--t-lip), 0 4px 0 var(--navy);
  color: #fff;
}
.badge-icon svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 var(--navy)); }

.eyebrow {
  display: inline-block;
  justify-self: start;
  width: fit-content;
  margin-bottom: 0.6rem;
  padding: 0.35em 0.8em 0.4em;
  border-radius: 999px;
  background: var(--flash);
  border: 3px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--navy);
}

.section-title {
  color: #fff;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.2rem);
  line-height: 1.02;
  text-wrap: balance;
}
.section-title--big { font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5.4rem); }
.sub-title { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.1; }
.section-head { display: grid; gap: 0.9rem; max-width: 760px; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--center .eyebrow { justify-self: center; }

.section-lede { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--cream); max-width: 62ch; }

/* ---------- Top bar, progress and depth meter ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 10px var(--gutter) 0;
  pointer-events: none;
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 8px 10px 8px 10px;
  border: var(--border) solid transparent;
  border-radius: 22px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  pointer-events: auto;
}
.topbar.is-solid .topbar__inner {
  background: linear-gradient(180deg, var(--navy-top), var(--navy-face) 60%);
  border-color: var(--navy);
  box-shadow: inset 0 -6px 0 var(--navy-lip), 0 6px 0 rgba(16, 22, 58, 0.4);
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.wordmark img { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--navy); }
.wordmark__text { font-size: 1.35rem; color: var(--flash); --stroke: 0.2em; line-height: 1; text-transform: uppercase; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 8px 12px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--navy), 0 0 3px var(--navy), 0 0 3px var(--navy);
  transition: background 0.15s;
}
.topnav a:hover, .topnav a.is-current { background: rgba(255, 255, 255, 0.16); }
.topbar__progress {
  display: none;
  height: 8px;
  max-width: 1280px;
  margin: 6px auto 0;
  opacity: 0;
  transition: opacity 0.3s;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: rgba(16, 22, 58, 0.6);
  overflow: hidden;
}
.topbar__progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, #9EF56A, #3CBF2E);
}

.depth {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 40;
  display: none;
  grid-template-columns: auto auto;
  grid-template-areas: "readout readout" "zones tube";
  gap: 10px 10px;
  transform: translateY(-46%);
  padding: 12px 10px 14px 12px;
  border-radius: 20px;
  background: rgba(16, 22, 58, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.depth__readout {
  grid-area: readout;
  justify-self: end;
  display: grid;
  justify-items: end;
  font-family: var(--font-display);
  line-height: 1;
}
.depth__label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 var(--navy), 0 0 3px var(--navy); }
.depth__value {
  font-size: 1.25rem;
  color: var(--flash);
  -webkit-text-stroke: 0.2em var(--navy);
  paint-order: stroke fill;
  font-variant-numeric: tabular-nums;
}
.depth__tube {
  grid-area: tube;
  position: relative;
  width: 18px;
  height: min(46vh, 380px);
  border: 4px solid var(--navy);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 14%, var(--grass) 16%, var(--soil-1) 24%, var(--soil-3) 50%, var(--soil-4) 64%, var(--core-2) 80%, var(--core-3) 100%);
  box-shadow: 0 4px 0 rgba(16, 22, 58, 0.5);
}
.depth__fill { position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, 0.25), transparent); }
.depth__marker {
  position: absolute;
  left: 50%;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 4px solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFF06A, #FFC21A 62%);
  box-shadow: inset 0 -4px 0 #C26E00, 0 3px 0 var(--navy);
  color: #fff;
}
.depth__marker svg { width: 18px; height: 18px; filter: drop-shadow(0 1.5px 0 var(--navy)); }
.depth__zones {
  grid-area: zones;
  display: grid;
  align-content: space-between;
  text-align: right;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 0 var(--navy);
}
.depth__zones li { transition: color 0.2s, transform 0.2s; }
.depth__zones li.is-active { color: #fff; transform: translateX(-4px); }

.topnav a, .topbar .btn__label { white-space: nowrap; }
.topbar__blog { display: none; }

/* The depth meter floats in the margin beside the 1200 px content column, so it appears only where it fits there:
   without its zone labels first, with them from 1520 px on. Narrower, it would cover the cards. */
@media (min-width: 1400px) {
  .depth { display: grid; }
}
@media (min-width: 1400px) and (max-width: 1519px) {
  .depth { right: 8px; grid-template-columns: auto; grid-template-areas: "readout" "tube"; justify-items: center; }
  .depth__zones { display: none; }
  .depth__readout { justify-self: center; }
}
/* Below this the sections' links do not fit in one row: the bar keeps the logo, the blog and the call to action. */
@media (max-width: 1099px) {
  .topnav { display: none; }
  .topbar__blog { display: inline-flex; }
}
@media (max-width: 899px) {
  .topbar__progress { display: block; }
  .topbar.is-solid .topbar__progress { opacity: 1; }
}
@media (max-width: 480px) {
  .wordmark__text { display: none; }
}

/* ---------- 1 · Hero: the surface ---------- */

.hero {
  position: relative;
  min-height: max(100svh, 680px);
  padding: calc(var(--topbar-h) + 28px) 0 clamp(150px, 20vw, 230px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #2F9BF5 0%, var(--sky) 42%, #47A9F6 70%, var(--sky-top) 100%);
}
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sky__sun {
  position: absolute;
  left: 72%;
  top: 46%;
  width: 0;
  height: 0;
}
.sky__rays {
  position: absolute;
  left: -110vmax;
  top: -110vmax;
  width: 220vmax;
  height: 220vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.18) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 22%, transparent 48%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 22%, transparent 48%);
}
.sky__sun::after {
  content: "";
  position: absolute;
  left: -32vmin;
  top: -32vmin;
  width: 64vmin;
  height: 64vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 65%);
}
.cloud {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
  aspect-ratio: 2 / 1;
  overflow: visible;
}
.mountains, .hills {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: visible;
}
.mountains { bottom: clamp(70px, 9vw, 120px); height: clamp(160px, 22vw, 300px); }
.hills { bottom: -2px; height: clamp(140px, 18vw, 260px); }
.sky__dusk {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 53, 45, 0.6), rgba(46, 29, 17, 0.75));
  opacity: 0;
}

.hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: calc(100svh - var(--topbar-h) - 220px);
}
.hero__copy { display: grid; gap: clamp(12px, 1.6vw, 18px); justify-items: start; position: relative; z-index: 2; }
.title {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.28em;
  font-size: clamp(3rem, 1.4rem + 6.4vw, 7rem);
  line-height: 0.92;
  color: var(--flash);
  --stroke: 0.15em;
  --depth: 0.09em;
  transform: rotate(-3deg);
  transform-origin: left bottom;
  text-transform: uppercase;
}
.title__word { display: inline-block; white-space: nowrap; }
.title .char { display: inline-block; will-change: transform; }
.tagline { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); color: #fff; text-transform: uppercase; --stroke: 0.22em; margin-top: -4px; }
.headline { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem); color: #fff; line-height: 1.08; --stroke: 0.16em; }
.lede {
  max-width: 54ch;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(16, 22, 58, 0.72);
  border: 3px solid var(--navy);
  color: #fff;
  font-weight: 600;
}
/* Buttons stacked in one column share the width of the widest, so their edges line up. */
.hero__actions { display: grid; grid-template-columns: minmax(0, max-content); max-width: 100%; gap: 14px; margin-top: 6px; }
.hero__actions .pill { justify-self: start; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 12px;
  background: #fff;
  border: 3px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  box-shadow: 0 3px 0 var(--navy);
}
.platforms svg { width: 20px; height: 20px; }

.hero__stage { position: relative; z-index: 1; display: grid; place-items: center; }
.island { position: relative; width: min(100%, 560px); aspect-ratio: 520 / 470; }
.island__rock { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; }
.island__hero {
  position: absolute;
  left: 4%;
  bottom: 39%;
  width: 92%;
  z-index: 1;
  filter: drop-shadow(0 10px 0 rgba(16, 22, 58, 0.25));
  cursor: pointer;
}
.boom {
  position: absolute;
  right: 0;
  top: 2%;
  z-index: 2;
  padding: 0.25em 0.6em 0.35em;
  border: 4px solid var(--navy);
  border-radius: 18px;
  background: linear-gradient(#FFF06A, #FFC21A 60%);
  box-shadow: inset 0 -5px 0 #C26E00, 0 4px 0 var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  text-transform: uppercase;
  -webkit-text-stroke: 0.2em var(--navy);
  paint-order: stroke fill;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.island__crumb {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: #8E4A1F;
  border: 3px solid var(--navy);
}
.island__crumb--small { width: 12px; height: 10px; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vw, 40px);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 2px;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-display);
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 2px 0 var(--navy), 0 0 3px var(--navy), 0 0 3px var(--navy);
}
.scroll-cue svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 0 var(--navy)) drop-shadow(0 0 1px var(--navy)); }

@media (max-width: 899px) {
  .hero { padding-bottom: 120px; }
  /* On a phone the genre and the button come first, the island in between, the long text after. */
  .hero__layout { grid-template-columns: 1fr; min-height: 0; justify-items: start; gap: 14px; }
  .hero__copy { display: contents; }
  .hero__copy .chip { order: 1; }
  .hero__copy .title { order: 2; }
  .hero__copy .tagline { order: 3; }
  .hero__copy .headline { order: 4; }
  .hero__copy .hero__actions { order: 5; }
  /* The beetle stands a third of the island's width above it. */
  .hero__stage { order: 6; justify-self: center; margin: calc(min(74vw, 380px) * 0.34) 0 24px; }
  .hero__copy .lede { order: 7; }
  .hero__copy .platforms { order: 8; }
  .island { width: min(74vw, 380px); }
  .sky__sun { left: 50%; top: 58%; }
  .scroll-cue { display: none; }
}

/* ---------- Soil layers ---------- */

.layer { position: relative; isolation: isolate; }
.layer--topsoil { background: linear-gradient(180deg, var(--soil-1) 0%, #A4561C 100%); }
.layer--soil { background: linear-gradient(180deg, var(--soil-2) 0%, #7A3C15 100%); }
.layer--roots { background: linear-gradient(180deg, var(--soil-3) 0%, #3F2112 100%); }
.layer--deep { background: linear-gradient(180deg, var(--soil-4) 0%, #1A2219 40%, var(--core-1) 100%); }
.layer--core { background: linear-gradient(180deg, var(--core-1) 0%, var(--core-2) 100%); }
.layer--core-deep { background: linear-gradient(180deg, var(--core-2) 0%, var(--core-3) 100%); }
.modes.layer--core { background: var(--core-2); }

.grass-edge, .strata-edge { position: absolute; left: 0; right: 0; bottom: 100%; height: clamp(40px, 6vw, 90px); margin-bottom: -2px; z-index: 2; pointer-events: none; }
.grass-edge svg, .strata-edge svg { width: 100%; height: 100%; overflow: visible; }
.grass-edge { height: clamp(50px, 6vw, 90px); bottom: auto; top: -40px; }

.pebbles {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 9px 6px at 12% 18%, #6E6A66 98%, transparent),
    radial-gradient(ellipse 6px 4px at 74% 32%, #8A7A6A 98%, transparent),
    radial-gradient(ellipse 12px 7px at 32% 64%, #6E6A66 98%, transparent),
    radial-gradient(ellipse 5px 4px at 88% 76%, #B59A7A 98%, transparent),
    radial-gradient(ellipse 8px 5px at 56% 88%, #7E7268 98%, transparent),
    radial-gradient(ellipse 4px 3px at 20% 82%, #B59A7A 98%, transparent);
  background-size: 520px 420px;
}
.pebbles--dense { background-size: 360px 300px; opacity: 0.4; }

.buried { position: absolute; z-index: -1; pointer-events: none; opacity: 0.8; }
.buried--crate { right: 6%; top: 18%; width: clamp(70px, 9vw, 120px); transform: rotate(-14deg); filter: saturate(0.7) brightness(0.7); }
.roots { position: absolute; top: 0; z-index: -1; width: clamp(120px, 16vw, 220px); height: auto; pointer-events: none; }
.roots--left { left: 2%; }
.roots--right { right: 4%; top: 30%; }

/* ---------- 2 · Dig ---------- */

.dig { padding: clamp(70px, 9vw, 110px) 0 clamp(80px, 10vw, 130px); }
.dig__stage { position: relative; }
.dig__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
}
.dig__copy { display: grid; gap: 14px; }
.dig__copy p { color: #fff; }
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 700; color: #fff; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--navy);
  background: radial-gradient(circle at 50% 30%, #9EF56A, #3CBF2E 62%);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.15em + 5px);
  width: 6px;
  height: 9px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.dig__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.hint { font-family: var(--font-display); color: var(--flash); }

.dig__window {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 6px solid var(--navy);
  border-radius: 30px;
  overflow: hidden;
  background: #6A8F80;
  box-shadow: 0 10px 0 rgba(16, 22, 58, 0.55);
  touch-action: manipulation;
  cursor: crosshair;
  isolation: isolate;
}
.dig__footage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dig__dirt, .dig__debris { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dig__dirt { transition: opacity 0.9s ease; }
.dig__window.is-cleared .dig__dirt { opacity: 0; }
.dig__window.is-cleared { cursor: default; }
.tag--footage { position: absolute; right: 14px; top: 14px; z-index: 3; pointer-events: none; }

@media (max-width: 899px) {
  .dig__layout { grid-template-columns: 1fr; }
  .dig__window { order: -1; }
}

/* ---------- 3 · Why ---------- */

.why { padding: clamp(90px, 10vw, 140px) 0; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.feature {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 22px 28px;
  border: var(--border) solid var(--navy);
  border-radius: 26px;
  background: linear-gradient(180deg, #F4F8FF 0%, #DDE7FA 70%);
  box-shadow: inset 0 -9px 0 #9FB2DD, 0 8px 0 rgba(16, 22, 58, 0.5);
  color: var(--navy);
  overflow: hidden;
}
.feature h3 { font-size: 1.45rem; line-height: 1.08; color: var(--navy); -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(16, 22, 58, 0.18); }
.feature p { font-weight: 600; }
.feature::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--t-face);
}
.feature--rope { padding-right: 112px; }
.rope-rig {
  position: absolute;
  top: -4px;
  right: 14px;
  width: 92px;
  height: auto;
  transform-origin: 50% 4%;
  transform: rotate(-12deg);
}

@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}

/* ---------- 4 · Footage ---------- */

.footage { padding: clamp(90px, 10vw, 140px) 0 clamp(90px, 10vw, 130px); overflow: hidden; }
.devices {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 20fr);
  align-items: end;
  gap: clamp(18px, 3vw, 40px);
  margin-bottom: clamp(60px, 8vw, 110px);
}
.device { display: grid; gap: 12px; }
.device__screen {
  position: relative;
  padding: clamp(8px, 1vw, 14px);
  border: 5px solid var(--navy);
  border-radius: clamp(26px, 3vw, 40px);
  background: linear-gradient(180deg, #2A3260, #161C40);
  box-shadow: inset 0 -8px 0 #0C1130, 0 10px 0 rgba(0, 0, 0, 0.35);
}
.device__screen img,
.device__screen video { display: block; width: 100%; height: auto; border-radius: clamp(16px, 2vw, 28px); border: 3px solid #0C1130; background: #0C1130; }
.device--wide { grid-column: 1 / -1; }
/* The tag sits on the bezel, so it never covers the game's own interface. */
.device__screen .tag--footage { top: -16px; right: clamp(28px, 4vw, 48px); }
.device figcaption { font-family: var(--font-display); color: #fff; text-shadow: 0 2px 0 var(--navy); padding-left: 8px; }

.biomes { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.biomes__text { display: grid; gap: 12px; }
.biome-fan { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.biome {
  position: relative;
  border: 5px solid var(--navy);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35);
  background: var(--navy);
}
.biome img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.biome figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 0.3em 0.8em 0.4em;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 899px) {
  .devices { grid-template-columns: 1fr; }
  .biomes { grid-template-columns: 1fr; }
}

/* ---------- 5 · Crew ---------- */

.crew { padding: clamp(90px, 10vw, 140px) 0 clamp(70px, 8vw, 110px); }
.crew__intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 60px); align-items: center; margin-bottom: clamp(30px, 4vw, 60px); }
.crew__intro .section-head { margin-bottom: 0; }
.poster-card {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  transform: rotate(3deg);
  border: 6px solid var(--navy);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.4);
}
.poster-card .tag { position: absolute; right: 12px; top: 12px; }
.crew__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  color: var(--flash);
}
.crew__hint svg { width: 22px; height: 22px; }
.crew__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--moss) transparent;
  padding: 10px 0 26px;
}
.crew-track {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  width: max-content;
  padding-inline: max(var(--gutter), calc((100vw - 1200px) / 2));
}
.creature {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  width: clamp(250px, 26vw, 310px);
  padding: 14px 14px 22px;
  scroll-snap-align: center;
  border: var(--border) solid var(--navy);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--navy-top), var(--navy-face) 34%);
  box-shadow: inset 0 -10px 0 var(--navy-lip), 0 10px 0 rgba(0, 0, 0, 0.35);
}
.creature__portrait {
  border: var(--border) solid var(--navy);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(var(--t-top), var(--t-face));
  box-shadow: inset 0 0 0 4px var(--t-face);
}
.creature__portrait img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(12, 17, 48, 0.25)); }
.creature__badge { position: absolute; top: 24px; right: 24px; }
.creature h3 { font-size: 1.6rem; line-height: 1.05; color: #fff; padding-inline: 6px; --stroke: 0.2em; }
.creature h3 small { display: block; font-size: 0.6em; color: var(--t-top); margin-top: 2px; }
.creature > p:last-child { padding-inline: 6px; color: #E9EDFF; font-size: 0.97rem; }
.creature__ability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-left: 4px;
  padding: 6px 12px 7px 8px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: linear-gradient(#FFF06A, #FFC21A 60%);
  box-shadow: inset 0 -3px 0 #C26E00;
  color: var(--navy);
  font-family: var(--font-display);
}
.creature__ability svg { width: 20px; height: 20px; }

.crew.is-pinned .crew__viewport { overflow: visible; scroll-snap-type: none; padding-bottom: 30px; }
.crew__pin { position: relative; }
.crew.is-pinned .crew__pin { display: flex; flex-direction: column; justify-content: center; height: 100svh; padding-top: calc(var(--topbar-h) + 10px); }

@media (max-width: 899px) {
  .crew__intro { grid-template-columns: 1fr; }
  .poster-card { width: min(86%, 380px); }
}

/* ---------- 6 · Arsenal ---------- */

.arsenal { padding: clamp(90px, 10vw, 140px) 0 clamp(60px, 8vw, 100px); overflow: hidden; }
.arsenal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 40% at 50% 34%, rgba(255, 195, 61, 0.14), transparent 70%);
}
.arsenal__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(20px, 4vw, 60px); align-items: end; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 clamp(28px, 5vw, 56px); }
.stat {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  padding: 16px 8px 18px;
  border: var(--border) solid var(--navy);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(58, 79, 174, 0.9), rgba(31, 44, 112, 0.95) 60%);
  box-shadow: inset 0 -7px 0 var(--navy-lip), 0 6px 0 rgba(0, 0, 0, 0.35);
  text-align: center;
}
.stat dd { margin: 0; font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.8rem); line-height: 1; color: var(--flash); --stroke: 0.14em; font-variant-numeric: tabular-nums; }
.stat dt { font-family: var(--font-display); font-size: 0.9rem; color: #fff; line-height: 1.15; }

.crate-shelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 28px);
  align-items: end;
  padding: 0 clamp(8px, 2vw, 30px) 26px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.crate-shelf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  border: var(--border) solid var(--navy);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--moss) 0 30%, #6E4021 30% 100%);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  z-index: -1;
}
.crate { display: grid; justify-items: center; gap: 10px; margin-bottom: 16px; }
.crate svg { width: min(100%, 150px); height: auto; overflow: visible; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.3)); }
.crate figcaption {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1.1rem);
  color: #fff;
  text-shadow: 0 2px 0 var(--navy), 0 0 3px var(--navy);
  text-align: center;
}

.marquee { display: grid; gap: 14px; margin-bottom: clamp(50px, 7vw, 90px); transform: rotate(-2deg); }
.marquee__row { display: flex; gap: 12px; width: max-content; padding-left: 4vw; }
.marquee__row--alt { margin-left: -30vw; }
.marquee__row li {
  padding: 10px 18px 12px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: linear-gradient(#F4F8FF, #BFD0F4 70%);
  box-shadow: inset 0 -4px 0 #7F95CC, 0 4px 0 rgba(0, 0, 0, 0.35);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  white-space: nowrap;
}
.marquee__row--alt li { background: linear-gradient(#FFF06A, #FFC21A 70%); box-shadow: inset 0 -4px 0 #C26E00, 0 4px 0 rgba(0, 0, 0, 0.35); }
.marquee__row li.is-hazard {
  background: repeating-linear-gradient(-45deg, #FFD60A 0 12px, #10163A 12px 20px);
  color: #fff;
  text-shadow: 0 2px 0 var(--navy), 0 0 3px var(--navy), 0 0 3px var(--navy);
}

.arsenal__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.powerups .sub-title { margin-bottom: 18px; }
.powerup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.powerup-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 14px 12px 10px;
  border: 3px solid var(--navy);
  border-radius: 18px;
  background: rgba(16, 22, 58, 0.72);
}
.pu-badge {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--pu) 55%, #fff), var(--pu) 64%);
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--pu) 60%, #000), 0 3px 0 var(--navy);
  color: #fff;
}
.pu-badge svg { width: 24px; height: 24px; filter: drop-shadow(0 1.5px 0 var(--navy)) drop-shadow(0 0 1px var(--navy)); }
.powerup-list b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; color: #fff; line-height: 1.1; }
.powerup-list span:last-child { font-size: 0.9rem; color: #CBD3F5; line-height: 1.25; }

.hud-demo { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar-h) + 30px); }
.hud-demo__screen {
  position: relative;
  min-height: 300px;
  padding: 22px 18px;
  border: 5px solid var(--navy);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(16, 22, 58, 0.05), rgba(16, 22, 58, 0.4)),
    url("../assets/shots/biome-volcano.webp") center / cover;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 18px;
}
.notice {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 12px 10px;
  border: 4px solid var(--navy);
  border-radius: 999px;
  background: linear-gradient(180deg, #F59BFF, #D63BE6 60%);
  box-shadow: inset 0 -6px 0 #8F1E9C, 0 5px 0 var(--navy);
}
.notice__badge {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 4px solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #fff, #F2C8FF 70%);
  color: #B42CC4;
}
.notice__badge svg { width: 26px; height: 26px; }
.notice__text { display: grid; line-height: 1.05; }
.notice__text b { font-weight: 400; font-size: 1.9rem; color: #fff; text-transform: uppercase; --stroke: 0.18em; }
.notice__text span { font-family: var(--font-display); color: #fff; font-size: 1rem; text-shadow: 0 1.5px 0 var(--navy), 0 0 2px var(--navy); }
.feed { display: grid; justify-items: end; gap: 8px; }
.feed__line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 8px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--navy-top), var(--navy-face) 60%);
  box-shadow: inset 0 -4px 0 var(--navy-lip);
  font-family: var(--font-display);
}
.feed__line b { font-weight: 400; text-shadow: 0 1.5px 0 var(--navy); }
.feed__line svg { width: 20px; height: 20px; color: #FFB02E; }
.feed__award { color: #FFE14D; text-transform: uppercase; }
.feed__line--hazard { background: repeating-linear-gradient(-45deg, #FFD60A 0 12px, #E8B800 12px 24px); }
.feed__line--hazard b { color: var(--navy); text-shadow: none; text-transform: uppercase; }
.feed__line--hazard svg { color: var(--navy); }
.hud-demo figcaption { font-size: 0.95rem; color: var(--cream); }

@media (max-width: 520px) {
  .powerup-list li { column-gap: 8px; padding: 8px 10px 10px 8px; }
  .pu-badge { width: 38px; height: 38px; }
  .pu-badge svg { width: 20px; height: 20px; }
  .powerup-list b { font-size: 1rem; }
  .powerup-list span:last-child { font-size: 0.82rem; }
}
@media (max-width: 899px) {
  .arsenal__head, .arsenal__grid { grid-template-columns: 1fr; }
  .crate-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
  .crate-shelf::after { display: none; }
  .hud-demo { position: relative; top: 0; }
}

/* ---------- 7 · Modes ---------- */

.modes { padding: clamp(70px, 9vw, 120px) 0; }
.modes__layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 60px); align-items: center; }
.modes__text { display: grid; gap: 20px; }
.modes__text .section-head { margin-bottom: 0; }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; }
.callout .badge-icon { grid-row: span 2; }
.callout h3 { font-size: 1.5rem; line-height: 1.1; color: #fff; --stroke: 0.2em; }
.callout p { color: #E9EDFF; }
/* The sky-blue panel: what the game is proud of (playing together with no network). */
.panel--sky {
  background: linear-gradient(180deg, #8FE0FF 0%, #1F8FF0 48%);
  box-shadow: inset 0 -10px 0 #1260B4, 0 8px 0 rgba(16, 22, 58, 0.55);
}
.panel--sky p { color: #fff; font-weight: 700; text-shadow: 0 1.5px 0 rgba(16, 22, 58, 0.7), 0 0 2px rgba(16, 22, 58, 0.6); }
.platforms li.platforms__direct { background: linear-gradient(#8FE0FF, #1F8FF0 70%); color: #fff; text-shadow: 0 1.5px 0 var(--navy), 0 0 2px var(--navy); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.controls li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 9px 10px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: rgba(16, 22, 58, 0.72);
  font-family: var(--font-display);
  color: #fff;
}
.controls svg { width: 24px; height: 24px; color: var(--moss); }

.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mode {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 24px;
  border: var(--border) solid var(--navy);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--t-top) 0%, var(--t-face) 52%);
  box-shadow: inset 0 -9px 0 var(--t-lip), 0 7px 0 var(--navy);
  color: #fff;
}
.mode::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 6px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}
.mode--wide { grid-column: 1 / -1; padding: 22px 22px 28px; }
.mode__icon { position: relative; width: 44px; height: 44px; flex: none; color: #fff; filter: drop-shadow(0 3px 0 var(--navy)) drop-shadow(0 0 1.5px var(--navy)) drop-shadow(0 0 1.5px var(--navy)); }
.mode--wide .mode__icon { width: 64px; height: 64px; }
.mode h3 { position: relative; font-size: 1.7rem; text-transform: uppercase; color: #fff; line-height: 1; --stroke: 0.2em; }
.mode--wide h3 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); }
.mode h3 small { display: block; font-size: 0.42em; margin-top: 4px; letter-spacing: 0.04em; }
.mode p { position: relative; margin-top: 8px; font-weight: 700; color: #fff; text-shadow: 0 1.5px 0 rgba(16, 22, 58, 0.8), 0 0 2px rgba(16, 22, 58, 0.8); }
.pill--note { grid-column: 1 / -1; justify-self: center; margin-top: 4px; }

@media (max-width: 899px) {
  .modes__layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .menu-grid { grid-template-columns: 1fr; }
}

/* ---------- 8 · Free and Full Game ---------- */

.offer { padding: clamp(80px, 10vw, 130px) 0 clamp(60px, 8vw, 100px); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); max-width: 980px; margin: 0 auto clamp(36px, 5vw, 60px); }
.plan {
  border: var(--border) solid var(--navy);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #F4F8FF, #DFE8FB);
  box-shadow: inset 0 -9px 0 #9FB2DD, 0 9px 0 rgba(0, 0, 0, 0.35);
  color: var(--navy);
}
.plan__head {
  padding: 20px 24px 22px;
  background: linear-gradient(180deg, var(--t-top), var(--t-face) 60%);
  border-bottom: var(--border) solid var(--navy);
  box-shadow: inset 0 -6px 0 var(--t-lip);
}
.plan__head h3 { display: flex; align-items: center; gap: 10px; font-size: 2rem; color: #fff; text-transform: uppercase; --stroke: 0.2em; }
.plan__head h3 svg { width: 30px; height: 30px; color: #FFE14D; filter: drop-shadow(0 2px 0 var(--navy)) drop-shadow(0 0 1px var(--navy)); }
.plan__head p { margin-top: 4px; font-family: var(--font-display); color: #fff; text-shadow: 0 1.5px 0 var(--navy), 0 0 2px var(--navy); }
.plan__rows { margin: 0; padding: 10px 24px 26px; display: grid; }
.plan__rows div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 2px dashed #B9C6E6; }
.plan__rows div:last-child { border-bottom: 0; }
.plan__rows dt { font-family: var(--font-display); color: var(--navy-face); }
.plan__rows dd { margin: 0; font-weight: 700; }
.plan__foot { padding: 14px 24px 22px; border-top: 2px dashed #B9C6E6; font-size: 0.9rem; font-weight: 600; color: #3B4672; }
.plan__foot a { color: var(--navy-face); font-weight: 800; }

/* Two cards side by side share their rows (subgrid): the heads, every dashed line and the feet sit level, whatever the
   text of either card needs. Without subgrid the cards still stretch to one height. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 761px) {
    .plans--rows { grid-template-rows: auto repeat(4, auto); row-gap: 0; }
    .plans--rows .plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; }
    .plans--rows .plan__rows { display: grid; grid-row: 2 / span 4; grid-template-rows: subgrid; }
    .plans--rows .plan__rows div { align-content: center; }
  }
}

.stamp {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 980px;
  margin-inline: auto;
  padding: 22px 26px 26px;
  border: var(--border) solid var(--navy);
  border-radius: 26px;
  background: linear-gradient(180deg, #FFF8D6, #FFE9A3);
  box-shadow: inset 0 -8px 0 #E2BD52, 0 8px 0 rgba(0, 0, 0, 0.35);
  color: var(--navy);
  transform: rotate(-1deg);
}
.stamp h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.1; color: var(--navy); -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(226, 189, 82, 0.9); margin-bottom: 8px; }
.stamp p { font-weight: 600; }

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .stamp { flex-direction: column; }
}

/* ---------- 9 · FAQ ---------- */

.faq { background: var(--core-3); padding: clamp(70px, 9vw, 120px) 0 clamp(90px, 10vw, 140px); }
.faq__layout { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.faq__list { display: grid; gap: 12px; }
.qa {
  border: 3px solid var(--navy);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(58, 79, 174, 0.55), rgba(31, 44, 112, 0.7));
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 0 2px 0 var(--navy);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFF06A, #FFC21A 62%);
  box-shadow: inset 0 -3px 0 #C26E00;
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
  text-shadow: none;
  transition: transform 0.25s ease;
}
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 18px 18px; color: #E9EDFF; }

@media (max-width: 899px) {
  .faq__layout { grid-template-columns: 1fr; }
}

/* ---------- 10 · Get the game ---------- */

.download { background: var(--core-3); padding: clamp(10px, 3vw, 40px) 0 clamp(60px, 8vw, 100px); }
.download__plans { align-items: stretch; margin-bottom: 0; }
.download__plans .plan { display: flex; flex-direction: column; }
.download__plans .plan__rows, .download__plans .plan__body { flex: 1; }
.download__plans .plan__rows { grid-auto-rows: 1fr; }
.download__plans .plan__rows div { align-items: center; }
@media (max-width: 899px) {
  .download__plans { grid-template-columns: minmax(0, 560px); justify-content: center; }
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 900px) {
    /* Head, body and foot of the two cards share three rows, so the feet and their lines sit level. */
    .download__plans { grid-template-rows: auto 1fr auto; row-gap: 0; }
    .download__plans .plan { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  }
}
.download__plans:has(> :only-child) { grid-template-columns: minmax(0, 480px); justify-content: center; }
.plan__body { display: grid; align-content: start; gap: 16px; padding: 20px 24px 22px; }
.plan__body > p { font-weight: 600; }
.plan__action { padding: 0 24px 26px; }
.plan__body a, .beta-form a { color: var(--navy-face); font-weight: 800; }
.plan__rows dd a { color: var(--navy-face); }

.beta-form { position: relative; display: grid; gap: 16px; }
.beta-form__field { display: grid; gap: 6px; }
.beta-form label { font-family: var(--font-display); color: var(--navy-face); }
.beta-form input[type="email"],
.beta-form input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 0.55em 0.9em;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: inset 0 3px 0 rgba(16, 22, 58, 0.12);
}
.beta-form input:focus-visible { outline: 3px solid var(--flash); outline-offset: 2px; }
.beta-form__field--check label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.beta-form input[type="checkbox"] { width: 26px; height: 26px; margin: 0; accent-color: var(--t-face); }
.beta-form__error { margin: 0; color: #B3201C; font-weight: 800; }
.beta-form .btn { justify-self: start; cursor: pointer; }
/* A field only robots fill in. */
.beta-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.beta-note { font-size: 0.9rem; font-weight: 600; color: #3B4672; }
.beta-done b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; color: var(--navy-face); }
a.pill { text-decoration: none; }
a.pill:hover { background: rgba(16, 22, 58, 0.92); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 11 · Finale ---------- */

.finale {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(110px, 12vw, 180px) 0 clamp(60px, 8vw, 100px);
  background: var(--core-3);
}
.finale__backdrop {
  position: absolute;
  inset: -10% 0 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--core-3) 0%, rgba(4, 36, 31, 0.2) 30%, rgba(4, 36, 31, 0) 60%),
    url("../assets/art/backdrop.webp") center bottom / cover no-repeat;
}
.finale__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); align-items: end; gap: 20px; }
.finale__copy { display: grid; gap: 18px; justify-items: start; padding-bottom: clamp(20px, 6vw, 80px); }
.finale__mascot { width: min(100%, 520px); justify-self: end; filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.3)); }
.surface-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--navy);
}
.surface-link svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .finale__layout { grid-template-columns: 1fr; }
  .finale__mascot { width: min(80%, 360px); justify-self: center; }
}

/* ---------- Footer ---------- */

.footer { background: #0B1030; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 5px solid var(--navy); }
.footer__layout { display: grid; gap: 22px; }
.footer__brand { display: flex; gap: 14px; align-items: center; }
.footer__brand img { border-radius: 14px; border: 3px solid var(--navy); }
.footer__name { font-family: var(--font-display); font-size: 1.4rem; color: var(--flash); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__nav a { font-family: var(--font-display); text-decoration: none; color: #fff; }
.footer__nav a:hover { color: var(--flash); }
.footer__small { font-size: 0.85rem; color: #9AA3C9; max-width: 80ch; }
.footer__link-button { font: inherit; font-family: var(--font-display); color: #fff; background: none; border: 0; padding: 0; cursor: pointer; }
.footer__link-button:hover { color: var(--flash); }

/* ---------- Cookie consent: a panel at the bottom; accepting and rejecting are equally easy ---------- */

.consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  padding: 0 var(--gutter) calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.consent[hidden] { display: none; }
.consent__inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  max-width: 980px;
  margin-inline: auto;
  padding: 16px 20px 20px;
  border: var(--border) solid var(--navy);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-face) 42%);
  box-shadow: inset 0 -8px 0 var(--navy-lip), 0 8px 0 rgba(16, 22, 58, 0.55);
  color: #fff;
}
.consent__text { flex: 1 1 380px; font-size: 0.95rem; line-height: 1.45; }
.consent__text b { font-family: var(--font-display); font-weight: normal; color: var(--flash); }
.consent__text a { color: #fff; }
.consent__actions { display: flex; gap: 12px; flex: none; }
@media (max-width: 520px) {
  .consent__actions { width: 100%; }
  .consent__actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Motion states ---------- */

.intro-pending .title, .intro-pending .intro-item, .intro-pending .island { visibility: hidden; }

.is-reduced *, .is-reduced *::before, .is-reduced *::after { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .qa summary::after { transition: none; }
}
