@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ════════════════════════════════════════
   TOKENS
════════════════════════════════════════ */
:root {
  --ink:        #1a1015;
  --muted:      #6b5862;
  --quiet:      #9a8990;
  --cream:      #faf6f1;
  --white:      #fffefb;
  --line:       #e8d8d0;
  --line-soft:  #f0e4de;

  --burg:       #6b2040;
  --burg-mid:   #4a1229;
  --burg-dark:  #2e0b1a;
  --rose:       #f9edf2;
  --rose-mid:   #f0d6e2;

  --teal:       #0b6555;
  --teal-soft:  #e6f4f1;

  --gold:       #9e6e28;

  --shadow-sm:  0 4px 16px rgba(46,11,26,.07);
  --shadow-md:  0 12px 40px rgba(46,11,26,.10);
  --shadow-lg:  0 24px 64px rgba(46,11,26,.13);

  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-pill: 999px;

  /* ── Type scale ──────────────────────
     xs    11px  labels, eyebrows, micro
     sm    13px  secondary body, captions
     base  15px  primary body copy
     lg    17px  lead / intro paragraphs
     xl    20px  small headings in cards
     2xl   24px  card h3, formbox h3
     3xl   30px  panel h2, section sub-titles
     4xl   38px  page h2 (sections)
     5xl   46px  hero h1
  ──────────────────────────────────── */
  --fs-xs:   11px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-lg:   17px;
  --fs-xl:   20px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;
  --fs-4xl:  38px;
  --fs-5xl:  46px;
}

/* ════════════════════════════════════════
   RESET
════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: var(--fs-base);
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 40% at 88% 0%,   rgba(11,101,85,.07), transparent),
    radial-gradient(ellipse 50% 35% at 10% 22%,  rgba(107,32,64,.05), transparent),
    var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }

/* ════════════════════════════════════════
   HEADINGS — Playfair Display throughout
   Sizes are deliberately CONTEXTUAL:
   bare h1/h2/h3 in flow get these defaults;
   components override with their own sizes.
════════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--burg-dark);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}
/* Default flow sizes — only apply outside components */
h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }

p { font-size: var(--fs-base); line-height: 1.75; color: var(--muted); }

/* ════════════════════════════════════════
   EYEBROW / TAG
════════════════════════════════════════ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  color: var(--burg);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.tag {
  display: inline-flex;
  background: var(--rose); color: var(--burg);
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.pill {
  background: var(--teal-soft); color: var(--teal);
  border-radius: var(--r-pill); padding: 4px 11px;
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,246,241,.96);
  border-bottom: 1px solid rgba(232,216,208,.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 13px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--burg-dark), var(--burg) 55%, var(--teal));
  box-shadow: 0 3px 10px rgba(107,32,64,.28);
}
/* Brand name: deliberately smaller than h1—it's a logo, not a heading */
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;               /* fixed, never changes */
  font-weight: 700;
  color: var(--burg-dark);
  line-height: 1;
  letter-spacing: -.02em;
}
.brand-sub { font-size: 10px; color: var(--quiet); margin-top: 3px; letter-spacing: .02em; }

.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted);
  padding: 6px 9px; border-radius: var(--r-sm);
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--burg); background: var(--rose); }

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-pill); padding: 9px 18px; border: 0;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; white-space: nowrap;
  transition: opacity .15s, transform .12s;
}
.btn:hover { opacity: .86; transform: translateY(-1px); }
.btn.primary   { background: var(--burg); color: #fff; box-shadow: 0 6px 18px rgba(107,32,64,.22); }
.btn.secondary { background: #fff; color: var(--burg); border: 1px solid var(--rose-mid); }
.btn.teal      { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(11,101,85,.20); }
.btn.ghost     { background: transparent; color: var(--burg); border: 1px solid var(--line); }

/* ════════════════════════════════════════
   LAYOUT
════════════════════════════════════════ */
.shell { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  padding: 60px 28px 56px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 52px; align-items: center;
}
/* Hero h1 keeps the largest size */
.hero h1 {
  margin-top: 18px;
  font-size: var(--fs-5xl);   /* 46px */
  line-height: 1.06;
}
.lead {
  margin-top: 18px; color: var(--muted);
  font-size: var(--fs-base);  /* 15px — readable, not bloated */
  line-height: 1.85; max-width: 600px;
}
.lead strong { color: var(--burg-dark); font-weight: 500; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.micro { margin-top: 14px; color: var(--quiet); font-size: var(--fs-xs); }

/* ════════════════════════════════════════
   SNAPSHOT PANEL (hero right col)
════════════════════════════════════════ */
.panel {
  background: rgba(255,255,255,.93); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 28px; box-shadow: var(--shadow-lg);
}
.panel-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; margin-bottom: 18px;
}
/* Panel h2 is a sub-heading in a widget — NOT a page title */
.panel h2 {
  font-size: var(--fs-2xl);   /* 24px */
  margin-top: 5px;
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 13px 14px;
}
.stat label {
  display: block; font-size: var(--fs-xs); color: var(--quiet);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.stat strong {
  display: block; margin-top: 5px;
  font-size: var(--fs-xl);    /* 20px */
  color: var(--ink); line-height: 1;
}
.stat span { display: block; margin-top: 4px; color: var(--quiet); font-size: var(--fs-xs); }

.dark-note {
  margin-top: 10px; padding: 16px 18px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--burg-dark), var(--burg) 60%, var(--teal));
}
.dark-note label {
  display: block; font-size: var(--fs-xs); color: rgba(255,255,255,.55);
  font-weight: 600; letter-spacing: .10em; text-transform: uppercase;
}
.dark-note p {
  margin-top: 7px; color: rgba(255,255,255,.82);
  font-size: var(--fs-sm);    /* 13px */
  line-height: 1.72;
}

/* ════════════════════════════════════════
   SECTIONS
════════════════════════════════════════ */
.section { padding: 60px 0; }
.section.alt {
  background: rgba(255,255,255,.50);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.center { text-align: center; max-width: 700px; margin: 0 auto 40px; }
/* Section center headings: one step below hero */
.center h1, .center h2 {
  font-size: var(--fs-4xl);   /* 38px */
  line-height: 1.08; margin-top: 12px;
}
.center p { margin-top: 12px; color: var(--muted); font-size: var(--fs-base); line-height: 1.8; }

.band {
  background: linear-gradient(135deg, var(--burg-dark), var(--burg) 55%, var(--teal));
  color: white; border-radius: var(--r-xl); padding: 44px 48px; box-shadow: var(--shadow-lg);
}
.band h2 {
  color: white;
  font-size: var(--fs-3xl);   /* 30px — band is a callout, not a page title */
  line-height: 1.08;
}
.band p { margin-top: 16px; color: rgba(255,255,255,.78); font-size: var(--fs-base); line-height: 1.85; max-width: 800px; }

/* ════════════════════════════════════════
   GRIDS
════════════════════════════════════════ */
.grid { display: grid; gap: 18px; }
.grid.two   { grid-template-columns: repeat(2,1fr); }
.grid.three { grid-template-columns: repeat(3,1fr); }
.grid.four  { grid-template-columns: repeat(4,1fr); }

/* ════════════════════════════════════════
   CARDS  (story timeline, reality, insights)
════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,.88); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 {
  font-size: var(--fs-xl);    /* 20px — card titles are smaller */
  color: var(--burg); line-height: 1.18;
}
.card p, .card li { margin-top: 9px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.75; }
.card ul { padding-left: 18px; margin-top: 10px; }

/* Reality page big number */
.number {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-4xl);   /* 38px — big but not overwhelming */
  font-weight: 700; color: var(--burg);
  letter-spacing: -.03em; line-height: 1;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }

.quote {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-3xl);   /* 30px — a pull quote, not a billboard */
  font-style: italic; line-height: 1.14;
  color: var(--burg-dark); font-weight: 400;
}
.copy { font-size: var(--fs-base); color: var(--muted); line-height: 1.85; }

/* ════════════════════════════════════════
   PRODUCT CARDS  (index.html two-col)
════════════════════════════════════════ */
.product {
  background: rgba(255,255,255,.90); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-md);
}
.product.dark {
  background: linear-gradient(135deg, var(--burg-dark), var(--burg) 55%, var(--teal));
  color: #fff; border-color: transparent;
}
/* Product card h2: these are CARD headlines, keep them card-scale */
.product h2 {
  font-size: var(--fs-2xl);   /* 24px */
  line-height: 1.12; margin-top: 14px;
}
.product.dark h2 { color: #fff; }
.product p.lead {
  font-size: var(--fs-sm);    /* 13px */
  margin-top: 10px; line-height: 1.75;
}
.product.dark p.lead { color: rgba(255,255,255,.76); }
.product.dark .tag { background: rgba(255,255,255,.12); color: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.18); }

.features { display: grid; gap: 7px; margin-top: 20px; }
.feature {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 10px 13px;
  color: var(--burg-mid); font-weight: 500; font-size: var(--fs-sm);
}
.product.dark .feature { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.88); }

/* ════════════════════════════════════════
   TIMELINE  (story.html)
════════════════════════════════════════ */
.timeline { display: grid; gap: 14px; }
.time { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.dot {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rose); color: var(--burg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-sm); flex-shrink: 0;
  border: 1.5px solid var(--rose-mid);
}

/* Insight articles */
.article {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 24px; transition: box-shadow .2s;
}
.article:hover { box-shadow: var(--shadow-sm); }
.article h3 {
  font-size: var(--fs-xl);    /* 20px */
  color: var(--burg-dark);
}
.article p { margin-top: 5px; font-size: var(--fs-sm); }
.article span {
  color: var(--gold); font-size: var(--fs-xs);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}

/* ════════════════════════════════════════
   PORTAL / ACCESS
════════════════════════════════════════ */
.access {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; background: var(--white); box-shadow: var(--shadow-lg);
}
.access-top {
  background: linear-gradient(135deg, var(--burg-dark), var(--burg) 60%);
  color: #fff; padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.access-top h2 {
  color: #fff;
  font-size: var(--fs-3xl);   /* 30px */
  margin-top: 8px;
}
.access-top p { color: rgba(255,255,255,.72); margin-top: 5px; font-size: var(--fs-sm); }

.auth { display: none; padding: 24px; border-bottom: 1px solid var(--line); }
.auth.active { display: block; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.formbox {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 24px;
}
.formbox h3 {
  font-size: var(--fs-2xl);   /* 24px */
}
.formbox > p { margin-top: 7px; font-size: var(--fs-sm); color: var(--muted); }

.form { display: grid; gap: 11px; margin-top: 16px; }
.form input, .form select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 13px; font-size: var(--fs-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus {
  outline: none; border-color: var(--burg); box-shadow: 0 0 0 3px rgba(107,32,64,.08);
}

.locked {
  text-align: center; padding: 60px 24px;
  background: linear-gradient(180deg, #fff, var(--white));
}
.locked h2 {
  font-size: var(--fs-3xl);   /* 30px */
}
.locked p { max-width: 560px; margin: 10px auto 0; color: var(--muted); font-size: var(--fs-base); }

.tools { display: none; }
.tools.unlocked { display: block; }

.tabs {
  display: flex; background: var(--white);
  border-bottom: 1px solid var(--line); gap: 8px; padding: 10px 14px;
}
.tabs a {
  flex: 1; text-align: center; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-weight: 600; font-size: var(--fs-sm);
  border-radius: var(--r-sm); padding: 11px;
  transition: background .15s, color .15s, border-color .15s;
}
.tabs a.active { background: var(--burg); color: #fff; border-color: var(--burg); }

/* ════════════════════════════════════════
   BASIC PLANNER
════════════════════════════════════════ */
.basic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 24px; }

.field { margin-top: 12px; }
.field label {
  display: block; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); margin-bottom: 5px;
}
.field input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 13px; font-size: var(--fs-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--burg); box-shadow: 0 0 0 3px rgba(107,32,64,.08); }
/* Placeholder text in inputs — subtle */
.field input::placeholder { color: var(--quiet); opacity: .7; }

/* Score ring */
.score {
  width: 110px; height: 110px; border-radius: 50%; margin: 18px auto;
  background: conic-gradient(var(--teal) 0deg 295deg, var(--teal-soft) 295deg 360deg);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 0 0 5px var(--teal-soft);
}
.score::after {
  content: ''; position: absolute;
  width: 82px; height: 82px; border-radius: 50%; background: #fff;
}
.score strong {
  position: relative; z-index: 1;
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-2xl);   /* 24px */
  color: var(--teal);
}
#scoreLabel {
  text-align: center; color: var(--muted);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em;
}

.results { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.result {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 13px 14px;
}
.result label {
  display: block; font-size: var(--fs-xs); color: var(--quiet);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.result strong {
  display: block; margin-top: 5px;
  font-size: var(--fs-lg);    /* 17px — result values, readable */
  color: var(--ink); line-height: 1;
}

.comment {
  margin-top: 12px; background: var(--teal-soft);
  border-left: 3px solid var(--teal); border-radius: var(--r-sm);
  padding: 13px 15px; color: #074d3d;
  font-size: var(--fs-sm); line-height: 1.75;
}

.advanced-link { text-align: center; padding: 44px 24px; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--line); padding: 24px;
  text-align: center; color: var(--quiet);
  font-size: var(--fs-xs); letter-spacing: .03em;
  background: rgba(255,255,255,.45);
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --fs-5xl: 34px;
    --fs-4xl: 28px;
    --fs-3xl: 23px;
    --fs-2xl: 20px;
  }
  .header-inner { padding: 11px 16px; }
  .nav a { font-size: 10px; padding: 5px 7px; }
  .shell { padding: 0 16px; }
  .hero { padding: 36px 16px 44px; grid-template-columns: 1fr; gap: 28px; }
  .panel { padding: 20px; }
  .panel-top { display: block; }
  .pill { display: inline-flex; margin-top: 10px; }
  .stats, .grid.two, .grid.three, .grid.four,
  .split, .auth-grid, .basic-grid, .results { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .band { padding: 26px 20px; border-radius: var(--r-lg); }
  .product { padding: 24px; border-radius: var(--r-lg); }
  .time { grid-template-columns: 1fr; }
  .access-top { padding: 20px 16px; }
  .tabs { display: block; }
  .tabs a { display: block; margin-bottom: 7px; }
}

@media (max-width: 560px) {
  :root { --fs-5xl: 28px; --fs-4xl: 24px; --fs-3xl: 20px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .nav a { flex: 0 0 auto; }
  .band { padding: 20px 16px; }
}

/* Score ring empty state */
.score--empty {
  background: conic-gradient(var(--line) 0deg 360deg);
  box-shadow: 0 0 0 5px var(--line-soft);
}
.score--empty strong { color: var(--quiet); }
