/*
 * Kiaido landing page.
 * Tokens mirror mobile/src/theme/theme.ts: true black, white at alpha steps, one family
 * at one weight, ember only as light (the sunrise and the orb), never as UI colour.
 */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/Archivo_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/Archivo_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour — theme.ts `color`, `alpha`, `semantic` */
  --black: #000;
  --white: #fff;
  --a04: rgba(255, 255, 255, 0.04);
  --a12: rgba(255, 255, 255, 0.12);
  --a20: rgba(255, 255, 255, 0.2);
  --a40: rgba(255, 255, 255, 0.4);
  --a60: rgba(255, 255, 255, 0.6);
  --a80: rgba(255, 255, 255, 0.8);
  --ember200: #e4813c;
  --ember300: #c86a2a;
  --ember400: #a8471b;
  --ember600: #4a1a08;
  --ember800: #120703;

  /* type — five levels only, see CLAUDE.md. Regular (400) except where noted */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: clamp(2.75rem, 1.5rem + 5vw, 5rem); /* the hero headline only, in Medium */
  --heading: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); /* every headline, statement and figure */
  --subheading: clamp(1.25rem, 1.15rem + 0.3vw, 1.375rem); /* 20 to 22, Medium: the top bar, titles over a short paragraph */
  --body: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem); /* 18 to 20: paragraphs, ledes, quotes */
  --small: 0.875rem; /* 14: labels, citations, buttons, footer */

  /* space — theme.ts `space` */
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --s16: 64px;
  --section: clamp(96px, 12vw, 176px);
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 34rem;
  --nav-h: 78px;
  --nav-top: 12px;

  /* motion — theme.ts `easing.calm` */
  --calm: cubic-bezier(0.22, 0.61, 0.36, 1);
  --quick: 240ms;
  --settle: 480ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor jumps (#download) land below the fixed nav, not under it */
  scroll-padding-top: calc(var(--nav-h) + var(--nav-top) * 2);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  /* Presses show their own feedback (:active), not iOS's grey box. */
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
  font-weight: 400;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: var(--s3) var(--s4);
  background: var(--black);
  border: 1px solid var(--a80);
  border-radius: 999px;
  z-index: 10;
}
.skip:focus {
  top: var(--s4);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.display,
.why-line {
  text-wrap: balance;
}

.display {
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.label {
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
}

.lede {
  color: var(--a60);
  max-width: var(--measure);
}

/* ---------- pill: the app's PillButton, hairline ring, never filled ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s6);
  border: 1px solid var(--a80);
  border-radius: 999px;
  font-size: var(--small);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform var(--quick) var(--calm), opacity var(--quick) var(--calm);
}
.pill:active {
  transform: scale(0.97);
  opacity: 0.6;
  /* In at once on press, back out at the normal pace on release. */
  transition-duration: 80ms;
}
.pill svg {
  width: 18px;
  height: 18px;
}

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

/*
 * A floating pane of dark glass pinned to the top: the page scrolls under it, blurred.
 * The pane is drawn by .wrap::before, inset 16px outside the content edge, so the brand
 * and the pill still line up with the page's text column.
 */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 5;
  padding-top: calc(env(safe-area-inset-top) + var(--nav-top));
  pointer-events: none;
}
.nav .wrap {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  pointer-events: auto;
}
.nav .wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 max(8px, calc(var(--gutter) - 16px));
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.9);
  /* A hairline rim; no highlights or colour boost, so the hero's light doesn't turn the
     bar orange and compete with the orb. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav .wrap::before {
    background: rgba(14, 14, 14, 0.7);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
/* The nav's one action, filled solid white so it reads before anything else in the bar. */
.nav .pill {
  min-height: 52px;
  padding: 0 var(--s6);
  margin-right: -4px;
  border: 0;
  background: var(--white);
  color: var(--black);
  font-size: var(--subheading);
  font-weight: 500;
  letter-spacing: 0;
}
@media (hover: hover) {
  .nav .pill:hover {
    background: var(--a80);
  }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  font-size: var(--subheading);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

/* ---------- store badges ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}
.store {
  display: block;
  border-radius: 9px;
  transition: transform var(--quick) var(--calm), opacity var(--quick) var(--calm);
}
.store:active {
  transform: scale(0.97);
  opacity: 0.6;
  transition-duration: 80ms;
}
/* No store link yet (site.js): not a link, so no press. */
.store.soon {
  cursor: default;
}
.store.soon:active {
  transform: none;
  opacity: 1;
}
/* Same height for both. Google Play ends up a little wider than the App Store badge,
   which keeps it at least as large, as its guidelines ask. */
.store img {
  height: 52px;
  width: auto;
}

.reassure {
  margin-top: var(--s4);
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
}

/* ---------- device frame ---------- */

/*
  Apple's official iPhone 17 bezel (Apple Design Resources, Black, portrait) laid over the
  screenshot. The bezel PNG is 1350 x 2760 and its screen opening is exactly 1206 x 2622 at
  (72, 69), the simulator's resolution, so the screenshot sits in it with no scaling.
*/
.phone {
  position: relative;
  margin: 0;
  width: var(--phone-w, 300px);
  aspect-ratio: 1350 / 2760;
  flex: none;
}
.phone img {
  position: absolute;
  left: calc(72 / 1350 * 100%);
  top: calc(69 / 2760 * 100%);
  width: calc(1206 / 1350 * 100%);
  height: calc(2622 / 2760 * 100%);
  object-fit: cover;
  /* Rounded just enough that the square corners stay under the bezel. */
  border-radius: 16.6% / 7.6%;
  background: var(--black);
}
/* A phone with data-cycle shows each nudge type in turn: the later screens fade in over the first (site.js). */
.phone img.cycle {
  opacity: 0;
  transition: opacity 900ms var(--calm);
}
.phone img.cycle.on {
  opacity: 1;
}
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/iphone-17-bezel.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}

/*
  .p3d: the same bezel as the front face of a 3D phone, on a metal band of stacked 1px
  layers that site.js adds behind it. Here the figure is the phone body: inside the bezel
  PNG it spans (28, 26) to (1322, 2733), so 1294 x 2707, which puts the screen opening at
  (44, 43). The bezel is clipped to the body so its flat side buttons don't stick out; the
  band's buttons replace them. Without JS the phone still shows, tilted, without its side.
*/
.phone.p3d {
  /* The pose, close to a hand holding it up: top leaning back and to the left. */
  --rx: 8deg;
  --ry: 16deg;
  --rz: -7deg;
  aspect-ratio: 1294 / 2707;
  transform-style: preserve-3d;
  transform: perspective(1800px) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
}
.phone.p3d img {
  left: calc(44 / 1294 * 100%);
  top: calc(43 / 2707 * 100%);
  width: calc(1206 / 1294 * 100%);
  height: calc(2622 / 2707 * 100%);
  transform: translateZ(0.5px);
}
.phone.p3d img.cycle {
  transform: translateZ(0.6px);
}
.phone.p3d::after {
  inset: auto;
  left: calc(-28 / 1294 * 100%);
  top: calc(-26 / 2707 * 100%);
  width: calc(1350 / 1294 * 100%);
  height: calc(2760 / 2707 * 100%);
  clip-path: inset(calc(26 / 2760 * 100%) calc(28 / 1350 * 100%));
  transform: translateZ(1px);
}
/* Glass reflection across the screen. */
.phone.p3d .glare {
  position: absolute;
  left: calc(44 / 1294 * 100%);
  top: calc(43 / 2707 * 100%);
  width: calc(1206 / 1294 * 100%);
  height: calc(2622 / 2707 * 100%);
  border-radius: 16.6% / 7.6%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 28%, transparent 45%);
  transform: translateZ(1.2px);
  pointer-events: none;
}
/* The metal band (site.js): the same rounded slab, 1px per layer, stacked behind the face. */
.phone.p3d .edge {
  position: absolute;
  inset: 0;
  /* Matches the bezel's outer corner (255 x 274 px of the 1294 x 2707 body). */
  border-radius: 19.7% / 10.1%;
  transform: translateZ(calc((var(--i) - 1) * -1px));
}
/* Side buttons and antenna lines on the band; size and shade set per layer in site.js. */
.phone.p3d .edge i,
.phone.p3d .antenna {
  position: absolute;
  border-radius: 1px;
}
.phone.p3d .antenna {
  transform: translateZ(1.3px);
}

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

.hero {
  position: relative;
  min-height: min(100svh, 940px);
  display: flex;
  align-items: center;
  padding: 120px 0 var(--s16);
  overflow: hidden;
  /* Clip sideways only: the orb's field runs past the hero's foot and dies out over the
     next section, as it dies out at the screen's edge in the app, instead of being cut
     off in a line. */
  overflow: clip visible;
  /* The download section's light, mirrored: rising from the bottom there, falling from
     the top here. */
  background: radial-gradient(
    90% 70% at 50% -12%,
    #c86a2a 0%,
    #a8471b 14%,
    #4a1a08 34%,
    #120703 56%,
    #000 76%
  );
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: var(--s12);
}
.hero h1 {
  font-size: var(--display);
  font-weight: 500;
  max-width: 14ch;
}
.hero .lede {
  margin-top: var(--s6);
  color: var(--a80);
}
.hero .stores {
  margin-top: var(--s8);
}
/*
 * The app's idle orb (mobile/src/features/nudge/nudge-orb.tsx), at the app's proportions.
 * --orb is the composition box (`orb.cradle`, 352pt in the app); every other size is a
 * fraction of it, so the whole thing scales as one.
 *
 *   field  `gradient.orbField`, the ambient heat. Window-sized in the app (~844pt across)
 *   glow   `gradient.orb`, 320pt, struck at cy 0.46 with a closest-side extent
 *   halo   `sweep.orbHalo`, 308pt, lifted by `orb.opticalRise` (12.8pt) onto the light
 */
.hero-orb {
  --orb: clamp(300px, 34vw, 460px);
  --rise: calc(var(--orb) * -12.8 / 352);
  position: relative;
  justify-self: center;
  width: var(--orb);
  height: var(--orb);
}
/* Centred with `translate`, which composes under `transform`, so the beat and the spin
   can animate `transform` freely. The field is far wider than the box and spills out. */
.hero-orb > * {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  pointer-events: none;
}
.orb-field {
  width: calc(var(--orb) * 844 / 352);
  aspect-ratio: 1;
  transform: translateY(var(--rise));
  background: radial-gradient(
    circle closest-side,
    rgba(255, 105, 55, 0.32) 0%,
    rgba(215, 80, 42, 0.29) 35%,
    rgba(190, 70, 40, 0.245) 50%,
    rgba(160, 58, 34, 0.185) 66%,
    rgba(120, 42, 22, 0.105) 82%,
    rgba(80, 26, 13, 0.04) 93%,
    rgba(60, 20, 10, 0) 100%
  );
}
.orb-glow {
  width: calc(var(--orb) * 320 / 352);
  aspect-ratio: 1;
  opacity: 0.86;
  background: radial-gradient(
    circle closest-side at 50% 46%,
    #dfa584 0%,
    #de9a76 13%,
    #db845d 26%,
    #d76f48 39%,
    #c75836 54%,
    #9a3c25 70%,
    rgba(96, 36, 23, 0.82) 83%,
    rgba(86, 33, 20, 0.5) 90%,
    rgba(72, 28, 17, 0.22) 96%,
    rgba(60, 22, 14, 0) 100%
  );
  animation: orb-beat 1700ms infinite;
}
.orb-halo {
  width: calc(var(--orb) * 308 / 352);
  height: auto;
  transform: translateY(var(--rise));
  animation: orb-spin 4000ms linear infinite;
}

/* Off screen, the orb holds still (site.js). */
.hero-orb.paused > * {
  animation-play-state: paused;
}

/* `BEAT` from nudge-orb.tsx: two thumps close together, then a long rest. Every leg on
   `easing.inOut`, as withTiming runs each leg of the sequence. */
@keyframes orb-beat {
  0%,
  7%,
  15%,
  24%,
  40% {
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  0% {
    transform: scale(1);
    opacity: 0.86;
  }
  7% {
    transform: scale(1.05);
    opacity: 0.96;
  }
  15% {
    transform: scale(1.01);
    opacity: 0.88;
  }
  24% {
    transform: scale(1.08);
    opacity: 1;
  }
  40%,
  100% {
    transform: scale(1);
    opacity: 0.86;
  }
}

/* Translate first, so the arc turns about its own centre and that centre is what moves
   up onto the light: the same order as the app's spinStyle. */
@keyframes orb-spin {
  from {
    transform: translateY(var(--rise)) rotate(0deg);
  }
  to {
    transform: translateY(var(--rise)) rotate(360deg);
  }
}

/* ---------- why: three statements and the answer, one at a time ---------- */

/*
 * Plain (no JS, reduced motion): the four frames stack, centred.
 * .play (site.js): the section grows by --why-scroll and the stage pins under the nav
 * while that stretch scrolls by. All four frames share one spot; site.js marks the
 * current one .in and the earlier ones .past, so each fades up and out as the next rises
 * in, its figure a beat behind the statement. The answer stays, in the orb's ember light.
 */
.why {
  position: relative;
  padding: var(--section) 0;
  overflow-x: clip;
}
.why .wrap {
  display: grid;
  justify-items: center;
  row-gap: var(--section);
  text-align: center;
}
.why-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.why-line {
  max-width: 24ch;
  font-size: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* The figure under each statement: a hairline, the number in warm light, a short note. */
.why-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--s12);
}
.why-stat::before {
  content: "";
  width: 1px;
  height: var(--s12);
  margin-bottom: var(--s6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--a40));
}
.why-figure {
  font-size: var(--heading);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.why-note {
  max-width: 30ch;
  margin-top: var(--s3);
  color: var(--a60);
  text-wrap: balance;
}

.why-answer {
  position: relative;
  isolation: isolate;
}
.why-answer::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(1100px, 180vw);
  aspect-ratio: 1.9;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(
      closest-side,
      rgba(255, 196, 150, 0.1),
      rgba(255, 196, 150, 0) 35%
    ),
    radial-gradient(
      closest-side,
      rgba(234, 112, 64, 0.48),
      rgba(196, 78, 44, 0.22) 42%,
      rgba(96, 32, 12, 0.08) 72%,
      rgba(0, 0, 0, 0) 100%
    );
  pointer-events: none;
}

.why.play {
  padding: 0;
  height: calc(100svh + var(--why-scroll));
}
.why.play .why-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-items: center;
  /* Centre in the space under the nav, not the whole screen. */
  padding-top: calc(var(--nav-h) + var(--nav-top) * 2);
}
.why.play .wrap {
  grid-template-areas: "slot";
}
.why.play .why-frame {
  grid-area: slot;
  pointer-events: none;
}
.why.play .why-frame.in {
  pointer-events: auto;
}
/* The answer has no figure, so it sits in the middle of the slot, inside its own light. */
.why.play .why-answer {
  align-self: center;
}
.why.play .why-line,
.why.play .why-stat {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 400ms var(--calm),
    transform 400ms var(--calm);
}
.why.play .why-frame.in .why-line,
.why.play .why-frame.in .why-stat {
  opacity: 1;
  transform: none;
}
/* Coming in, the figure follows the statement; going out, they leave together. */
.why.play .why-frame.in .why-stat {
  transition-delay: 120ms;
}
.why.play .why-frame.past .why-line,
.why.play .why-frame.past .why-stat {
  transform: translateY(-28px);
}
/* The answer's light fades with it. */
.why.play .why-answer::before {
  opacity: 0;
  transition: opacity 600ms var(--calm);
}
.why.play .why-answer.in::before {
  opacity: 1;
}

/* ---------- steps ---------- */

.how-title {
  font-size: var(--heading);
  max-width: 14ch;
  margin-bottom: var(--s8);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  padding-bottom: calc(var(--section) * 0.55);
  border-top: 1px solid var(--a12);
}
/* The tab: what stays visible of a step once the next one slides over it. */
.step-tab {
  display: flex;
  align-items: center;
  gap: var(--s6);
  height: var(--tab, 64px);
  margin: 0;
  font-size: var(--subheading);
  font-weight: 500;
  color: var(--a80);
}
.step-num {
  color: var(--a60);
  font-variant-numeric: tabular-nums;
}
.step-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s12);
  padding-top: calc(var(--section) * 0.3);
}
.step:nth-child(even) .step-copy {
  order: 2;
}
.step h3 {
  font-size: var(--heading);
  max-width: 14ch;
}
.step-copy p {
  margin-top: var(--s6);
}
.step-devices {
  --phone-w: clamp(220px, 25vw, 340px);
}
.step-devices .phones {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* The second phone stands in front, a little to the right and lower, in the same pose. */
.step-devices.pair .phone + .phone {
  margin-left: calc(var(--phone-w) * -0.08);
  margin-top: calc(var(--phone-w) * 0.1);
}

/*
  Stacked steps (motivation.app's "01 Be positive" pattern): each step is a sticky card that
  stops one tab lower than the one before, so the next card slides up over it and closes it
  down to its tab. Every card is sized to fit under the full stack of tabs, phones included,
  so nothing is ever cut off while stuck. Only where the viewport is big enough to hold a
  whole card; smaller screens keep the plain list.
*/
@media (min-width: 861px) and (min-height: 640px) {
  /* The heading sticks too, on top of the stack; the cards stop below it. */
  .how {
    /* Tabs are kept short so the open card has room for whole phones big enough to read. */
    --tab: 48px;
    /* Tabs stacked above the last card: one per earlier step. */
    --tabs: 4;
    --head: calc(var(--heading) * 1.04 + var(--s4) * 2);
    --stack-top: calc(var(--nav-h) + var(--nav-top) * 2 + var(--head));
    --card-h: calc(100vh - var(--stack-top) - var(--tabs) * var(--tab));
    --card-h: calc(100svh - var(--stack-top) - var(--tabs) * var(--tab));
  }
  .how-title {
    position: sticky;
    z-index: 1;
    top: calc(var(--nav-h) + var(--nav-top) * 2);
    display: flex;
    align-items: center;
    height: var(--head);
    max-width: none;
    margin-bottom: 0;
    background: var(--black);
  }
  /*
    The hold: empty room after the last card, inside the list, so the heading and the whole
    stack stay pinned with the last card open for this much scrolling before they leave together.
    (A spacer, not padding: sticky boxes stop at their container's content edge.)
  */
  .steps::after {
    content: "";
    display: block;
    height: 50vh;
  }
  /*
    Leaving together. Every card reaches down to the viewport's bottom edge (earlier cards
    are taller by the tabs below them), so the list's end pushes them all up at once. The
    heading's container is cut short by the same full-stack height (negative margin, given
    back as padding) so it is released at that same scroll position.
  */
  .how .wrap {
    padding-bottom: calc(var(--card-h) + var(--tabs) * var(--tab));
  }
  .steps {
    margin-bottom: calc(-1 * (var(--card-h) + var(--tabs) * var(--tab)));
  }
  .step {
    position: sticky;
    top: calc(var(--stack-top) + var(--i, 0) * var(--tab));
    display: flex;
    flex-direction: column;
    height: calc(var(--card-h) + (var(--tabs) - var(--i, 0)) * var(--tab));
    padding: 0 var(--s8);
    background: var(--black);
    border: 1px solid var(--a12);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
  }
  .step:nth-child(2) {
    --i: 1;
  }
  .step:nth-child(3) {
    --i: 2;
  }
  .step:nth-child(4) {
    --i: 3;
  }
  .step:nth-child(5) {
    --i: 4;
  }
  /* A tap on a tab brings its card back open (site.js). */
  .step-tab {
    cursor: pointer;
    transition: color var(--quick) var(--calm);
  }
  @media (hover: hover) {
    .step-tab:hover {
      color: var(--white);
    }
  }
  .step-body {
    /* Dims and sinks back as the next card covers it (site.js). */
    transform-origin: 50% 0;
    flex: none;
    height: calc(var(--card-h) - var(--tab));
    min-height: 0;
    padding: 0 0 var(--s8);
  }
  /*
    Phones are shown whole and as big as the card allows: a phone stands about 2.05
    phone-widths tall in its pose, a pair 2.15 (the second phone drops 0.1). Width is also
    capped by the column so a pair (about 1.9 phone-widths across) still fits.
  */
  .step-devices {
    --room: calc(var(--card-h) - var(--tab) - var(--s4) * 2);
    container-type: inline-size;
    align-self: center;
    --phone-w: min(calc(var(--room) / 2.05), 62cqi, 440px);
  }
  .step-devices.pair {
    --phone-w: min(calc(var(--room) / 2.15), 52cqi, 400px);
  }
}

/* ---------- honest reassurances ---------- */

.promises {
  padding: var(--section) 0;
  border-top: 1px solid var(--a12);
}
.promises h2 {
  font-size: var(--heading);
  max-width: 14ch;
}
.promise-list {
  list-style: none;
  margin: var(--s12) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s12);
}
.promise-list li {
  padding: var(--s6) 0;
  border-bottom: 1px solid var(--a12);
}
.promise-list h3 {
  font-size: var(--subheading);
  font-weight: 500;
}
.promise-list p {
  margin-top: var(--s2);
  color: var(--a60);
  max-width: 34ch;
}

/* ---------- download ---------- */

.download {
  position: relative;
  overflow: hidden;
  padding: var(--section) 0;
  text-align: center;
  background: radial-gradient(
    90% 70% at 50% 112%,
    #c86a2a 0%,
    #a8471b 14%,
    #4a1a08 34%,
    #120703 56%,
    #000 76%
  );
}
.download .wrap {
  position: relative;
}
.download-icon {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto var(--s12);
  border-radius: 27px;
  box-shadow:
    0 0 0 1px var(--a12),
    0 24px 60px -12px rgb(0 0 0 / 0.8);
}
.download h2 {
  font-size: var(--heading);
  max-width: 34ch;
  margin: 0 auto;
}
.download h2 span {
  /* one sentence per line where it fits */
  display: inline-block;
}
.download .lede {
  margin: var(--s6) auto 0;
  color: var(--a80);
}
.download .stores {
  justify-content: center;
  margin-top: var(--s8);
}

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

.footer {
  padding: var(--s12) 0;
  border-top: 1px solid var(--a12);
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s8);
  align-items: center;
  justify-content: space-between;
}
.footer nav {
  display: flex;
  gap: var(--s6);
}
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--a80);
}
@media (hover: hover) {
  .footer a:hover {
    color: var(--white);
  }
}

/* ---------- tablet & down ---------- */

@media (max-width: 860px) {
  .hero {
    min-height: auto;
    padding-top: 112px;
  }
  .hero .wrap,
  .step-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1 {
    max-width: 14ch;
  }
  .hero-orb {
    margin-top: var(--s8);
    --orb: min(88vw, 360px);
  }
  .step:nth-child(even) .step-copy {
    order: 0;
  }
  .step-devices {
    --phone-w: min(60vw, 300px);
  }
  .step-devices.pair {
    --phone-w: min(44vw, 260px);
  }
  .promise-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .store img {
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
  /* The phones still show each activity, by a short cross-fade instead of a slow one. */
  .phone img.cycle {
    transition-duration: 200ms !important;
  }
}

/* Solid chrome for people who turn transparency off. */
@media (prefers-reduced-transparency: reduce) {
  .nav .wrap::before {
    background: #0e0e0e;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* More contrast: a firmer nav edge and lighter grey text. */
@media (prefers-contrast: more) {
  .nav .wrap::before {
    background: #0e0e0e;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: inset 0 0 0 1px var(--a60);
  }
  :root {
    --a60: rgba(255, 255, 255, 0.8);
    --a12: rgba(255, 255, 255, 0.3);
  }
}

/* ---------- text pages (privacy, support) ---------- */

.doc {
  padding: 140px 0 var(--section);
}
.doc .wrap {
  max-width: calc(40rem + 2 * var(--gutter));
}
.doc h1 {
  font-size: var(--heading);
}
.doc .updated {
  margin-top: var(--s4);
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
}
.doc h2 {
  margin-top: var(--s12);
  font-size: var(--subheading);
  font-weight: 500;
}
.doc p,
.doc li {
  color: var(--a80);
  line-height: 1.6;
}
.doc p {
  margin-top: var(--s4);
}
.doc ul {
  margin: var(--s4) 0 0;
  padding-left: 1.2em;
}
.doc li + li {
  margin-top: var(--s2);
}
.doc a {
  text-underline-offset: 3px;
}
.doc .pill {
  margin-top: var(--s6);
}

/* ---------- proof (rendered from PROOF in site.js, hidden while empty) ---------- */

.proof {
  padding: var(--section) 0;
  border-top: 1px solid var(--a12);
}
.proof[hidden] {
  display: none;
}
.proof h2 {
  font-size: var(--heading);
  max-width: 14ch;
}
.rating {
  display: inline-flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s8);
  text-decoration: none;
}
.rating[hidden] {
  display: none;
}
.rating-figure {
  font-size: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1;
}
.rating-note {
  color: var(--a60);
  font-size: var(--small);
  letter-spacing: 0.01em;
}
.quotes {
  list-style: none;
  margin: var(--s12) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--s8) var(--s12);
}
.quote {
  border-top: 1px solid var(--a40);
  padding-top: var(--s6);
}
.quote blockquote {
  margin: 0;
  font-size: var(--body);
}
.quote-who {
  margin-top: var(--s4);
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
}
.press {
  list-style: none;
  margin: var(--s12) 0 0;
  padding: 0;
}
.press a {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s6);
  padding: var(--s4) 0;
  min-height: 44px;
  border-bottom: 1px solid var(--a12);
  text-decoration: none;
}
.press-outlet {
  min-width: 10rem;
  font-size: var(--small);
  letter-spacing: 0.01em;
  color: var(--a60);
  padding-top: 4px;
}
.press-headline {
  font-size: var(--body);
}
