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

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

:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --ink-faint: #999;
  --bg: #fafaf7;
  --surface: #ffffff;
  --accent: #2e6b4f;
  --accent-light: #e8f2ec;
  --accent-mid: #4a9970;
  --rule: #e5e5df;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,247,0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav-logo span { color: var(--accent); font-style: italic; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.01em; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom: 1.5px solid var(--accent); padding-bottom: 1px; }

/* PAGE HERO */
.page-hero { max-width: 860px; margin: 0 auto; padding: 5rem 2rem 2.5rem; opacity: 0; animation: fadeUp 0.7s ease forwards 0.1s; }
.eyebrow { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.eyebrow a { color: var(--ink-faint); text-decoration: none; transition: color 0.2s; }
.eyebrow a:hover { color: var(--accent); }
.eyebrow .sep { color: var(--rule); }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1.1rem; }
.page-hero h1 em { font-style: italic; color: var(--accent); }
.page-hero .lead { font-size: 0.98rem; color: var(--ink-soft); max-width: 540px; line-height: 1.75; font-weight: 300; }

/* TABS */
.topic-tabs { max-width: 860px; margin: 0 auto; padding: 1.5rem 2rem 2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tab-btn { font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em; padding: 0.4rem 0.9rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-soft); cursor: pointer; text-decoration: none; transition: all 0.2s; }
.tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

/* DIVIDER */
.divider { max-width: 860px; margin: 0 auto; border: none; border-top: 1px solid var(--rule); }

/* CONTENT */
.content-body { max-width: 860px; margin: 0 auto; padding: 3rem 2rem 5rem; opacity: 0; animation: fadeUp 0.7s ease forwards 0.25s; }
.section-block { margin-bottom: 3.5rem; }
.section-block:last-child { margin-bottom: 0; }
.block-header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.block-header h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.block-tag { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-light); background: var(--accent-light); padding: 0.15rem 0.45rem; flex-shrink: 0; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: start; }
.prose p { font-size: 0.93rem; color: var(--ink-soft); line-height: 1.8; font-weight: 300; margin-bottom: 0.9rem; }
.prose p:last-child { margin-bottom: 0; }
.prose p strong { color: var(--ink); font-weight: 500; }
.prose ul { margin: 0.5rem 0 0.9rem 1.1rem; font-size: 0.93rem; color: var(--ink-soft); font-weight: 300; line-height: 1.8; }

/* VISUAL CARD */
.visual-card { background: var(--surface); border: 1px solid var(--rule); padding: 1.4rem; }
.visual-label { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; }

/* DEFS LINK BAR */
.defs-link-bar { background: var(--accent-light); border: 1px solid #c4dfd0; padding: 0.9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; text-decoration: none; transition: background 0.2s; }
.defs-link-bar:hover { background: #d8ede3; }
.defs-link-bar-left { display: flex; align-items: center; gap: 0.65rem; }
.defs-link-bar-icon { font-size: 1rem; }
.defs-link-bar-text strong { display: block; font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.defs-link-bar-text span { font-size: 0.78rem; color: var(--ink-soft); font-weight: 300; }
.defs-link-bar-arrow { color: var(--accent); font-size: 1rem; }

/* DEFS PAGE */
.defs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 3rem; }
.def-card { background: var(--surface); padding: 1.4rem; }
.def-term { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.45rem; color: var(--ink); }
.def-body { font-size: 0.83rem; color: var(--ink-soft); line-height: 1.65; font-weight: 300; }
.def-body strong { color: var(--ink); font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--ink-faint); text-decoration: none; margin-bottom: 1.75rem; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }

/* VISUALIZATIONS */
.bracket-bar { margin-bottom: 0.75rem; }
.bracket-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 0.28rem; }
.bracket-track { height: 5px; background: var(--accent-light); }
.bracket-fill { height: 100%; background: var(--accent); }

.budget-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }
.budget-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.budget-row-label { font-size: 0.79rem; color: var(--ink-soft); flex: 1; }
.budget-row-pct { font-size: 0.79rem; font-weight: 500; color: var(--ink); }
.budget-bar-track { flex: 2; height: 4px; background: var(--rule); }
.budget-bar-fill { height: 100%; }

.flow-step { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
.flow-node { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-light); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.58rem; font-weight: 600; color: var(--accent); flex-shrink: 0; }
.flow-line { height: 16px; width: 2px; background: var(--rule); margin-left: 14px; margin-bottom: 0.35rem; }
.flow-text { font-size: 0.79rem; color: var(--ink-soft); }

.invest-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.invest-row:last-child { border-bottom: none; }
.invest-icon { font-size: 0.95rem; width: 22px; text-align: center; flex-shrink: 0; }
.invest-name { font-size: 0.82rem; font-weight: 500; color: var(--ink); flex: 1; }
.invest-desc { font-size: 0.77rem; color: var(--ink-soft); flex: 2; }
.invest-risk { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.06em; padding: 0.15rem 0.4rem; }
.risk-low { background: #e8f2ec; color: #2e6b4f; }
.risk-med { background: #fff8e1; color: #b07d00; }
.risk-high { background: #fce8e8; color: #b03030; }

/* HOME */
.home-hero { max-width: 860px; margin: 0 auto; padding: 7rem 2rem 5rem; opacity: 0; animation: fadeUp 0.8s ease forwards 0.1s; }
.home-hero .eyebrow { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.25rem; display: block; }
.home-hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 5.5vw, 4rem); font-weight: 600; line-height: 1.13; letter-spacing: -0.03em; margin-bottom: 1.4rem; }
.home-hero h1 em { font-style: italic; color: var(--accent); }
.home-hero .sub { font-size: 1.05rem; color: var(--ink-soft); max-width: 530px; line-height: 1.78; font-weight: 300; margin-bottom: 2.5rem; }
.cta-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: white; text-decoration: none; padding: 0.85rem 1.75rem; font-size: 0.88rem; font-weight: 500; letter-spacing: 0.02em; transition: background 0.2s, transform 0.2s; }
.cta-btn:hover { background: #245a41; transform: translateY(-1px); }
.cta-btn:hover svg { transform: translateX(3px); }
.cta-btn svg { transition: transform 0.2s; }

.topics-grid-wrap { max-width: 860px; margin: 0 auto; padding: 0 2rem 5rem; opacity: 0; animation: fadeUp 0.7s ease forwards 0.3s; }
.section-label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.5rem; }
.topic-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.topic-card { background: var(--surface); padding: 1.75rem; text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: background 0.2s; display: block; }
.topic-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s ease; }
.topic-card:hover { background: var(--accent-light); }
.topic-card:hover::after { width: 100%; }
.topic-card-icon { font-size: 1.2rem; margin-bottom: 1rem; }
.topic-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.topic-card p { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.6; font-weight: 300; }
.topic-card-arrow { display: block; margin-top: 1rem; font-size: 0.77rem; color: var(--accent); font-weight: 500; }

.philosophy-band { background: var(--ink); color: white; padding: 4.5rem 2rem; opacity: 0; animation: fadeUp 0.7s ease forwards 0.45s; }
.philosophy-inner { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.philosophy-inner h2 { font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.03em; }
.philosophy-inner h2 em { color: var(--accent-mid); font-style: italic; }
.philosophy-points { display: flex; flex-direction: column; gap: 1.4rem; }
.point { display: flex; gap: 1rem; align-items: flex-start; }
.point-num { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em; color: var(--accent-mid); margin-top: 0.2rem; flex-shrink: 0; }
.point-text { font-size: 0.88rem; color: rgba(255,255,255,0.72); line-height: 1.65; font-weight: 300; }
.point-text strong { color: white; font-weight: 500; }

/* FOOTER */
footer { border-top: 1px solid var(--rule); padding: 2.5rem 2rem; }
.footer-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--font-display); font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; text-decoration: none; }
.footer-logo span { color: var(--accent); font-style: italic; }
footer p { font-size: 0.78rem; color: var(--ink-faint); font-weight: 300; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .two-col { grid-template-columns: 1fr; }
  .philosophy-inner { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
