/* Word Run marketing site. One stylesheet for every page. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/nunito-400.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/nunito-700.woff2") format("woff2");
}

:root {
  --navy: #032251;
  --navy-deep: #021433;
  --ink: #f7fbff;
  --muted: #d7e6f6;
  --line: rgba(255, 255, 255, 0.32);
  --accent: #f6d34a;
  --focus: #ffe56a;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3rem;
  --measure: 65ch;
  --content: 32rem;
  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --motion-distant: 72s;
  --shadow-text: 0 1px 2px rgba(2, 8, 24, 0.85), 0 0 16px rgba(2, 12, 32, 0.45);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  background: #021a48;
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: #021a48;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip;
}

/* Real ray photograph. WebP when the browser accepts it; JPEG stays the fallback. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--navy);
  background-image: url("../assets/background.jpg");
  background-image: image-set(
    url("../assets/background.webp") type("image/webp"),
    url("../assets/background.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 18% 62% at 50% 40%, rgba(3, 24, 64, 0.18) 0%, rgba(3, 24, 64, 0) 72%),
    radial-gradient(ellipse at center, rgba(2, 16, 48, 0) 46%, rgba(2, 10, 30, 0.38) 100%);
}

img { max-width: 100%; height: auto; }

h1, h2, p, ul { margin: 0; }

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.letter-field,
.distant,
.crossers {
  pointer-events: none;
}

/* Gold-letter canvas. Desktop: fixed, letters live only in the side gutters outside the container.
   Below 960px: absolute at the top of the page, letters only beside the logo (height set in js). */
.letter-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

@media (max-width: 959px) {
  .letter-field {
    position: absolute;
    inset: 0 0 auto 0;
    height: 0;
  }
}

/* Distant tiles: blurred, faint, slow, kept to the far edges. */
.distant {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.distant span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--s, 5rem);
  line-height: 1;
  color: #9fd4ff;
  opacity: 0.1;
  filter: blur(14px);
  transform: translate3d(0, 0, 0) rotate(var(--rot, -8deg));
  animation: drift var(--dur, var(--motion-distant)) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--rot, -8deg)); }
  to { transform: translate3d(var(--dx, 18px), var(--dy, 28px), 0) rotate(var(--rot2, 10deg)); }
}

@media (max-width: 959px) {
  /* Phone/tablet: only the two top tiles, scrolling away with the hero. */
  .distant { position: absolute; height: 100svh; bottom: auto; }
  .distant span:nth-child(n + 3) { display: none; }
  .distant span { filter: blur(12px); opacity: 0.08; --y: 3% !important; }
}

/* ---------- Home layout ---------- */

.page {
  --gutter: clamp(0.9rem, 3vw, 1.5rem);
  position: relative;
  z-index: 2;
  min-height: 100svh;
  width: min(40rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding-top: max(0.85rem, env(safe-area-inset-top, 0px) + 0.6rem);
}

.home {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 5vw, 2.25rem);
}

@media (min-width: 960px) {
  .page {
    --gutter: clamp(1rem, 6vw, 5rem);
    width: min(75rem, 100% - 2 * var(--gutter));
    padding-top: clamp(1.75rem, 5vh, 3.25rem);
  }
  .home { gap: clamp(2.5rem, 5vh, 3.5rem); }
}

/* Hero: stacked and centered on phones, two columns from 960px. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.05rem;
  text-align: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wordmark {
  margin: 0;
  line-height: 0;
  width: min(78%, 26rem);
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.hook {
  margin-top: 0.7rem;
  max-width: 26rem;
  font-size: clamp(1.02rem, 2.4vw, 1.15rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  text-shadow: var(--shadow-text);
}

.release {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-shadow: var(--shadow-text);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.35rem 0.95rem 0.35rem 0.7rem;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 0.55rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
  cursor: default;
  font-family: var(--font);
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow 0.15s ease;
}

.store-badge:hover {
  box-shadow: 0 0 0 2px rgba(246, 211, 74, 0.75);
}

.store-badge[aria-disabled="true"] { cursor: default; }

.store-badge .lines {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.store-badge small {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.store-badge strong {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-media { min-width: 0; }

/* Main frame: fixed 1080:500 box so swapping video and stills never shifts layout. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 500;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(2, 12, 32, 0.45);
  box-shadow: 0 14px 36px rgba(2, 8, 24, 0.5), 0 2px 8px rgba(2, 8, 24, 0.35);
}

.gameplay-video,
.stage-still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.stage-still[hidden] { display: none; }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.5rem);
    text-align: left;
  }
  .hero-copy { align-items: flex-start; }
  .wordmark { width: min(100%, 30rem); }
  .hook {
    margin-top: 1.25rem;
    max-width: 30rem;
    font-size: clamp(1.3rem, 1.6vw, 1.45rem);
    line-height: 1.38;
  }
  .release { margin-top: 1rem; font-size: 1.05rem; }
  .badge-row { justify-content: flex-start; margin-top: 1rem; }
  .stage { border-radius: 1.15rem; }
}

/* ---------- Benefits ---------- */

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(3, 20, 56, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.benefit-icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.1rem;
  color: var(--accent);
}

.benefit h2 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  text-shadow: var(--shadow-text);
}

.benefit p {
  margin-top: 0.15rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
  text-shadow: 0 1px 2px rgba(2, 8, 24, 0.7);
}

/* Phones/tablets: one compact glassy panel, three rows split by hairlines. */
@media (max-width: 959px) {
  .benefit-list {
    gap: 0;
    border-radius: 0.9rem;
    background: rgba(3, 20, 56, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .benefit {
    padding: 0.6rem 0.85rem;
    gap: 0.7rem;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .benefit + .benefit { border-top: 1px solid rgba(255, 255, 255, 0.09); }
  .benefit-icon { width: 1.45rem; height: 1.45rem; }
  .benefit h2 { font-size: 0.98rem; }
  .benefit p { font-size: 0.88rem; line-height: 1.35; margin-top: 0.05rem; }
}

@media (min-width: 960px) {
  .benefit-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
  }
  .benefit { padding: 1.15rem 1.25rem; gap: 0.9rem; }
  .benefit-icon { width: 2rem; height: 2rem; }
  .benefit h2 { font-size: 1.15rem; }
  .benefit p { font-size: 1rem; }
}

@media (min-width: 960px) {
  .thumb-label { font-size: 1.05rem; }
}

/* ---------- Gallery ---------- */

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: center;
  cursor: pointer;
  border-radius: 0.9rem;
  -webkit-tap-highlight-color: transparent;
}

.thumb-frame {
  position: relative;
  display: block;
  aspect-ratio: 1080 / 500;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(2, 12, 32, 0.45);
  box-shadow: 0 8px 20px rgba(2, 8, 24, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.14);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.thumb-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 0.15s ease;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.4rem;
  height: 2.4rem;
  margin: -1.2rem 0 0 -1.2rem;
  border-radius: 50%;
  background: rgba(2, 12, 32, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent #fff;
}

.thumb-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: var(--shadow-text);
}

.thumb:hover .thumb-frame { box-shadow: 0 8px 20px rgba(2, 8, 24, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.55); }
.thumb:hover .thumb-frame img { opacity: 1; }
.thumb:hover .thumb-label { color: var(--ink); }

.thumb[aria-pressed="true"] .thumb-frame {
  box-shadow: 0 8px 20px rgba(2, 8, 24, 0.45), 0 0 0 3px var(--accent);
}
.thumb[aria-pressed="true"] .thumb-frame img { opacity: 1; }
.thumb[aria-pressed="true"] .thumb-label { color: var(--accent); }

.thumb:focus-visible { outline: none; }
.thumb:focus-visible .thumb-frame {
  box-shadow: 0 8px 20px rgba(2, 8, 24, 0.45), 0 0 0 3px var(--navy-deep), 0 0 0 6px #fff;
}
.thumb[aria-pressed="true"]:focus-visible .thumb-frame {
  box-shadow: 0 8px 20px rgba(2, 8, 24, 0.45), 0 0 0 3px var(--accent), 0 0 0 5px var(--navy-deep), 0 0 0 8px #fff;
}
.thumb:focus-visible .thumb-label { text-decoration: underline; text-underline-offset: 0.2em; }

/* Phones: swipeable scroll-snap row, each thumb about 70% of the screen. */
@media (max-width: 599px) {
  .gallery { margin-inline: calc(-1 * var(--gutter)); }
  .thumbs {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 0.4rem var(--gutter) 0.6rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumb {
    flex: 0 0 70%;
    scroll-snap-align: start;
  }
  .thumb-label { font-size: 1rem; }
  /* Only the selected item shows its label; buttons keep their aria-label names. */
  .thumb[aria-pressed="false"] .thumb-label { visibility: hidden; }
}

/* ---------- Characters ---------- */

.section-title {
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--ink);
  text-shadow: var(--shadow-text);
}

.runner-list {
  --runner-h: clamp(6.4rem, 30vw, 8.5rem);
  list-style: none;
  margin: 1rem auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 1.1rem;
  max-width: 30rem;
}

/* Common height box; the image is contained and pinned to the bottom so every runner shares a baseline. */
.runner {
  position: relative;
  flex: 0 0 33.333%;
  height: var(--runner-h);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 0.45rem;
}

/* Ground: soft contact shadow plus a faint fading line under each runner. */
.runner::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0.35rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28) 30%, rgba(255, 255, 255, 0.28) 70%, rgba(255, 255, 255, 0));
}

.runner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 62%;
  height: 0.6rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(1, 6, 20, 0.6) 0%, rgba(1, 6, 20, 0) 70%);
}

.runner img {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 4px 6px rgba(2, 8, 24, 0.4));
}

/* The lightning runner's streaks make it wide; cap it so it doesn't dominate the lineup. */
.runner-wide img {
  width: 100%;
  max-width: calc(var(--runner-h) * 0.95);
}

@media (min-width: 600px) {
  .runner-list { max-width: none; }
  .runner { flex: 0 0 20%; }
  .runner-list { --runner-h: clamp(8rem, 18vw, 13rem); }
}

@media (min-width: 960px) {
  .runner-list {
    --runner-h: clamp(11rem, 16vw, 14.5rem);
    max-width: 62rem;
    margin-top: 1.5rem;
  }
  .runner { flex-basis: 19%; }
  .runner-wide { flex-basis: 24%; }
  .runner::before { left: 0; right: 0; background: rgba(255, 255, 255, 0.2); }
  .runner:first-child::before { left: 10%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2) 40%); }
  .runner:last-child::before { right: 10%; background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 60%, rgba(255, 255, 255, 0)); }
}

/* ---------- Progression callout (under the runners) ---------- */

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

.progress-callout {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  justify-content: center;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem clamp(0.9rem, 2.4vw, 1.6rem);
  padding: 0.75rem clamp(1rem, 3vw, 1.75rem);
  border-radius: 999px;
  background: rgba(3, 20, 56, 0.42);
  border: 1px solid rgba(246, 211, 74, 0.28);
  text-shadow: var(--shadow-text);
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
}

.stat-num {
  font-size: clamp(1.6rem, 4.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.stat-pre {
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-label {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  font-weight: 700;
  color: var(--ink);
}

.stat-sep {
  color: rgba(246, 211, 74, 0.6);
  font-size: 1.2rem;
  line-height: 1;
}

/* Phones: three stacked stats, no dots, in a rounded panel. */
@media (max-width: 559px) {
  .stats {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
    border-radius: 1rem;
    padding: 0.85rem 1.6rem;
  }
  .stat { display: contents; }
  .stat-num { text-align: right; }
  .stat-label { text-align: left; }
  .stat-sep { display: none; }
}

/* ---------- Two-up media (jungle still + locked-letters loop) ---------- */

.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.slide-dots { display: none; }

.duo-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Both sources are 1080:500, so the frames match exactly; cover only trims a pixel row. */
.duo-frame {
  position: relative;
  aspect-ratio: 1080 / 500;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(2, 12, 32, 0.45);
  box-shadow: 0 14px 36px rgba(2, 8, 24, 0.5), 0 2px 8px rgba(2, 8, 24, 0.35);
}

.duo-frame img,
.duo-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.duo-item figcaption {
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
  text-shadow: var(--shadow-text);
}

@media (min-width: 960px) {
  .duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }
  .duo { margin-top: 1.5rem; }
  .duo-frame { border-radius: 1.15rem; }
  .duo-item figcaption { font-size: 1.15rem; }
}

/* Phones: swipeable scroll-snap row (~85% slides so the next one peeks) with dots. */
@media (max-width: 599px) {
  .duo-section { margin-inline: calc(-1 * var(--gutter)); }
  .duo-section .section-title { padding-inline: var(--gutter); }
  .duo {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 0.2rem var(--gutter) 0.4rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .duo::-webkit-scrollbar { display: none; }
  .duo-item {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
  .slide-dots {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
  }
  .slide-dot {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .slide-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background-color 0.15s ease, transform 0.15s ease;
  }
  .slide-dot:hover::after { background: rgba(255, 255, 255, 0.7); }
  .slide-dot[aria-current="true"]::after { background: var(--accent); transform: scale(1.25); }
  .slide-dot:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
}

/* Closing CTA after Master Every Level: heading + badges, centered on the page.
   Net space above = 3rem (48px) phones/tablets, 4.5rem (72px) desktop: margin offsets the .home flex gap. */
.cta {
  margin-top: calc(3rem - clamp(1.5rem, 5vw, 2.25rem));
  text-align: center;
}

.cta .cta-badges {
  justify-content: center;
  margin-top: 0.9rem;
}

@media (min-width: 960px) {
  .cta { margin-top: calc(4.5rem - clamp(2.5rem, 5vh, 3.5rem)); }
  .cta .cta-badges { margin-top: 1.1rem; }
}

/* ---------- Master Every Level ---------- */

.master {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  text-align: center;
}

.master-text {
  margin-top: 0.45rem;
  text-wrap: balance;
  font-size: clamp(1.02rem, 2.4vw, 1.15rem);
  line-height: 1.4;
  color: var(--ink);
  text-shadow: var(--shadow-text);
}

.master-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 500;
  object-fit: cover;
  border-radius: 1rem;
  /* Same shadow as the main frame, plus a faint edge: this screen shares the page's blue. */
  box-shadow: 0 14px 36px rgba(2, 8, 24, 0.5), 0 2px 8px rgba(2, 8, 24, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.16);
  background: rgba(2, 12, 32, 0.45);
}

/* Desktop: image left, text right (alternates with the hero, whose media is on the right). */
@media (min-width: 960px) {
  .master {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.5rem);
    text-align: left;
  }
  .master-media { grid-column: 1; grid-row: 1; }
  .master-copy { grid-column: 2; grid-row: 1; }
  .master .section-title { text-align: left; font-size: clamp(1.8rem, 2.4vw, 2.25rem); }
  .master-text { margin-top: 0.8rem; font-size: clamp(1.2rem, 1.5vw, 1.35rem); max-width: 26rem; }
  .master-shot { border-radius: 1.15rem; }
}

/* ---------- Footer (shared with legal pages) ---------- */

.site-footer {
  width: min(22rem, 100%);
  margin: clamp(2rem, 5vh, 3rem) auto 0;
  padding: 0.5rem 0 max(1.1rem, env(safe-area-inset-bottom, 0px) + 0.6rem);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-shadow: var(--shadow-text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 0.1rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.6rem;
  border-radius: 0.4rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration-thickness: 2px;
}

.footer-nav [aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

/* Solid colour so contrast holds: about 9:1 on the navy backdrop. */
.copyright {
  margin: 0;
  font-size: 0.8rem;
  color: #c3d3e6;
}

/* Legal and support pages */
.doc {
  position: relative;
  z-index: 2;
  width: min(var(--measure), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 4vh, 2.4rem) 0 2.6rem;
  min-height: 100svh;
}

.doc::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -6vw;
  right: -6vw;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(3, 22, 58, 0.42) 0%,
    rgba(3, 18, 50, 0.72) 12%,
    rgba(3, 16, 46, 0.78) 88%,
    rgba(3, 18, 50, 0.5) 100%
  );
}

.home-logo {
  display: block;
  width: min(15rem, 68vw);
  margin: 0 auto 1.35rem;
  line-height: 0;
}

.home-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.doc h1 {
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: var(--shadow-text);
}

.updated {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-shadow: var(--shadow-text);
}

.prose { margin-top: 1.35rem; }

.prose h2 {
  margin-top: 1.45rem;
  margin-bottom: 0.4rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-shadow: var(--shadow-text);
}

.prose p,
.prose li {
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(2, 8, 24, 0.72);
}

.prose p + p { margin-top: 0.7rem; }

.prose ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.prose li + li { margin-top: 0.35rem; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.contact { margin-top: 0.35rem; }

.doc .site-footer {
  width: 100%;
  margin-top: 2.2rem;
}

/* Runners stay in the markup and stay hidden. Do not show them.
   Sprite background-image rules and PNG assets removed (never fetched while display:none). */
.crossers { display: none; }

@media (prefers-reduced-motion: reduce) {
  .distant span {
    animation: none;
  }
  .store-badge,
  .thumb-frame,
  .thumb-frame img,
  .footer-nav a,
  .slide-dot::after {
    transition: none;
  }
  /* Autoplay is removed in js/main.js; poster stays visible. */
}
