/* Little Cove's site: a night sky from the game, toy blocks for decoration, and gold buttons
 * that press like keys. The game's own colours throughout: purple for the groups (Bloops), teal
 * for the size of each group (lights), gold for zaps and coins.
 *
 * Fonts: the system's rounded face for headings (SF Pro Rounded on Apple devices, Nunito
 * elsewhere), the system text face for body copy, Fredoka (the game's font) for sums and the
 * wordmark, and Caveat for hand-written notes. All self-hosted: the page asks nothing of anyone
 * else's servers. */

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

@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/caveat-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* The game's sky, deck and planet. */
  --space: #10133f;
  --void: #080a24;
  --night-2: #1d1b5e;
  --violet: #8267e2;
  --violet-bright: #9b74ff;
  --violet-soft: #d2c6ff;
  --violet-deep: #5040b2;
  --violet-ink: #3a2a70;
  --teal: #079298;
  --teal-glow: #19e6dc;

  /* Zaps and coins. */
  --gold: #ffc928;
  --gold-shine: #fff0a6;
  --gold-side: #c98a12;
  --zap: #f9d46b;

  /* The Bloops. */
  --pink: #ff5cb0;
  --orange: #ff8a24;
  --green: #7ee03a;
  --blue: #3fb4ff;
  --yellow: #ffd21f;

  /* The game's HUD ("Paper Kids", src/hud.rs): flat faces, a 2px edge, and a hard shadow of the
     edge's colour that the button sinks into when pressed. Free play is zap yellow on its own
     darker edge; everything else is paper on a lavender line. */
  --zap-face: #f9d46b;
  --zap-edge: #897538;
  --line: #8281a9;
  --edge: 2px;
  --press: cubic-bezier(0.3, 0.7, 0.4, 1);

  /* Ink and paper (the game's HUD ink and lines). */
  --ink: #2b284f;
  --ink-soft: #57537f;
  --ink-faint: #8281a9;
  --paper: #f7f6ff;
  --mist: #eeebff;
  --white: #fff;

  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-game: "Fredoka", ui-rounded, "SF Pro Rounded", "Nunito", sans-serif;
  --font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;

  --shadow-ink: 16, 19, 63;
  --sh-sm: 0 2px 6px rgba(var(--shadow-ink), 0.08), 0 1px 2px rgba(var(--shadow-ink), 0.06);
  --sh-md: 0 12px 30px -8px rgba(var(--shadow-ink), 0.22), 0 4px 10px -4px rgba(var(--shadow-ink), 0.12);
  --sh-lg: 0 40px 80px -24px rgba(var(--shadow-ink), 0.5), 0 16px 32px -12px rgba(var(--shadow-ink), 0.3);

  --grad-sky: radial-gradient(120% 90% at 50% 35%, #33298a 0%, #221e6b 36%, var(--space) 70%, var(--void) 100%);
  --grad-violet: linear-gradient(160deg, var(--violet-bright) 0%, var(--violet) 45%, var(--violet-deep) 100%);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.0625rem) / 1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

p,
li {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-round);
  font-weight: 900;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--violet-bright);
  outline-offset: 3px;
  border-radius: 8px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------- type */

.display {
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.h2 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.h3 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.25rem);
  line-height: 1.55;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
}

/* A small paper pill, like the game's coin counter. */
.eyebrow {
  display: inline-block;
  padding: 0.3em 0.95em;
  border: var(--edge) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 3px 0 var(--line);
  color: var(--violet-deep);
  font: 600 0.78rem / 1.4 var(--font-game);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.groups {
  color: var(--violet);
}

.size {
  color: var(--teal);
}

.on-night .size {
  color: var(--teal-glow);
}

.on-night .groups {
  color: var(--violet-bright);
}

/* A hand-drawn underline under a word, drawn in when the page loads. */
.scribble {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.scribble svg {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.32em;
  overflow: visible;
}

.scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.85;
}

/* The wordmark, as the welcome screen's title: "Multi" in zap yellow and "verse" in white, on a
   plate of night sky. `.plain` drops the plate, for names that aren't the game's. */
.wordmark {
  display: inline-block;
  padding: 0.26em 0.55em 0.3em;
  border-radius: 0.3em;
  background: var(--space);
  color: var(--white);
  font: 600 1.3rem / 1 var(--font-game);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark b {
  font-weight: 600;
  color: var(--zap-face);
}

.wordmark.plain {
  padding: 0;
  background: none;
  color: inherit;
}

/* ---------------------------------------------------------------- buttons */

/* The game's buttons: a flat face, a 2px edge and a hard shadow underneath. Hovering lifts the
   button a pixel; pressing sinks it into its shadow, as tapping does in the game. */
.btn {
  --depth: 5px;
  --shadow: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.55em 1.5em 0.6em;
  border: var(--edge) solid var(--shadow);
  border-radius: 999px;
  box-shadow: 0 var(--depth) 0 var(--shadow);
  font: 600 1.15rem / 1.1 var(--font-game);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s var(--press), box-shadow 0.12s var(--press);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 calc(var(--depth) + 1px) 0 var(--shadow);
}

.btn:active {
  transform: translateY(var(--depth));
  box-shadow: 0 0 0 var(--shadow);
}

.btn svg,
.btn img {
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

/* Zap yellow, like Free play. */
.btn-gold {
  --shadow: var(--zap-edge);
  background: var(--zap-face);
  color: var(--ink);
}

/* Paper, like the Shop button and the answers. */
.btn-paper {
  background: var(--white);
  color: var(--ink);
}

.btn-sm {
  --depth: 4px;
  min-height: 42px;
  padding: 0.45em 1.15em 0.5em;
  font-size: 1rem;
}

/* The App Store button. It isn't Apple's badge: the game isn't out yet. A night-sky face, so it
   reads as the game's own, with the same edge and press as the others. */
.btn-store {
  --shadow: #000;
  gap: 0.7em;
  padding: 0.5em 1.35em 0.55em 1rem;
  border-radius: 18px;
  background: var(--void);
  color: var(--white);
  text-align: left;
}

.btn-store svg {
  width: 1.9em;
  height: 1.9em;
  color: var(--zap-face);
}

.btn-store small {
  display: block;
  font: 400 0.75rem / 1.2 var(--font-game);
  opacity: 0.8;
}

.btn-store span {
  display: block;
  font-size: 1.35rem;
}

/* Little paper pills, like the coin counter: "No ads", "Works offline". */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.95em 0.4em 0.75em;
  border: var(--edge) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 4px 0 var(--line);
  color: var(--ink);
  font: 600 0.92rem / 1.2 var(--font-game);
}

.pill svg {
  width: 1.1em;
  height: 1.1em;
  color: var(--teal);
}

/* -------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  z-index: 50;
  inset: 12px 0 auto;
  pointer-events: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(100% - 24px, var(--container));
  margin-inline: auto;
  padding: 8px 8px 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--sh-md), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: var(--sh-sm);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  color: var(--ink-soft);
  font: 800 0.92rem / 1 var(--font-round);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--mist);
  color: var(--ink);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav-bar .btn {
    margin-left: auto;
  }
}

/* ------------------------------------------------------------- night sky */

.on-night {
  position: relative;
  background: var(--grad-sky);
  color: var(--white);
  isolation: isolate;
}

/* Stars: three layers of dots, the last twinkling. */
.stars,
.stars::before,
.stars::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stars {
  overflow: hidden;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 61% 33%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 88%, #fff 50%, transparent 51%);
  background-size: 640px 520px;
  opacity: 0.7;
}

.stars::before {
  content: "";
  background-image:
    radial-gradient(1px 1px at 22% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 10%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 56%, #fff 50%, transparent 51%);
  background-size: 410px 380px;
  opacity: 0.55;
}

.stars::after {
  content: "";
  background-image:
    radial-gradient(3px 3px at 18% 30%, var(--yellow) 50%, transparent 51%),
    radial-gradient(3px 3px at 84% 22%, var(--yellow) 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 58% 74%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 30% 86%, var(--yellow) 50%, transparent 51%);
  background-size: 900px 700px;
}

/* --------------------------------------------------------------- the blocks */

/* The layer the blocks float in, behind the words. */
.blocks {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* A toy block from the game: a lit top, a darker side, a soft shadow. --c is its colour. */
.block {
  --c: var(--pink);
  --s: 56px;
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: calc(var(--s) * 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 38%),
    var(--c);
  box-shadow:
    inset 0 calc(var(--s) * -0.1) 0 rgba(0, 0, 0, 0.22),
    inset 0 calc(var(--s) * 0.05) 0 rgba(255, 255, 255, 0.35),
    0 calc(var(--s) * 0.22) calc(var(--s) * 0.4) -0.1em rgba(0, 0, 0, 0.35);
  transform: rotate(var(--r, 12deg));
  pointer-events: none;
}

.block.glass {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.06) 60%),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 calc(var(--s) * -0.08) 0 rgba(255, 255, 255, 0.08),
    0 calc(var(--s) * 0.2) calc(var(--s) * 0.4) -0.1em rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(3px);
}

@media (prefers-reduced-motion: no-preference) {
  .block {
    animation: bob var(--t, 7s) ease-in-out var(--d, 0s) infinite alternate;
  }

  @keyframes bob {
    from {
      transform: translateY(-8px) rotate(var(--r, 12deg));
    }
    to {
      transform: translateY(10px) rotate(calc(var(--r, 12deg) + 8deg));
    }
  }

  .stars::after {
    animation: twinkle 3.2s ease-in-out infinite alternate;
  }

  @keyframes twinkle {
    from {
      opacity: 0.35;
    }
    to {
      opacity: 1;
    }
  }
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding: clamp(112px, 16vw, 150px) 0 clamp(72px, 10vw, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.hero-copy .eyebrow {
  margin-bottom: 22px;
}

.hero h1 .scribble {
  color: var(--zap-face);
}

/* The sum in the headline, in the game's font. */
.sum-inline {
  font-family: var(--font-game);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero .lede {
  max-width: 34rem;
  margin: 24px 0 32px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-bottom: 28px;
}

.hero-phone {
  position: relative;
  justify-self: center;
}

/* The note pointing at the answers. */
.note {
  position: absolute;
  z-index: 2;
  color: var(--zap-face);
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem);
  line-height: 1;
  transform: rotate(-8deg);
  white-space: nowrap;
}

.note svg {
  display: block;
  width: 70px;
  height: 46px;
  margin-top: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Under the phone, pointing up at the answers. */
.hero-phone .note {
  top: 100%;
  right: -24px;
  margin-top: 10px;
  transform: rotate(-5deg);
}

.hero-phone .note svg {
  margin: 0 0 4px 30px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero .lede {
    margin-inline: auto;
  }

  .hero-actions,
  .hero .pills {
    justify-content: center;
  }

  .hero-phone .note {
    right: 50%;
    transform: translateX(50%) rotate(-4deg);
  }
}

@media (max-width: 560px) {
  .hero-phone .note {
    display: none;
  }
}

/* On a narrow screen the glass blocks would sit behind the words: leave them out. */
@media (max-width: 900px) {
  .hero .block.glass {
    display: none;
  }
}

/* ------------------------------------------------------------- the phone */

.phone {
  position: relative;
  width: min(300px, 74vw);
  aspect-ratio: 1206 / 2622;
  padding: 10px;
  border-radius: 48px;
  background: linear-gradient(145deg, #3a3a52, #121222);
  box-shadow:
    var(--sh-lg),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}

.phone img {
  width: 100%;
  height: 100%;
  border-radius: 39px;
  object-fit: cover;
  background: var(--space);
}

/* The camera's island. */
.phone::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 30%;
  height: 22px;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.phone.small {
  width: 100%;
  max-width: 240px;
  padding: 8px;
  border-radius: 38px;
}

.phone.small img {
  border-radius: 31px;
}

.phone.small::after {
  top: 15px;
  height: 17px;
}

.hero .phone {
  transform: rotate(4deg);
}

/* An iPad, for the wider shots. */
.tablet {
  position: relative;
  aspect-ratio: 1404 / 2027;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(145deg, #3a3a52, #121222);
  box-shadow: var(--sh-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.16);
}

.tablet img {
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
}

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

.section {
  position: relative;
  padding: clamp(80px, 11vw, 140px) 0;
}

.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head p {
  margin: 20px auto 0;
  max-width: 38rem;
  color: var(--ink-soft);
}

.on-night .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

/* ------------------------------------------------------------ the problem */

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}

.card {
  position: relative;
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-md);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card-foot {
  margin: 24px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.card.plain {
  background: transparent;
  box-shadow: none;
  border: 2px dashed #d4d0f0;
}

.card.night {
  background: var(--grad-sky);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.card.night .card-foot {
  color: rgba(255, 255, 255, 0.78);
}

/* A flashcard: a question and a clock running down. */
.flashcard {
  display: grid;
  place-items: center;
  gap: 18px;
  margin: 28px auto 0;
  padding: 40px 24px 28px;
  max-width: 320px;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--sh-md);
  transform: rotate(-2deg);
}

.flashcard-sum {
  font: 600 clamp(2.4rem, 2rem + 2vw, 3.4rem) / 1 var(--font-game);
  color: var(--ink);
}

.flashcard-clock {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
}

.flashcard-clock span {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: #ff6a6a;
}

.flashcard-caption {
  margin: 0;
  font: 800 0.85rem / 1.3 var(--font-round);
  color: var(--ink-faint);
}

/* Three Bloops' worth of lights: groups ringed in purple, four teal lights in each. */
.groups-demo {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2.5vw, 22px);
  margin: 28px 0 22px;
}

.group {
  display: grid;
  grid-template-columns: repeat(2, 16px);
  gap: 12px;
  padding: 22px 20px;
  border-radius: 46% 46% 40% 40%;
  background: linear-gradient(180deg, #ff74bd, var(--pink));
  box-shadow:
    0 0 0 4px rgba(155, 116, 255, 0.85),
    inset 0 -8px 0 rgba(0, 0, 0, 0.18);
}

.group i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal-glow);
  box-shadow: 0 0 0 3px #0c6f74, 0 0 12px rgba(25, 230, 220, 0.9);
}

/* The sentence card, as the game shows it once a wave is spot on: a star, then the sum. */
.sum-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3em;
  width: fit-content;
  margin: 0 auto;
  padding: 0.22em 0.75em 0.26em 0.55em;
  border: var(--edge) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 5px 0 var(--line);
  color: var(--ink);
  font: 600 clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem) / 1.1 var(--font-game);
}

.sum-strip img {
  width: 1em;
  height: 1em;
  margin-right: 0.1em;
}

.sum-strip .size {
  color: var(--teal);
}

.sum-strip .groups {
  color: var(--violet);
}

@media (max-width: 760px) {
  .compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- marquee */

/* The band is tilted and a little wider than the page; its wrapper keeps it from widening it. */
.marquee-wrap {
  overflow: hidden;
  padding: 24px 0;
  margin: -24px 0;
}

.marquee {
  overflow: hidden;
  padding: 22px 0;
  background: var(--grad-violet);
  color: var(--white);
  transform: rotate(-1.5deg) scaleX(1.04);
  box-shadow: var(--sh-md);
}

.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  font: 600 clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem) / 1 var(--font-game);
  white-space: nowrap;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
}

.marquee-track span::after {
  content: "";
  margin-left: 48px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--zap-face);
  transform: rotate(12deg);
}

.marquee .size {
  color: var(--teal-glow);
}

.marquee .groups {
  color: var(--gold-shine);
}

@media (prefers-reduced-motion: no-preference) {
  .marquee-track {
    animation: slide 40s linear infinite;
  }

  @keyframes slide {
    to {
      transform: translateX(-50%);
    }
  }
}

/* ------------------------------------------------------------ how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 32px) 0;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-md);
  overflow: hidden;
  counter-increment: step;
}

/* Each step's number is one of the game's answer buttons: paper, with rounded corners. */
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: var(--edge) solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 0 var(--line);
  color: var(--ink);
  font: 600 1.6rem / 1 var(--font-game);
}

/* The last is the one picked, in zap yellow. */
.step:last-child::before {
  border-color: var(--zap-edge);
  background: var(--zap-face);
  box-shadow: 0 4px 0 var(--zap-edge);
}

.step h3 {
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.step p {
  margin: 10px 0 28px;
  color: var(--ink-soft);
}

.step .phone {
  margin: auto auto -64px;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin-inline: auto;
  }
}

/* ------------------------------------------------------------------ bento */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-md);
  overflow: hidden;
  isolation: isolate;
}

.tile h3 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.tile p {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

.tile.night {
  background: var(--grad-sky);
  color: var(--white);
}

.tile.night p {
  color: rgba(255, 255, 255, 0.78);
}

.tile.violet {
  background: var(--grad-violet);
  color: var(--white);
}

.tile.violet p {
  color: rgba(255, 255, 255, 0.85);
}

.tile.gold {
  background: var(--zap-face);
}

.tile.gold p {
  color: #5a4210;
}

.tile.mist {
  background: var(--mist);
  box-shadow: none;
}

.span-4 {
  grid-column: span 4;
}

.span-3 {
  grid-column: span 3;
}

.span-2 {
  grid-column: span 2;
}

.tile-shot {
  margin: 28px -10px -34px auto;
  width: min(100%, 420px);
}

.tile .tablet {
  margin-top: auto;
}

.tile-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 24px;
  height: 100%;
}

.tile-pair .tablet {
  margin-bottom: -60px;
}

/* A counted-out number: "Four! Eight! Twelve!" */
.count-out {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 26px;
  padding: 0;
  list-style: none;
}

/* The running totals that pop up as Bloops burst: flat purple pills, white numbers. */
.count-out li {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 52px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--white);
  font: 600 2rem / 1 var(--font-game);
}

.count-out li:nth-child(2) {
  transform: translateY(-8px);
}

.big-number {
  margin: auto 0 0;
  font: 900 clamp(4rem, 3rem + 4vw, 6.5rem) / 0.9 var(--font-round);
  letter-spacing: -0.05em;
  color: var(--gold);
}

.big-number + h3 {
  margin-top: 10px;
}

/* The game's coin: gold, a darker edge, and a pale ring inside. */
.coin {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-right: -10px;
  border: var(--edge) solid var(--gold-side);
  border-radius: 50%;
  background: var(--gold);
}

.coin::after {
  content: "";
  width: 56%;
  height: 56%;
  border: 3.5px solid var(--gold-shine);
  border-radius: 50%;
}

/* The coin counter from the top of the screen. */
.counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 8px;
  border: var(--edge) solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 600 1.4rem / 1 var(--font-game);
}

.counter .coin {
  width: 30px;
  height: 30px;
  margin: 0;
}

.counter .coin::after {
  border-width: 2.5px;
}

.tile svg.icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--violet);
}

@media (max-width: 960px) {
  .span-4,
  .span-3,
  .span-2 {
    grid-column: span 6;
  }

  .bento .span-2.half {
    grid-column: span 3;
  }

  .tile-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile-pair .tablet {
    max-width: 300px;
    margin: 8px auto -60px;
  }
}

@media (max-width: 560px) {
  .bento .span-2.half {
    grid-column: span 6;
  }
}

/* ---------------------------------------------------------------- promises */

.promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  padding: 26px 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.promise svg {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  color: var(--teal-glow);
}

.promise h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.promise p {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.76);
}

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

@media (max-width: 520px) {
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------- faq */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.faq-intro .h2 span {
  display: block;
  color: var(--violet);
}

.faq-intro p {
  margin: 22px 0 0;
  color: var(--ink-soft);
}

.faq-intro a {
  color: var(--violet-deep);
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--sh-sm);
  transition: box-shadow 0.25s ease;
}

.faq-list details[open] {
  box-shadow: var(--sh-md), inset 0 0 0 2px var(--violet-soft);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font: 800 1.05rem / 1.35 var(--font-round);
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

/* A plus on one of the game's round paper buttons, that turns into a zap-yellow cross. */
.faq-list summary::after {
  content: "+";
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding-bottom: 2px;
  border: var(--edge) solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 3px 0 var(--line);
  color: var(--ink);
  font: 500 1.4rem / 1 var(--font-game);
  transition: transform 0.3s var(--spring);
}

.faq-list details[open] summary::after {
  border-color: var(--zap-edge);
  background: var(--zap-face);
  box-shadow: 0 3px 0 var(--zap-edge);
  transform: rotate(45deg);
}

.faq-list details p {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ final */

.final {
  padding: clamp(96px, 13vw, 160px) 0;
  overflow: hidden;
  text-align: center;
}

.final .lede {
  max-width: 34rem;
  margin: 22px auto 36px;
  color: rgba(255, 255, 255, 0.84);
}

.final .hero-actions,
.final .pills {
  justify-content: center;
}

.final .icon-big {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border-radius: 26px;
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* ----------------------------------------------------------------- footer */

.footer {
  padding: 64px 0 32px;
  background: var(--void);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.5fr));
  gap: 40px;
}

.footer .brand {
  color: var(--white);
}

.footer .brand .wordmark b {
  color: var(--gold);
}

.footer-about {
  max-width: 24rem;
  margin: 16px 0 0;
}

.footer h2 {
  margin: 0 0 14px;
  font: 800 0.75rem / 1.4 var(--font-round);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

.footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-small {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-small p {
  margin: 0;
}

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------- prose pages */

.prose-page {
  padding: clamp(120px, 16vw, 160px) 0 clamp(72px, 10vw, 112px);
}

.prose {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
}

.prose h1 {
  margin: 18px 0 12px;
}

.prose .updated {
  margin: 0 0 40px;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.prose p,
.prose ul {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.prose li + li {
  margin-top: 0.45em;
}

.prose strong {
  color: var(--ink);
}

.prose a {
  color: var(--violet-deep);
  font-weight: 700;
}

.prose .summary {
  margin: 0 0 8px;
  padding: 24px 26px;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--sh-md), inset 0 0 0 2px var(--violet-soft);
  color: var(--ink);
}

.prose .summary p {
  margin: 0;
  color: var(--ink);
}
