/*
 * The app's design system, on the web.
 *
 * Every value here is lifted from `src/theme/palettes.ts` and
 * `src/theme/tokens.ts` rather than eyeballed, so the site and the app cannot
 * drift into being two different products. The rules that matter, and which a
 * later edit should not quietly break:
 *
 * - **Pastel and tonal.** Every hue sits in the 70-90% lightness band, so no hue
 *   outranks another: hue carries role, not rank. Aqua is the anchor, coral is
 *   curiosity, mint is the page. Exactly one deep value breaks the band
 *   (`--primary`, for interactive things) plus the ink ramp. Nothing pops, which
 *   is the emotional point and a hazard for hierarchy — so hierarchy comes from
 *   size and position, never from shouting.
 * - **No red and no green exist in this palette**, so nothing can read as
 *   failure.
 * - **Elevation is a coloured glow plus an inner top light**, both in one
 *   shadow. There is no grey shadow anywhere: a shadow is the object's own hue,
 *   blurred.
 * - **Fredoka at 20px and up, Nunito below it.** A size boundary, not a role
 *   list. The one documented exception is button labels, which are Fredoka at 17
 *   because a pill reads as a single object.
 * - **No em dashes in copy.** Two sentences, or a comma. The separator is `·`.
 */

:root {
  /* --- palette, from src/theme/palettes.ts --- */
  --primary: #2a707a;
  --primary-dark: #266770;
  --teal: #7fd3dc;
  --teal-light: #d6f3f4;
  --coral: #f58a6a;
  --coral-dark: #de7455;
  --coral-light: #fac9b8;
  --sand-light: #faf2e6;
  --background: #c9ede8;
  --surface: #fdfcfa;
  --surface-alt: #e4f7f4;
  --text: #16404a;
  --text-secondary: #3f646d;
  --text-light: #fdfcfa;
  --border: rgba(127, 211, 220, 0.45);
  --border-light: rgba(46, 122, 133, 0.16);
  --on-action: #5a2412;

  /* --- geometry, from tokens.ts --- */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* The object's own hue, blurred, plus a light along the top edge. */
  --glow: 0 12px 32px rgba(42, 112, 122, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --glow-lift: 0 18px 44px rgba(42, 112, 122, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --glow-coral: 0 12px 32px rgba(245, 138, 106, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  /* Cream at the top settling into the page's mint, the same wash the
     onboarding flow uses. Fixed so it does not repeat down a long policy. */
  background: linear-gradient(180deg, var(--sand-light) 0%, var(--background) 62%) no-repeat;
  background-attachment: fixed;
  background-color: var(--background);
  color: var(--text);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  max-width: 720px;
}

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

h1,
h2,
h3,
.display {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(38px, 6.5vw, 62px);
}

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
}

h3 {
  font-size: 21px;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.5;
  color: var(--text-secondary);
}

.kicker {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
}

.muted {
  color: var(--text-secondary);
}

.small {
  font-size: 15px;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

/* --- header -------------------------------------------------------------- */

.site-head {
  padding: 26px 0;
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--primary);
}

/* --- buttons ------------------------------------------------------------- */

/* Every button is a pill, and the label is Fredoka at 17: the one documented
   exception to the size boundary, because a pill reads as a single object
   rather than a capsule with words in it. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.btn--primary {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: var(--glow);
}

.btn--primary:hover {
  color: var(--text-light);
  box-shadow: var(--glow-lift);
}

/* scale(0.97) on press, matching the app. */
.btn:active {
  transform: scale(0.97);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* --- surfaces ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--glow);
}

/* Edges are value change, not stroke: the card draws no border, and the tint
   fill is what separates it from the page. */
.card--tint {
  background: var(--surface-alt);
}

section {
  padding: 56px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
  display: grid;
  gap: 12px;
}

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

.hero {
  padding: 48px 0 30px;
  display: grid;
  gap: 44px;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding: 64px 0 40px;
  }
}

.hero__copy {
  display: grid;
  gap: 22px;
  justify-items: start;
}

/* The one word allowed to be loud on the page. `onAction` rather than coral
   itself: coral-dark measures 2.49 against the mint stop, below even the
   large-text floor, and this deep terracotta is what the palette already uses
   as ink on a coral fill. */
.accent-word {
  color: var(--on-action);
}

/* --- phone frames -------------------------------------------------------- */

.shots {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.phone {
  aspect-ratio: 9 / 19.5;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--glow);
  padding: 9px;
  overflow: hidden;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  display: block;
}

/* The empty state, until a real capture goes in.
 *
 * A dashed edge is the one place this system uses one, and it means exactly
 * this: an empty slot saying "the next one goes here". Replace the inner
 * `.phone__slot` with an `<img>` and nothing else needs to change. */
.phone__slot {
  height: 100%;
  border-radius: 25px;
  border: 2px dashed var(--border);
  background: var(--surface-alt);
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: 20px;
}

.phone__slot span {
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.phone__slot small {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- feature rows -------------------------------------------------------- */

.feature {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 34px 0;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 44px 0;
  }
  /* Alternating sides, so a column of features reads as a walk rather than a
     list. `order` only, so the DOM order stays the reading order. */
  .feature:nth-child(even) .feature__media {
    order: -1;
  }
}

.feature__copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.feature__media .phone {
  max-width: 250px;
  margin: 0 auto;
}

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

.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}

.step {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--glow);
  display: grid;
  gap: 10px;
  align-content: start;
}

.step__n {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  background: var(--teal-light);
  color: var(--primary);
  display: grid;
  place-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 17px;
}

/* --- waitlist ------------------------------------------------------------ */

.waitlist {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: clamp(30px, 5vw, 52px);
  box-shadow: var(--glow);
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.waitlist form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 480px;
}

.waitlist input {
  flex: 1 1 240px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
}

.waitlist input:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.waitlist input::placeholder {
  color: var(--text-secondary);
}

/* Reserved whether or not it holds anything, so the form does not jump when it
   answers. */
.form-note {
  min-height: 22px;
  font-size: 15px;
  color: var(--text-secondary);
}

/* --- prose (policy, terms, support) -------------------------------------- */

.prose {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--glow);
}

.prose h1 {
  font-size: clamp(30px, 4.4vw, 42px);
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 25px;
  margin: 40px 0 12px;
}

.prose h3 {
  font-size: 19px;
  margin: 28px 0 8px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 12px 0;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 7px 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 36px 0;
}

/* Wide tables scroll inside their own container rather than the page. */
.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.prose th {
  background: var(--surface-alt);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--text);
}

.prose tr:last-child td {
  border-bottom: 0;
}

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

.site-foot {
  padding: 44px 0 56px;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: var(--text-secondary);
}

.site-foot a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--primary);
}
