/* ============================================================
   Council of Five — marketing site
   Bespoke styles. Palette mirrors the app (constants/colors.ts):
   celestial light-blue sky, navy ink, gold accent, warm paper.
   ============================================================ */

:root {
  /* Sky / backgrounds */
  --sky-0: #eaf3fb;
  --sky-1: #d6e7f5;
  --sky-2: #b5d3ee;
  --sky-3: #7fb1de;
  /* Ink / text */
  --ink: #0e2238;
  --ink-soft: #3a4d66;
  --ink-muted: #54677f;
  /* Surfaces */
  --paper: #fbfcfe;
  --paper-warm: #f5efe3;
  --divider: rgba(14, 34, 56, 0.08);
  --gold: #c5a572; /* decorative only (borders, badge bg, crest) */
  --gold-ink: #856526; /* darkened gold for TEXT — passes WCAG AA on light surfaces */
  --gold-soft: rgba(197, 165, 114, 0.16);
  --shadow: 0 18px 50px rgba(14, 34, 56, 0.12);
  --shadow-sm: 0 8px 24px rgba(14, 34, 56, 0.08);
  /* Advisor accents */
  --stoic: #8b5a3c;
  --stoic-soft: #e9d9c7;
  --monk: #c77a3d;
  --monk-soft: #f2e0c9;
  --founder: #1e63c7;
  --founder-soft: #d2e2f7;
  --future: #a8893e;
  --future-soft: #f1e6c7;
  --child: #d86c7a;
  --child-soft: #f7d7dc;

  --maxw: 1140px;
  --radius: 22px;
  --radius-lg: 28px;

  --serif: "Fraunces", "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sky-0);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--sky-2); }
:focus-visible { outline: 2px solid var(--founder); outline-offset: 2px; border-radius: 6px; }
.nav-links a:focus-visible, .btn:focus-visible { outline: 2px solid #9B98C9; outline-offset: 3px; }
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; transition: top 0.18s ease;
}
.skip:focus { top: 12px; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.5px; color: var(--ink); }
h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; }
h3 { font-size: 22px; font-weight: 400; letter-spacing: -0.2px; }
.lead { font-size: 19px; color: var(--ink-soft); line-height: 1.55; max-width: 42ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* crest dots (the app's signature motif) */
.crest { display: flex; gap: 8px; }
.crest span { width: 11px; height: 11px; border-radius: 50%; }
.crest span:nth-child(1) { background: var(--stoic); }
.crest span:nth-child(2) { background: var(--monk); }
.crest span:nth-child(3) { background: var(--founder); transform: translateY(-4px); }
.crest span:nth-child(4) { background: var(--future); }
.crest span:nth-child(5) { background: var(--child); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 14px 22px; border-radius: 14px; border: 0; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--divider); }
.btn-ghost:hover { background: var(--paper); }
.btn svg { width: 18px; height: 18px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(234, 243, 251, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--divider); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.brand b { font-family: var(--serif); font-weight: 500; font-size: 18px; letter-spacing: -0.2px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: 0.2s; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; position: relative; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(127, 177, 222, 0.35), transparent 70%),
    linear-gradient(180deg, var(--sky-2) 0%, var(--sky-1) 45%, var(--sky-0) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.02; margin: 18px 0 20px; }
.hero .lead { font-size: 20px; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--ink-muted); }

/* phone showcase — a single, contained device that never overflows or clips */
.phones { display: flex; justify-content: center; align-items: center; }
/* Device mockups are transparent PNGs (the dark capture canvas was removed),
   so the shadow must follow the phone silhouette via drop-shadow, not a
   rectangular box-shadow. No background/border-radius — the frame is in the art. */
.phone {
  filter: drop-shadow(0 22px 44px rgba(14, 34, 56, 0.24));
}
.phone-main {
  width: clamp(220px, 24vw, 280px);
  max-height: 72vh;
  height: auto;
  object-fit: contain;
}

/* ---------- voices ---------- */
.voices-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 44px;
}
.voice {
  background: var(--paper); border-radius: var(--radius); padding: 24px 18px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--divider);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.voice:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.voice .glyph {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; margin-bottom: 14px;
}
.voice h3 { font-size: 17px; font-weight: 500; }
.voice .tag { font-size: 13px; color: var(--ink-muted); font-style: italic; margin: 2px 0 10px; }
.voice p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 46px; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--gold-ink);
  width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature.reverse .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-media img.phone { width: 264px; }
.feature-media img.ipad { width: 100%; max-width: 560px; filter: drop-shadow(0 22px 44px rgba(14, 34, 56, 0.22)); }
.feature h2 { margin-bottom: 16px; }
.feature p { color: var(--ink-soft); font-size: 17px; max-width: 44ch; }
.feature .mini-eyebrow { color: var(--gold-ink); font-weight: 700; letter-spacing: 2px; font-size: 12px; text-transform: uppercase; }
.feature .feature-body .mini-eyebrow { display: block; margin-bottom: 12px; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; max-width: 820px; margin-left: auto; margin-right: auto; }
.plan {
  background: var(--paper); border-radius: var(--radius-lg); padding: 34px 30px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--divider); position: relative;
}
.plan.pro { border-color: var(--gold); box-shadow: var(--shadow); background: linear-gradient(180deg, #fffdf8, var(--paper)); }
.plan .plan-badge {
  position: absolute; top: -13px; right: 26px; background: var(--gold); color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; padding: 5px 12px; border-radius: 20px;
}
.plan h3 { font-size: 20px; font-weight: 500; }
.plan .price { font-family: var(--serif); font-size: 40px; color: var(--ink); margin: 10px 0 2px; }
.plan .price small { font-size: 15px; color: var(--ink-muted); font-family: var(--sans); }
.plan .plan-sub { color: var(--ink-muted); font-size: 14px; margin-bottom: 20px; }
.plan ul { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
.plan li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--ink-soft); }
.plan li svg { width: 19px; height: 19px; flex: none; margin-top: 1px; color: var(--gold-ink); }
.plan .btn { width: 100%; justify-content: center; }

/* ---------- closing CTA ---------- */
.cta-final { text-align: center; padding: 110px 0; }
.cta-final .crest { justify-content: center; margin-bottom: 22px; }
.cta-final h2 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 14px; }
.cta-final .lead { margin: 0 auto 30px; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #c6d2e2; padding: 64px 0 36px; }
.footer a { color: #c6d2e2; transition: color 0.15s; }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand b { color: #fff; }
.footer .brand img { box-shadow: none; }
.footer-col h4 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #8294ad; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a { font-size: 15px; }
.footer-blurb { font-size: 14px; line-height: 1.6; color: #94a4bd; margin-top: 16px; max-width: 34ch; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #7b8da6; }
.footer-bottom .disclaimer { font-style: italic; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- legal pages ---------- */
.legal-page { background: var(--sky-0); }
.legal-hero { padding: 56px 0 8px; }
.legal-body { padding: 24px 0 90px; }
.legal-body .wrap { max-width: 760px; }
.legal-body h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 8px; }
.legal-body h2 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 36px 0 10px; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.legal-body ul { margin: 8px 0 8px 22px; display: grid; gap: 8px; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body hr { border: 0; border-top: 1px solid var(--divider); margin: 28px 0; }
.legal-body a { color: var(--founder); text-decoration: underline; }
.legal-meta { color: var(--ink-muted); font-size: 14px; }

/* ---------- responsive ---------- */
/* Stack the hero earlier (1024px) so the back-phone fan never crowds the copy
   in the small-laptop / large-tablet "tween" zone. */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero .crest { justify-content: center; }
  .phones { min-height: 500px; margin-top: 16px; }
  .feature { gap: 40px; }
  .steps { gap: 20px; }
}
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero .crest { justify-content: center; }
  .phones { min-height: 460px; margin-top: 20px; }
  .voices-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .feature { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; text-align: center; }
  .feature.reverse .feature-media { order: 0; }
  .feature p { margin-left: auto; margin-right: auto; }
  .feature .feature-body .mini-eyebrow { text-align: center; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--sky-0); padding: 18px 24px 26px; gap: 18px;
    border-bottom: 1px solid var(--divider); box-shadow: var(--shadow-sm);
  }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .voices-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .phone-main { width: 230px; }
  .phone-back { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn:hover, .voice:hover { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
