/* Settled website
   Colours, type and motion follow the app (docs/design/handoff.md, the App Reference Figma file).
   Three faces, like the app: the system font (SF Pro on Apple devices) for reading text,
   a wide bold face for the one display line per section (the web stand-in for SF Pro Expanded),
   and Newsreader for numbers. */

@font-face {
  font-family: "Mona Sans";
  src: url("assets/fonts/mona-sans-expanded.woff2") format("woff2");
  font-weight: 600 800;
  font-stretch: 112.5% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-numbers.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+2E, U+30-39; /* digits and the full stop only */
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-wordmark.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Colour: the app's dark palette */
  --canvas: #161616;
  --surface: #222222;
  --elevated: #2c2c2c;
  --text: #f2eadf;
  --text-2: #a3a09b;
  --text-3: #6f6c67;
  --hairline: #333333;
  --accent: #ffc93c;          /* Popcorn Yellow */
  --accent-hover: #ffd564;
  --on-accent: #161616;
  --error: #ee6e61;
  --success: #5fbf85;
  /* The ticket at the end uses the light palette */
  --ivory: #f2eadf;
  --ink: #161616;
  --ink-2: #5f5b56;
  --paper-line: #ded6c9;

  /* Type */
  --font-ui: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Mona Sans", var(--font-ui);
  --font-number: "Newsreader", "New York", Georgia, serif;
  --font-wordmark: "Figtree", var(--font-ui);

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 240ms;
  --dur-4: 300ms;
  --dur-5: 500ms;
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);

  /* Layout */
  --gutter: 16px;
  --container: 1160px;
  --nav-h: 64px;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1000px) { :root { --gutter: 40px; } }

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

html {
  background: var(--canvas);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--font-ui);
  letter-spacing: -0.01em;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; }
a { color: inherit; }

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

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -200%;
}
.skip:focus { translate: 0 0; }

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

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

h1, h2, .steps__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2, .steps__title {
  font-size: clamp(1.75rem, 1.1rem + 2.9vw, 3rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* The small caps label above a heading, with the yellow "rest line" under it. */
.eyebrow {
  display: inline-block;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left center;
}
.eyebrow--ink { color: var(--ink-2); }
.eyebrow--ink::after { background: var(--ink); }

.num {
  font-family: var(--font-number);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}

.section__head { display: grid; gap: 16px; justify-items: start; }
.section__head--center { justify-items: center; text-align: center; }
.section__head--center .eyebrow::after { margin-inline: auto; transform-origin: center; }

.section {
  position: relative;
  padding-block: clamp(88px, 12vw, 168px);
  overflow: clip;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1.0625rem/1 var(--font-ui);
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: background-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.btn:disabled { cursor: default; opacity: 0.6; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ink { background: var(--ink); color: var(--ivory); }
@media (hover: hover) {
  .btn--primary:not(:disabled):hover { background: var(--accent-hover); }
  .btn--ink:not(:disabled):hover { background: #2c2c2c; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):active { scale: 0.96; }
}

/* ---------- Top bar ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
}
/* A soft fade where the page slides under the bar, instead of a hard line. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px 0;
  background: linear-gradient(rgb(22 22 22 / 0.86), rgb(22 22 22 / 0));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-mask-image: linear-gradient(#000 50%, transparent);
  mask-image: linear-gradient(#000 50%, transparent);
  opacity: 0;
  transition: opacity var(--dur-2) ease;
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }
@media (prefers-reduced-transparency: reduce) {
  .nav::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--canvas);
    -webkit-mask-image: none;
    mask-image: none;
    inset: 0;
  }
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}
.brand__name {
  font: 600 1.375rem/1 var(--font-wordmark);
  letter-spacing: -0.01em;
}

.nav__links { display: none; gap: 28px; }
.nav__links a {
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}
@media (hover: hover) { .nav__links a:hover { color: var(--text); } }
@media (min-width: 900px) { .nav__links { display: flex; } }

/* The bar's own button waits until the opening form has scrolled away. */
.js .nav__cta {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease-out-quart), visibility 0s linear var(--dur-2),
    background-color 150ms ease-out, scale 150ms ease-out;
}
.js .nav.is-past-hero .nav__cta {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* ---------- Phone ---------- */

.phone {
  --w: 280px;
  --bezel: calc(var(--w) * 0.024);
  position: relative;
  flex: none;
  width: var(--w);
  padding: var(--bezel);
  border-radius: calc(var(--w) * 0.154);
  background: linear-gradient(145deg, #3d3d3d, #121212 28%, #0b0b0b 72%, #2e2e2e);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.07),
    0 44px 80px -24px rgb(0 0 0 / 0.75),
    0 20px 40px -20px rgb(0 0 0 / 0.6);
}
.phone__screen {
  position: relative;
  aspect-ratio: 1206 / 2622;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.13);
  background: #000;
  isolation: isolate;
}
.phone__screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The camera pill, and a faint edge so dark screens don't melt into the frame. */
.phone__screen::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 1.5%;
  left: 50%;
  width: 23.4%;
  aspect-ratio: 94 / 34;
  border-radius: 999px;
  background: #000;
  translate: -50% 0;
}
.phone__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  pointer-events: none;
}

/* The app's "diffusion": a blurred, enlarged copy of the screen glowing behind it. */
.glow {
  position: absolute;
  inset: -12% -45%;
  z-index: -1;
  filter: blur(56px) saturate(1.5);
  opacity: 0.5;
  pointer-events: none;
}
.glow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 1 · The opening ---------- */

.hero {
  /* The fan and the three lines under it share these, so each line sits under its phone on a wide screen. */
  --pw: min(54vw, 230px);              /* one phone's width */
  --gap: calc(var(--pw) * -0.6);       /* on a phone the side ones sit mostly behind the middle one */
  --tuck: 0.5;                         /* how far the side phones start tucked in, before you scroll */
  --rest: 5deg;                        /* their lean once the fan is open */
  --side: 0.9;                         /* their size beside the middle one */
  position: relative;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(20px, 5vh, 64px));
  padding-bottom: clamp(72px, 10vw, 136px);
  overflow: clip;
}
/* Warm light from above, like the app's ranking screens. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(100%, 1100px);
  background:
    radial-gradient(70% 60% at 50% 0%, rgb(214 138 32 / 0.26), transparent 70%),
    radial-gradient(50% 40% at 0% 0%, rgb(255 201 60 / 0.05), transparent 70%);
  pointer-events: none;
}

/* One column the width of the page: the fan is wider than a phone's screen and spills evenly off both sides. */
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.hero__copy {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: 100%;
  max-width: 62rem;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgb(242 234 223 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(242 234 223 / 0.1);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}
.pill__spark { width: 10px; height: 13px; color: var(--accent); }

.hero__title {
  font-size: clamp(1.875rem, 8.4vw, 3.25rem);
  line-height: 1.06;
}
.hero__title .line { display: block; }
.hero__last { position: relative; display: inline-block; white-space: nowrap; }
.hero__spark {
  position: absolute;
  top: 0.12em;
  right: -0.5em;
  width: 0.36em;
  height: 0.46em;
  color: var(--accent);
}

.hero__lead {
  max-width: 33em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.hero__form { margin-top: 10px; text-align: left; }
.hero__copy .waitlist__note, .hero__copy .waitlist__error { padding-inline: 0; text-align: center; }
.hero__copy .waitlist__done { justify-content: center; text-align: left; }

/* The three phones: ranking, Recs, Together. */
.fan {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 6vw, 72px);
  isolation: isolate;
}
.fan__item { position: relative; flex: none; width: var(--pw); transform-origin: 50% 100%; }
.fan__item + .fan__item { margin-left: var(--gap); }
.fan .phone { --w: var(--pw); }
.fan__item--centre { z-index: 2; }
.fan__item--left { transform: rotate(calc(var(--rest) * -1)) scale(var(--side)); }
.fan__item--right { transform: rotate(var(--rest)) scale(var(--side)); }
.glow--fan { inset: 6% 4% 18%; opacity: 0.5; }

/* The whole app in three lines. */
.sum {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 27rem;
  margin-top: clamp(44px, 6vw, 72px);
  list-style: none;
}
.sum__item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
}
.sum__item .num { grid-row: span 2; align-self: start; margin-bottom: 0; }
.sum__item p { grid-column: 2; color: var(--text-2); font-size: 1rem; line-height: 1.45; }

/* The opening plays once when the page loads. */
.hero__copy > *, .hero__title .line, .fan {
  animation: fade-in 700ms ease-out both;
}
.hero__copy > .hero__title { animation: none; }
.hero__copy > .pill { animation-delay: 60ms; }
.hero__title .line { animation-delay: calc(140ms + var(--i) * 120ms); }
.hero__copy > .hero__lead { animation-delay: 460ms; }
.hero__copy > .hero__form, .hero__copy > noscript { animation-delay: 560ms; }
.fan { animation-duration: 1100ms; animation-delay: 420ms; }
.hero__spark { animation: fade-in 400ms ease-out 1000ms both; }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > *, .hero__title .line {
    animation-name: rise-in;
    animation-timing-function: var(--ease-out-expo);
    animation-duration: 900ms;
  }
  .fan { animation-name: phone-in; animation-timing-function: var(--ease-out-expo); }
  /* The sparkle pops last, with the one small overshoot on the page (the app's Settle does the same). */
  .hero__spark { animation: spark-pop 600ms cubic-bezier(.34, 1.56, .64, 1) 1050ms both; }

  /* The side phones start tucked behind the middle one and open out as you begin to scroll,
     tied 1:1 to the scroll (--fan goes from 0 to 1 over the first half screen). */
  .js .fan__item--left {
    transform:
      translateX(calc((1 - var(--fan, 1)) * (var(--pw) + var(--gap)) * var(--tuck)))
      rotate(calc(var(--rest) * -1 - (1 - var(--fan, 1)) * 5deg))
      scale(calc(var(--side) - (1 - var(--fan, 1)) * 0.05));
    filter: brightness(calc(0.7 + var(--fan, 1) * 0.3));
  }
  .js .fan__item--right {
    transform:
      translateX(calc((1 - var(--fan, 1)) * (var(--pw) + var(--gap)) * var(--tuck) * -1))
      rotate(calc(var(--rest) + (1 - var(--fan, 1)) * 5deg))
      scale(calc(var(--side) - (1 - var(--fan, 1)) * 0.05));
    filter: brightness(calc(0.7 + var(--fan, 1) * 0.3));
  }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(5px); }
}
@keyframes phone-in {
  from { opacity: 0; transform: translateY(48px) scale(0.96); }
}
@keyframes spark-pop {
  from { opacity: 0; transform: scale(0.25) rotate(-45deg); }
}

@media (min-width: 900px) {
  .hero {
    --pw: clamp(220px, 21vw, 290px);
    --gap: clamp(28px, 4vw, 56px);
    --tuck: 0.74;
    --rest: 0deg;
    --side: 1;
  }
  .hero__copy { gap: 22px; }
  .hero__title { font-size: clamp(2.5rem, 4.4vw, 4rem); }
  .hero__form { margin-top: 12px; }
  .sum {
    grid-template-columns: repeat(3, var(--pw));
    justify-content: center;
    gap: var(--gap);
    max-width: none;
  }
  .sum__item { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sum__item .num { grid-row: auto; align-self: center; margin-bottom: 6px; }
  .sum__item p { grid-column: auto; text-wrap: balance; }
}

/* ---------- 2 · Together: one phone, three steps ---------- */

.story { position: relative; }
.story__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top));
  overflow: clip;
}
.story__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Centred behind the phone, so it fades out before the stage's edges and leaves no line where the chapter starts. */
  background: radial-gradient(55% 45% at 72% 48%, rgb(214 138 32 / 0.13), transparent 72%);
  pointer-events: none;
}
.story__inner {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.story__copy { padding-top: 16px; }
.story__device {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 0;
  padding-top: 28px;
  isolation: isolate;
}
.phone--story { --w: min(74vw, 300px); align-self: flex-start; }
.story .glow { inset: -6% 0 0; }

/* Without scripts the steps are a plain list beside the first screen. */
.steps { display: grid; gap: 14px; justify-items: start; }
.steps__body { position: relative; }
.steps__list { display: grid; gap: 24px; list-style: none; }
.step { display: grid; gap: 6px; }
.step p { max-width: 30em; color: var(--text-2); line-height: 1.45; }
.steps__rail, .steps__dots { display: none; }
html:not(.js) .story__stage { padding-bottom: 72px; }
html:not(.js) .phone--story .phone__screen img:not([data-screen="1"]),
html:not(.js) .story .glow img:not([data-screen="1"]) { display: none; }

/* With scripts the stage pins for a little over two screens of scrolling, and the step,
   the phone's screen and the glow behind it follow how far you've got. */
.js .story { height: 340vh; height: 340svh; }
.js .story__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

/* On a phone, one step shows at a time, in the same spot. */
.js .steps__list { gap: 0; }
.js .step {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-3) ease, visibility 0s linear var(--dur-3);
}
.js .story[data-step="1"] .step[data-i="1"],
.js .story[data-step="2"] .step[data-i="2"],
.js .story[data-step="3"] .step[data-i="3"] {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-4) ease var(--dur-1), visibility 0s;
}

.js .steps__dots { display: flex; gap: 6px; margin-top: 4px; }
.steps__dots i {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--text-3);
  transition: background-color var(--dur-3) ease;
}
@media (prefers-reduced-motion: no-preference) {
  .steps__dots i { transition: background-color var(--dur-3) ease, width var(--dur-3) var(--ease-in-out-cubic); }
}
.story[data-step="1"] .steps__dots i:nth-child(1),
.story[data-step="2"] .steps__dots i:nth-child(2),
.story[data-step="3"] .steps__dots i:nth-child(3) { width: 20px; background: var(--accent); }

.js .phone--story .phone__screen img,
.js .story .glow img {
  opacity: 0;
  transition: opacity 420ms var(--ease-in-out-cubic);
}
.js .story[data-screen="1"] [data-screen="1"],
.js .story[data-screen="2"] [data-screen="2"],
.js .story[data-screen="3"] [data-screen="3"] { opacity: 1; }

@media (min-width: 900px) {
  .story__inner { flex-direction: row; align-items: center; gap: clamp(40px, 7vw, 112px); }
  .story__copy { flex: 1; padding-top: 0; padding-bottom: 4vh; }
  .story__device { flex: none; align-items: center; padding-top: 0; }
  .phone--story { --w: min(340px, calc((100vh - 170px) * 0.44)); align-self: center; }
  .story .glow { inset: -12% -45%; }

  .steps { gap: 20px; }
  .steps__body { margin-top: 12px; padding-left: 28px; }
  .js .steps__rail {
    display: block;
    position: absolute;
    top: 4px; bottom: 4px; left: 0;
    width: 2px;
    border-radius: 2px;
    background: var(--hairline);
    overflow: hidden;
  }
  .js .steps__rail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleY(var(--rail, 0));
    transform-origin: top;
  }
  /* All three steps show; the ones you're not on are quieter but still readable. */
  .js .steps__list { gap: 28px; }
  .js .step {
    grid-area: auto;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .js .step h3 { color: var(--text-2); font-size: 1.375rem; transition: color var(--dur-3) ease; }
  .js .step p { color: #85827c; transition: color var(--dur-3) ease; }
  .js .story[data-step="1"] .step[data-i="1"],
  .js .story[data-step="2"] .step[data-i="2"],
  .js .story[data-step="3"] .step[data-i="3"] { transition: none; }
  .js .story[data-step="1"] .step[data-i="1"] h3,
  .js .story[data-step="2"] .step[data-i="2"] h3,
  .js .story[data-step="3"] .step[data-i="3"] h3 { color: var(--text); }
  .js .story[data-step="1"] .step[data-i="1"] p,
  .js .story[data-step="2"] .step[data-i="2"] p,
  .js .story[data-step="3"] .step[data-i="3"] p { color: var(--text-2); }
  .js .steps__dots { display: none; }
}

/* ---------- Waitlist form ---------- */

.waitlist { width: 100%; max-width: 460px; }
html:not(.js) .waitlist { display: none; }

.waitlist__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgb(242 234 223 / 0.07);
  box-shadow: inset 0 0 0 1px rgb(242 234 223 / 0.14);
  transition: box-shadow 150ms ease, background-color 150ms ease;
}
.waitlist__field:focus-within {
  background: rgb(242 234 223 / 0.1);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.waitlist__input {
  flex: 1;
  width: 0;       /* a text field's built-in width would otherwise push the row wider than a phone */
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 400 1rem/1.2 var(--font-ui);  /* 16px keeps iPhones from zooming in */
  letter-spacing: -0.01em;
  caret-color: var(--accent);
}
.waitlist__input::placeholder { color: #8e8a84; opacity: 1; }
.waitlist__input:focus { outline: none; }
.waitlist__btn { height: 48px; padding: 0 20px; border-radius: 999px; font-size: 1rem; }

/* A field people never see: anything that fills it in is not a person. */
.waitlist__trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.waitlist__note, .waitlist__error, .waitlist__done {
  margin-top: 12px;
  padding-inline: 18px;
  font-size: 0.875rem;
  line-height: 1.4;
}
.waitlist__note { color: var(--text-2); }
.waitlist__error { color: var(--error); }
.waitlist__error:empty, .waitlist__done:empty { display: none; }

.waitlist__done {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding: 0;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
}
.waitlist__tick {
  flex: none;
  width: 36px; height: 36px;
  padding: 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}
.waitlist[data-state="done"] .waitlist__field,
.waitlist[data-state="done"] .waitlist__note,
.waitlist[data-state="done"] .waitlist__error { display: none; }
.waitlist[data-state="done"] .waitlist__done { animation: fade-in 300ms ease-out both; }
.waitlist[data-state="done"] .waitlist__tick { animation: fade-in 300ms cubic-bezier(.2, 0, 0, 1) both; }
@media (prefers-reduced-motion: no-preference) {
  .waitlist[data-state="done"] .waitlist__done { animation-name: rise-in; }
  .waitlist[data-state="done"] .waitlist__tick { animation-name: tick-in; }
}
@keyframes tick-in {
  from { opacity: 0; transform: scale(0.25); filter: blur(4px); }
}

/* On the ivory ticket */
.waitlist--light .waitlist__field {
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgb(22 22 22 / 0.2);
}
.waitlist--light .waitlist__field:focus-within {
  background: #fffdf9;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.waitlist--light .waitlist__input { color: var(--ink); caret-color: var(--ink); }
.waitlist--light .waitlist__input::placeholder { color: #6f6c67; }
.waitlist--light .waitlist__error { color: #b8382c; }
.waitlist--light .waitlist__done { color: var(--ink); }
.waitlist--light .waitlist__tick { background: var(--ink); color: var(--ivory); }
.waitlist--light :focus-visible { outline-color: var(--ink); }

/* Where the form itself is narrow (the ticket on a phone), the button drops under the field. */
.waitlist { container-type: inline-size; }
@container (max-width: 330px) {
  .waitlist__field { flex-direction: column; align-items: stretch; border-radius: 30px; }
  .waitlist__input { flex: none; width: auto; padding: 0 16px; }
}

/* ---------- Things that arrive as you reach them ---------- */

.js .reveal {
  opacity: 0;
  transition: opacity 600ms ease-out;
  transition-delay: calc(var(--i, 0) * 100ms);
}
.js .reveal.is-in { opacity: 1; }
.js .reveal .eyebrow::after { transition: transform 700ms var(--ease-out-quart) 200ms; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    transform: translateY(16px);
    filter: blur(6px);
    transition-property: opacity, transform, filter;
    transition-duration: 700ms;
    transition-timing-function: var(--ease-out-quart);
  }
  .js .reveal.is-in { transform: none; filter: none; }
  .js .reveal:not(.is-in) .eyebrow::after { transform: scaleX(0); }
  /* A little depth: these drift a few points against the scroll. */
  [data-parallax] > .phone { translate: 0 calc(var(--v, 0) * var(--depth, 0px)); }
}

/* ---------- 3 · Ranking ---------- */

.rank__glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background: radial-gradient(60% 55% at 50% 38%, rgb(214 138 32 / 0.2), transparent 70%);
  pointer-events: none;
}

.trio {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(70vw, 270px);
  gap: 20px;
  margin: 48px calc(var(--gutter) * -1) 0;
  padding: 8px max(var(--gutter), calc(50vw - min(35vw, 135px))) 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
}
.trio::-webkit-scrollbar { display: none; }
.trio__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  scroll-snap-align: center;
}
.trio .phone { --w: min(62vw, 250px); }
.trio__cap {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.trio__cap .num,
.sum__item .num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 6px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}
.trio__cap p { max-width: 17em; color: var(--text-2); font-size: 1rem; line-height: 1.45; text-wrap: balance; }

@media (min-width: 900px) {
  .trio {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 72px 0 0;
    padding: 0;
    overflow: visible;
  }
  .trio .phone { --w: clamp(220px, 22vw, 280px); }
  .trio__item:nth-child(2) { margin-top: 64px; }
  .trio__item:nth-child(1) { --depth: 26px; }
  .trio__item:nth-child(2) { --depth: -14px; }
  .trio__item:nth-child(3) { --depth: 26px; }
}

/* ---------- 4 · For You ---------- */

.foryou__grid { display: grid; gap: 64px; }
.foryou__devices {
  position: relative;
  display: flex;
  justify-content: center;
  isolation: isolate;
}
.foryou__devices .phone { --w: min(66vw, 290px); }
.foryou__front { --depth: -18px; }
.foryou__back {
  --depth: 44px;
  position: absolute;
  top: 7%;
  left: 50%;
  z-index: -1;
  transform: translateX(-4%) scale(0.9);
  transform-origin: top left;
  opacity: 0.55;
}
.glow--single { inset: 4% 8%; opacity: 0.55; }

.foryou__copy { display: grid; gap: 40px; align-content: center; }
.points { display: grid; gap: 28px; list-style: none; }
.point { display: flex; gap: 16px; }
.point__icon { flex: none; width: 14px; height: 18px; margin-top: 4px; color: var(--accent); }
.point h3 { font-size: 1.1875rem; }
.point p { max-width: 26em; margin-top: 4px; color: var(--text-2); font-size: 1rem; line-height: 1.45; }

@media (min-width: 900px) {
  .foryou__grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
  .foryou__devices { justify-content: flex-start; padding-left: 4%; }
  .foryou__devices .phone { --w: clamp(250px, 24vw, 310px); }
  .foryou__back { left: calc(4% + clamp(250px, 24vw, 310px) * 0.62); transform: scale(0.9); }
}

/* ---------- 5 · Taste Type ---------- */

.taste__grid { display: grid; gap: 64px; }
.taste__copy { display: grid; gap: 40px; align-content: center; }
.stats { display: flex; gap: clamp(32px, 6vw, 72px); }
.stat { display: flex; flex-direction: column-reverse; gap: 2px; }
.stat dt { color: var(--text-2); font-size: 0.9375rem; line-height: 1.3; }
.stat dd {
  font-size: clamp(3.5rem, 2.6rem + 4vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.taste__device {
  position: relative;
  display: flex;
  justify-content: center;
  isolation: isolate;
}
.taste__device .phone { --w: min(70vw, 310px); }
.glow--taste { inset: 0 2%; opacity: 0.6; filter: blur(64px) saturate(1.6); }
.tilt {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
}

/* The app's curtains, parted by scrolling. They only exist when scripts run. */
.curtain { display: none; }
.js .curtain {
  display: block;
  position: absolute;
  top: 0; bottom: 0;
  z-index: 2;
  width: 50.5%;
  background-image: url("assets/screens/taste-curtains.webp");
  background-size: auto 100%;
  opacity: calc(1 - var(--open, 0));
}
.js .curtain--l { left: 0; background-position: left top; }
.js .curtain--r { right: 0; background-position: right top; }
@media (prefers-reduced-motion: no-preference) {
  .js .curtain { opacity: 1; will-change: transform; }
  .js .curtain--l { transform: translateX(calc(var(--open, 0) * -101%)); box-shadow: 14px 0 28px -8px rgb(0 0 0 / calc(var(--open, 0) * 0.6)); }
  .js .curtain--r { transform: translateX(calc(var(--open, 0) * 101%)); box-shadow: -14px 0 28px -8px rgb(0 0 0 / calc(var(--open, 0) * 0.6)); }
  .js .phone--taste .phone__screen > img {
    transform: scale(calc(1.08 - var(--open, 0) * 0.08));
    filter: brightness(calc(0.55 + var(--open, 0) * 0.45));
  }
}
.sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(60% 45% at var(--sx, 50%) var(--sy, 0%), rgb(255 255 255 / 0.16), transparent 70%);
  opacity: var(--sheen, 0);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

@media (min-width: 900px) {
  .taste__grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
  .taste__device .phone { --w: clamp(260px, 25vw, 320px); }
}

/* ---------- 6 · The rest ---------- */

.more { padding-bottom: clamp(56px, 7vw, 96px); }
.bento { display: grid; gap: 16px; margin-top: 48px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06);
}
.card h3 { font-size: 1.25rem; }
.card p { max-width: 28em; color: var(--text-2); font-size: 1rem; line-height: 1.45; }
.card__icon { width: 28px; height: 28px; margin-bottom: 12px; color: var(--accent); }
.card--wide { padding-bottom: 0; }
.card__peek {
  align-self: center;
  height: 280px;
  margin-top: 28px;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.card__peek .phone { --w: min(62vw, 250px); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07); }

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, 1fr); margin-top: 64px; }
  .card--wide { grid-column: span 3; }
  .card--sm { grid-column: span 2; }
  .card { padding: 32px; }
  .card--wide { padding-bottom: 0; }
}

/* ---------- 7 · The waitlist ticket ---------- */

.cta { padding-top: clamp(40px, 6vw, 80px); }
.ticket-wrap {
  max-width: 980px;
  margin-inline: auto;
  filter: drop-shadow(0 40px 70px rgb(255 201 60 / 0.1)) drop-shadow(0 12px 30px rgb(0 0 0 / 0.5));
}
.ticket {
  --notch: 14px;
  --stub: 148px;
  display: grid;
  border-radius: 28px;
  background: var(--ivory);
  color: var(--ink);
  /* Two half-round bites where the stub tears off, like the tickets in the app. */
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) right / 51% 100% no-repeat;
}
.ticket__main { display: grid; gap: 16px; justify-items: start; padding: 36px 24px 40px; }
.ticket__main h2 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.25rem); }
.ticket__lead { max-width: 26em; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.45; text-wrap: pretty; }
.ticket__main .waitlist { margin-top: 12px; }

.ticket__stub {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--stub);
  padding: 0 24px;
  border-top: 2px dashed rgb(22 22 22 / 0.22);
}
.ticket__stub img { flex: none; width: 58px; height: auto; }
.ticket__facts { display: flex; flex: 1; gap: 20px; justify-content: space-between; }
.ticket__facts dt {
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticket__facts dd { margin-top: 4px; font-size: 1.125rem; font-weight: 600; line-height: 1.2; }

@media (min-width: 820px) {
  .ticket {
    --stub: 250px;
    grid-template-columns: 1fr var(--stub);
    -webkit-mask:
      radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) bottom / 100% 51% no-repeat;
    mask:
      radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 calc(var(--notch) - 0.5px), #000 var(--notch)) bottom / 100% 51% no-repeat;
  }
  .ticket__main { padding: 56px 56px 60px; }
  .ticket__stub {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: auto;
    padding: 56px 36px 60px;
    border-top: 0;
    border-left: 2px dashed rgb(22 22 22 / 0.22);
  }
  .ticket__stub img { width: 74px; }
  .ticket__facts { flex: none; flex-direction: column; gap: 18px; }
  .ticket__facts dd { font-size: 1.25rem; }
}

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

.footer { padding-block: 40px 56px; border-top: 1px solid var(--hairline); }
.footer__inner { display: grid; gap: 16px; }
.footer .brand { margin-right: 0; justify-self: start; }
.footer .brand__name { font-size: 1.1875rem; }
.footer__meta, .footer__credit { color: var(--text-2); font-size: 0.875rem; line-height: 1.5; }
.footer__credit { max-width: 44em; }
.footer a { text-underline-offset: 3px; text-decoration-thickness: from-font; }
@media (min-width: 820px) {
  .footer__inner { grid-template-columns: auto 1fr; align-items: center; column-gap: 32px; }
  .footer__meta { justify-self: end; }
  .footer__credit { grid-column: 1 / -1; }
}
