/* ============================================================
   Tax Free Growth Advisors — quiet-wealth editorial
   Eggshell ground · forest ink · restrained gold accent
   ============================================================ */

:root {
  --ground: #f6f3ec;
  --ground-alt: #eee9dd;
  --surface: #fdfbf6;
  --ink: #1c2a22;
  --ink-soft: #45544b;
  --ink-faint: #5a685e;
  --accent: #a4801f;
  --accent-strong: #8a6a14;
  --accent-text: #6f5510;
  --accent-soft: rgba(164, 128, 31, 0.14);
  --green: #2e5c43;
  --line: rgba(28, 42, 34, 0.14);
  --line-strong: rgba(28, 42, 34, 0.28);
  --cta-ground: #1c2a22;
  --cta-ink: #f0ecdf;
  --shadow: 0 18px 44px -22px rgba(28, 42, 34, 0.35);

  --font-display: "Palatino", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --font-body: "Seravek", "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1320px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121814;
    --ground-alt: #0d1310;
    --surface: #1a221d;
    --ink: #eae5d6;
    --ink-soft: #b8bfae;
    --ink-faint: #8d968a;
    --accent: #c9a44c;
    --accent-strong: #d9b866;
    --accent-text: #d9b866;
    --accent-soft: rgba(201, 164, 76, 0.16);
    --green: #7fb598;
    --line: rgba(234, 229, 214, 0.14);
    --line-strong: rgba(234, 229, 214, 0.3);
    --cta-ground: #0d1310;
    --cta-ink: #eae5d6;
    --shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  --ground: #f6f3ec;
  --ground-alt: #eee9dd;
  --surface: #fdfbf6;
  --ink: #1c2a22;
  --ink-soft: #45544b;
  --ink-faint: #5a685e;
  --accent: #a4801f;
  --accent-strong: #8a6a14;
  --accent-text: #6f5510;
  --accent-soft: rgba(164, 128, 31, 0.14);
  --green: #2e5c43;
  --line: rgba(28, 42, 34, 0.14);
  --line-strong: rgba(28, 42, 34, 0.28);
  --cta-ground: #1c2a22;
  --cta-ink: #f0ecdf;
  --shadow: 0 18px 44px -22px rgba(28, 42, 34, 0.35);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #121814;
  --ground-alt: #0d1310;
  --surface: #1a221d;
  --ink: #eae5d6;
  --ink-soft: #b8bfae;
  --ink-faint: #8d968a;
  --accent: #c9a44c;
  --accent-strong: #d9b866;
  --accent-text: #d9b866;
  --accent-soft: rgba(201, 164, 76, 0.16);
  --green: #7fb598;
  --line: rgba(234, 229, 214, 0.14);
  --line-strong: rgba(234, 229, 214, 0.3);
  --cta-ground: #0d1310;
  --cta-ink: #eae5d6;
  --shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--ground);
  /* subtle paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
h1 em, h2 em { font-style: italic; color: var(--accent-strong); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.28rem; line-height: 1.3; }

p { max-width: 68ch; }

a { color: inherit; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: #f4f1e6;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand-mark { width: 30px; height: 30px; color: var(--accent); flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-name em { font-style: italic; font-weight: 400; color: var(--accent-strong); }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav .nav-book { display: none; }
.site-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 150ms ease;
}
.site-nav a:hover { color: var(--accent-strong); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }

.theme-toggle {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color 150ms ease, border-color 150ms ease;
}
.theme-toggle:hover { color: var(--accent-strong); border-color: var(--accent); }
.theme-toggle svg { width: 19px; height: 19px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color 150ms ease, border-color 150ms ease;
}
.nav-toggle:hover { color: var(--accent-strong); border-color: var(--accent); }
.nav-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-sun, :root[data-theme="dark"] .icon-sun { display: none; }
  :root:not([data-theme]) .icon-moon, :root[data-theme="dark"] .icon-moon { display: block; }
  :root[data-theme="light"] .icon-sun { display: block; }
  :root[data-theme="light"] .icon-moon { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: #f4f1e6;
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .btn-primary { color: #10160f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .btn-primary { color: #10160f; }
  :root[data-theme="light"] .btn-primary { color: #f4f1e6; }
}
.btn-primary:hover { background: color-mix(in srgb, var(--green) 88%, var(--ink) 12%); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-gold {
  background: var(--accent);
  color: #1c1607;
  box-shadow: var(--shadow);
}
.btn-gold:hover { background: var(--accent-strong); color: #1c1607; }
:root[data-theme="dark"] .btn-gold:hover { color: #10160f; }

.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.92rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero-copy .lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 56ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.hero-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.75rem);
  box-shadow: var(--shadow);
}
.hero-chart svg { width: 100%; height: auto; }
.hero-chart figcaption {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 0.7rem;
  text-align: center;
}

.chart-grid line { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.chart-line { stroke-width: 3.5; stroke-linecap: round; }
.line-free { stroke: var(--accent); }
.line-taxed { stroke: var(--ink-faint); stroke-dasharray: 6 7; }
.chart-label text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink-soft);
}
.label-free text { fill: var(--accent-strong); }
.chart-axis-label text {
  font-family: var(--font-body);
  font-size: 12.5px;
  fill: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* draw-on animation (JS adds .drawn; reduced-motion guarded in JS + here) */
.chart-line.will-draw {
  stroke-dashoffset: var(--path-len, 900);
  transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}
.chart-line.will-draw.drawn { stroke-dashoffset: 0; }
.chart-fill { opacity: 0; transition: opacity 1.2s ease 1.2s; }
.chart-fill.drawn { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .chart-line.will-draw { stroke-dashoffset: 0 !important; transition: none; }
  .chart-fill { opacity: 1; transition: none; }
}

/* ---------- strip ---------- */
.strip {
  border-block: 1px solid var(--line);
  background: var(--ground-alt);
  padding: clamp(2.2rem, 4vw, 3.5rem) 0;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.strip-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--accent-strong);
  font-style: italic;
  font-weight: 600;
}
.strip-item p { font-size: 0.96rem; color: var(--ink-soft); }
@media (min-width: 901px) {
  .strip-item + .strip-item {
    border-left: 1px solid var(--line-strong);
    padding-left: clamp(1.5rem, 3vw, 3rem);
  }
}

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-alt { background: var(--ground-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 780px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-sub { color: var(--ink-soft); margin-top: 1rem; }

/* ---------- strategies: editorial ledger, no cards ---------- */
.strategy-list { border-top: 1px solid var(--line-strong); }

.strategy {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  padding: clamp(2.25rem, 4.5vw, 3.75rem) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background-color 300ms ease;
}
/* alternate rows indent — broken-grid rhythm */
.strategy:nth-child(even) { padding-left: clamp(0px, 6vw, 88px); }

.strategy-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  margin-bottom: 0.75rem;
  transition: color 350ms ease;
}
.strategy:hover .strategy-num { color: var(--accent); }

.strategy-head h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  max-width: 14ch;
}
.strategy-body p { font-size: 1rem; color: var(--ink-soft); max-width: 62ch; }
.strategy-fit {
  margin-top: 1.1rem;
  font-size: 0.92rem;
}
.strategy-fit strong {
  color: var(--green);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 1.02em;
  margin-right: 0.35em;
}

.section-disclosure {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  font-size: 0.84rem;
  color: var(--ink-faint);
  max-width: 90ch;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

/* ---------- who ---------- */
.who-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.who-copy p { color: var(--ink-soft); margin-top: 1rem; }

.who-ledger { border-top: 1px solid var(--line-strong); }
.who-row {
  padding: 1.6rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}
.who-row dt {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
  position: relative;
  padding-left: 1.6rem;
}
.who-row dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.85rem;
  height: 1px;
  background: var(--accent);
}
.who-row dd {
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-left: 1.6rem;
  max-width: 58ch;
}

/* ---------- steps: staggered editorial columns ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.step {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding-top: 1.4rem;
}
/* staggered baseline — deliberate broken grid */
@media (min-width: 901px) {
  .step:nth-child(2) { margin-top: 2.75rem; }
  .step:nth-child(3) { margin-top: 5.5rem; }
  .step:nth-child(4) { margin-top: 8.25rem; }
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 3.4vw, 3.1rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.18rem; margin-bottom: 0.55rem; }
.step p { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }

.faq {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  padding: 1rem 2.4rem 1rem 0;
  position: relative;
  list-style: none;
  transition: color 150ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-strong); }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 200ms ease;
}
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p {
  padding: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 72ch;
}

/* ---------- CTA ---------- */
.cta-section {
  background: var(--cta-ground);
  color: var(--cta-ink);
  border-block: 1px solid var(--line);
  /* faint gold sheen */
  background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201, 164, 76, 0.14), transparent 65%);
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
}
.cta-inner h2 {
  color: inherit;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
}
.cta-inner h2 em { font-style: italic; color: var(--accent); }
.eyebrow-light { color: #c9a44c; } /* CTA panel is dark in both themes */
.cta-sub {
  color: color-mix(in srgb, var(--cta-ink) 78%, transparent);
  font-size: 1.06rem;
}
.cta-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.cta-contact {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 1.02rem;
}
.cta-contact a,
.cta-contact [data-placeholder] {
  color: #c9a44c; /* readable gold on the always-dark CTA panel */
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.cta-contact a:hover { border-color: #c9a44c; }
.cta-fineprint {
  margin-top: 1.5rem;
  font-size: 0.86rem;
  color: color-mix(in srgb, var(--cta-ink) 60%, transparent);
}
.cta-side { border-left: 1px solid rgba(201, 164, 76, 0.35); padding-left: clamp(1.5rem, 3vw, 3rem); }

/* ---------- footer ---------- */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  background: var(--ground-alt);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand .brand-name { font-size: 1.15rem; }
.footer-tag { margin-top: 0.6rem; font-size: 0.92rem; color: var(--ink-soft); }
.footer-license { margin-top: 0.9rem; font-size: 0.84rem; color: var(--ink-faint); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; align-content: start; justify-content: flex-end; }
.footer-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 150ms ease;
}
.footer-nav a:hover { color: var(--accent-strong); }

.footer-disclosure { padding-top: 1.75rem; }
.footer-disclosure p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: none;
}
.footer-copy { margin-top: 1.25rem; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
/* No-JS fallback: content must never depend on app.js running */
@media (scripting: none) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- legal page ---------- */
.legal { padding: clamp(3rem, 6vw, 5rem) 0; }
.legal-body { max-width: 780px; }
.legal-body h1 { margin-bottom: 0.5rem; }
.legal-updated { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal-body h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 0.98rem; }
.legal-body ul { padding-left: 1.4rem; margin: 0.75rem 0; }
.legal-body li { margin-bottom: 0.5rem; }
.legal-body a { color: var(--accent-strong); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-toggle { display: grid; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.5rem clamp(20px, 4vw, 48px) 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav .nav-book { display: block; color: var(--accent-text); font-weight: 700; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > * { min-width: 0; }
  .hero-chart { max-width: 100%; overflow: hidden; }
  .strip-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .strategy { grid-template-columns: 1fr; gap: 1rem; }
  .strategy:nth-child(even) { padding-left: 0; }
  .who-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-inner { grid-template-columns: 1fr; }
  .cta-side { border-left: none; padding-left: 0; border-top: 1px solid rgba(201, 164, 76, 0.35); padding-top: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
  .brand-name { font-size: 1rem; }
  .header-actions .btn { display: none; }
  .hero-ctas .btn { width: 100%; }
}
