/* ABOUTME: Styles for the grabfifteen.com marketing page.
   ABOUTME: Tokens first, then layout by section, then breakpoints matching the previous site. */

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

   --brand is the Fifteen green and every filled surface uses it exactly:
   buttons, chips, step numbers, the meter. Nothing substitutes for it, because
   a button in a near-green is a button in the wrong colour.

   --brand-ink is the same hue (138deg) and saturation (60%) at a lower
   lightness, and is used ONLY for green words set at body size on a light
   background, plus the focus ring. Green body text at --brand measures 3.08:1
   and is genuinely hard to read; at --brand-ink it measures 4.79:1. A darker
   green inside a sentence is close to invisible as a brand shift, whereas a
   darker button is not.

   Known and deliberate: white on --brand is 3.08:1, which is under the 4.5:1
   WCAG AA needs for normal text. It clears the 3:1 bar for large text and for
   UI component boundaries. Holding the brand colour here is Toheeb's call.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  --brand: #2aa850;
  --brand-ink: #21833f;
  --brand-wash: #f2faf3;

  --ink: #1e2023;
  --muted: #6b7280;
  --line: #e2e4e8;
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-2: #fafafa;
  --dark: #1e2023;
  --on-dark-muted: #b6bac0;
  --accent-purple: #9c82f8;

  --font-display: "Stratford Serial", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step: clamp(0.75rem, 0.6rem + 0.7vw, 1rem);
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  /* The content width, not the outer box. The shell adds its gutters on top so
     the text column lands at exactly this, matching the nav above it. */
  --max: 1200px;
  --radius: 14px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* Deep deceleration, for things arriving rather than responding. */
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: "Stratford Serial";
  src: url("assets/fonts/stratford-serial-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* The nav is sticky, so an anchor would otherwise drop its heading underneath it. */
:target,
[id] {
  scroll-margin-top: 7rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(33, 131, 63, 0.18);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

/* Display sizes carry tight leading; the smaller headings need room to breathe. */
h1 {
  line-height: 1.04;
}

h2 {
  line-height: 1.1;
}

h3,
.step__title {
  line-height: 1.22;
}

p {
  margin: 0;
}

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

a {
  color: inherit;
}

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

/* max() rather than + so the notch only ever widens the gutter, never doubles it. */
.shell {
  width: 100%;
  max-width: calc(var(--max) + (2 * var(--gutter)));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* 36px, measured off the Framer original. Set as a min-height rather than left
     to padding plus font metrics, so it cannot drift when the type changes. */
  min-height: 36px;
  padding: 0 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.btn:hover {
  background: #24913f;
}

.btn:active {
  transform: translateY(1px);
}

/* Touch targets want more room than a pointer does, so the pill grows on coarse
   input only. The desktop proportions stay exactly as they were. */
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 0 1.15rem;
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 1rem;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.nav {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.7rem 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.nav__logo img {
  width: 104px;
  height: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav__links a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.5rem 0;
}

.nav__links a:hover {
  color: var(--brand-ink);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.4rem);
  letter-spacing: -0.035em;
  /* The line break is authored, so balancing fights it. */
  text-wrap: initial;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
}

.hero__cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.hero__note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--muted);
}

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

   The frame is a photograph of a real device and it already contains the status
   bar, the conversation header and the composer. Only the meter and the messages
   are drawn on top; anything else would appear twice.

   Measured against the frame: the free area between the header and the composer
   runs from 17.5% to 87.5% of the image height.
   -------------------------------------------------------------------------- */
.phone {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
}

.phone__frame {
  width: 100%;
  filter: drop-shadow(0 24px 48px rgba(30, 32, 35, 0.14));
}

.phone__screen {
  /* Decoration, not a control. Without this a swipe over the phone scrolls the
     thread instead of the page, and overscroll-behavior traps it there. Script
     can still set scrollTop. */
  pointer-events: none;
  position: absolute;
  inset: 18% 12% 13.5% 12%;
  display: flex;
  flex-direction: column;
  font-size: clamp(0.5rem, 0.26rem + 0.55vw, 0.64rem);
  line-height: 1.35;
  overflow: hidden;
}

.chat__meter {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.86em;
  color: var(--muted);
}

.chat__meter-track {
  flex: 1;
  height: 0.3em;
  border-radius: 1em;
  background: var(--line);
  overflow: hidden;
}

/* The meter is the count over fifteen, so the width is declared per count rather
   than written from script. It has to agree with the number beside it. */
.chat__meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transform-origin: left;
}

.chat__meter-fill[data-count="9"] {
  transform: scaleX(0.6);
}

.chat__meter-fill[data-count="10"] {
  transform: scaleX(0.667);
}

.chat__meter-fill[data-count="11"] {
  transform: scaleX(0.733);
}

.chat__meter-fill[data-count="12"] {
  transform: scaleX(0.8);
}

@media (prefers-reduced-motion: no-preference) {
  .chat__meter-fill {
    transition: transform 520ms var(--ease);
  }
}

.chat__count {
  font-variant-numeric: tabular-nums;
}

/* The thread scrolls, the way the real one does, so a long last message is never
   clipped by the frame. The bar itself is hidden: this is a picture of a phone,
   and a desktop scrollbar down the middle of it would give that away. */
.chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin: 0;
  padding: 0.9em 0 0;
  list-style: none;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.chat__log::-webkit-scrollbar {
  display: none;
}

.chat__time {
  align-self: center;
  color: var(--muted);
  font-size: 0.84em;
}

.chat__row {
  display: flex;
}

.chat__row--them {
  justify-content: flex-start;
}

.chat__row--you {
  justify-content: flex-end;
}

.bubble {
  max-width: 78%;
  padding: 0.62em 0.75em;
  border-radius: 0.9em;
}

.bubble--them {
  background: var(--surface);
  border-bottom-left-radius: 0.28em;
}

.bubble--you {
  background: var(--brand-wash);
  border-bottom-right-radius: 0.28em;
}

/* Typing indicator */
.bubble--dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  padding: 0.7em 0.8em;
}

.bubble--dots i {
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  background: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .bubble--dots i {
    animation: dot 1.1s var(--ease) infinite;
  }

  .bubble--dots i:nth-child(2) {
    animation-delay: 0.16s;
  }

  .bubble--dots i:nth-child(3) {
    animation-delay: 0.32s;
  }
}

@keyframes dot {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-0.18em);
  }
}

/* Beats. Without JS, or with reduced motion, every beat except the two typing
   indicators is simply present, so the conversation reads as a finished thread. */
.chat__log [data-beat] {
  display: none;
}

.chat__log [data-beat].is-shown {
  display: flex;
}

.chat__log .chat__time[data-beat].is-shown {
  display: block;
}

html:not(.js) .chat__log [data-beat] {
  display: flex;
}

html:not(.js) .chat__log .chat__time[data-beat] {
  display: block;
}

html:not(.js) .chat__log [data-typing] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .chat__log [data-beat].is-shown {
    animation: beat 340ms var(--ease) both;
  }
}

@keyframes beat {
  from {
    opacity: 0;
    transform: translateY(0.6em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The two people in the thread.

   Plain discs, no tail. A clipped polygon glued to a photographic cut-out is a
   geometric mask standing in for an organic contour, and it reads worse than
   having no pointer at all. The colour and placement already say who is who.

   The overhang is a percentage of the phone, so it scales instead of clipping
   against the viewport edge on a narrow screen. */
.talker {
  position: absolute;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(30, 32, 35, 0.2);
}

.talker picture,
.talker img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.talker--you {
  top: 1%;
  right: -7%;
  background: var(--accent-purple);
}

.talker--them {
  bottom: 13%;
  left: -7%;
  background: var(--brand);
}

@media (prefers-reduced-motion: no-preference) {
  .talker {
    transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
  }

  .talker.is-speaking {
    transform: translateY(-5%) scale(1.06);
    box-shadow: 0 18px 36px rgba(30, 32, 35, 0.26);
  }
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section__head {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.section__head h2 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
}

.section__head p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.steps-grid {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  border: 1.5px solid var(--brand);
  background: transparent;
  color: var(--brand-ink);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.step.is-on .step__num,
.step__trigger:hover .step__num {
  background: var(--brand);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .step__num {
    transition: background-color 260ms var(--ease), color 260ms var(--ease);
  }
}

.step h3 {
  margin-top: 0.9rem;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
}

.step p {
  margin-top: 0.6rem;
  color: var(--muted);
  max-width: 34rem;
}

.step .accent {
  color: var(--brand-ink);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Step triggers and the rotator
   -------------------------------------------------------------------------- */
.step__head {
  margin: 0;
}

.step__trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

/* Every step stays fully legible. The active one is marked by its number filling
   in and a rule growing down the left, so the tie to the panel is visible without
   pushing the others away. */
.step {
  position: relative;
  padding-left: 1.1rem;
  cursor: pointer;
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  bottom: 0.15rem;
  width: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleY(0);
  transform-origin: top;
}

.step.is-on::before {
  transform: scaleY(1);
}

@media (prefers-reduced-motion: no-preference) {
  .step::before {
    transition: transform 420ms var(--ease);
  }
}

.rotator {
  display: inline-grid;
  vertical-align: baseline;
}

/* Two columns wide, the heading has room for one line and should keep it. Below
   that breakpoint the column narrows and a wrapped heading is normal. */
@media (min-width: 1200px) {
  .step__title {
    white-space: nowrap;
  }
}

/* Every word stacks in one grid cell, so the widest sets the width once and the
   heading never reflows as the word changes. */
.rotator__word {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.rotator__word.is-out {
  opacity: 0;
}

/* Sizing copies. They hold the cell open so the widest word fixes the width. */
.rotator__ghost {
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .rotator__word {
    transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  }

  .rotator__word.is-out {
    transform: translateY(-0.35em);
  }

  .rotator__word.is-in-start {
    opacity: 0;
    transform: translateY(0.35em);
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Step panels
   -------------------------------------------------------------------------- */
.panels {
  position: relative;
  display: grid;
  min-height: 19rem;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  place-items: center;
}

.panel {
  grid-area: 1 / 1;
  width: min(100%, 340px);
  opacity: 0;
  visibility: hidden;
}

.panel.is-on {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .panel {
    transform: translateY(10px);
    transition: opacity 320ms var(--ease), transform 320ms var(--ease), visibility 0s linear 320ms;
  }

  .panel.is-on {
    transform: none;
    transition-delay: 0s;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(30, 32, 35, 0.07);
  font-size: 0.875rem;
}

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

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.card__amount {
  font-size: 1.5rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.card__unit {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.card__link {
  color: var(--muted);
}

.card__link b {
  color: var(--ink);
  font-weight: 500;
}

.card__chip {
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
}

.card__chip--brand {
  background: var(--brand);
  color: #fff;
}

/* Rate slider

   Six declared stops rather than a width written from script. The track carries
   no end labels, so a stop is a position on a picture and not a claim about
   where a given rate falls on the real scale. */
.rate {
  margin-top: 1.15rem;
}

.rate__track {
  display: block;
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.rate__fill {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--brand);
  transform-origin: left;
}

.rate__thumb {
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(30, 32, 35, 0.3);
}

.rate__track[data-pos="1"] .rate__fill {
  transform: scaleX(.12);
}

.rate__track[data-pos="1"] .rate__thumb {
  left: 12%;
}

.rate__track[data-pos="2"] .rate__fill {
  transform: scaleX(.26);
}

.rate__track[data-pos="2"] .rate__thumb {
  left: 26%;
}

.rate__track[data-pos="3"] .rate__fill {
  transform: scaleX(.44);
}

.rate__track[data-pos="3"] .rate__thumb {
  left: 44%;
}

.rate__track[data-pos="4"] .rate__fill {
  transform: scaleX(.62);
}

.rate__track[data-pos="4"] .rate__thumb {
  left: 62%;
}

.rate__track[data-pos="5"] .rate__fill {
  transform: scaleX(.33);
}

.rate__track[data-pos="5"] .rate__thumb {
  left: 33%;
}

.rate__track[data-pos="6"] .rate__fill {
  transform: scaleX(.20);
}

.rate__track[data-pos="6"] .rate__thumb {
  left: 20%;
}

@media (prefers-reduced-motion: no-preference) {
  .rate__fill {
    transition: transform 780ms var(--ease);
  }

  .rate__thumb {
    transition: left 780ms var(--ease);
  }
}

/* Pending request */
.req__who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.req__who img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.req__who b {
  display: block;
  font-weight: 500;
}

.req__who em {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--muted);
}

.req__paid {
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-size: 0.75rem;
  font-weight: 500;
}

.req__ask {
  margin-top: 0.85rem;
  color: var(--ink);
}

.req__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.req__btn {
  flex: 1;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.req__btn--accept {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

/* Mini conversation */
.mini__meter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.mini__track {
  flex: 1;
  height: 0.25rem;
  border-radius: 1em;
  background: var(--line);
  overflow: hidden;
}

.mini__fill {
  display: block;
  height: 100%;
  width: 13%;
  border-radius: inherit;
  background: var(--brand);
  transform-origin: left;
}

/* Bubbles hug their own side and stop short of the far edge, the way they do in
   a real thread. Left-aligned blocks at full width read as paragraphs, not messages. */
.mini__log {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.mini__bubble {
  max-width: 84%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.85rem;
  font-size: 0.8125rem;
}

.mini__bubble--them {
  align-self: flex-start;
  background: var(--surface);
  border-bottom-left-radius: 0.25rem;
}

.mini__bubble--you {
  align-self: flex-end;
  background: var(--brand-wash);
  border-bottom-right-radius: 0.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .panel.is-on .mini__bubble {
    animation: beat 380ms var(--ease) both;
  }

  .panel.is-on .mini__bubble--you {
    animation-delay: 220ms;
  }

  .panel.is-on .mini__fill {
    animation: meter 900ms var(--ease) 380ms both;
  }
}

@keyframes meter {
  from {
    transform: scaleX(0.35);
  }
  to {
    transform: scaleX(1);
  }
}

.mini__composer {
  margin-top: 0.85rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.4em;
  color: var(--muted);
  font-size: 0.8125rem;
}

.footnote {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 44rem;
}

.section__cta {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Audiences
   -------------------------------------------------------------------------- */
.audience {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.audience h2 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
  grid-column: 1;
}

.audience h2 .accent {
  color: var(--brand);
}

/* A <picture> so the illustration can swap per profession. It is inline by
   default, hence the explicit block. */
.audience__art {
  display: block;
  grid-column: 2;
  justify-self: center;
  width: min(100%, 330px);
}

.audience__art img {
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .audience__art img {
    transition: opacity 220ms var(--ease);
  }

  .audience__art.is-swapping img {
    opacity: 0;
  }
}

.chips {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.chip {
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.chip:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.chip[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

.audience__panel {
  grid-column: 2;
}

.audience__panel h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
}

.audience__panel h3 .accent {
  color: var(--brand);
}

.audience__panel p {
  margin-top: 0.85rem;
  color: var(--on-dark-muted);
  max-width: 32rem;
}

/* --------------------------------------------------------------------------
   Android notice
   -------------------------------------------------------------------------- */
.notice {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  background: var(--surface-2);
}

.notice h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
}

.notice p {
  margin-top: 0.7rem;
  color: var(--muted);
}

.notice__lede {
  margin-top: 0.7rem;
  color: var(--muted);
}

/* Android waitlist form */
/* Exactly one of these is ever shown. The form needs fetch to submit, so without
   scripting the address is the working path. */
.notice__fallback {
  margin-top: 1rem;
  color: var(--muted);
}

.js .notice__fallback {
  display: none;
}

html:not(.js) .signup {
  display: none;
}

.notice__fallback a {
  color: var(--brand-ink);
  font-weight: 500;
}

.signup {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 26rem);
  margin: 1.6rem auto 0;
  text-align: left;
}

.field {
  display: grid;
  gap: 0.35rem;
}

/* .field sets display, which would otherwise beat the user agent's [hidden] rule. */
.field[hidden] {
  display: none;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.field__opt {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:focus-visible,
.field select:focus-visible {
  border-color: var(--brand-ink);
}

.field.is-invalid input {
  border-color: #b4291f;
}

/* The message sits beside its own field, not collected at the top of the form. */
.field__error {
  min-height: 0;
  color: #b4291f;
  font-size: 0.8125rem;
}

.field__error:empty {
  display: none;
}

.signup .btn {
  justify-self: start;
  margin-top: 0.2rem;
}

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

.signup__status:empty {
  display: none;
}

.signup__status[data-tone="ok"] {
  color: var(--brand-ink);
  font-weight: 500;
}

.signup__status[data-tone="bad"] {
  color: #b4291f;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding-block: clamp(3rem, 7vw, 4.5rem) 2.5rem;
  text-align: center;
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--muted);
}

.footer__bar {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer__bar a {
  color: var(--muted);
}

.footer__bar a:hover {
  color: var(--brand-ink);
}

/* --------------------------------------------------------------------------
   Entrance

   One orchestrated moment on load, nothing scattered. Elements start shifted
   and settle; without JS or with reduced motion they are simply already there.
   -------------------------------------------------------------------------- */
/* Arrival

   Content is present by default. The hidden state is scoped to .js, so a failed
   script leaves a readable page rather than a blank one.

   Distance is small and the curve decelerates hard, so things settle rather than
   slide. The four steps and the profession chips stagger because each genuinely
   is a list; nothing else does, because a page of staggered sections reads as a
   template rather than a decision.

   Reduced motion keeps the fade and drops the movement. The arrival still reads
   as an arrival, it just does not travel. */
.rise--d1 {
  --delay: 70ms;
}

.rise--d2 {
  --delay: 140ms;
}

.rise--d3 {
  --delay: 210ms;
}

.js .rise {
  opacity: 0;
}

.js .rise.is-in {
  opacity: 1;
  transition: opacity 620ms var(--ease-enter), transform 620ms var(--ease-enter);
  transition-delay: var(--delay, 0ms);
}

@media (prefers-reduced-motion: no-preference) {
  .js .rise {
    transform: translateY(18px);
  }

  .js .rise.is-in {
    transform: none;
  }

  /* The hero phone travels a little further, since it is the focal arrival. */
  .js .phone.rise {
    transform: translateY(26px);
  }

  /* Genuine lists, so their items arrive in turn. The total is capped so the
     last one is never left waiting on the first. */
  .js .steps .step:nth-child(1).is-in {
    transition-delay: 0ms;
  }

  .js .steps .step:nth-child(2).is-in {
    transition-delay: 80ms;
  }

  .js .steps .step:nth-child(3).is-in {
    transition-delay: 160ms;
  }

  .js .steps .step:nth-child(4).is-in {
    transition-delay: 240ms;
  }

  .js .chips.is-in .chip {
    animation: chip-in 420ms var(--ease-enter) both;
  }

  .js .chips.is-in .chip:nth-child(n + 2) {
    animation-delay: 40ms;
  }

  .js .chips.is-in .chip:nth-child(n + 4) {
    animation-delay: 80ms;
  }

  .js .chips.is-in .chip:nth-child(n + 7) {
    animation-delay: 120ms;
  }
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .phone {
    justify-self: center;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  /* Below the two-column breakpoint the panel is sticky instead, so it stays in
     view while the steps scroll past and drive it. */
  .panels {
    position: sticky;
    top: 6rem;
    order: -1;
    min-height: 16rem;
  }
}

@media (max-width: 809px) {
  .nav__links {
    display: none;
  }

  .audience {
    grid-template-columns: 1fr;
  }

  .audience h2,
  .audience__art,
  .chips,
  .audience__panel {
    grid-column: 1;
  }

  .audience__art {
    justify-self: center;
    width: min(62%, 200px);
  }

  /* Ten labels between four and nineteen characters wrap into orphan rows with a
     jagged edge. Tighter chips let three short ones share a line instead of two,
     and centring makes what is left symmetrical rather than ragged down one side.
     Height stays at 44px, because the target still has to be a target. */
  .chips {
    justify-content: center;
    gap: 0.5rem;
  }

  .chip {
    padding-inline: 0.85rem;
    font-size: 0.875rem;
  }

  .talker {
    width: 20%;
  }

  .talker--you {
    right: 0;
  }

  .talker--them {
    left: 0;
  }

  /* Stacked at this width the phone is centred, so left-aligned text above it
     reads as a misalignment rather than a choice. */
  .hero {
    justify-items: center;
    text-align: center;
  }

  /* The green phrase takes its own line rather than breaking mid-phrase. */
  .hero h1 .accent {
    display: block;
  }

  .hero__lede {
    margin-inline: auto;
  }

  .hero__cta {
    width: 100%;
    align-items: center;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .footer__bar {
    flex-direction: column;
    gap: 0.5rem;
  }
}
