/* NeverMiss site — matches the app (Theme.swift, 1.1 redesign): light grey
   page, white cards, near-black ink for the one main action (like the app's
   Done button), red only for urgency.
   The app is light-only, so the site is too. */
:root {
  color-scheme: light;
  --color-bg-page: #F2F2F7;      /* Color.page */
  --color-bg-card: #FFFFFF;
  --color-text: #0A0A0A;         /* Color.ink */
  --color-text-secondary: #5C5C5C; /* Color.warmStone, 5.7:1 on page, 6.7:1 on card */
  --color-separator: #E2E2E6;
  --color-accent-solid: #0A0A0A; /* Color.ink — white on top */
  --color-accent-solid-hover: #2C2C2E;
  --color-on-accent: #FFFFFF;
  --color-urgent-text: #CB2D19;  /* Color.accentText, 5.35:1 on white */
  --radius-card: 20px;
  --radius-control: 999px;
  --space-gutter: 16px;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1.0625rem; /* 17px, iOS body */
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-gutter);
  top: -100px;
  background: var(--color-bg-card);
  padding: 8px 16px;
  border-radius: 10px;
  z-index: 1;
}
.skip-link::selection { background: var(--color-text); color: var(--color-on-accent); }

:focus-visible { top: 12px; }

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

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px var(--space-gutter) 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
  margin-inline-end: auto;
  padding: 8px 0;
}
.site-header nav { display: flex; gap: 2px; }
.site-header nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.site-header nav a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-bg-card);
}
@media (hover: hover) {
  .site-header nav a:not([aria-current]):hover { color: var(--color-text); }
}

/* ---------- Page ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--space-gutter) 24px;
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

h1 {
  font-size: 2.125rem; /* 34px, iOS large title */
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-title { padding: 0 4px; margin-bottom: 24px; }
.subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin: 6px 0 0;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2em 0 0.4em;
}
h2:first-child { margin-top: 0; }

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin: 36px 0 8px;
  padding: 0 20px;
}

p { margin: 0 0 0.9em; }
ul { margin: 0 0 0.9em; padding-inline-start: 1.25em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--color-text-secondary); }

a {
  color: var(--color-text);
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  text-decoration-color: color-mix(in oklab, var(--color-text) 35%, transparent);
  transition: text-decoration-color 150ms ease-out;
  overflow-wrap: break-word;
}
@media (hover: hover) {
  a:hover { text-decoration-color: var(--color-text); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 12px;
}
.card > :last-child { margin-bottom: 0; }

/* Long legal text: one quiet card, capped to a readable measure. */
.prose { padding: 32px; }
.prose p, .prose li { max-width: 68ch; }

/* The emergency warning: the one place red appears. */
.urgent-title {
  color: var(--color-urgent-text);
  font-weight: 600;
  margin-bottom: 0.3em;
}

/* ---------- Support hero ---------- */
.hero h1 { margin-bottom: 8px; }
.hero p { color: var(--color-text-secondary); max-width: 46ch; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
}
.email {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  user-select: all;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  background: var(--color-accent-solid);
  color: var(--color-on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease-out, scale 150ms ease-out;
}
@media (hover: hover) {
  .button:hover { background: var(--color-accent-solid-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  .button:active { scale: 0.96; }
}

/* ---------- FAQ: grouped list, like iOS Settings ---------- */
.faq { padding: 0; overflow: hidden; }
.faq details + details { border-top: 1px solid var(--color-separator); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  min-height: 56px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease-out;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  rotate: 45deg;
  translate: 0 -2px;
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 2px; }
@media (prefers-reduced-motion: no-preference) {
  .faq summary::after { transition: rotate 200ms ease-out, translate 200ms ease-out; }
}
@media (hover: hover) {
  .faq summary:hover { background: #F6F6F8; }
}
.faq summary::selection { background: var(--color-text); color: var(--color-on-accent); }

:focus-visible { outline-offset: -3px; border-radius: 0; }
.faq .answer { padding: 0 20px 18px; color: var(--color-text); }
.faq .answer p { margin: 0; max-width: 62ch; }

/* ---------- Table (privacy legal bases) ---------- */
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; margin: 8px 0 1.2em; }
th, td {
  text-align: start;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--color-separator);
}
th {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}
tr:last-child td { border-bottom: 0; }

/* On narrow screens each row becomes a small stacked block — no sideways scrolling. */
@media (max-width: 600px) {
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { padding: 12px 0; border-bottom: 1px solid var(--color-separator); }
  tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 2px 0; }
  td:first-child { font-weight: 600; }
  td[data-label]:not(:first-child)::before {
    content: attr(data-label) ": ";
    color: var(--color-text-secondary);
  }
}

/* ---------- Footer ---------- */
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px calc(var(--space-gutter) + 4px) 48px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
footer a { color: var(--color-text-secondary); }
footer span { margin-inline-end: auto; }

@media (max-width: 480px) {
  main { padding-top: 28px; }
  .card { padding: 20px; }
  .prose { padding: 24px 20px; }
  h1 { font-size: 1.875rem; }
}

/* ======================================================================
   Landing page (index.html). Same tokens as the rest of the site; wider
   measure for the hero, everything else stays in the 720px column.
   ====================================================================== */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --color-input-border: #D4D4DA;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Sticky header ---------- */
.site-header--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: none;
  padding: 0;
  display: block;
  background: var(--color-bg-page);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 200ms ease-out;
}
.site-header--sticky[data-scrolled] { box-shadow: 0 1px 0 var(--color-separator); }
.site-header__inner {
  max-width: calc(880px + 2 * var(--space-gutter));
  margin: 0 auto;
  padding: 10px var(--space-gutter);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.site-header__nav { display: flex; gap: 2px; }
.button--small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; white-space: nowrap; flex: none; }
@media (max-width: 380px) {
  .hide-narrow { display: none; }
}
@media (max-width: 640px) {
  .site-header .site-header__nav { display: none; } /* same links live in the footer */
}

/* ---------- Layout ---------- */
.landing main { max-width: calc(880px + 2 * var(--space-gutter)); padding-top: 0; }
.section { padding-top: 64px; }
.section__title {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 4px 16px;
}
.section__intro { color: var(--color-text-secondary); margin: -4px 4px 16px; max-width: 56ch; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
}
.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.lede {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 44ch;
  margin: 20px 0 28px;
}

.hero__phone { margin: 0; display: grid; justify-items: center; gap: 12px; }
.hero__phone figcaption { font-size: 0.875rem; color: var(--color-text-secondary); }
/* A real simulator screenshot in a phone outline drawn here, so it stays sharp at any size. */
.device {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
  border: 9px solid var(--color-text);
  border-radius: 52px;
  background: var(--color-text);
  box-shadow: 0 24px 48px -16px rgb(10 10 10 / 0.28);
}
.hero__device { position: relative; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 36px; }
  .device { width: 270px; }
}

/* ---------- Waitlist form ---------- */
.waitlist { max-width: 480px; }
.waitlist__row { display: flex; gap: 8px; }
.waitlist__input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-control);
  background: var(--color-bg-card);
  color: var(--color-text);
  font: inherit;
  font-size: 1.0625rem; /* 17px: no zoom-on-focus in iOS Safari */
  transition: border-color 150ms ease-out;
}
.waitlist__input::placeholder { color: #75757D; } /* 4.6:1 on white */
.waitlist__input::selection { background: var(--color-text); color: var(--color-on-accent); }

:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; border-color: var(--color-text); }
.waitlist__button { min-height: 52px; flex: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.waitlist__button:disabled { cursor: progress; opacity: 0.7; }
.waitlist__note {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 8px 0 0 20px;
  min-height: 1.4em;
}
.waitlist.is-error .waitlist__input { border-color: var(--color-urgent-text); }
.waitlist.is-error .waitlist__note { color: var(--color-urgent-text); }
.waitlist.is-done .waitlist__row { display: none; }
.waitlist.is-done .waitlist__note {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--color-bg-card);
}
@media (prefers-reduced-motion: no-preference) {
  .waitlist.is-done .waitlist__note {
    transition: opacity 300ms var(--ease-out), translate 300ms var(--ease-out);
    @starting-style { opacity: 0; translate: 0 6px; }
  }
}
/* Honeypot: kept off-screen rather than display:none, which some bots skip. */
.waitlist__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .waitlist__row { flex-direction: column; }
  .waitlist__button { width: 100%; }
  .waitlist__note { margin-left: 4px; }
}

/* ---------- How it works ---------- */
/* Real app screenshots, so the page shows the product instead of describing it. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}
.step { margin: 0; display: grid; align-content: start; gap: 16px; }
/* Each screenshot sits in the same phone outline as the hero picture, scaled down. */
.step__shot {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  border: 6px solid var(--color-text);
  border-radius: 30px;
  background: var(--color-text);
  box-shadow: 0 14px 28px -12px rgb(10 10 10 / 0.25);
}
.step__text { display: grid; gap: 4px; padding: 0 4px; }
.step h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; margin: 0; }
.step__number {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  margin-inline-end: 8px;
}
.step p { margin: 0; color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.5; }

/* Phones: one big, readable phone per step, swiped sideways. The next one
   peeks in from the right so it's clear there's more. */
@media (max-width: 640px) {
  .steps {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--space-gutter);
    margin-inline: calc(-1 * var(--space-gutter));
    padding: 4px var(--space-gutter) 24px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 74%; scroll-snap-align: start; gap: 14px; }
  .step__shot { max-width: none; border-width: 7px; border-radius: 40px; }
}


/* ---------- Questions: plain list with hairlines, no card ---------- */
.questions { border-top: 1px solid #D4D4DA; }
.questions details { border-bottom: 1px solid #D4D4DA; }
.questions summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  rotate: 45deg;
  translate: 0 -2px;
}
.questions details[open] summary::after { rotate: 225deg; translate: 0 2px; }
@media (prefers-reduced-motion: no-preference) {
  .questions summary::after { transition: rotate 200ms ease-out, translate 200ms ease-out; }
}
.questions summary::selection { background: var(--color-text); color: var(--color-on-accent); }

:focus-visible { outline-offset: -2px; }
.questions details p { margin: -4px 4px 20px; max-width: 62ch; color: var(--color-text-secondary); }


/* ---------- Notice + closing ---------- */
.notice { margin-bottom: 0; }
.closing { padding-bottom: 32px; }
.closing__card { padding: 32px; display: grid; gap: 12px; }
.closing__card h2 { font-size: 1.5rem; line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.closing__card > p { color: var(--color-text-secondary); margin: 0 0 8px; max-width: 48ch; }

.landing footer { max-width: calc(880px + 2 * var(--space-gutter)); }

@media (max-width: 480px) {
  .section { padding-top: 44px; }
  .closing__card { padding: 24px 20px; }
}

/* ---------- Rules: three short lines ---------- */
.rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rules-list li { padding: 0 4px; color: var(--color-text-secondary); max-width: 52ch; }
.rules-list strong { color: var(--color-text); font-weight: 600; }

/* The emergency-service line: small, but always there. */
.notice-line { margin: 40px 4px 0; font-size: 0.875rem; color: var(--color-text-secondary); max-width: 52ch; }
