/* ============================================================================
   Life Ahead — the public landing page.

   The iOS app's look on the web: Archivo, the app palette, rounded cards, one
   red accent. Values come from design_handoff_landing_page/ (tokens.css and
   landing-reference.html) and are exact on purpose; do not round them.

   Theme resolution, same convention as app.css:
     :root / html[data-theme=light]        light
     html[data-theme=dark]                 dark, chosen with the toggle
     prefers-color-scheme + :not([light])  dark, following the system

   Self-contained: no framework, no build step, no CDN.
   ============================================================================ */

@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/Archivo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/Archivo-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/Archivo-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root,
html[data-theme="light"] {
  --bg: #f3f2f2;
  --card: #ffffff;
  --ink: #201e1d;
  --ink2: #5f5d5c;
  --ink3: #6b6968;
  --line: rgba(32,30,29,.12);
  --line-strong: rgba(32,30,29,.45);
  --fill: rgba(32,30,29,.07);
  --fill2: rgba(32,30,29,.12);
  --accent: #ec3013;
  --accent-fill: #dd2b0f;
  --accent-text: #ae1800;
  --accent-soft: rgba(236,48,19,.09);
  --accent-band: rgba(236,48,19,.25);
  --bezel: #201e1d;
}

html[data-theme="dark"] {
  --bg: #0e0d0d;
  --card: #1e1d1d;
  --ink: #eceaea;
  --ink2: #b3b0b0;
  --ink3: #9a9797;
  --line: rgba(236,234,234,.14);
  --line-strong: rgba(236,234,234,.45);
  --fill: rgba(236,234,234,.08);
  --fill2: rgba(236,234,234,.14);
  --accent-text: #ff9783;
  --accent-soft: rgba(236,48,19,.16);
  --accent-band: rgba(236,48,19,.30);
  --bezel: #3b3939;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0e0d0d;
    --card: #1e1d1d;
    --ink: #eceaea;
    --ink2: #b3b0b0;
    --ink3: #9a9797;
    --line: rgba(236,234,234,.14);
    --line-strong: rgba(236,234,234,.45);
    --fill: rgba(236,234,234,.08);
    --fill2: rgba(236,234,234,.14);
    --accent-text: #ff9783;
    --accent-soft: rgba(236,48,19,.16);
    --accent-band: rgba(236,48,19,.30);
    --bezel: #3b3939;
  }
}

/* ---------- base ---------- */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Archivo, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
a { color: inherit; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder { color: var(--ink3); opacity: 1; }
svg { display: block; }

/* One <img>/<svg> per theme; the other is removed, not just hidden. */
.only-light, .only-dark, .waitlist-form, .waitlist-done { display: contents; }
.only-dark { display: none; }
html[data-theme="dark"] .only-light { display: none; }
html[data-theme="dark"] .only-dark { display: contents; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .only-light { display: none; }
  html:not([data-theme="light"]) .only-dark { display: contents; }
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
}
.kicker--accent { color: var(--accent-text); }
.brand-mark {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.h3 { font-size: 19px; font-weight: 800; line-height: 1.15; }
.lead { max-width: 560px; font-size: 22px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.body { font-size: 17px; line-height: 1.55; color: var(--ink2); text-wrap: pretty; }
.footnote { font-size: 13px; line-height: 1.45; color: var(--ink3); }
.card-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink3);
}

/* ---------- layout ---------- */

.site-header,
.section,
.site-footer {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  box-sizing: border-box;
}
.site-header {
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
main { display: flex; flex-direction: column; }
.section {
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.section--hero {
  padding-top: 40px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px 64px;
}
.section--feature {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 72px;
}
/* The reads row: visual first in the source so it leads on desktop, text
   first once the row wraps on a phone. */
.section--feature-reverse { flex-wrap: wrap-reverse; }
.section--closing { padding-bottom: 72px; display: block; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.section-head--wide { max-width: 760px; }

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}
.brand-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}
.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  text-decoration: none;
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--fill2);
  color: var(--ink);
  cursor: pointer;
}
.btn-nav {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.btn-nav:hover { color: var(--bg); }

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

.hero-text {
  flex: 1 1 440px;
  min-width: 0;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-text .body { max-width: 540px; }

.hero-phone {
  flex: 0 1 340px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

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

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: 540px;
  margin: 0;
}
.signup--hero { margin-top: 12px; }
.signup-label { flex: 1 1 100%; font-size: 13px; font-weight: 600; color: var(--ink2); }
.signup-input {
  flex: 1 1 240px;
  min-width: 0;
  height: 56px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
}
.signup-button {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  background: var(--accent-fill);
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.signup-button:disabled { cursor: default; opacity: 0.7; }
.field-error { flex: 1 1 100%; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.done {
  max-width: 540px;
  padding: 18px 20px;
  box-sizing: border-box;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 600;
}
.done--hero { margin-top: 12px; }
/* The honeypot: off-screen rather than display:none, so it is still a field
   to a script that fills every input. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* On the red block the form uses fixed colours in both themes. */
.on-red .signup-label { color: #ffffff; }
.on-red .signup-input { border: 0; background: #ffffff; color: #201e1d; }
.on-red .signup-button { background: #201e1d; }
.on-red .field-error { color: #ffffff; }
.on-red .done { background: #ffffff; color: #201e1d; }

/* ---------- phone mock-up ---------- */

.phone {
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 54px;
  background: var(--bezel);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.45);
}
.phone-screen {
  height: 660px;
  box-sizing: border-box;
  padding: 26px 12px 0;
  overflow: hidden;
  border-radius: 44px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 6px;
}
.phone-brand { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.phone-right { display: flex; align-items: center; gap: 10px; }
.phone-date { font-size: 12px; color: var(--ink2); }
.phone-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--fill2);
  font-size: 12px;
  font-weight: 600;
}
.mini-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-card--age { padding-bottom: 16px; border-radius: 18px; gap: 6px; }
.mini-card--recovery { gap: 8px; }
.mini-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink3);
}
.mini-kicker--accent { color: var(--accent-text); }
.mini-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.mini-sub { font-size: 12px; color: var(--ink2); }
.mini-row { display: flex; align-items: center; justify-content: space-between; }
.mini-link { font-size: 13px; color: var(--accent-text); }

.gauge { display: grid; justify-items: center; }
.gauge svg { grid-area: 1 / 1; width: 100%; max-width: 232px; height: auto; }
.gauge-track { fill: none; stroke: var(--fill2); stroke-width: 7; stroke-linecap: round; }
.gauge-band { fill: none; stroke: var(--accent-band); stroke-width: 7; stroke-linecap: round; }
.gauge-tick-accent { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.gauge-tick-ink { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.gauge-label { font-size: 11px; fill: var(--ink3); text-anchor: middle; }
.gauge-value {
  grid-area: 1 / 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 10px;
}
.gauge-num { font-size: 68px; font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; }
.gauge-delta { font-size: 15px; font-weight: 600; color: var(--accent-text); }
.gauge-you { font-size: 12px; color: var(--ink2); }

.trend { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.trend span { flex: 1 1 0; border-radius: 1px; background: var(--fill2); }
.trend span:nth-child(-n+2) { height: 21px; }
.trend span:nth-child(n+3):nth-child(-n+4) { height: 20px; }
.trend span:nth-child(n+5):nth-child(-n+6) { height: 19px; }
.trend span:nth-child(n+7):nth-child(-n+8) { height: 18px; }
.trend span:nth-child(n+9):nth-child(-n+10) { height: 17px; }
.trend span:nth-child(n+11) { height: 16px; }
.trend span.now { background: var(--ink); }
.trend-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); }

.recovery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-name { font-size: 13px; color: var(--ink2); }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.stat-delta { font-size: 12px; font-weight: 600; color: var(--accent-text); }

/* ---------- cards ---------- */

.card { border-radius: 18px; background: var(--card); }
.cards-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 16px;
}
.card--step { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card--step .badge { margin-bottom: 8px; }
.card-body { font-size: 15px; line-height: 1.5; color: var(--ink2); text-wrap: pretty; }

.badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 800;
}
.badge--sm { width: 28px; height: 28px; border-radius: 8px; }
.badge--xs { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }

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

.feature-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.feature-visual { flex: 1 1 440px; min-width: 0; }

/* Today's signals */
.signals-card { overflow: hidden; }
.signals-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.signals-link { font-size: 14px; color: var(--accent-text); }
.signals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding-top: 1px;
  background: var(--line);
}
.signal { padding: 18px 22px 20px; background: var(--card); display: flex; flex-direction: column; gap: 3px; }
.signal-name { font-size: 15px; color: var(--ink2); }
.signal-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.signal-delta { font-size: 14px; color: var(--ink2); }
.signal-delta--off { font-weight: 600; color: var(--accent-text); }

/* Today's read */
.read-card {
  box-sizing: border-box;
  padding: 26px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.read-headline { font-size: 26px; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.confidence { display: flex; flex-direction: column; gap: 10px; }
.confidence-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.confidence-label { font-size: 14px; color: var(--ink2); }
.confidence-level { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.confidence-note { font-size: 13px; color: var(--ink2); }
.confidence-bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.confidence-bars span { height: 5px; border-radius: 3px; background: var(--accent); }
.do-first { display: flex; flex-direction: column; margin-top: 8px; }
.do-first-title { padding-bottom: 6px; font-size: 19px; font-weight: 800; line-height: 1.15; }
.step { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-text { display: flex; flex-direction: column; gap: 3px; }
.step-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.step-why { font-size: 13px; line-height: 1.45; color: var(--ink2); }

/* Check-in */
.checkin-visual { display: flex; flex-direction: column; gap: 12px; }
.checkin-card { box-sizing: border-box; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.checkin-head { display: flex; flex-direction: column; gap: 6px; }
.checkin-q { font-size: 22px; font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
.load-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.load {
  height: 88px;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--fill);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.load--on { background: var(--accent-soft); }
.load-name { font-size: 14px; font-weight: 600; }
.load-bars { display: flex; align-items: flex-end; gap: 4px; }
.load-bars span { width: 9px; border-radius: 2px; background: var(--fill2); }
.load-bars span:nth-child(1) { height: 6px; }
.load-bars span:nth-child(2) { height: 11px; }
.load-bars span:nth-child(3) { height: 16px; }
.load-bars span.lit { background: var(--accent); }
.checkin-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 12px;
  background: var(--accent-fill);
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
}
.moments-card {
  box-sizing: border-box;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.moments-left { display: flex; flex-direction: column; gap: 2px; }
.moments-name { font-size: 16px; font-weight: 600; }
.moments-right { display: flex; align-items: center; gap: 14px; }
.moments-times { font-size: 14px; color: var(--ink2); }
.plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--fill2);
}
.plus .icon { stroke-width: 2.5; }

/* ---------- "It is / It is not" ---------- */

.cols-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 16px;
}
.col { display: flex; flex-direction: column; gap: 10px; }
.col-title { padding: 0 22px; }
.rows-card { display: flex; flex-direction: column; }
.rows-card p { padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.rows-card p:last-child { border-bottom: 0; }

/* ---------- privacy ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 16px;
}
.card--promise { padding: 22px; display: flex; align-items: flex-start; gap: 16px; }
.card--promise p { font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.privacy-note { margin-top: -16px; font-size: 15px; color: var(--ink2); }

/* ---------- pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 16px;
}
.card--plan { padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.card--plan.featured { box-shadow: inset 0 0 0 2px var(--accent); }
.plan-head { display: flex; flex-direction: column; gap: 8px; }
.plan-title { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.plan-desc { font-size: 15px; line-height: 1.5; color: var(--ink2); }
.plan-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 10px;
}
.plan-box { padding: 16px 18px; border-radius: 14px; background: var(--fill); display: flex; flex-direction: column; gap: 6px; }
.plan-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  min-height: 24px;
}
.plan-name { font-size: 14px; font-weight: 600; color: var(--ink2); }
.plan-badge {
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.price { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.per { font-size: 14px; color: var(--ink2); }
.ticks { display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.4; }
.tick {
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.plan-foot { margin-top: auto; font-size: 13px; line-height: 1.45; color: var(--ink3); }

/* ---------- closing block ---------- */

.closing {
  box-sizing: border-box;
  padding: clamp(32px, 6vw, 72px);
  border-radius: 24px;
  background: var(--accent-fill);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.closing-head { display: flex; flex-direction: column; gap: 18px; }
.closing .brand-mark { letter-spacing: 0.18em; }
.closing-h2 {
  max-width: 820px;
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

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

.site-footer { margin-top: auto; padding: 0 24px 40px; }
.footer-inner {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-copy { font-size: 13px; color: var(--ink3); }
