/* One accent hue, two themes, one typeface of our own for headings.
 *
 * Every colour pair used for text is checked against WCAG AA by
 * `npm run check:contrast`, which reads the tokens out of this file — so
 * changing a value here without checking it will fail the build. */

:root {
  color-scheme: light dark;

  --bg: #fbfaf7;
  --bg-tint: #f3f1eb;
  --surface: #ffffff;
  --text: #16181b;
  --muted: #565b62;
  --border: #e3dfd7;
  --accent: #0b5d4f;
  --accent-soft: #e4f1ec;
  --on-accent: #ffffff;

  /* The drawn phone's body, and the rim of light round its edge: black on a
   * light page, and a little lifted on a dark one, where black would vanish
   * into the page. */
  --phone: #121316;
  --phone-rim: rgb(255 255 255 / 0.1);

  /* The colour of shadows, as channels for rgb(): warm in the light theme,
   * plain black in the dark one. */
  --shadow: 48 38 20;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font);

  --wrap: 72rem;
  --measure: 38rem;
  --gutter: 1.25rem;
  --radius: 12px;
  --radius-large: 24px;
  --header-height: 4rem;

  /* The help screenshots' width over their height: a Pixel 10 Pro, 427 by
   * 876 with its status and gesture bars trimmed off. */
  --shot-aspect: 0.487;
}

/* The dark theme, twice: once for a system set to dark, unless the reader
 * has chosen light with the switch, and once for a reader who has chosen
 * dark (static/theme.js). The contrast check reads both and fails if they
 * differ, so change them together. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113;
    --bg-tint: #15181b;
    --surface: #1a1d21;
    --text: #eeece8;
    --muted: #a3a9b0;
    --border: #2a2e34;
    --accent: #5ed3b8;
    --accent-soft: #16302a;
    --on-accent: #062a21;
    --shadow: 0 0 0;
    --phone: #202328;
    --phone-rim: rgb(255 255 255 / 0.16);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1113;
  --bg-tint: #15181b;
  --surface: #1a1d21;
  --text: #eeece8;
  --muted: #a3a9b0;
  --border: #2a2e34;
  --accent: #5ed3b8;
  --accent-soft: #16302a;
  --on-accent: #062a21;
  --shadow: 0 0 0;
  --phone: #202328;
  --phone-rim: rgb(255 255 255 / 0.16);
}

/* The browser's own controls and scrollbars follow a chosen theme too. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

/* Fonts -------------------------------------------------------------------
 *
 * Bricolage Grotesque, for headings, served from this origin like everything
 * else. Its weight and optical-size axes: a heading set large is drawn
 * tighter than one set small, without being asked. One file per script; the
 * browser fetches the Latin Extended one only for a page with a character in
 * it. The build copies the files in from the @fontsource-variable package and
 * fills in their hashed names. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/bricolage-grotesque-latin.a79fdb52.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/bricolage-grotesque-latin-ext.776f6dca.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Base -------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* A link to a section lands below the masthead, which stays in view. */
  scroll-padding-top: calc(var(--header-height) + 1rem);

  /* The bands and the screen gallery run to the window's edges, which on a
   * platform with classic scrollbars is a few pixels wider than the page.
   * Clip rather than hidden: hidden would make the page a scroll
   * container. */
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) 0;
  z-index: 30;
}

.skip-link:focus {
  left: 0;
}

/* The column every band's content sits in. */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}

/* Masthead ----------------------------------------------------------------
 *
 * Stays at the top of the window, over the page, a little translucent so
 * the page shows through as it scrolls under. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

/* Flex rather than inline, so the link is the mark's height: inline, it
 * would leave room below for descenders and sit above the links beside it. */
.masthead__brand,
.colophon__brand {
  display: flex;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* The master is square; the tile's corners are 9/32 of its side, as the
 * favicon's are (scripts/make-social-images.mjs). */
.brand__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 28.125%;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* A narrow window has room for the name, two links and the switch, but not a
 * third link: Privacy goes, and is in the footer. A phone has room for one:
 * Games goes too, since the games are the home page, and every game's page
 * links back to them. On the narrowest phones the name goes as well, and the
 * mark stays: the link still says where it goes, by its label. */
@media (max-width: 34rem) {
  .nav__item--wide {
    display: none;
  }

  .masthead__inner {
    gap: 0.5rem;
  }

  .masthead__end {
    gap: 0.25rem;
  }

  .nav__link {
    padding-inline: 0.5rem;
  }

  .masthead .brand__name {
    font-size: 1.05rem;
  }

  .has-theme-switch .theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 26rem) {
  .nav__item--roomy {
    display: none;
  }
}

@media (max-width: 20rem) {
  .masthead .brand__name {
    display: none;
  }
}

.masthead__end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__list {
  display: flex;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}

.nav__link:hover {
  color: var(--text);
  background: var(--bg-tint);
}

.nav__link--active {
  color: var(--text);
}

/* Hidden until static/theme.js has run: without it the button would do
 * nothing. */
.theme-toggle {
  display: none;
}

.has-theme-switch .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--muted);
}

.theme-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
}

/* Each theme shows the other's icon: the moon while light, to go dark, and
 * the sun while dark. */
.theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle__icon--moon {
    display: none;
  }
}

/* Type and pieces used across pages --------------------------------------- */

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.section-head__title--small {
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.section-head__lede {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}

.button--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.12), 0 6px 16px -6px rgb(var(--shadow) / 0.35);
}

.button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(var(--shadow) / 0.12), 0 12px 24px -8px rgb(var(--shadow) / 0.4);
}

.button--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.button--secondary:hover {
  border-color: var(--muted);
}

.button__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

/* Inline rather than a flex row, so that when the words wrap the arrow
   follows the last of them instead of standing apart at the far edge. */
.link-arrow {
  font-weight: 650;
  text-decoration: none;
}

.link-arrow__end {
  white-space: nowrap;
}

.link-arrow__icon {
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.4rem;
  vertical-align: -0.2em;
  transition: transform 0.15s ease;
}

.link-arrow:hover {
  text-decoration: underline;
}

.link-arrow:hover .link-arrow__icon {
  transform: translateX(3px);
}

/* A game's status: "Coming soon" or "Available now", beside its name. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.status--soon::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* An app icon, with the corners a phone would give it. */
.app-icon {
  display: block;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgb(var(--shadow) / 0.08), 0 4px 12px -4px rgb(var(--shadow) / 0.35);
}

/* Bands -------------------------------------------------------------------
 *
 * The home and game pages are a stack of bands across the window, each with
 * its content in the column; every other one is tinted. */

.band {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.band--tint {
  background: var(--bg-tint);
}

.band--tight {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

/* The drawn phone --------------------------------------------------------
 *
 * A dark body of even width around the screen, with corners in proportion
 * to it, and a camera in the strip at the top where the status bar would be.
 * Everything is in units of the phone's own width (cqi), so a phone is the
 * same shape at any size, and whatever holds it sets only its width. */

.phone {
  container-type: inline-size;
}

.phone__body {
  position: relative;
  padding: 3cqi;
  border-radius: 15cqi;
  background: var(--phone);
  box-shadow:
    inset 0 0 0 1px var(--phone-rim),
    0 0 0 1px rgb(0 0 0 / 0.06),
    0 3cqi 6cqi -2cqi rgb(var(--shadow) / 0.18),
    0 14cqi 30cqi -8cqi rgb(var(--shadow) / 0.4);
}

.phone__body::after {
  content: "";
  position: absolute;
  top: calc(3cqi + 4.4cqi);
  left: 50%;
  width: 3.4cqi;
  height: 3.4cqi;
  border-radius: 50%;
  background: #08090a;
  box-shadow: 0 0 0 0.5cqi rgb(255 255 255 / 0.06);
  transform: translateX(-50%);
}

.phone__screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12cqi;
  background: var(--surface);
}

/* The home page's hero ------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 7vw, 6rem);
  background:
    radial-gradient(52rem 36rem at 88% 18%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(40rem 28rem at 0% 100%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--bg);
}

/* A faint board of squares behind it, fading out towards the words. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(48rem 34rem at 82% 30%, #000 10%, transparent 72%);
  mask-image: radial-gradient(48rem 34rem at 82% 30%, #000 10%, transparent 72%);
}

.hero__inner {
  display: grid;
  gap: clamp(3rem, 6vw, 4rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.hero__title {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__lede {
  max-width: 32rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.125rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.hero__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Three phones, fanned: the third game's in the middle, in front and
 * upright, and the first two's behind it and tilted out. The stage keeps their shared shape, so they
 * overlap the same way at any width. */
.hero__stage {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  aspect-ratio: 1 / 1.02;
}

.hero__phone {
  position: absolute;
  width: 38%;
}

.hero__phone--1 {
  left: 3%;
  top: 9%;
  z-index: 1;
  transform: rotate(-8deg);
}

.hero__phone--2 {
  right: 3%;
  top: 9%;
  z-index: 2;
  transform: rotate(8deg);
}

.hero__phone--3 {
  left: 29%;
  top: 0;
  z-index: 3;
  width: 42%;
}

/* Pledges ----------------------------------------------------------------- */

.pledges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pledge {
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
}

.pledge__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pledge__icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.pledge__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pledge__detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* On a phone, one column of six cards would be a long way down: each pledge
 * is a row instead, its icon beside its words, in one card. */
@media (max-width: 40rem) {
  .pledges {
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
  }

  .pledge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: none;
    border: 0;
    border-radius: 0;
  }

  .pledge + .pledge {
    border-top: 1px solid var(--border);
  }

  .pledge__icon {
    grid-row: span 2;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
  }

  .pledge__title {
    margin: 0.1rem 0 0.15rem;
    font-size: 1.1rem;
  }
}

/* Spotlights: each game on the home page ------------------------------------
 *
 * The game's screen in a phone, on a panel tinted in the game's own colour,
 * beside its name and a sentence or two. They alternate sides down the page
 * on a wide screen. */

.spotlight,
.game-hero,
.game-card {
  --game-tint: var(--accent);
}

.spotlight--minesweeper,
.game-hero--minesweeper {
  --game-tint: #2a72c8;
}

.spotlight--freecell,
.game-hero--freecell {
  --game-tint: #15805a;
}

.spotlight--blocks,
.game-hero--blocks {
  --game-tint: #7b5cc4;
}

.spotlights {
  display: grid;
  gap: clamp(3.5rem, 7vw, 6rem);
}

.spotlight {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .spotlight {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 5rem);
  }

  .spotlight:nth-child(even) .spotlight__media {
    order: 2;
  }
}

/* The phone stands in the panel from a little below its top edge and runs
 * off the bottom, so the panel shows the top three-quarters of the screen,
 * where every game's board is. */
.spotlight__media {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 0.92;
  padding-top: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--game-tint) 34%, transparent), transparent 68%),
    color-mix(in srgb, var(--game-tint) 9%, var(--surface));
}

.spotlight__phone {
  width: min(48%, 15rem);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.spotlight__media:hover .spotlight__phone {
  transform: translateY(-6px);
}

.spotlight__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.spotlight__icon {
  width: 4rem;
  height: 4rem;
  flex: none;
}

.spotlight__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.spotlight__title a {
  color: var(--text);
  text-decoration: none;
}

.spotlight__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.spotlight__tagline {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.spotlight__pitch {
  max-width: 34rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
}

/* The story ----------------------------------------------------------------- */

.story {
  display: grid;
  gap: 1.5rem 4rem;
}

@media (min-width: 52rem) {
  .story {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .story__head {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    align-self: start;
  }
}

.story__body p {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.story__body p:first-child {
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.story__body p:last-child {
  margin-bottom: 0;
}

/* A callout: a heading, a sentence and its buttons, on a tinted card. ---- */

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem 3rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(36rem 20rem at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--accent-soft);
}

.callout__text {
  flex: 1 1 22rem;
}

.callout__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.callout__lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* A game's own page ---------------------------------------------------------- */

.game-hero {
  overflow: clip;
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(50rem 34rem at 82% 30%, color-mix(in srgb, var(--game-tint) 24%, transparent), transparent 64%),
    linear-gradient(to bottom, color-mix(in srgb, var(--game-tint) 6%, var(--bg)), var(--bg));
}

.game-hero__inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .game-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
}

.backlink:hover {
  color: var(--text);
}

.backlink__icon {
  width: 1rem;
  height: 1rem;
  transform: scaleX(-1);
}

.game-hero__icon {
  width: clamp(4.5rem, 9vw, 5.75rem);
  height: auto;
  margin-bottom: 1.5rem;
}

.game-hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.game-hero__lede {
  max-width: 30rem;
  margin: 1rem 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.availability {
  margin-top: 1.75rem;
}

.availability__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* The stores' own badges, at the same height, which each store asks for
 * beside the other's; 3rem matches the site's buttons. Both are drawn edge to
 * edge, so the gap between them is their clear space. */
.store-badge {
  display: inline-block;
  border-radius: 9px;
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge__image {
  display: block;
  width: auto;
  height: 3rem;
}

.availability__price {
  margin: 0;
  color: var(--muted);
}

.availability__amount {
  margin-right: 0.15rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  vertical-align: -0.1em;
}

/* Two phones: the game in front, and its next screen behind and to the
 * right, tilted. */
.game-hero__stage {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  aspect-ratio: 1 / 1.08;
}

.game-hero__phone {
  position: absolute;
}

.game-hero__phone--front {
  left: 6%;
  top: 0;
  z-index: 2;
  width: 48%;
}

.game-hero__phone--back {
  right: 2%;
  top: 8%;
  z-index: 1;
  width: 44%;
  transform: rotate(7deg);
}

/* The band after the game's hero is the same colour as the hero's foot, so
 * the two together need less than two bands' worth of space between them. */
.game-hero + .band {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* About the game, and what is in it: a heading on the left and the words
 * on the right, on a wide screen. */
.split {
  display: grid;
  gap: 1.5rem 4rem;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

.prose--lead p {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.prose--lead p:first-child {
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.prose--lead p:last-child {
  margin-bottom: 0;
}

/* The screens, in a row. Where they don't all fit, the row scrolls sideways,
 * from the window's edge, with each phone snapping into place; where they
 * do, they share the column's width. */
.gallery {
  --gallery-inset: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));

  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0.5rem var(--gallery-inset) 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gallery-inset);
  scrollbar-width: thin;
  list-style: none;
}

.gallery__item {
  flex: 0 0 auto;
  width: clamp(11rem, 56vw, 13rem);
  scroll-snap-align: start;
}

@media (min-width: 64rem) {
  .gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
    overflow: visible;
  }

  .gallery__item {
    width: auto;
  }
}

.gallery__figure {
  margin: 0;
}

.gallery__caption {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

.checklist {
  display: grid;
  gap: 1rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.checklist__item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 1.05rem;
  line-height: 1.5;
}

.checklist__icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0.3rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  stroke-width: 2.5;
}

/* Game cards: the other games, at the end of a game's page. --------------- */

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  height: 100%;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 12px 28px -14px rgb(var(--shadow) / 0.35);
}

.game-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
}

.game-card__body {
  flex: 1;
  min-width: 0;
}

.game-card__title {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  /* Set, not inherited from the body copy's: a name like "Nothing But
     Minesweeper" wraps in a narrow card, and wraps as one heading. */
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.game-card__tagline {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.game-card__tagline--last {
  margin-bottom: 0;
}

/* On the support page, the games' help, one above another in the column. */
.game-cards--stack {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--measure);
}

.callout--page {
  max-width: var(--measure);
  margin-block: 2.5rem 0.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.game-card__arrow {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.game-card:hover .game-card__tagline--last {
  margin-bottom: 0;
}

/* On the support page, the games' help, one above another in the column. */
.game-cards--stack {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--measure);
}

.callout--page {
  max-width: var(--measure);
  margin-block: 2.5rem 0.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.game-card__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Pages of words: support, privacy, help, not found ------------------------ */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem);
}

.page__title {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.page__lede {
  max-width: var(--measure);
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.section {
  margin-block: 0;
}

.section > p,
.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1rem;
}

.section__title {
  margin: 2.75rem 0 0.85rem;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__note {
  margin-top: 1.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.features {
  max-width: var(--measure);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.features__item {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
}

.features__item::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Help pages ---------------------------------------------------------------
 *
 * A game's help is long enough to want a way through it: a trail back up to
 * the game, the contents, then sections of prose and term lists. Nothing here
 * introduces a colour pair the contrast check does not already cover. */

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb__separator {
  margin-left: 0.5rem;
}

.toc {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
}

.toc__title {
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc__list {
  columns: 2 13rem;
  column-gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__item {
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

.help__subheading {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.terms {
  margin: 0 0 1rem;
}

.terms__entry + .terms__entry {
  margin-top: 0.85rem;
}

.terms__term {
  font-weight: 650;
}

.terms__detail {
  margin: 0.1rem 0 0;
}

/* The help pages' prose: held to the measure, as .prose is, without being
 * .prose, since a section holding a walkthrough runs wider than the measure. */
.help > p,
.help > .terms,
.help > .features,
.help > .help__subheading {
  max-width: var(--measure);
}

.help p {
  margin: 0 0 1rem;
}

/* Walkthroughs ---------------------------------------------------------------
 *
 * A screenshot of one of the game's screens and the items on it, a few words
 * each. Narrow, the screen is shown once and each item comes with a crop of
 * it; wide, the screen stays in view beside the words, and static/help.js
 * lights the item being read on it while the rest of the screen dims.
 *
 * Everything that has to land on a particular pixel of a screenshot is an
 * SVG attribute, drawn in the screenshot's own coordinates, so nothing here
 * needs to know where anything is. */

.tour {
  margin: 1.5rem 0 2.5rem;
}

.tour__screen,
.tour__crop {
  margin: 0;
}

.tour__screen {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

/* The overlay is laid over the image and sized to it, rather than taking
 * any part in the layout: an SVG has an intrinsic size of its own, 300 by
 * 150, which would otherwise widen the box past the picture. */
.shot {
  position: relative;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.tour__screen .shot__image {
  width: 15rem;
}

.shot__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shot__ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.shot__dim {
  fill: #000;
  fill-opacity: 0.5;
}

/* The whole screen's highlights are only for the wide layout, and only once
 * one is lit. */
.shot__spot {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.shot__spot.is-active {
  opacity: 1;
}

.tour__stops {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour__stop {
  max-width: var(--measure);
}

.tour__stop + .tour__stop {
  margin-top: 2rem;
}

.tour__crop {
  margin-bottom: 0.75rem;
}

/* A crop fills the column, which on a phone shows it a little larger than
 * the game does: near enough to recognise, big enough to read. */
.tour__crop .shot,
.tour__crop .shot__image {
  width: 100%;
}

.tour__crop--large .shot {
  margin-inline: auto;
}

.tour__crop--large .shot,
.tour__crop--large .shot__image {
  width: 15rem;
}

.tour__name {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tour__stop .terms {
  margin-top: 0.5rem;
}

@media (min-width: 52rem) {
  .tour {
    display: grid;
    grid-template-columns: 21rem minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }

  /* Below the masthead, which stays in view over it. */
  .tour__screen {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    margin: 0;
  }

  /* Tall enough to read, and never taller than the window less the
   * masthead, so the whole screen is in view while any of its items is.
   * The width is what gets clamped, through the screen's proportions,
   * rather than the height: an image squeezed to a max-height would no
   * longer match the overlay drawn over it. Every screenshot comes from the
   * same phone, so they share one shape, and --shot-aspect is its width
   * over its height. */
  .tour__screen .shot__image {
    width: min(21rem, calc((100vh - var(--header-height) - 3rem) * var(--shot-aspect)));
  }

  .tour__crop {
    display: none;
  }

  /* Leaves room above the first item for the screen to come into view, and
   * below the last for its highlight to be read before the next screen
   * scrolls up. */
  .tour__stops {
    padding-block: 2rem 30vh;
  }

  .tour__stop {
    padding-left: 1rem;
    border-left: 3px solid transparent;
    transition: border-color 0.25s ease;
  }

  .tour__stop.is-active {
    border-left-color: var(--accent);
  }
}

/* Colophon ---------------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--border);
  background: var(--bg-tint);
  font-size: 0.95rem;
}

.colophon__inner {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4rem) 2.5rem;
}

@media (min-width: 48rem) {
  .colophon__inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.colophon__brand {
  width: fit-content;
  margin-bottom: 1rem;
}

.colophon__line {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
}

.colophon__heading {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.colophon__list a {
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.colophon__list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.colophon__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.colophon__legal p {
  margin: 0;
}

.colophon__legal .colophon__trademarks {
  flex-basis: 100%;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
