/* Tokens pulled directly from mobile/src/lib/theme.ts — the app's own
   warm-palette design system — not invented for this page. */
:root {
  --accent: #D85A30;
  --accent-light: #FAECE7;
  --accent-dark: #993C1D;
  --bg: #FBF6EF;
  --border: #E8DDD0;
  --card: #FFFFFF;
  --text: #3A2E27;
  --text-muted: #8A7D6E;
  /* The app's own per-shortcut colors, pulled directly from
     mobile/src/lib/theme.ts's SHORTCUT_ICON_COLORS — not approximated. */
  --c-inbox: #EC7F8A;
  --c-notes: #E8896F;
  --c-games: #D9645A;
  --c-gallery: #E06B5E;
  --c-navigate-home: #E58A6E;
  --c-analysis: #C15E52;
  --c-survey: #E58A6E;
  --c-physical-exercise: #D9756A;
  --c-location: #E2755F;
  --c-stories: #E0947E;
  /* The logo/app-icon's own distinct brand blue (icon-1024.png) --
     used sparingly, as an accent to the logo mark only, never as the
     page's functional UI color (that's --accent, matching the app). */
  --brand-blue: #3A76F5;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 246, 239, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; display: block; }
.brand-name {
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 600;
}
.site-header nav a { color: var(--text-muted); }
.site-header nav a.active, .site-header nav a:hover { color: var(--accent); text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none; }

main { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
main.narrow { max-width: 760px; padding-top: 40px; padding-bottom: 80px; }

.site-footer {
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.site-footer nav { display: flex; gap: 18px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 42px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 16px; }
.hero p.tagline { font-size: 18px; color: var(--text-muted); max-width: 50ch; margin: 0 0 28px; }
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 260px;
  border-radius: 34px;
  overflow: hidden;
  border: 8px solid #211c17;
  box-shadow: 0 30px 60px -20px rgba(58, 46, 39, 0.35);
  background: #211c17;
}
/* The real screenshot is 750x1334px; we hide only the top ~136px (the
   greeting text + real profile photo, for privacy) and show everything
   below it. A vertical % margin resolves against the containing block's
   WIDTH in CSS, and since the image scales uniformly with width, that
   makes this crop exact at any phone-frame size with no per-breakpoint
   recalculation needed — the earlier fixed-pixel version didn't account
   for the frame's own width, so its crop window read past the actual
   scaled image height and exposed the frame's dark background as a
   false "black bottom half." */
.phone-frame .crop {
  width: 100%;
  aspect-ratio: 750 / 1198;
  overflow: hidden;
}
.phone-frame .crop img {
  display: block;
  width: 100%;
  margin-top: -18.13%;
}
.hero-logo-badge {
  position: absolute;
  top: -18px;
  right: 10px;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(58, 46, 39, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.hero-logo-badge img { width: 100%; height: 100%; }

/* ---------- Pre-register form ---------- */
.preregister-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  flex-wrap: wrap;
}
.preregister-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  color: var(--text);
}
.preregister-form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.preregister-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.preregister-form button:hover { background: var(--accent-dark); }
.preregister-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }
.preregister-success {
  display: none;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 600;
  max-width: 420px;
}

/* ---------- Sections ---------- */
section.block { padding: 56px 0; border-top: 1px solid var(--border); }
section.block:first-of-type { border-top: none; }
.section-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title { font-size: 28px; font-weight: 800; margin: 0 0 16px; max-width: 24ch; }
.section-lead { font-size: 16px; color: var(--text-muted); max-width: 60ch; margin: 0 0 32px; }

.mission {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 44px;
  align-items: center;
}
.mission-illustration { display: flex; justify-content: center; }
.mission-illustration svg { width: 200px; height: 200px; }
.mission .section-lead { margin-bottom: 0; }

/* ---------- Audience split (family vs. the person themself) ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0 28px;
  align-items: stretch;
}
.audience-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
}
.audience-card .icon { font-size: 34px; display: block; margin-bottom: 16px; }
.audience-card h3 { font-size: 21px; margin: 0 0 10px; }
.audience-card p { font-size: 15px; color: var(--text-muted); margin: 0; }
.audience-note {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  margin: 14px 0 0;
}
.audience-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 72px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
}
.audience-connector .mdi {
  font-size: 22px;
  color: var(--accent);
  background: var(--accent-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.peer-card {
  background: var(--accent-light);
  border-radius: 20px;
  padding: 32px 36px;
  text-align: center;
  max-width: 640px;
  margin: 28px auto 0;
}
.peer-card .icon {
  font-size: 32px;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 14px;
}
.peer-card h3 { font-size: 19px; margin: 0 0 10px; }
.peer-card p { font-size: 14.5px; color: var(--text); margin: 0; }

@media (max-width: 860px) {
  .audience-grid { grid-template-columns: 1fr; gap: 16px; }
  .audience-connector { flex-direction: row; width: auto; margin: 0 auto; }
}

.pilot-banner {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  display: inline-block;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.problem-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }
.problem-card .stat { font-size: 30px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.feature-card .icon {
  font-size: 30px;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; margin: 0 0 6px; }
.feature-card p { font-size: 13.5px; color: var(--text-muted); margin: 0; }

/* Mirrors the app's own shortcut-card look exactly (PrimaryHomeScreen.tsx's
   shortcutCard style): white card, --accent-light border, 12px radius, a
   single colored MaterialDesignIcons glyph above the label — same icon
   names and same per-shortcut colors as the real Home screen. */
.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.icon-tile {
  background: var(--card);
  border: 1px solid var(--accent-light);
  border-radius: 12px;
  width: 104px;
  padding: 14px 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.icon-tile .mdi { font-size: 26px; margin-bottom: 8px; display: block; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.pricing-card .tier { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent); }
.pricing-card .price { font-size: 26px; font-weight: 800; margin: 8px 0 4px; }
.pricing-card .price span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.pricing-card .desc { font-size: 12.5px; color: var(--text-muted); }

.cta-band {
  background: var(--accent);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: 26px; margin: 0 0 10px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0 0 24px; }
.cta-band .preregister-form { margin: 0 auto; }
.cta-band .preregister-form input[type="email"] { border: none; }
.cta-band .preregister-form button { background: var(--text); }
.cta-band .preregister-form button:hover { background: #2a221c; }
.cta-band .preregister-note { color: rgba(255,255,255,0.75); }
.cta-band .preregister-success { background: rgba(255,255,255,0.18); color: #fff; }

.pilot-badge {
  display: inline-block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---------- Legal pages ---------- */
.legal-page h1 { font-size: 28px; margin: 0 0 4px; }
.last-updated { color: var(--text-muted); font-size: 13.5px; margin: 0 0 20px; }
.draft-notice {
  background: var(--accent-light);
  border: 1px solid #E8CBBB;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 32px;
}
.legal-section { margin-bottom: 28px; }
.legal-section h2 { font-size: 17px; margin: 0 0 10px; }
.legal-section p { font-size: 14.5px; margin: 0 0 10px; }
.legal-section ul { font-size: 14.5px; margin: 0 0 10px; padding-left: 22px; }
.legal-section li { margin-bottom: 4px; }
.legal-section hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- Support page ---------- */
.support-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.support-card h2 { font-size: 16px; margin: 0 0 8px; }
.support-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { order: -1; }
  .phone-frame { width: 220px; }
  .mission { grid-template-columns: 1fr; }
  .mission-illustration { order: -1; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .section-title { font-size: 22px; }
  main.narrow { padding: 28px 16px 64px; }
  .cta-band { padding: 36px 20px; }
}
