/* ---- How to Build Wealth — presentation site ---- */
/* Claude-inspired palette: warm cream surfaces, ink text, terracotta accent */
:root {
  --bg: #FAF9F5;
  --bg-deep: #F0EEE6;
  --panel: #FFFFFF;
  --ink: #141413;
  --ink-2: #3d3a34;
  --muted: #6e6b64;
  --faint: #a5a196;
  --line: #E5E1D8;
  --accent: #D97757;
  --accent-deep: #C15F3C;
  --accent-soft: #F5E5DD;
  --green: #5E7D5A;
  --green-soft: #E8EFE6;
  --red: #B0432F;
  --red-soft: #F6E3DE;
  --gold: #B8860B;
  --dark: #1F1E1B;
  --dark-2: #29271F;
  --cream-on-dark: #F5F1E8;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- deck scaffolding ---------- */
.deck { height: 100svh; overflow-y: auto; scroll-snap-type: y mandatory; }
.slide {
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5svh 7vw;
  position: relative;
}
.slide.dark { background: var(--dark); color: var(--cream-on-dark); }
.slide.dark .kicker { color: var(--accent); }
.slide.deep { background: var(--bg-deep); }

.kicker {
  font-family: var(--sans);
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1.2rem;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 2.2rem;
}
.sub { font-size: clamp(15px, 1.5vw, 20px); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.slide.dark .sub { color: #b8b2a4; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 18px; }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 24px;
  box-shadow: 0 1px 2px rgba(20,20,19,.04), 0 8px 24px -12px rgba(20,20,19,.08);
}
.card .icon { font-size: 26px; margin-bottom: 12px; display: block; }
.card h3 { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 22px); font-weight: 600; margin-bottom: 8px; }
.card p { font-size: clamp(13px, 1.25vw, 15.5px); color: var(--muted); line-height: 1.55; }
.card.dark { background: var(--dark-2); border-color: #3a382e; }
.card.dark h3 { color: var(--cream-on-dark); }
.card.dark p { color: #b8b2a4; }
.card.tint { background: var(--accent-soft); border-color: #ecd4c8; }
.card.green { background: var(--green-soft); border-color: #d3e0d0; }
.card.red { background: var(--red-soft); border-color: #ecd0c8; }

/* ---------- hero numbers / stat tiles ---------- */
.stat { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; }
.stat.huge { font-size: clamp(56px, 9vw, 130px); line-height: 1; }
.stat.big { font-size: clamp(38px, 5vw, 72px); line-height: 1.05; }
.stat.accent { color: var(--accent-deep); }
.stat.green { color: var(--green); }
.stat.red { color: var(--red); }
.stat-label { font-size: clamp(13px, 1.3vw, 16px); color: var(--muted); margin-top: 10px; line-height: 1.45; }
.slide.dark .stat-label { color: #b8b2a4; }

/* ---------- step list ---------- */
.steps { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(20,20,19,.04);
}
.step .n {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); margin-top: 2px;
}
.step h3 { font-family: var(--serif); font-size: clamp(16px, 1.6vw, 21px); font-weight: 600; margin-bottom: 4px; }
.step p { font-size: clamp(13px, 1.25vw, 15.5px); color: var(--muted); line-height: 1.5; }
.step p b, .card p b { color: var(--ink-2); }
.step .n.g { background: var(--green); }
.step .n.k { background: var(--ink); }

/* ---------- chart bits ---------- */
.chart-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px 30px; overflow-x: auto; box-shadow: 0 1px 2px rgba(20,20,19,.04), 0 8px 24px -12px rgba(20,20,19,.08); }
.hbar-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; margin: 14px 0; }
.hbar-row .lbl { font-size: clamp(13px, 1.3vw, 16px); font-weight: 600; text-align: right; }
.hbar-track { position: relative; height: 40px; }
.hbar {
  height: 40px; border-radius: 4px; min-width: 8px;
  display: flex; align-items: center;
  position: relative;
}
.hbar .val {
  font-family: var(--serif); font-weight: 700; font-size: clamp(15px, 1.6vw, 21px);
  position: absolute; left: calc(100% + 12px); white-space: nowrap;
}
.hbar.inside .val { position: static; margin-left: auto; padding-right: 14px; color: #fff; }
.footnote { font-size: clamp(11px, 1.05vw, 13px); color: var(--faint); margin-top: 18px; line-height: 1.5; }
.slide.dark .footnote { color: #86816f; }

/* ---------- table ---------- */
table.tbl { border-collapse: collapse; width: 100%; font-size: clamp(13px, 1.3vw, 16px); }
.tbl th { text-align: left; font-weight: 700; padding: 10px 14px; border-bottom: 2px solid var(--ink); font-size: .92em; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl td.fee { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 600; }
.pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .82em; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent-deep);
}
.pill.g { background: var(--green-soft); color: var(--green); }

/* ---------- nav rail ---------- */
.rail {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 9px; z-index: 50;
}
.rail button {
  width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20,20,19,.18); padding: 0; transition: all .25s;
}
.rail button.on { background: var(--accent); transform: scale(1.45); }
.rail.on-dark button { background: rgba(245,241,232,.25); }
.rail.on-dark button.on { background: var(--accent); }
.counter {
  position: fixed; bottom: 18px; right: 22px; z-index: 50;
  font-size: 12px; font-weight: 600; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.hint {
  position: fixed; bottom: 18px; left: 22px; z-index: 50;
  font-size: 12px; color: var(--faint);
}

/* ---------- misc ---------- */
.divider { width: 72px; height: 4px; border-radius: 2px; background: var(--accent); margin: 1.6rem 0; }
.center { text-align: center; align-items: center; }
.center .divider { margin-left: auto; margin-right: auto; }
.creds { font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .04em; color: #b8b2a4; }
.creds b { color: var(--cream-on-dark); font-weight: 600; }
.disclaimer {
  position: absolute; bottom: 3.2svh; left: 7vw; right: 7vw;
  font-size: clamp(9px, .95vw, 11.5px); color: #86816f; text-align: center; line-height: 1.5;
}
.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .cards.c4, .cards.c3 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .rail { display: none; }
  .slide { padding: 6svh 6vw; }
}
@media (max-width: 560px) {
  .cards.c4, .cards.c3, .cards.c2 { grid-template-columns: 1fr; }
  .hbar-row { grid-template-columns: 90px 1fr; }
}

/* ---------- polish: animation layer ---------- */
.reveal { transition: opacity .8s cubic-bezier(.2,.6,.2,1), transform .8s cubic-bezier(.2,.6,.2,1); }
.reveal:not(.in) .hbar { width: 8px !important; }
.hbar { transition: width 1.3s cubic-bezier(.25,.7,.2,1) .15s; }
.reveal .card, .reveal .step { opacity: 0; transform: translateY(14px); }
.reveal.in .card, .reveal.in .step { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.reveal.in .card:nth-child(1), .reveal.in .step:nth-child(1) { transition-delay: .05s; }
.reveal.in .card:nth-child(2), .reveal.in .step:nth-child(2) { transition-delay: .17s; }
.reveal.in .card:nth-child(3), .reveal.in .step:nth-child(3) { transition-delay: .29s; }
.reveal.in .card:nth-child(4), .reveal.in .step:nth-child(4) { transition-delay: .41s; }
.reveal.in .card:nth-child(5), .reveal.in .step:nth-child(5) { transition-delay: .53s; }
.reveal.in .card:nth-child(6), .reveal.in .step:nth-child(6) { transition-delay: .65s; }
.slide.dark { background: radial-gradient(1200px 700px at 50% -10%, #2E2C24 0%, var(--dark) 60%); }
.slide.dark.center h1 { text-shadow: 0 2px 40px rgba(217,119,87,.15); }
.tagline { font-family: var(--serif); font-style: italic; color: #b8b2a4; font-size: clamp(15px, 1.6vw, 21px); margin-top: 1.4rem; }
.badge-fund { display:inline-block; margin-top:14px; padding: 4px 12px; border-radius: 8px; background: var(--bg-deep); border:1px solid var(--line); font-family: ui-monospace, Menlo, monospace; font-size: .8em; font-weight: 700; color: var(--ink-2); }

/* ---------- account mini-statement ---------- */
.acct { display: flex; flex-direction: column; gap: 11px; }
.acct .r { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.acct .r .l { font-size: clamp(13px, 1.3vw, 15.5px); color: var(--muted); }
.acct .r .v { font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(15px, 1.5vw, 18px); white-space: nowrap; }
.acct .r .v.g { color: var(--green); }
.acct .r .v .pct { font-size: .72em; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 2px 7px; margin-right: 8px; vertical-align: 1px; }
.card.green .acct .r .v .pct { background: #fff; }
.acct .r.total { border-top: 2px solid var(--ink); padding-top: 13px; margin-top: 5px; align-items: center; }
.acct .r.total .l { font-weight: 700; color: var(--ink); font-size: clamp(15px, 1.5vw, 18px); }
.acct .r.total .v { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.01em; }
