/*
  Evening In — shared styles for the prelaunch site (index, support, privacy).
  Same-origin stylesheet, no external fonts/scripts/trackers (keeps the app's
  "Data Not Collected" promise). Colors, type, and voice come from the brand kit
  (02-identity/palette.md, typography.md, voice.md).
*/

:root {
  /* Light-mode only (per preference). The hero keeps its dark "evening" band by design. */
  color-scheme: light;
  --primary:            #E8A03D;
  --on-primary:         #233152;
  --primary-container:  #F7E6C8;
  --on-primary-container:#7A4E12;
  --accent:             #E8B58A;
  --background:         #FBF6EE;
  --on-background:      #2A3A5E;
  --surface:            #FFFFFF;
  --on-surface:         #2A3A5E;
  --surface-variant:    #F1EADD;
  /* Lifted from #5A6478 → ~7:1 on white, clearing AAA for body per typography.md */
  --on-surface-variant: #4C5468;
  --outline:            #DED5C4;
  /* Form-field border: ≥3:1 against both the white card and the cream fill (WCAG 1.4.11) */
  --field-border:       #968A72;
  --success-text:       #3F6A4E;
  --dusk:               #2A3A5E;
  --glow-1:             #FFE9BC;
  --glow-2:             #F4B95C;
  --nav-h:              58px;
}

/* Dark-mode palette overrides intentionally removed — the site renders light-mode only. */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Keep in-page anchors clear of the sticky nav */
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--on-background);
  font-family: -apple-system, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  /* Body never below 17px, per the accessibility floor in typography.md */
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Marketing headlines may use a warmer/rounded face (typography.md); the app does not. */
h1, h2, h3 {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, "SF Pro Display", system-ui, sans-serif;
  color: var(--on-background);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Visible keyboard focus for links & buttons (WCAG 2.4.7). --on-background flips
   with the color scheme, so the ring stays high-contrast in both light and dark. */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--on-background);
  outline-offset: 2px;
}

/* Skip link — first tab stop, hidden until focused */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--on-surface);
  border: 1px solid var(--outline); border-radius: 10px;
  padding: 10px 14px; font-weight: 600; text-decoration: none;
  transition: top 160ms ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Top navigation (shared) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--outline);
}
.nav-inner {
  max-width: 920px; margin: 0 auto;
  padding: 0 20px; min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--on-background); text-decoration: none; white-space: nowrap;
}
.nav-brand .in { color: var(--primary); }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end;
}
.nav-links a {
  color: var(--on-surface-variant); text-decoration: none;
  font-size: 16px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.nav-links a:hover { color: var(--on-background); background: color-mix(in srgb, var(--on-background) 7%, transparent); }
.nav-links a[aria-current="page"] { color: var(--on-background); }
.nav-links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--primary); margin: 3px 12px 0;
}
.nav-links a.nav-cta {
  color: var(--on-primary); background: var(--primary);
  font-weight: 700; padding: 9px 16px;
}
.nav-links a.nav-cta:hover { color: var(--on-primary); filter: brightness(1.04); }
.nav-links a.nav-cta[aria-current="page"]::after { display: none; }
/* Narrow screens: stack the brand over centered links so nothing collides. */
@media (max-width: 560px) {
  .nav-inner { flex-wrap: wrap; justify-content: center; gap: 4px 6px; padding-top: 8px; padding-bottom: 8px; }
  .nav-brand { flex-basis: 100%; text-align: center; }
  .nav-links { flex-basis: 100%; justify-content: center; }
  /* Two-row nav is taller — keep anchored sections clear of it. */
  html { scroll-padding-top: 116px; }
}
@media (max-width: 380px) {
  .nav-links a { padding: 7px 8px; font-size: 15px; }
}

/* ---------- Hero ---------- */
header.hero {
  text-align: center;
  padding: 64px 24px 44px;
  /* Always-on dark "evening" band, regardless of the visitor's color scheme.
     The reading-heavy sections below stay light for 45–65 legibility. */
  background: radial-gradient(125% 85% at 50% 0%, #26375E 0%, #1B2A4A 52%, #14203A 100%);
}
/* Force light-on-dark text inside the hero even when the page renders light. */
header.hero .brandline,
header.hero h1 { color: #F2ECE1; }
header.hero .brandline .in { color: #F0AE4F; }
header.hero .lede { color: #EAE4D8; }
header.hero .category,
header.hero .platform-cue { color: #B7BECE; }
/* Pin the phone mockup to the light-mode app look so it always pops on the dark band. */
header.hero .device {
  --surface: #FFFFFF;
  --background: #FBF6EE;
  --on-background: #2A3A5E;
  --on-surface-variant: #5A6478;
  --outline: #DED5C4;
  --primary: #E8A03D;
  --on-primary-container: #7A4E12;
}

.mark {
  width: 96px; height: 96px;
  display: block; margin: 0 auto 28px;
  border-radius: 24px;
  box-shadow: 0 10px 40px -12px rgba(232,160,61,0.55);
}

.brandline {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--on-background);
  margin: 0 0 4px;
}
.brandline .in { color: var(--primary); }

/* The category always rides with the name where a new person meets it (voice.md, non-negotiable) */
.category {
  font-size: 16px;
  color: var(--on-surface-variant);
  margin: 0 0 40px;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(30px, 6.4vw, 44px);
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 15ch;
}

.lede {
  font-size: 20px;
  color: var(--on-background);
  max-width: 34ch;
  margin: 0 auto 28px;
}

/* "Coming to iPhone" cue — sets expectations, adds legitimacy for a cautious audience */
.platform-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--on-surface-variant);
  margin: 0 auto 34px;
  letter-spacing: 0.01em;
}
.platform-cue svg { width: 15px; height: 18px; fill: currentColor; flex: none; }

/* ---------- Hero device mockup (show the product) ---------- */
/* A self-contained CSS render of the Today view — no image asset, no external deps,
   keeping the page's "no external fonts/scripts/trackers" promise intact.
   Swap for a real device-frame screenshot (03-ui-system/mockups) before launch. */
.hero-mock { margin: 4px auto 8px; display: flex; justify-content: center; }
.device {
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 30px 70px -28px rgba(42,58,94,0.55);
}
.device-screen {
  background: var(--background);
  border-radius: 30px;
  padding: 16px 14px 14px;
  overflow: hidden;
}
.mock-nav-title { font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-weight: 700; font-size: 20px; color: var(--on-background); }
.mock-nav-sub { font-size: 12px; color: var(--on-surface-variant); margin: 2px 0 14px; }
.mock-reassure {
  background: linear-gradient(135deg, #2A3A5E, #3A4D74);
  color: #F6E7C8; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.mock-reassure::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px;
  background: radial-gradient(circle, rgba(232,160,61,0.55), transparent 70%);
}
.mock-reassure strong { display: block; font-size: 15px; font-weight: 600; }
.mock-reassure span { font-size: 12px; opacity: 0.85; }
.mock-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.mock-card .grow { text-align: left; }
.mock-med { font-size: 14px; font-weight: 600; color: var(--on-background); }
.mock-detail { font-size: 12px; color: var(--on-surface-variant); }
.mock-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--success-text);
  background: color-mix(in srgb, var(--success-text) 14%, transparent);
  border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}
.mock-badge .bdot { width: 7px; height: 7px; border-radius: 50%; background: #5E8B6A; }
/* Muted status for an unassigned item (mirrors the app's grey state) */
.mock-badge--muted { color: var(--on-surface-variant); background: color-mix(in srgb, var(--on-surface-variant) 16%, transparent); }
.mock-badge--muted .bdot { background: var(--on-surface-variant); }

/* Grouped-list style (matches the crisp white card on the Medications screen) */
.mock-list { background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; overflow: hidden; }
.mock-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; text-align: left; }
.mock-row + .mock-row { border-top: 1px solid var(--outline); }
.mock-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-variant);
  color: var(--on-background); display: flex; align-items: center; justify-content: center; }
.mock-ico svg { width: 16px; height: 16px; }
.mock-row .grow { flex: 1; min-width: 0; }
.mock-status { font-size: 12px; font-weight: 600; margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; }
.mock-status .bdot { width: 7px; height: 7px; border-radius: 50%; }
.mock-status.covered { color: var(--success-text); }
.mock-status.covered .bdot { background: #5E8B6A; }
.mock-status.open { color: var(--on-surface-variant); }
.mock-status.open .bdot { background: var(--on-surface-variant); }
.mock-chev { flex: none; align-self: center; color: var(--on-surface-variant); font-size: 17px; opacity: 0.55; }

/* ---------- Second product shot: coordination showcase ---------- */
section.showcase { padding: 56px 0 8px; }
.showcase-inner { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.showcase-copy { flex: 1 1 260px; max-width: 360px; }
.showcase-copy h2 { font-size: 25px; margin: 0 0 10px; text-align: left; }
.showcase-copy p { font-size: 17px; color: var(--on-surface-variant); margin: 0; }
.showcase-mock { flex: 0 0 auto; }

/* ---------- Repeat CTA (capture intent at the moment of conviction) ---------- */
.cta-repeat { max-width: 460px; margin: 8px auto 0; text-align: center; }
.cta-repeat h2 { font-size: 22px; margin: 0 0 14px; }

/* ---------- Sticky sign-up bar (appears once the top form scrolls away) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--outline);
  padding: 10px 16px;
  transform: translateY(120%);
  transition: transform 260ms ease;
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta form { flex-direction: row; gap: 8px; max-width: 560px; margin: 0 auto; }
.sticky-cta input[type="email"] { flex: 1; padding: 12px 14px; font-size: 16px; }
.sticky-cta button.cta { padding: 12px 18px; min-height: 46px; white-space: nowrap; }
.sticky-cta .sticky-label { display: none; }
@media (max-width: 520px) {
  .sticky-cta button.cta span.long { display: none; }
}

/* One honest line of human provenance — trust is the moat */
.provenance {
  max-width: 40ch; margin: 22px auto 0;
  font-size: 15px; color: var(--on-surface-variant);
}

/* ---------- Waitlist form ---------- */
.signup {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: 0 8px 30px -18px rgba(42,58,94,0.35);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.signup h2 { font-size: 21px; margin: 0 0 6px; }
.signup p.sub { margin: 0 0 18px; font-size: 16px; color: var(--on-surface-variant); }

form { display: flex; flex-direction: column; gap: 12px; }

label.field-label {
  font-size: 15px; font-weight: 600; color: var(--on-surface-variant);
  text-align: left;
}

input[type="email"] {
  font: inherit;
  font-size: 18px;
  padding: 15px 16px;
  border: 1.5px solid var(--field-border);
  border-radius: 14px;
  background: var(--background);
  color: var(--on-background);
  width: 100%;
}
input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 28%, transparent);
}

button.cta {
  font: inherit;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  /* Amber buttons always carry dark indigo text, never white (palette.md rule 1) */
  color: var(--on-primary);
  background: var(--primary);
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  min-height: 52px;           /* ≥44pt touch target */
  cursor: pointer;
  transition: transform 220ms ease, filter 220ms ease; /* gentle ease, never springy */
}
button.cta:hover { filter: brightness(1.04); }
button.cta:active { transform: translateY(1px); }

.trust {
  margin: 16px auto 0;
  font-size: 15px;
  color: var(--success-text);
  max-width: 40ch;
}
.trust strong { font-weight: 700; }

.form-note {
  margin-top: 10px; font-size: 13px; color: var(--on-surface-variant);
}

/* Calm inline confirmation (no confetti — brand guardrail) */
.confirm {
  display: none;
  text-align: center;
  padding: 8px 4px;
}
.confirm.show { display: block; }
.confirm .check {
  width: 44px; height: 44px; margin: 0 auto 12px; display: block;
}
.confirm h2 { margin: 0 0 6px; }
.confirm p { margin: 0; color: var(--on-surface-variant); font-size: 16px; }

/* ---------- How it works ---------- */
section.how { padding: 72px 0 8px; }
section.how h2 { text-align: center; font-size: 26px; margin: 0 0 36px; }

.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 18px;
  padding: 22px 22px;
}
.card h3 { font-size: 19px; margin: 0 0 6px; }
.card p { margin: 0; font-size: 17px; color: var(--on-surface-variant); }
.card .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle;
  background: var(--primary);
}
.card.taken .dot { background: #5E8B6A; }

/* ---------- Content pages (support, privacy) ---------- */
section.doc { padding: 56px 0 8px; }
section.doc.first { padding-top: 44px; }
section.doc h1 { font-size: clamp(28px, 6vw, 38px); margin: 0 0 6px; max-width: none; text-align: left; }
section.doc .doc-lede { font-size: 18px; color: var(--on-surface-variant); margin: 0 0 8px; }
section.doc h2 { font-size: 24px; margin: 34px 0 8px; }
section.doc h3 { font-size: 20px; margin: 28px 0 8px; }
section.doc p, section.doc li { font-size: 17px; color: var(--on-background); }
section.doc a { color: var(--on-primary-container); }
section.doc ul { padding-left: 22px; }
section.doc li { margin: 6px 0; }
.short-version {
  background: var(--surface-variant);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 16px 0 8px;
}
/* Back-to-home affordance on content pages */
.doc-back { display: inline-block; margin-top: 40px; font-weight: 600; text-decoration: none; }
.doc-back:hover { text-decoration: underline; }

hr.rule { border: none; border-top: 1px solid var(--outline); margin: 72px 0 0; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 48px 24px 64px;
  color: var(--on-surface-variant);
  font-size: 15px;
}
footer nav a {
  color: var(--on-surface-variant);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0 10px;
}
footer nav a:hover { color: var(--primary); }
footer .disclaimer {
  max-width: 52ch; margin: 20px auto 0; font-size: 13px; line-height: 1.5;
}

:target { scroll-margin-top: calc(var(--nav-h) + 16px); }
