/* ============================================================
   Personal Finance Review — design system
   Dark, premium, restrained. Fraunces (display) + Inter (body).
   ============================================================ */

:root {
  --bg: #0b0e0d;
  --bg-alt: #0f1312;
  --card: #111514;
  --line: rgba(230, 236, 232, 0.09);
  --line-strong: rgba(230, 236, 232, 0.17);
  --text: #edece5;
  --text-2: #a8afab;
  --text-3: #7d8682;
  --accent: #2dd4bf;
  --accent-hi: #5ce3d0;
  --accent-dim: rgba(45, 212, 191, 0.10);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --container: 1160px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #07110f; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.container-narrow { max-width: 840px; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }

h1 {
  font-size: clamp(2.7rem, 6.6vw, 4.7rem);
  line-height: 1.04;
  margin-bottom: 1.6rem;
}

h2 {
  font-size: clamp(1.95rem, 4.2vw, 3rem);
  margin-bottom: 1.4rem;
}

h3 { font-size: 1.125rem; letter-spacing: -0.01em; }

em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.section-lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--text-2);
  max-width: 60ch;
  margin-bottom: 2.8rem;
}

.section-note {
  color: var(--text-2);
  max-width: 60ch;
  margin-top: 2.5rem;
  font-size: 0.95rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.55rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  min-height: 46px;
}

.btn-primary {
  background: var(--accent);
  color: #07110f;
}
.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(45, 212, 191, 0.22);
}

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

.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.9rem; min-height: 40px; }
.btn-lg { padding: 1.02rem 1.95rem; font-size: 1.0625rem; min-height: 54px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 13, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  padding-block: 0.7rem;
}
.brand-mark { color: var(--accent); }
.brand-name { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }

.nav-links a {
  color: var(--text-2);
  font-size: 0.93rem;
  font-weight: 500;
  padding-block: 0.4rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(6rem, 15vh, 10rem) clamp(4.5rem, 9vh, 7rem);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto 0;
  height: 70%;
  background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(45, 212, 191, 0.07), transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 820px; }

.lede {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  color: var(--text-2);
  max-width: 54ch;
  margin-bottom: 2.4rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin-top: 2.6rem;
  color: var(--text-3);
  font-size: 0.875rem;
}
.hero-notes li { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero-notes li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

/* ---------- Situation grid (problem) ---------- */
.situation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 2.5rem;
  max-width: 820px;
}

.situation-grid li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-2);
  font-size: 1.02rem;
}
.situation-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 2px;
}

/* ---------- Review cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.85rem 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: rgba(45, 212, 191, 0.45);
  transform: translateY(-2px);
}

.card-icon {
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 9px;
  padding: 9px;
  margin-bottom: 1.35rem;
  width: 44px;
  height: 44px;
}

.card h3 { margin-bottom: 0.55rem; }
.card p { color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }

/* ---------- What you leave with ---------- */
.outcome-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.deliverable {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.deliverable h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.deliverable-intro { color: var(--text-2); margin-bottom: 1.4rem; font-size: 0.95rem; }

.deliverable-list li {
  position: relative;
  padding-left: 1.4rem;
  padding-block: 0.52rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
}
.deliverable-list li:last-child { border-bottom: 0; }
.deliverable-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.02em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.deliverable-list strong { color: var(--text); font-weight: 600; }

.outcomes { padding-top: 0.35rem; }

.outcome-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.outcome-row:first-child { border-top: 1px solid var(--line); }
.outcome-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent);
  padding-top: 0.1rem;
}
.outcome-row h3 { margin-bottom: 0.25rem; }
.outcome-row p { color: var(--text-2); font-size: 0.95rem; }

.promise {
  margin-top: 2.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  line-height: 1.35;
  text-align: center;
  max-width: 44ch;
  margin-inline: auto;
}
.promise em { color: var(--accent); }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.step:hover { border-color: rgba(45, 212, 191, 0.4); transform: translateY(-2px); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.3rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-2); font-size: 0.93rem; line-height: 1.6; }

/* ---------- Who grid ---------- */
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 3rem;
  max-width: 900px;
}

.who-grid li {
  position: relative;
  padding-left: 1.7rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 500;
}
.who-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25em;
  width: 7px;
  height: 7px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 2px;
}

/* ---------- What this is not ---------- */
.not-card {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(2.2rem, 5vw, 3.8rem) clamp(1.6rem, 4vw, 3.5rem);
}
.not-card .eyebrow { margin-bottom: 1rem; }
.not-card h2 { margin-bottom: 1.2rem; }
.not-card p { color: var(--text-2); font-size: 1.05rem; }
.not-card-sub { margin-top: 1.1rem; font-size: 0.92rem !important; }
.not-card a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 0.25rem 0.15rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.about-grid p { color: var(--text-2); margin-bottom: 1.1rem; max-width: 56ch; }
.about-grid p:last-of-type { margin-bottom: 0; }

.credential-list {
  border-top: 1px solid var(--line);
}
.credential-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--text);
}
.credential-list span {
  color: var(--text-3);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.2rem;
  flex-shrink: 0;
}
.credential-list li { text-align: right; }

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 3rem 1.2rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  transition: color 0.15s ease;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--accent);
}

.faq details p {
  color: var(--text-2);
  font-size: 0.97rem;
  padding: 0 2.5rem 1.4rem 0;
  max-width: 62ch;
  animation: faq-in 0.22s ease;
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
  border-bottom: 0;
  text-align: center;
  padding-block: clamp(6rem, 12vw, 9rem);
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 60% at 50% 100%, rgba(45, 212, 191, 0.08), transparent 70%);
  pointer-events: none;
}

.final-cta-inner { position: relative; }
.final-cta h2 {
  font-size: clamp(2.3rem, 5.5vw, 3.9rem);
  margin-bottom: 1.2rem;
}
.final-cta p { color: var(--text-2); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 52ch; margin-inline: auto; margin-bottom: 2.4rem; }
.final-cta .cta-row { justify-content: center; }
.final-cta-sub { font-size: 0.92rem !important; margin-top: 1.8rem; margin-bottom: 0 !important; }
.final-cta-sub a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 0.25rem 0.15rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3.5rem 2.5rem;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.footer-brand .brand-name { font-size: 1rem; }
.footer-brand p {
  color: var(--text-3);
  font-size: 0.86rem;
  max-width: 52ch;
  margin-top: 0.7rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.9rem;
}
.footer-links a {
  color: var(--text-2);
  font-size: 0.9rem;
  padding-block: 0.55rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--accent); }

.footer-copy { color: var(--text-3); font-size: 0.83rem; }

/* ---------- Prose pages (privacy / terms / scope) ---------- */
.page {
  padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(4rem, 8vw, 6rem);
}
.page h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 0.8rem; }
.page .updated { color: var(--text-3); font-size: 0.85rem; margin-bottom: 2.6rem; }
.prose { max-width: 720px; }
.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.4rem;
  margin-bottom: 0.7rem;
}
.prose p { color: var(--text-2); margin-bottom: 1.05rem; }
.prose ul { margin-bottom: 1.2rem; }
.prose li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 0.25rem 0.15rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .outcome-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .credential-list { max-width: 560px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .nav { gap: 0; }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11, 14, 13, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1.1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding-block: 0.9rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links li:last-child a { border-bottom: 0; }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .situation-grid { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .credential-list li { flex-direction: column; gap: 0.3rem; text-align: left; }
  .credential-list li span { padding-top: 0; }
  .outcome-row { grid-template-columns: 2.4rem 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
