/* TrackFitTracker website. One file, no framework, no third-party requests.
   The palette is the app's own (frontend/src/themes/defaultTheme.js): teal primary, cyan secondary, cool neutrals.
   Colours are tokens on :root; light is the default and dark follows the visitor's system setting. */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-latin-ext-wght-normal.woff2) format("woff2-variations");
  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;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2-variations");
  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;
}

:root {
  color-scheme: light dark;

  --bg: #f4f8f8;
  --surface: #ffffff;
  --surface-2: #eaf1f2;
  --text: #0b1214;
  --muted: #475a60;
  --line: rgba(11, 18, 20, 0.12);
  --line-strong: rgba(11, 18, 20, 0.22);
  --accent: #0f6b57; /* links and filled buttons: 6:1 on white */
  --accent-hover: #0b5646;
  --on-accent: #ffffff;
  --accent-2: #0a7c95; /* the cyan of the wordmark, darkened for a light page */
  --glow: rgba(34, 211, 238, 0.14);
  --warn-bg: #fff3bf;
  --warn-text: #5c4400;
  --warn-line: #b88700;
  --shadow: 0 1px 2px rgba(11, 18, 20, 0.06), 0 10px 30px rgba(11, 18, 20, 0.06);
  --shadow-lg: 0 2px 6px rgba(11, 18, 20, 0.08), 0 30px 70px rgba(11, 18, 20, 0.2);
  --frame: #0b1214; /* behind a screenshot of the app, which is dark in both themes */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --radius: 14px;
  --gutter: 16px;
  --measure: 46rem;
  --wide: 70rem;
  --font: "Manrope Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1214;
    --surface: #121b1f;
    --surface-2: #1a262c;
    --text: #e6f0f2;
    --muted: #9fb3b9;
    --line: rgba(230, 240, 242, 0.1);
    --line-strong: rgba(230, 240, 242, 0.2);
    --accent: #2cb59a;
    --accent-hover: #4bd0b5;
    --on-accent: #06201a;
    --accent-2: #22d3ee;
    --glow: rgba(34, 211, 238, 0.12);
    --warn-bg: #3a2f00;
    --warn-text: #ffe28a;
    --warn-line: #b88700;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.5), 0 30px 80px rgba(0, 0, 0, 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Long German, Dutch and Polish words must wrap before they push the page sideways. */
  overflow-wrap: break-word;
  hyphens: auto;
}
main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.narrow {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.15s;
}
.skip:focus {
  top: 8px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  position: relative; /* the language menu hangs from the bar, so it can never leave the screen */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  border-radius: 9px;
  display: block;
}
.wordmark {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: 1.2rem;
  hyphens: none;
}
.wordmark .accent {
  color: var(--accent-2);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
/* The way in is the one link of the menu that is drawn as a button. */
.nav a[data-page="download"] {
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--accent);
}
.nav a[data-page="download"]:hover {
  color: var(--accent-hover);
}
body[data-page="download"] .nav a[data-page="download"],
body[data-page="support"] .nav a[data-page="support"],
body[data-page="privacy"] .nav a[data-page="privacy"] {
  background: var(--surface-2);
}

.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang[open] summary {
  background: var(--surface-2);
}
.lang ul {
  position: absolute;
  right: max(var(--gutter), env(safe-area-inset-right));
  top: calc(100% + 4px);
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 11rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.lang li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.lang li a:hover {
  background: var(--surface-2);
}
.lang li a[aria-current] {
  font-weight: 800;
  color: var(--accent);
}

@media (max-width: 36rem) {
  /* Brand and language on the first row, the three links on the second. */
  .brand {
    order: 1;
  }
  .lang {
    order: 2;
  }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin-inline: -8px;
  }
}

/* ------------------------------------------------------------------ text */

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 800;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);
  margin: 0 0 0.5em;
}
h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  margin: 2.2em 0 0.5em;
  scroll-margin-top: 5.5rem;
}
h3 {
  font-size: 1.1rem;
  margin: 1.6em 0 0.3em;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
ul,
ol {
  padding-left: 1.3em;
}
li {
  margin-bottom: 0.35em;
}
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}
.meta {
  color: var(--muted);
  font-size: 0.92rem;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  hyphens: none;
  overflow-wrap: anywhere;
}

/* A text page: privacy, terms, support, deletion. */
.page-body {
  padding-block: 40px 72px;
}
.page-body > h1:first-child {
  margin-top: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-block: 24px;
}
.toc h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 8px;
}
.toc ol {
  columns: 2 16rem;
  column-gap: 32px;
  margin: 0;
  padding-left: 1.3em;
}
.toc li {
  break-inside: avoid;
}

/* Boxes */
.callout,
.notice {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 18px;
  margin-block: 20px;
}
.callout > :last-child,
.notice > :last-child {
  margin-bottom: 0;
}
.notice {
  border-left-color: var(--accent-2);
  color: var(--muted);
  font-size: 0.95rem;
}

dl.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
dl.facts dt {
  font-weight: 700;
  padding: 12px 16px 0;
}
dl.facts dd {
  margin: 0;
  padding: 2px 16px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
dl.facts dd:last-child {
  border-bottom: 0;
}
@media (min-width: 44rem) {
  dl.facts {
    grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
  }
  dl.facts dt,
  dl.facts dd {
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
  }
  dl.facts dt {
    padding-bottom: 12px;
  }
  dl.facts dt:last-of-type,
  dl.facts dd:last-child {
    border-bottom: 0;
  }
}

/* A value the owner has not filled in yet. Loud on purpose: it must not go unnoticed, in either theme. */
mark.placeholder {
  background: var(--warn-bg);
  color: var(--warn-text);
  outline: 2px dashed var(--warn-line);
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 0.25em;
  font-weight: 700;
  hyphens: none;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn {
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s,
    border-color 0.2s;
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn:active {
  transform: translateY(0);
}
.btn.secondary:hover {
  box-shadow: none;
}
.btn.secondary {
  background: transparent;
  color: var(--accent);
}
.btn.secondary:hover {
  background: var(--surface-2);
  color: var(--accent-hover);
}
.btn[aria-disabled="true"] {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 24px 0;
}

/* ------------------------------------------------------------------ home */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(44px, 8vw, 104px) clamp(40px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

/* The moving backdrop: two soft lights that drift, and the lanes of a track sliding past. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}
.orb-a {
  width: 44rem;
  height: 44rem;
  right: -14rem;
  top: -20rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent 66%);
  animation: drift-a 19s ease-in-out infinite alternate;
}
.orb-b {
  width: 38rem;
  height: 38rem;
  left: -16rem;
  bottom: -22rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 66%);
  animation: drift-b 23s ease-in-out infinite alternate;
}
.lanes {
  position: absolute;
  inset: -10% -10%;
  background: repeating-linear-gradient(115deg, transparent 0 86px, var(--line) 86px 88px);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 0, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 0, transparent 72%);
  /* One step of the pattern sideways (88px across the lanes is 97.1px along the page), so the loop has no seam. */
  animation: lanes 9s linear infinite;
}
@keyframes drift-a {
  to {
    transform: translate(-7rem, 5rem) scale(1.12);
  }
}
@keyframes drift-b {
  to {
    transform: translate(8rem, -4rem) scale(1.08);
  }
}
@keyframes lanes {
  to {
    background-position: 97.1px 0;
  }
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
  }
}
.hero h1 {
  font-size: clamp(2.2rem, 1.3rem + 3.8vw, 3.9rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The words of the hero come in one after another when the page opens. */
.hero-copy > * {
  animation: rise 0.8s var(--ease) both;
}
.hero-copy > :nth-child(2) {
  animation-delay: 0.08s;
}
.hero-copy > :nth-child(3) {
  animation-delay: 0.16s;
}
.hero-copy > :nth-child(4) {
  animation-delay: 0.24s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  to {
    transform: scale(3.4);
    opacity: 0;
  }
}

/* Two pieces of the app: a window that leans away and runs off the page, and a phone in front of it. */
.hero-stage {
  position: relative;
  aspect-ratio: 10 / 7.4;
  perspective: 1500px;
  animation: rise 1s var(--ease) 0.2s both;
}
.window {
  position: absolute;
  top: 0;
  left: 12%;
  width: 118%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--frame);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
  transform: rotateY(-16deg) rotateX(7deg);
  transform-origin: left center;
}
.window::before {
  content: "";
  display: block;
  height: 26px;
  background:
    radial-gradient(circle at 16px 13px, #f0635a 4.5px, transparent 5px),
    radial-gradient(circle at 34px 13px, #f5bd4f 4.5px, transparent 5px),
    radial-gradient(circle at 52px 13px, #5fc454 4.5px, transparent 5px),
    #121b1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.window img,
.phone img,
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.phone {
  position: absolute;
  left: 0;
  bottom: -4%;
  width: 30%;
  border-radius: clamp(18px, 2.6vw, 30px);
  overflow: hidden;
  background: var(--frame);
  border: clamp(4px, 0.6vw, 7px) solid #1d2a30;
  outline: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite alternate;
}
@keyframes float {
  to {
    transform: translateY(-14px);
  }
}
@media (max-width: 59.99rem) {
  .hero-stage {
    margin-right: calc(-1 * var(--gutter));
  }
}

/* A line of the things people train, running past under the hero. */
.ticker {
  overflow: hidden;
  padding-block: 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  hyphens: none;
}
.ticker li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  white-space: nowrap;
}
.ticker li::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline: 22px;
  border-radius: 50%;
  background: var(--accent-2);
}
.ticker ul.running {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  animation: ticker 46s linear infinite;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* Boxes that come in as they are scrolled to. Only when the script is there to bring them in. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

.kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.story-head {
  text-align: center;
}
.look h2 {
  margin: 0 auto;
  font-size: clamp(1.7rem, 1.1rem + 2.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16em;
}

/* The look inside: four chapters that run the whole width of the page, not a box on it. Without the script
   (or for a visitor who asked for less motion, or on a small screen) they follow one another down the page.
   With it, on a screen with room, the section holds still while it is scrolled through: the words and the
   picture of one chapter give way to the next, and the picture slides inside its frame as the scroll goes on. */
.story {
  position: relative;
  margin-top: clamp(20px, 4vw, 44px);
}
.story-pin {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.story-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--glow);
  background:
    radial-gradient(52rem 30rem at 82% 48%, currentColor, transparent 70%),
    radial-gradient(30rem 22rem at 8% 100%, currentColor, transparent 72%);
  transition: color 0.9s linear;
  pointer-events: none;
}
.story[data-at="0"] .story-glow {
  color: color-mix(in srgb, var(--accent) 26%, transparent);
}
.story[data-at="1"] .story-glow {
  color: color-mix(in srgb, var(--accent-2) 24%, transparent);
}
.story[data-at="2"] .story-glow {
  color: color-mix(in srgb, #6d7cff 24%, transparent);
}
.story[data-at="3"] .story-glow {
  color: color-mix(in srgb, #34d399 20%, transparent);
}

.chapter {
  padding-block: clamp(22px, 5vw, 44px);
}
.chapter-copy {
  max-width: 34rem;
  padding-inline: var(--gutter);
}
.chapter h3 {
  margin: 0 0 0.4em;
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
}
.chapter p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
}
.tag,
.card .tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}
/* A piece of a screen, not the screen: the frame is lower than the picture and runs off the right edge
   of the page. */
.shot {
  position: relative;
  width: 138%;
  margin: 22px 0 0 var(--gutter);
  aspect-ratio: 2368 / 1150;
  overflow: hidden;
  border-radius: 16px;
  background: var(--frame);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 58rem) {
  .chapter {
    --copy: 21rem;
    --gap: clamp(28px, 4vw, 64px);
    display: grid;
    grid-template-columns:
      minmax(var(--gutter), 1fr)
      minmax(0, var(--copy))
      var(--gap)
      minmax(0, calc(var(--wide) - 2 * var(--gutter) - var(--copy) - var(--gap)))
      minmax(var(--gutter), 1fr);
    align-items: center;
    padding-block: clamp(28px, 4vw, 52px);
  }
  .chapter-copy {
    grid-column: 2;
    padding-inline: 0;
  }
  .shot {
    grid-column: 4 / -1;
    width: min(132%, 62vh * 2368 / 1150);
    min-width: 100%;
    margin: 0;
    border-radius: 18px;
  }
}

/* Stacked, with the script: a chapter comes in when it is scrolled to. */
.js .story:not(.is-pinned) .chapter-copy > *,
.js .story:not(.is-pinned) .shot {
  transition:
    opacity 0.8s var(--ease),
    transform 0.9s var(--ease);
}
.js .story:not(.is-pinned) .chapter:not(.is-active) .chapter-copy > * {
  opacity: 0;
  transform: translateY(26px);
}
.js .story:not(.is-pinned) .chapter:not(.is-active) .shot {
  opacity: 0;
  transform: translate(60px, 20px) scale(0.97);
}
.js .story:not(.is-pinned) .shot {
  transition-delay: 0.12s;
}

.story-rail {
  display: none;
}

/* Held still while it is scrolled through. --n is the number of chapters, --top the height of the header,
   --t how far the scroll is through the chapter on show and --f how full a step of the rail is: all four
   are set by the script. */
.story.is-pinned {
  height: calc(100vh - var(--top, 64px) + var(--n, 4) * 72vh);
}
.is-pinned .story-pin {
  position: sticky;
  top: var(--top, 64px);
  height: calc(100vh - var(--top, 64px));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.is-pinned .story-stage {
  display: grid;
  min-height: 0;
}
.is-pinned .chapter {
  grid-area: 1 / 1;
  min-height: 0;
  padding-block: 0;
  pointer-events: none;
}
.is-pinned .chapter.is-active {
  pointer-events: auto;
}
.is-pinned .chapter-copy > * {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.45s var(--ease),
    transform 0.7s var(--ease);
}
.is-pinned .chapter.is-past .chapter-copy > * {
  transform: translateY(-34px);
}
.is-pinned .chapter.is-active .chapter-copy > * {
  opacity: 1;
  transform: none;
  transition-duration: 0.7s, 0.8s;
  transition-delay: 0.12s;
}
.is-pinned .chapter.is-active .chapter-copy > :nth-child(2) {
  transition-delay: 0.19s;
}
.is-pinned .chapter.is-active .chapter-copy > :nth-child(3) {
  transition-delay: 0.26s;
}
.is-pinned .shot {
  opacity: 0;
  transform: translate3d(10%, 3%, 0) scale(0.93);
  transform-origin: left center;
  transition:
    opacity 0.6s var(--ease),
    transform 1s var(--ease);
}
.is-pinned .chapter.is-past .shot {
  transform: translate3d(-7%, -3%, 0) scale(1.05);
}
.is-pinned .chapter.is-active .shot {
  opacity: 1;
  transform: none;
}
/* The picture is 170 of its 1320 rows higher than its frame, and travels that far while its chapter is on show. */
.is-pinned .shot img {
  transform: translate3d(0, calc(var(--t, 0) * -12.87%), 0);
  will-change: transform;
}

.is-pinned .story-rail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(16px, 3.4vh, 34px);
}
.story-step {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 14px 0 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s;
}
.story-step::before,
.story-step::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 3px;
  background: var(--line-strong);
}
.story-step::after {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(var(--f, 0));
  transform-origin: left center;
}
.story-step:hover,
.story-step.is-active {
  color: var(--text);
}
.story-step-n {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.look > .container:last-child {
  margin-top: clamp(28px, 5vw, 56px);
}

/* The closing box. */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 5vw, 60px);
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(36rem 20rem at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    radial-gradient(30rem 20rem at 0% 100%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
    var(--surface);
  text-align: center;
}
.cta h2 {
  margin: 0 0 0.3em;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem);
  letter-spacing: -0.025em;
}
.cta p {
  max-width: 38rem;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.1rem;
}
.cta .actions {
  justify-content: center;
}

/* The steps of asking for access. */
ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 62px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-weight: 800;
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .story .shot,
  .js .story .chapter-copy > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

.section {
  padding-block: clamp(32px, 5vw, 56px);
}
.section > .container > h2:first-child {
  margin-top: 0;
}
.section.alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin-top: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.section.alt .card {
  background: var(--bg);
}
.card,
.platform {
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s var(--ease);
}
.card:hover,
.platform:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line));
  box-shadow: var(--shadow);
}
/* Scrolling to a box and pointing at it are two things: the entrance must not be undone by the hover. */
.js .card.reveal:not(.in),
.js .platform.reveal:not(.in) {
  transform: translateY(26px);
}
.card h3 {
  margin: 0 0 0.4em;
  font-size: 1.1rem;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}

/* Download platforms */
.platforms {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-block: 24px;
}
.platform {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.platform h2,
.platform h3 {
  margin: 0;
  font-size: 1.2rem;
}
.platform p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.platform .btn {
  margin-top: auto;
}
.platform .status {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 36px 24px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.footer-about {
  grid-column: 1 / -1;
  max-width: 26rem;
}
@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
  .footer-about {
    grid-column: auto;
  }
}
.site-footer h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li {
  margin-bottom: 6px;
}
.site-footer a {
  color: var(--text);
}
.site-footer a:hover {
  color: var(--accent);
}
.site-footer .lang-list {
  columns: 2;
}
.site-footer .lang-list a[aria-current] {
  font-weight: 800;
  color: var(--accent);
}
.site-footer p {
  color: var(--muted);
  margin: 12px 0 0;
}
.legal-line {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
  }
}
