/* Precursor — dawn palette (First Light / Daybreak), two lights via data-theme.
   v6: design-handoff UI overhaul (2026-07-11). Tokens follow the design system's
   README (Handoffs/design_handoff_landing_page). SHARED by every page: index,
   privacy, support, terms, calculators/, compare/. Page-specific styling stays
   in each page's own <style> block, driven by these tokens. */

/* ---------- Self-hosted fonts (assets/fonts; zero third-party requests) ---------- */
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root, :root[data-theme="dark"] {
  /* First Light (dark, default) */
  --canvas:  #05070f;            /* deep-night page canvas */
  --night:   #16203c;            /* header/hero radial, outer stop */
  --indigo:  #0b1022;            /* header/hero radial, middle stop */
  --violet:  #05070f;            /* header/hero radial, edge stop */
  --card:    #14172b;
  --card-inset: #1c2038;
  --border:  #2a2e54;            /* hairline */
  --ink:     #eceaf4;            /* primary text */
  --body-text: #c9cce3;          /* content-page paragraphs */
  --muted:   #8e92b4;            /* secondary text */
  --dim:     #6b7396;
  --amber:   #f2a65a;            /* signature accent */
  --first-light: #f7ce96;        /* warm highlight, content h2 */
  --kicker:  #f6a94c;
  --seam:    #e89246;
  --bead:    #f79a3c;
  --tracer:  #5b76c4;
  --tracer-tint: #7a96e0;        /* the hopeful blue word in headlines */
  --link:    #f2a65a;
  --link-hover: #f7ce96;
  --accent-soft: rgba(242, 166, 90, 0.10);   /* selected-chip fill */
  --chip-on-text: #f7ce96;
  --pill-bg: rgba(20, 23, 43, 0.85);         /* signup pill / nav buttons */
  --btn-bg:  linear-gradient(180deg, #f7ce96, #f2a65a);
  --btn-text: #3a2410;
  --btn-hover-brightness: 1.06;
  --poster-grad: linear-gradient(180deg, #f7ce96, #e89246);
  --num-grad: linear-gradient(100deg, #f7ce96, #f2a65a);
  --shadow-deep: rgba(3, 5, 11, 0.8);
  --shadow-side: rgba(3, 5, 11, 0.6);
  --bead-glow-hi: 0 0 8px rgba(247, 154, 60, 0.9);
  --bead-glow-lo: 0 0 14px rgba(247, 154, 60, 0.5);
  --bead-drop: drop-shadow(0 0 6px rgba(247, 154, 60, 0.9));
  --maxw:    720px;
  --ease-settle: cubic-bezier(0.4, 0, 0.2, 1);
}
:root[data-theme="light"] {
  /* Daybreak (light) — token table from README-light-mode.md */
  --canvas:  #faf6f0;
  --night:   #dde5f4;   /* content-page band: morning sky into cream */
  --indigo:  #f1e5d3;
  --violet:  #faf6f0;
  --card:    #ffffff;
  --card-inset: #f6e9da;
  --border:  #e6dfd4;
  --ink:     #2d2a4a;
  --body-text: #4a4668;
  --muted:   #8b86a8;
  --dim:     #8b86a8;
  --amber:   #c2722e;            /* copper; raw amber fails AA on cream */
  --first-light: #c2722e;
  --kicker:  #b5641c;
  --seam:    #a85e16;
  --bead:    #e8862f;
  --tracer:  #5b76c4;
  --tracer-tint: #3d55a8;
  --link:    #c2722e;
  --link-hover: #a85e16;
  --accent-soft: rgba(194, 114, 46, 0.08);
  --chip-on-text: #a85e16;
  --pill-bg: rgba(255, 255, 255, 0.8);
  --btn-bg:  #2d2a4a;            /* light theme flips: night-ink fill, cream text */
  --btn-text: #f6efe3;
  --btn-hover-brightness: 1.15;
  --poster-grad: linear-gradient(180deg, #c2722e, #a85e16);
  --num-grad: linear-gradient(100deg, #c2722e, #a85e16);
  --shadow-deep: rgba(90, 78, 54, 0.25);   /* warm gray on cream */
  --shadow-side: rgba(90, 78, 54, 0.18);
  --bead-glow-hi: 0 0 8px rgba(232, 134, 47, 0.5);
  --bead-glow-lo: 0 0 14px rgba(232, 134, 47, 0.3);
  --bead-drop: drop-shadow(0 0 6px rgba(232, 134, 47, 0.5));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ---------- Theme toggle (fixed, all pages) ---------- */
#theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}
#theme-toggle:hover { color: var(--ink); border-color: var(--amber); }

/* ---------- Buttons (shared) ---------- */
.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(var(--btn-hover-brightness)); }
.btn-primary:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.btn-secondary {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--link);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--amber); }
.btn-secondary:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Kicker (ALL-CAPS eyebrow) ---------- */
.kicker {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--kicker);
}

/* ---------- Beta signup (index) ---------- */
.signup {
  margin-top: 36px;
  width: 100%;
  max-width: 400px;
}
.signup-lede {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
}
/* one joined pill: input and button share a single rounded shell */
#beta-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  margin: 0 auto;
}
#beta-form:focus-within { border-color: var(--amber); }
/* Daybreak pill is slightly more translucent than the nav buttons (spec) */
:root[data-theme="light"] #beta-form { background: rgba(255, 255, 255, 0.75); }
#beta-email {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}
#beta-email::placeholder { color: var(--muted); opacity: 0.75; }
/* honeypot: parked far off-canvas, invisible to humans */
#beta-website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
#beta-btn {
  padding: 13px 22px;
  border-radius: 999px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
#beta-btn:hover { filter: brightness(var(--btn-hover-brightness)); }
#beta-btn:disabled { opacity: 0.65; cursor: default; }
.signup-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 1.2em;
}
.signup-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.signup-done-main {
  color: var(--amber);
  font-size: 16px;
  font-weight: 600;
}
.signup-done-lede {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}
.share-btn {
  margin-top: 4px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--link);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}
.share-btn:hover { border-color: var(--amber); }
/* Instant-install CTA shown after signup once the TestFlight link is live. */
.tf-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tf-btn:hover { filter: brightness(var(--btn-hover-brightness)); }
.tf-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Content pages: header band ---------- */
.page-head {
  background: radial-gradient(125% 160% at 50% -20%,
    var(--night) 0%, var(--indigo) 55%, var(--violet) 100%);
  padding: 40px 24px 56px;
}
.page-head-inner { max-width: var(--maxw); margin: 0 auto; }
.page-head .back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.page-head .back:hover { color: var(--ink); }
.page-head .kicker { margin-top: 44px; }
/* pages without a kicker (compare/, calculators/): keep the band's breathing room */
.page-head .back + h1 { margin-top: 40px; }
.page-head h1 {
  font-weight: 700;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 12px 0 0;
}
.page-head .updated { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.page-head .lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 48ch;
}
.page-head .lede a { color: var(--link); }
.page-head .lede a:hover { color: var(--link-hover); }

/* ---------- Content pages: body ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.page h2 {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--first-light);
  margin: 36px 0 10px;
}
.page h2:first-child { margin-top: 0; }
.page p, .page li {
  color: var(--body-text);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.page li { margin-bottom: 10px; }
.page ul { padding-left: 22px; margin-bottom: 14px; }
.page strong { color: var(--ink); }
.page a { color: var(--link); }
.page a:hover { color: var(--link-hover); }
/* buttons rendered as links inside content pages: keep button text colors
   (".page a" outranks ".btn-primary" on specificity otherwise) */
.page a.btn-primary, .page a.btn-primary:hover { color: var(--btn-text); }
.page a.btn-secondary, .page a.btn-secondary:hover { color: var(--link); }
.callout {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  padding: 22px 24px;
  margin: 20px 0;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 26px 24px 34px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  margin: 0 11px;
}
footer a:hover { color: var(--ink); text-decoration: underline; }
/* Guides row: links every GEO/compare page one hop from home (also in sitemap.xml). */
.footer-guides {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  max-width: 560px;
  margin: 0 auto 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.footer-guides a { font-size: 0.85rem; }
.footer-legal { margin-bottom: 2px; }

/* ---------- Reduced motion: instant everything, site-wide ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
