/* Shared styles for the public marketing landing pages
   (/finance, /family, /investments, /planning, /settings).
   Mirrors the design tokens and components used on the homepage (index.html). */

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

:root {
  --ink:           #1d1d1f;
  --ink-inv:       #f5f5f7;
  --muted:         #6e6e73;
  --muted-inv:     #a1a1a6;
  --line:          #e3e3e6;
  --panel:         #ffffff;
  --soft:          #f5f5f7;
  --accent:        #0071e3;
  --accent-strong: #005bb5;
  --green:         #34c759;
  --purple:        #af52de;
  --orange:        #ff9500;
  --hero-bg:       #0a0a14;
  --hero-card:     rgba(255,255,255,0.06);
  --hero-line:     rgba(255,255,255,0.10);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }
body { background: var(--panel); color: var(--ink); overflow-x: hidden; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 52px;
  background: rgba(10,10,20,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: rgba(255,255,255,0.75); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  font-size: 14px; font-weight: 500;
  background: var(--accent); color: #fff;
  padding: 7px 16px; border-radius: 980px; transition: background .2s;
}
.nav-cta:hover { background: var(--accent-strong); color: #fff; }
@media (max-width: 600px) { .nav-links .nav-hide-sm { display: none; } }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: 150px 5vw 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,113,227,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 700; letter-spacing: -1.4px; line-height: 1.06;
  color: #fff; max-width: 760px; margin: 0 auto 22px;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px); line-height: 1.55;
  color: var(--muted-inv); max-width: 600px; margin: 0 auto 40px;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  font-size: 17px; font-weight: 500;
  background: var(--accent); color: #fff;
  padding: 15px 30px; border-radius: 980px;
  transition: background .2s, transform .15s; display: inline-block;
}
.btn-primary:hover { background: var(--accent-strong); transform: scale(1.02); }
.btn-ghost {
  font-size: 17px; font-weight: 400;
  color: rgba(255,255,255,0.65);
  padding: 15px 24px; border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: border-color .2s, color .2s; display: inline-block;
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.35); }

/* ── Generic section ──────────────────────────────────── */
.section { padding: 84px 5vw; }
.section-soft { background: var(--soft); }
.section-inner { max-width: 980px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.8px;
  line-height: 1.12; color: var(--ink); margin-bottom: 16px;
}
.section-head p { font-size: 18px; line-height: 1.6; color: var(--muted); }

/* Prose block (the unique body copy each page carries) */
.prose { max-width: 720px; margin: 0 auto; }
.prose p { font-size: 18px; line-height: 1.7; color: var(--ink); margin-bottom: 22px; }
.prose p.lead { font-size: 21px; color: var(--ink); }
.prose strong { font-weight: 600; }

/* Feature cards */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px;
}
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px;
}
.section-soft .feature-card { background: #fff; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-bottom: 16px;
  background: rgba(0,113,227,0.12); color: var(--accent);
}
.feature-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 8px; color: var(--ink); }
.feature-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Stat row */
.stat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; margin-top: 8px; }
.stat { text-align: center; }
.stat-value { font-size: 40px; font-weight: 700; letter-spacing: -1px; color: var(--ink); }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* FAQ */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 22px 0;
}
.faq summary {
  font-size: 18px; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 24px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { font-size: 16px; line-height: 1.65; color: var(--muted); margin-top: 14px; }

/* CTA band */
.cta-band { background: var(--hero-bg); padding: 96px 5vw; text-align: center; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 120%, rgba(0,113,227,0.28) 0%, transparent 70%);
  pointer-events: none;
}
.cta-band h2 { position: relative; font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -1px; color: #fff; max-width: 680px; margin: 0 auto 16px; }
.cta-band p { position: relative; font-size: 18px; color: var(--muted-inv); margin-bottom: 36px; }
.btn-white {
  position: relative; display: inline-block;
  font-size: 17px; font-weight: 500; background: #fff; color: var(--ink);
  padding: 15px 32px; border-radius: 980px; transition: transform .15s;
}
.btn-white:hover { transform: scale(1.02); }

/* Footer */
footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 32px 5vw; background: var(--soft); border-top: 1px solid var(--line);
}
.footer-brand { font-size: 15px; font-weight: 600; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 13px; color: var(--muted); }

/* ── Motion: hero entrance + scroll reveal ─────────────────
   Hero children animate on load; section content fades in as it
   enters the viewport (progressive enhancement via /landing.js —
   if JS doesn't run, the .reveal class is never added and all
   content stays fully visible). */
@keyframes landingFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero-inner > .hero-eyebrow { animation: landingFadeUp .7s ease both; }
.hero-inner > h1            { animation: landingFadeUp .7s ease .08s both; }
.hero-inner > .hero-sub     { animation: landingFadeUp .7s ease .16s both; }
.hero-inner > .hero-actions { animation: landingFadeUp .7s ease .24s both; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
/* Cascade cards/items within a grid or list as the group enters */
.feature-grid .feature-card.reveal:nth-child(2) { transition-delay: .07s; }
.feature-grid .feature-card.reveal:nth-child(3) { transition-delay: .14s; }
.feature-grid .feature-card.reveal:nth-child(4) { transition-delay: .07s; }
.feature-grid .feature-card.reveal:nth-child(5) { transition-delay: .14s; }
.feature-grid .feature-card.reveal:nth-child(6) { transition-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  .hero-inner > .hero-eyebrow,
  .hero-inner > h1,
  .hero-inner > .hero-sub,
  .hero-inner > .hero-actions,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
