/*
 * BikeLife website. One stylesheet for every page.
 *
 * The look is the app's: its electric blue, its ink, its page tones (light and
 * dark, from src/constants/theme.ts), its wave, and type that echoes the
 * BIKELIFE wordmark (Archivo, heavy, italic, expanded).
 *
 * Shape rule, as in the app: anything you press is a pill (or a circle when it
 * is only an icon). Everything else is square. Phones are hardware and keep
 * their corners.
 *
 * Motion: ease-out curves, transform and opacity only, exits faster than
 * entrances, and nothing moves when a visitor asks for reduced motion. Nothing
 * animates on hover.
 */

/* -------------------------------------------------------------------------- */
/* Fonts                                                                       */
/* -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin.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: 'Archivo';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin-italic.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;
}

/* -------------------------------------------------------------------------- */
/* Tokens                                                                      */
/* -------------------------------------------------------------------------- */

:root {
  /* The brand. The same in both themes, as the app's header is. */
  --blue: #2e1be6;
  --blue-press: #2413c4;
  --ice: #6bc5f7;
  --ink: #0b0b0f;

  /* The page, light. */
  --page: #f4f6fb;
  --raise: #e9edf5;
  --line: #d9dee9;
  --text: #12141a;
  --muted: #5a6373;
  --accent: #2e1be6;
  --accent-press: #2413c4;
  --accent-soft: #e6e3fd;
  --on-accent: #ffffff;
  --danger: #c42532;
  --device-edge: #0b0b0f;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 64px;
  --gutter: 16px;
  --max: 1240px;

  --fs-h1: clamp(2.35rem, 0.9rem + 6.1vw, 5.1rem);
  --fs-h2: clamp(2rem, 1.15rem + 3.3vw, 3.6rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);

  color-scheme: light dark;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067,
      1.099 24.3%, 1.108 26%, 1.103 27.9%, 1.077 31.2%, 1.006 38.4%, 0.985 42.4%, 0.976 46.6%,
      0.979 54.2%, 1.001 69.6%, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1014;
    --raise: #1c212a;
    --line: #272c37;
    --text: #e9ebf1;
    --muted: #9aa2b3;
    --accent: #8578f5;
    --accent-press: #6f60f2;
    --accent-soft: #201e38;
    --on-accent: #0b0b0f;
    --danger: #ff6b73;
    --device-edge: #2a2f3a;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 1280px) {
  :root {
    --gutter: 48px;
    --nav-h: 72px;
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.on-blue :focus-visible,
.nav:not(.is-solid) :focus-visible,
.nav.is-open :focus-visible {
  outline-color: #ffffff;
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 650;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* -------------------------------------------------------------------------- */
/* Type                                                                        */
/* -------------------------------------------------------------------------- */

/* The wordmark's voice: heavy, italic, expanded, capitals. */
.display {
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-wrap: balance;
}

h1.display {
  font-size: var(--fs-h1);
}

h2.display {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34rem;
  text-wrap: pretty;
}

.on-blue .lead {
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head {
  display: grid;
  gap: 18px;
  justify-items: center;
  margin-bottom: clamp(36px, 5vw, 64px);
  text-align: center;
}

.section-head .lead {
  margin-inline: auto;
}

/* Beside a picture on a wide screen, a heading reads from the left like its column. */
@media (min-width: 1024px) {
  .proof .section-head,
  .form-side .section-head {
    justify-items: start;
    text-align: left;
  }
  .proof .section-head .lead,
  .form-side .section-head .lead {
    margin-inline: 0;
  }
}

.section {
  padding-block: clamp(56px, 7vw, 112px);
}

/* -------------------------------------------------------------------------- */
/* Buttons and badges                                                          */
/* -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--accent-press);
  }
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
}

.btn--light {
  background: #f4f6fb;
  color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .btn--light:hover {
    background: #ecebff;
  }
}

.btn--quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

@media (hover: hover) and (pointer: fine) {
  .btn--quiet:hover {
    background: var(--raise);
  }
}

.store-badge {
  display: inline-block;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}

.store-badge:active {
  transform: scale(0.97);
}

.store-badge img {
  height: 54px;
  width: auto;
}

/* -------------------------------------------------------------------------- */
/* Navigation                                                                  */
/* -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: #ffffff;
  transition:
    background-color 220ms var(--ease-out),
    color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.nav.is-solid {
  background: var(--page);
  color: var(--text);
  box-shadow: inset 0 -1px 0 var(--line);
}

.nav.is-open {
  background: var(--blue);
  color: #ffffff;
  box-shadow: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--nav-h);
}

.nav-logo {
  display: block;
  margin-right: auto;
  border-radius: 4px;
}

.nav-logo img {
  height: 26px;
  width: auto;
}

@media (min-width: 1280px) {
  .nav-logo img {
    height: 29px;
  }
}

.logo-ink {
  display: none;
}

.nav.is-solid:not(.is-open) .logo-white {
  display: none;
}

.nav.is-solid:not(.is-open) .logo-ink {
  display: block;
}

@media (prefers-color-scheme: dark) {
  .nav.is-solid:not(.is-open) .logo-white {
    display: block;
  }
  .nav.is-solid:not(.is-open) .logo-ink {
    display: none;
  }
}

.nav-links {
  display: none;
  gap: 4px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
  }
}

.nav-links a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.nav-cta {
  height: 42px;
  padding: 0 18px;
  font-size: 0.9375rem;
  background: #f4f6fb;
  color: var(--blue);
}

.nav.is-solid:not(.is-open) .nav-cta {
  background: var(--accent);
  color: var(--on-accent);
}

@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover {
    background: #ecebff;
  }
  .nav.is-solid:not(.is-open) .nav-cta:hover {
    background: var(--accent-press);
  }
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.38);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}

.nav-toggle:active {
  transform: scale(0.94);
}

.nav.is-solid:not(.is-open) .nav-toggle {
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.nav-toggle .icon {
  width: 24px;
  height: 24px;
}

.nav-toggle .icon-close,
.nav.is-open .nav-toggle .icon-menu {
  display: none;
}

.nav.is-open .nav-toggle .icon-close {
  display: block;
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* The menu on a phone: the brand's blue, the page's words in the wordmark's voice. */
.menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 24px var(--gutter) max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--blue);
  color: #ffffff;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 160ms var(--ease-out),
    transform 160ms var(--ease-out),
    visibility 0s linear 160ms;
}

.nav.is-open .menu {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 240ms var(--ease-out),
    transform 320ms var(--ease-out),
    visibility 0s;
}

.menu-links {
  display: grid;
}

.menu-links a {
  display: block;
  padding: 12px 0;
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1.05;
  text-transform: uppercase;
  text-decoration: none;
}

.nav.is-open .menu-links li {
  animation: menu-in 420ms var(--ease-out) both;
  animation-delay: calc(60ms + var(--i, 0) * 40ms);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (min-width: 960px) {
  .menu {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* The phone                                                                   */
/* -------------------------------------------------------------------------- */

/*
 * A phone drawn around a real screen. --w is its width; everything else is in
 * proportion to it. The screens are 390 by 844, an iPhone's points.
 */
.device {
  --w: 300px;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.165);
  background: #0b0b0f;
  outline: 1.5px solid var(--device-edge);
  outline-offset: -1.5px;
}

/* Its buttons, so it reads as a phone at a glance. */
.device::before,
.device::after {
  content: '';
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #1b1d24;
}

.device::before {
  left: -3px;
  top: 21%;
  height: 9%;
}

.device::after {
  right: -3px;
  top: 25%;
  height: 13%;
}

.device-screen {
  position: relative;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.134);
  background: #0e1014;
  isolation: isolate;
}

.device-screen > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-island {
  position: absolute;
  z-index: 3;
  top: calc(var(--w) * 0.058);
  left: 50%;
  width: calc(var(--w) * 0.29);
  height: calc(var(--w) * 0.086);
  border-radius: 999px;
  background: #050507;
  transform: translateX(-50%);
}

/* The screen's own box, without its clip: lifted cards break past its edges. */
.device-lift {
  position: absolute;
  inset: calc(var(--w) * 0.032);
  z-index: 4;
  pointer-events: none;
}

.lift {
  position: absolute;
  height: auto;
  max-width: none;
}

/* -------------------------------------------------------------------------- */
/* Blue bands and the wave                                                     */
/* -------------------------------------------------------------------------- */

.on-blue {
  background: var(--blue);
  color: #ffffff;
}

/* The app's wave, from the onboarding stage. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 5;
  width: 100%;
  height: clamp(44px, 7vw, 120px);
  fill: var(--page);
  pointer-events: none;
}

.wave--top {
  top: -1px;
  bottom: auto;
  transform: scaleY(-1);
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-h) + 32px);
}

/* On a phone the words sit in the middle, above the phone they describe. */
.hero-copy {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.hero h1 .line {
  display: block;
}

.hero-sub {
  max-width: 30rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.hero-visual {
  position: relative;
  flex: 1;
  min-height: 330px;
  margin-top: 48px;
}

.hero .device {
  position: absolute;
  top: 0;
  left: 50%;
}

.hero .device--front {
  --w: min(68vw, 312px);
  translate: -50% 0;
}

/* The ChrisTheSurfer card, where the App Store art lifts it: measured off the screen. */
.lift--rideout {
  left: -9.04%;
  top: 21.44%;
  width: 115.86%;
}

@media (min-width: 1024px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: center;
    gap: 32px;
    padding-top: var(--nav-h);
  }

  .hero-copy {
    justify-items: start;
    text-align: left;
    padding-bottom: 10vh;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  /* Two lines, each whole: sized to the column, which stops growing at --max. */
  .hero h1.display {
    font-size: min(4.25rem, 5vw);
    font-stretch: 106%;
  }

  .hero h1 .line {
    white-space: nowrap;
  }

  .hero-visual {
    align-self: stretch;
    margin-top: 0;
  }

  .hero .device--front {
    --w: clamp(290px, 25vw, 360px);
    top: calc(var(--nav-h) + 6vh);
  }
}

/* The way in: the app as the App Store lists it, one big thing to press. */
.get {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 430px;
  min-height: 76px;
  padding: 10px;
  border-radius: 999px;
  background: #f4f6fb;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}

.get:active {
  transform: scale(0.97);
}

.get-icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
}

.get-text {
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1.2;
}

.get-text strong {
  font-size: 1.0625rem;
  font-weight: 800;
}

.get-text span {
  color: #5a6373;
  font-size: 0.875rem;
}

.get-btn {
  display: inline-grid;
  place-items: center;
  height: 56px;
  margin-left: auto;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 750;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .get:hover .get-btn {
    background: var(--blue-press);
  }
}

/* The hero arriving: words first, then the phones, then the card lifted off them. */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero .line,
  .hero-sub,
  .hero-cta {
    animation: rise 800ms var(--ease-out) both;
  }
  .hero .eyebrow {
    animation-delay: 40ms;
  }
  .hero .line:nth-child(1) {
    animation-delay: 100ms;
  }
  .hero .line:nth-child(2) {
    animation-delay: 160ms;
  }
  .hero-sub {
    animation-delay: 230ms;
  }
  .hero-cta {
    animation-delay: 300ms;
  }
  .hero .get-icon {
    animation: icon-pop 700ms var(--spring) 520ms both;
  }
  .hero .device--front {
    animation: phone-rise 1000ms var(--ease-out) 140ms both;
  }
  .hero .lift--rideout {
    animation: card-pop 760ms var(--spring) 600ms both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .device,
  .hero .lift--rideout {
    animation: fade 400ms ease both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes phone-rise {
  from {
    opacity: 0;
    transform: translateY(72px);
  }
}

@keyframes card-pop {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.86);
  }
}

@keyframes icon-pop {
  from {
    transform: scale(0.6);
  }
}

@keyframes card-land {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Revealing on scroll                                                         */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    transition:
      opacity 700ms var(--ease-out),
      transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .js [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* -------------------------------------------------------------------------- */
/* The rideout, step by step                                                  */
/* -------------------------------------------------------------------------- */
/*
 * One screen at a time, held in place while the page scrolls past markers.
 * The heading above leads straight into the tabs, centred under it; below, the
 * words and the phone. Screens push in sideways as the app's own screens do;
 * the titles slide up through a mask; each step's card springs off the phone
 * and drops away fast when the next one comes. Every state is a class, so a
 * quick scroll back and forth retargets mid-move instead of queueing.
 */
.story-intro {
  padding-top: clamp(56px, 7vw, 112px);
}

/* The frame's own top edge is the gap to the tabs. */
.story-intro .section-head {
  margin-bottom: 0;
}

.story-track {
  position: relative;
}

.js .story-track {
  height: calc(100svh + (var(--count) - 1) * 70svh);
}

.story-marker {
  position: absolute;
  left: 0;
  width: 1px;
  top: calc(var(--i) * 70svh);
  height: 70svh;
  pointer-events: none;
}

.story-marker:last-child {
  height: calc(100svh);
}

.story-sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  height: 100svh;
  padding-top: calc(var(--nav-h) + 8px);
  padding-bottom: 20px;
}

.story-side {
  display: contents;
}

/* The app's tabs: words, and a bar under the one that is showing. */
.story-tabs {
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--line);
}

.story-tabs::-webkit-scrollbar {
  display: none;
}

/* Centred while they fit; from the left once they scroll. */
.story-tabs-inner {
  position: relative;
  display: flex;
  gap: 2px;
  width: max-content;
  margin-inline: auto;
}

.story-tab {
  flex: none;
  padding: 12px 12px 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms var(--ease-out);
}

.story-tab[aria-selected='true'] {
  color: var(--accent);
}

.story-ink {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 340ms var(--ease-out);
}

.story-copy {
  display: grid;
}

.story-text {
  grid-area: 1 / 1;
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.story-text h3 {
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.5rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.story-text p {
  max-width: 31rem;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(0.9375rem, 0.9rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
}

/* On a phone the words stay short so the picture gets the room. */
@media (max-width: 1023px) {
  .story-sticky {
    gap: 12px;
    padding-bottom: 12px;
  }
  .story-text {
    gap: 8px;
  }
  .story-text h3 {
    font-size: clamp(1.6rem, 1rem + 3vw, 2.4rem);
  }
}

/* Words that slide into view through their own edge. */
.mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.mask > span {
  display: block;
}

.js .story-text .mask > span {
  transform: translateY(110%);
  transition: transform 260ms var(--ease-out);
}

.js .story-text.is-before .mask > span {
  transform: translateY(-110%);
}

.js .story-text.is-active .mask > span {
  transform: none;
  transition: transform 560ms var(--ease-out) 90ms;
}

.js .story-text.is-active p .mask > span {
  transition-delay: 150ms;
}

/* The phone takes whatever room the words leave, measured, not guessed. */
.story-phone {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  container-type: size;
}

.story-phone .device {
  --w: min(60vw, calc((100svh - var(--nav-h) - 290px) / 2.09));
}

@supports (width: 1cqh) {
  .story-phone .device {
    --w: min(76cqw, 340px, calc(97cqh / 2.09));
  }
}

/*
 * On a phone there is not room for the words and a whole phone, so the phone
 * is drawn big and runs off the foot of the screen, as in the app's own
 * onboarding; the cards that sat at the bottom of its screen come up to stay in view.
 */
@media (max-width: 1023px) {
  .story-phone {
    align-items: flex-start;
    margin-inline: calc(var(--gutter) * -1);
    overflow: hidden;
    container-type: normal;
    -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent);
    mask-image: linear-gradient(to bottom, #000 88%, transparent);
  }
  .story-phone .device {
    --w: min(76vw, 320px);
    margin-top: 6px;
  }
  .story .lift--route,
  .story .lift--turn,
  .story .lift--reward {
    top: 24%;
    bottom: auto;
  }
}

.story .screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.story .screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js .story .screen {
  transform: translateX(100%);
  transition: transform 480ms var(--ease-drawer);
}

.story .screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 480ms var(--ease-drawer);
}

.js .story .screen.is-before {
  z-index: 1;
  transform: translateX(-30%);
}

.story .screen.is-before::after {
  opacity: 0.5;
}

.story .screen.is-active,
.js .story .screen.is-active {
  z-index: 2;
  transform: none;
}

.js .story .lift {
  opacity: 0;
  transform: translateY(28px) scale(0.8);
  transition:
    opacity 120ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.js .story .lift.is-active {
  opacity: 1;
  transform: none;
  transition:
    opacity 160ms var(--ease-out) 200ms,
    transform 640ms var(--spring) 200ms;
}

.story .no-anim,
.story .no-anim *,
.story .no-anim::after {
  transition: none !important;
}

/* Wide: the tabs across the top, then the words, large, beside the phone. */
@media (min-width: 1024px) {
  .story-sticky {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: clamp(40px, 6vw, 96px);
    row-gap: 24px;
    padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 24px;
  }

  .story-tabs {
    grid-column: 1 / -1;
    margin-inline: 0;
    padding-inline: 0;
  }

  .story-copy {
    align-self: center;
  }

  .story-text {
    gap: 28px;
    justify-items: start;
    text-align: left;
  }

  .story-text h3 {
    font-size: clamp(3rem, 1rem + 3.6vw, 5rem);
  }

  .story-text p {
    max-width: 34rem;
    margin-inline: 0;
    font-size: clamp(1.1875rem, 0.8rem + 0.6vw, 1.4375rem);
  }

  .story-phone {
    align-items: center;
  }

  .story-phone .device {
    --w: min(340px, calc((100svh - var(--nav-h) - 130px) / 2.09));
  }
}

/* Where each lifted card sits on its screen. */
.lift--push {
  left: -13%;
  top: 5.5%;
  width: 126%;
}

.lift--route {
  left: -10%;
  bottom: 4%;
  width: 120%;
}

.lift--turn {
  left: -10%;
  bottom: 6%;
  width: 120%;
}

.lift--reward {
  left: 4%;
  bottom: 3%;
  width: 92%;
}

.lift--clip {
  left: -17%;
  top: 25%;
  width: 128%;
}

@media (prefers-reduced-motion: reduce) {
  .js .story .screen,
  .js .story .screen.is-before {
    transform: none;
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .js .story .screen.is-active {
    opacity: 1;
  }
  .js .story-text .mask > span,
  .js .story-text.is-before .mask > span {
    transform: none;
  }
  .js .story-text {
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .js .story-text.is-active {
    opacity: 1;
  }
  .js .story .lift,
  .js .story .lift.is-active {
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Ranks                                                                      */
/* -------------------------------------------------------------------------- */
.ranks .section-head {
  margin-bottom: clamp(32px, 5vw, 64px);
}

/* The climb: every rank a step higher than the last, in more of the brand's blue. */
.climb {
  --stair-base: #d9d4fb;
  display: grid;
  gap: 10px;
}

@media (prefers-color-scheme: dark) {
  .climb {
    --stair-base: #1c212a;
  }
}

.climb li {
  --tone: color-mix(in oklab, var(--blue) calc(14% + var(--i) * 10.75%), var(--stair-base));
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.climb img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.stair {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc(46% + var(--i) * 6.75%);
  min-height: 56px;
  padding: 10px 14px;
  color: #ffffff;
}

/* The lighter steps carry ink, in light mode only. */
@media not (prefers-color-scheme: dark) {
  .climb li:nth-child(-n + 3) .stair {
    color: var(--ink);
  }
}

.stair-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--tone);
  transform-origin: left center;
}

.stair-name {
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.15;
}

.stair-xp {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.88;
}

.ranks-note {
  max-width: 40rem;
  margin: 40px auto 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

@media (min-width: 900px) {
  .climb {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
  }

  .climb li {
    grid-template-columns: none;
    justify-items: center;
    gap: 14px;
  }

  .climb img {
    width: 84px;
    height: 88px;
  }

  .climb li:last-child img {
    width: 112px;
    height: 118px;
  }

  .stair {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    height: calc(88px + var(--i) * 30px);
    padding: 16px 6px;
    text-align: center;
  }

  .stair-fill {
    transform-origin: center bottom;
  }

  .stair-name {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .climb .stair-fill {
    transform: scaleX(0);
    transition: transform 720ms var(--ease-out) calc(var(--i) * 60ms);
  }
  @media (min-width: 900px) {
    .js .climb .stair-fill {
      transform: scaleY(0);
    }
  }
  .js .climb.is-in .stair-fill {
    transform: none;
  }
  .js .climb img {
    opacity: 0;
    transform: translateY(-28px) scale(0.7);
    transition:
      opacity 200ms var(--ease-out) calc(300ms + var(--i) * 60ms),
      transform 680ms var(--spring) calc(300ms + var(--i) * 60ms);
  }
  .js .climb.is-in img {
    opacity: 1;
    transform: none;
  }
  .js .climb .stair-name,
  .js .climb .stair-xp {
    opacity: 0;
    transition: opacity 320ms var(--ease-out) calc(420ms + var(--i) * 60ms);
  }
  .js .climb.is-in .stair-name {
    opacity: 1;
  }
  .js .climb.is-in .stair-xp {
    opacity: 0.88;
  }
}

/* -------------------------------------------------------------------------- */
/* Membership                                                                 */
/* -------------------------------------------------------------------------- */
.membership .section-head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* What every rider gets, before any plan. */
.free-panel {
  display: grid;
  gap: 22px;
  padding: 28px 24px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.free-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.free-head .plan-name {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.free-head span:not(.plan-name) {
  color: var(--muted);
  font-weight: 600;
}

.free-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.free-list li {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .free-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .free-panel {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
    align-items: center;
    padding: 32px 36px;
  }
}

.plan-name {
  display: block;
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1;
  text-transform: uppercase;
}

/* Monthly or yearly, as the app's own switch. */
.billing-row {
  display: flex;
  justify-content: center;
  margin: clamp(40px, 5vw, 56px) 0 24px;
}

.billing {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: 999px;
  background: var(--raise);
}

.billing button {
  position: relative;
  z-index: 1;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 220ms var(--ease-out);
}

.billing button[aria-pressed='true'] {
  color: var(--on-accent);
}

.billing-ink {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--accent);
  transition: transform 300ms var(--ease-out);
}

.billing[data-period='yearly'] .billing-ink {
  transform: translateX(100%);
}

.plan-cards {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .plan-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(26px, 3vw, 40px);
  background: var(--raise);
}

.plan--ultimate {
  background: var(--blue);
  color: #ffffff;
}

.plan-head {
  display: grid;
  gap: 8px;
}

.plan .plan-name {
  font-size: clamp(2.1rem, 1.6rem + 1.6vw, 2.9rem);
}

.plan-for {
  color: var(--muted);
}

.price {
  display: grid;
  gap: 8px;
}

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.price-amount {
  display: inline-block;
  font-size: clamp(2.75rem, 2.1rem + 2.2vw, 3.75rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 106%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-unit,
.price-note {
  display: inline-block;
  color: var(--muted);
}

.price-unit {
  font-weight: 650;
}

.price-note {
  font-size: 0.875rem;
}

.plan--ultimate .plan-for,
.plan--ultimate .price-unit,
.plan--ultimate .price-note {
  color: rgba(255, 255, 255, 0.84);
}

@media (prefers-reduced-motion: no-preference) {
  .roll {
    animation: roll 340ms var(--ease-out) both;
  }
}

@keyframes roll {
  from {
    opacity: 0;
    transform: translateY(40%);
  }
}

.perks {
  display: grid;
}

.perks li {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  line-height: 1.4;
}

.plan--ultimate .perks li {
  border-color: rgba(255, 255, 255, 0.24);
}

.perks strong {
  font-weight: 750;
}

.plan .btn {
  width: 100%;
  height: 58px;
  margin-top: auto;
  font-size: 1.0625rem;
}

.plan--ultimate .btn {
  background: #f4f6fb;
  color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .plan--ultimate .btn:hover {
    background: #e6e3fd;
  }
}

.pricing-fine {
  max-width: 46rem;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Safety                                                                     */
/* -------------------------------------------------------------------------- */
/* The rules riders can count on, on the brand's blue, said big. */
.safety {
  position: relative;
  overflow: hidden;
  padding-block: clamp(110px, 12vw, 180px);
}

.safety .section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
}

.safety-grid {
  display: grid;
  gap: 44px 80px;
}

@media (min-width: 900px) {
  .safety-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.safety-item {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: center;
  padding-top: 24px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
  text-align: center;
}

.safety-item h3 {
  font-size: clamp(2rem, 1.3rem + 2.3vw, 3rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.safety-item p {
  max-width: 31rem;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.0625rem;
}

@media (prefers-reduced-motion: no-preference) {
  .js .safety-item .mask > span {
    transform: translateY(110%);
    transition: transform 760ms var(--ease-out) calc(var(--i, 0) * 90ms);
  }
  .js .safety-item.is-in .mask > span {
    transform: none;
  }
  .js .safety-item p {
    opacity: 0;
    transition: opacity 500ms var(--ease-out) calc(200ms + var(--i, 0) * 90ms);
  }
  .js .safety-item.is-in p {
    opacity: 1;
  }
}

/* -------------------------------------------------------------------------- */
/* FAQ                                                                         */
/* -------------------------------------------------------------------------- */

.faq-layout {
  max-width: calc(820px + var(--gutter) * 2);
}

.faq-layout .section-head {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.faq-list details {
  border-top: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.faq-list summary .icon {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--accent);
  transition: transform 260ms var(--ease-out);
}

.faq-list details[open] summary .icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  color: var(--muted);
  max-width: 40rem;
}

.faq-answer a {
  color: var(--accent);
  font-weight: 600;
}

@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  @media (prefers-reduced-motion: no-preference) {
    .faq-list details::details-content {
      block-size: 0;
      overflow-y: clip;
      transition:
        block-size 320ms var(--ease-out),
        content-visibility 320ms allow-discrete;
    }
    .faq-list details[open]::details-content {
      block-size: auto;
    }
  }
}

/* -------------------------------------------------------------------------- */
/* The last word                                                               */
/* -------------------------------------------------------------------------- */

.closer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(110px, 12vw, 180px);
  padding-bottom: clamp(72px, 8vw, 120px);
}

.closer-grid {
  display: grid;
  gap: 36px;
  justify-items: center;
  text-align: center;
}

.closer-copy {
  display: grid;
  gap: 22px;
  justify-items: center;
}

.closer .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22.5%;
}

.qr {
  display: none;
}

@media (min-width: 1024px) and (pointer: fine) {
  .qr {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 22px;
    background: #f4f6fb;
    color: var(--ink);
  }
  .qr svg {
    width: 168px;
    height: 168px;
  }
  .qr p {
    font-size: 0.875rem;
    font-weight: 600;
  }
}

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

.footer {
  padding-block: 64px 40px;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 40px;
}

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

.footer-brand {
  display: grid;
  gap: 16px;
  align-content: start;
}

.footer-brand img {
  height: 26px;
  width: auto;
}

.footer-brand p {
  color: var(--muted);
  max-width: 22rem;
}

.footer h2 {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer ul {
  display: grid;
  gap: 8px;
}

.footer ul a {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .footer ul a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.footer-base {
  display: grid;
  gap: 8px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.logo-on-page-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-on-page-light {
    display: none;
  }
  .logo-on-page-dark {
    display: block;
  }
}

/* -------------------------------------------------------------------------- */
/* Pages under the main one                                                    */
/* -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 104px));
  padding-bottom: clamp(104px, 12vw, 176px);
}

.page-hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.page-hero .copy {
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
}

@media (min-width: 1024px) {
  .page-hero .copy {
    justify-items: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero .copy > * {
    animation: rise 900ms var(--ease-out) both;
  }
  .page-hero .copy > :nth-child(2) {
    animation-delay: 80ms;
  }
  .page-hero .copy > :nth-child(3) {
    animation-delay: 160ms;
  }
  .page-hero .copy > :nth-child(4) {
    animation-delay: 240ms;
  }
  .page-hero .hero-art {
    animation: card-land 1000ms var(--ease-out) 260ms both;
  }
}

.hero-art {
  width: 100%;
  max-width: 560px;
  height: auto;
  justify-self: center;
}

@media (min-width: 1024px) {
  .page-hero-grid--art {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

/* -------------------------------------------------------------------------- */
/* Brands                                                                      */
/* -------------------------------------------------------------------------- */

/* A pill with only an edge, for the second thing to press on the blue. */
.btn--ghost {
  background: transparent;
  color: #ffffff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
}

@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

.bhero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 128px));
  padding-bottom: clamp(120px, 13vw, 190px);
}

/* Words only, in the middle. */
.bhero .copy {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.bhero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.bhero h1 {
  font-size: clamp(2.75rem, 1rem + 6.6vw, 6rem);
}

.bhero h1 .line {
  display: block;
}

/* Two whole lines from a tablet up. */
@media (min-width: 768px) {
  .bhero h1 {
    font-size: min(6rem, 6.4vw);
  }
  .bhero h1 .line {
    white-space: nowrap;
  }
}

.bhero .lead {
  max-width: 38rem;
}

.bhero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* The options start right under the wave. */
.bhero + .section {
  padding-top: clamp(4px, 1.5vw, 24px);
}

/* Stacked on a phone, the two buttons match. */
.bhero-cta .btn {
  min-width: 220px;
  height: 56px;
  font-size: 1.0625rem;
}

@media (prefers-reduced-motion: no-preference) {
  .bhero .copy > * {
    animation: rise 800ms var(--ease-out) both;
  }
  .bhero .copy > :nth-child(2) {
    animation-delay: 70ms;
  }
  .bhero .copy > :nth-child(3) {
    animation-delay: 140ms;
  }
  .bhero .copy > :nth-child(4) {
    animation-delay: 210ms;
  }
}

/*
 * Ways to partner: four groups behind tabs, the app's own pills with a count,
 * one group's options at a time so the page stays short. Switching brings the
 * options up one after another.
 */
.tab-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

/* On a phone, one row that scrolls, as the app's chips do. */
@media (max-width: 767px) {
  .tab-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tab-row::-webkit-scrollbar {
    display: none;
  }
  .tab-row [role='tab'] {
    flex: none;
  }
}

.tab-row [role='tab'] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--raise);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.tab-row [role='tab']:active {
  transform: scale(0.97);
}

.tab-row [role='tab'][aria-selected='true'] {
  background: var(--accent);
  color: var(--on-accent);
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in oklab, currentColor 16%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel:focus-visible {
  outline-offset: 8px;
}

.panel-lead {
  max-width: 34rem;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.0625rem;
  text-align: center;
}

.panel-items {
  display: grid;
  column-gap: 56px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .panel-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* An odd one out takes the whole last row. */
  .panel-items > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.panel-items > li {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: center;
  padding-block: 26px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.panel-items h3 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1;
  text-transform: uppercase;
}

.panel-items p {
  max-width: 30rem;
  color: var(--muted);
}

.goals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.goals li {
  padding: 5px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  .tab-panel.is-entering .panel-items > li {
    animation: rise 420ms var(--ease-out) both;
    animation-delay: calc(var(--i) * 50ms);
  }
}

/* Headline partnerships: the big ones, on the brand's blue. */
.headline {
  position: relative;
  overflow: hidden;
  padding-block: clamp(110px, 12vw, 180px);
}

.headline-emblem {
  width: clamp(120px, 14vw, 170px);
  height: auto;
  margin-bottom: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  .js .headline-emblem {
    opacity: 0;
    transform: scale(0.7) rotate(-40deg);
    transition:
      opacity 300ms var(--ease-out),
      transform 900ms var(--spring);
  }
  .js .headline-emblem.is-in {
    opacity: 1;
    transform: none;
  }
}

.headline-grid {
  display: grid;
  gap: 40px 80px;
}

@media (min-width: 900px) {
  .headline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.headline-item {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  padding-top: 22px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
  text-align: center;
}

.headline-item h3 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.95;
  text-transform: uppercase;
}

.headline-item p {
  max-width: 30rem;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.0625rem;
}

@media (prefers-reduced-motion: no-preference) {
  .js .headline-item .mask > span {
    transform: translateY(110%);
    transition: transform 760ms var(--ease-out) calc(var(--i, 0) * 90ms);
  }
  .js .headline-item.is-in .mask > span {
    transform: none;
  }
  .js .headline-item p {
    opacity: 0;
    transition: opacity 500ms var(--ease-out) calc(200ms + var(--i, 0) * 90ms);
  }
  .js .headline-item.is-in p {
    opacity: 1;
  }
}


/* Start a partnership: the form on its own panel, on the brand's blue. */
/* Straight on from the headline band: one blue, divided by its line. */
.headline {
  padding-bottom: 0;
}

.headline + .start {
  padding-top: clamp(72px, 9vw, 128px);
}

.headline + .start .section-head {
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
}

.start {
  position: relative;
  overflow: hidden;
  padding-block: clamp(110px, 12vw, 170px);
}

.start-form {
  max-width: 820px;
  margin-inline: auto;
}

.start-alt {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.start-alt a {
  color: #ffffff;
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------- */
/* Forms                                                                       */
/* -------------------------------------------------------------------------- */

.form-layout {
  display: grid;
  gap: 64px;
}

@media (min-width: 1024px) {
  .form-layout {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(48px, 7vw, 112px);
  }
  .form-layout > .form-side {
    order: -1;
  }
}

/*
 * A form is groups, each under a short heading with a line above it. Fields
 * are filled, as the app's are; a field in use gets a line along its foot in
 * the accent, which moves rather than blinks on.
 */
.form {
  --field: var(--raise);
  --field-focus: color-mix(in oklab, var(--raise) 70%, var(--line));
  --ink-field: var(--text);
  --label: var(--text);
  --soft: var(--muted);
  --mark: var(--accent);
  --bad: var(--danger);
  --rule: var(--line);
  --pill-on: var(--accent);
  --pill-on-ink: var(--on-accent);
  display: grid;
  gap: 40px;
}

/*
 * A form that has to be seen: a light card on the brand's blue, the same in
 * both themes as the blue is, with the brand's blue for what is chosen.
 */
.form-card {
  padding: clamp(22px, 4vw, 52px);
  background: #f4f6fb;
  color: #12141a;
}

.form-card .form {
  --field: #e4e8f1;
  --field-focus: #dbe0ec;
  --ink-field: #12141a;
  --label: #12141a;
  --soft: #5a6373;
  --mark: #2e1be6;
  --bad: #c42532;
  --rule: #d4d9e5;
  --pill-on: #2e1be6;
  --pill-on-ink: #ffffff;
}

.form-card :focus-visible {
  outline-color: #2e1be6;
}

.form-card .btn--send {
  background: #2e1be6;
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .form-card .btn--send:hover {
    background: #2413c4;
  }
}

.form-card .form-status {
  background: #e6e3fd;
}

.form-card .form-status p {
  color: #12141a;
}

.form-card .form-status .btn--quiet {
  color: #12141a;
  box-shadow: inset 0 0 0 1.5px #c9cfdc;
}

/* The card's first group needs no line over it: the card's edge is one. */
.form-card .form-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.form-group {
  display: grid;
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 26px 0 0;
  border: 0;
  border-top: 1.5px solid var(--rule);
}

.form-group > legend {
  float: left;
  width: 100%;
  margin-bottom: 2px;
  padding: 0;
  color: var(--label);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1.1;
  text-transform: uppercase;
}

/* The float takes the legend out of the fieldset's edge; this puts the rows back under it. */
.form-group > legend + * {
  clear: both;
}

.form-row {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field label,
.choices legend {
  color: var(--label);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field .optional,
.choices .optional {
  color: var(--soft);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 60px;
  padding: 17px 18px;
  border: 0;
  border-radius: 0;
  background: var(--field);
  color: var(--ink-field);
  box-shadow: inset 0 -2px 0 transparent;
  font-size: 1.0625rem;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.field textarea {
  min-height: 176px;
  resize: vertical;
}

.field ::placeholder {
  color: var(--soft);
  opacity: 0.8;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--field-focus);
  box-shadow: inset 0 -3px 0 var(--mark);
}

.field [aria-invalid='true'] {
  box-shadow: inset 0 -3px 0 var(--bad);
}

/* A browser's own fill colour for remembered details would sit wrong on either surface. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink-field);
  box-shadow: inset 0 0 0 100px var(--field);
  caret-color: var(--ink-field);
}

.select {
  position: relative;
}

.select select {
  padding-right: 48px;
  cursor: pointer;
}

.select .icon {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.hint {
  color: var(--soft);
  font-size: 0.875rem;
}

.error {
  color: var(--bad);
  font-size: 0.875rem;
  font-weight: 650;
}

.error:empty {
  display: none;
}

/* A choice of one, as pills: filled like the fields, the chosen one in the accent. */
.choices {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choices legend {
  float: left;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
}

.choice-row {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink-field);
  font-size: 0.9375rem;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.choice input:active + span {
  transform: scale(0.97);
}

.choice input:checked + span {
  background: var(--pill-on);
  color: var(--pill-on-ink);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
}

.form-actions {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.btn--send {
  width: 100%;
  max-width: 420px;
  height: 60px;
  font-size: 1.125rem;
}

.form-status {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 24px;
  background: var(--accent-soft);
  text-align: center;
}

.form-status[hidden] {
  display: none;
}

.form-status p {
  color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  .form-status:not([hidden]) {
    animation: rise 520ms var(--ease-out) both;
  }
}

/* The list of inboxes beside a form. */
.inboxes {
  display: grid;
  gap: 0;
}

.inbox {
  display: grid;
  gap: 6px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.inbox:last-child {
  border-bottom: 1px solid var(--line);
}

.inbox h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}

.inbox p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.inbox a {
  color: var(--accent);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.address {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.6;
}

.copy-btn {
  height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------------- */
/* Contact                                                                     */
/* -------------------------------------------------------------------------- */

.contact-top {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(120px, 13vw, 190px);
}

.contact-grid {
  display: grid;
  grid-template-areas: 'intro' 'form' 'more';
  gap: 40px;
}

.contact-intro {
  grid-area: intro;
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
}

.contact-grid > .form-card {
  grid-area: form;
}

.contact-more {
  grid-area: more;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    grid-template-areas: 'intro form' 'more form';
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: clamp(48px, 6vw, 96px);
  }
  .contact-intro {
    justify-items: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .contact-intro > * {
    animation: rise 800ms var(--ease-out) both;
  }
  .contact-intro > :nth-child(2) {
    animation-delay: 80ms;
  }
  .contact-grid > .form-card {
    animation: card-land 900ms var(--ease-out) 180ms both;
  }
}

/* The inboxes, on the blue. */
.on-blue .inbox {
  border-color: rgba(255, 255, 255, 0.25);
}

.on-blue .inbox h3 {
  color: #ffffff;
}

.on-blue .inbox p,
.on-blue .address {
  color: rgba(255, 255, 255, 0.82);
}

.on-blue .inbox a {
  color: #ffffff;
}


/* -------------------------------------------------------------------------- */
/* Not found                                                                   */
/* -------------------------------------------------------------------------- */

.lost {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: calc(var(--nav-h) + 48px) 120px;
}

.lost .copy {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}


.nb {
  white-space: nowrap;
}

/* A field for bots only: out of sight, out of the tab order, read out to nobody. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}
