/* page-home.css — look v2: the cinematic opening, the live sum, and the home chapters. */

/* ---------- hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem); overflow: clip; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__title { font-size: clamp(3.25rem, 1.2rem + 6.4vw, 6.25rem); line-height: 0.98; letter-spacing: -0.045em; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word { display: inline-block; }
.hero__sub { margin-top: 1.75rem; max-width: 32em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.hero__trust { display: flex; align-items: center; gap: 0.9rem; margin-top: 2.5rem; font-size: var(--step-small); color: var(--muted); }
.hero__trust img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 3px solid var(--sage); }
.hero__trust strong { color: var(--ink); }

.scene { position: relative; height: 580px; width: 100%; max-width: 600px; justify-self: center; }
.scene__card { position: absolute; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lift); }
.scene__ledger { left: 0; width: 70%; top: 40px; padding: 1.75rem 1.75rem 1.5rem; }
.scene__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 700; color: var(--muted); text-transform: none; }
.scene__h { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; margin: 0.6rem 0 0.8rem; }
.scene__row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.68rem 0; border-bottom: 1px solid rgba(12, 31, 24, 0.07); font-size: 0.9375rem; max-width: none; }
.scene__row span:first-child { color: var(--muted); }
.scene__row .amt { font-weight: 700; }
.scene__row--total { border-bottom: 0; }
.scene__row--total span:first-child { color: var(--ink); font-weight: 700; }
.scene__gap { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; padding: 0.85rem 1rem; border-radius: var(--r-sm); background: var(--brass); font-weight: 700; }
.scene__gap b { font-family: var(--font-display); font-size: 1.75rem; letter-spacing: -0.025em; }
.scene__gauge { right: -8px; top: 0; width: 176px; padding: 1.1rem; text-align: center; }
.scene__gauge svg { width: 120px; height: 120px; margin: 0 auto; transform: rotate(-90deg); }
.gauge__track { stroke: var(--sage); }
.gauge__fill { stroke: var(--accent); stroke-linecap: round; }
.scene__pct { position: absolute; left: 0; right: 0; top: 3.9rem; font-family: var(--font-display); font-weight: 800; font-size: 1.875rem; letter-spacing: -0.03em; }
.scene__cap { display: block; margin-top: 0.4rem; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.scene__coins { right: -8px; top: 236px; width: 176px; height: 200px; }
.scene__coins .scene__cap { position: absolute; left: 1.1rem; top: 0.9rem; margin: 0; }
.scene__coins .scene__cap b { display: block; font-family: var(--font-display); font-size: 1.375rem; color: var(--ink); letter-spacing: -0.02em; }
.stack { position: absolute; left: 50%; margin-left: -36px; bottom: 18px; width: 72px; height: 110px; }
.coin { position: absolute; left: 0; width: 72px; height: 22px; }
.coin svg { width: 100%; height: 100%; overflow: visible; }
.coin__edge { fill: #E0A21F; }
.coin__face { fill: var(--brass); }
.coin__sign { fill: #B47C08; font: 800 13px var(--font-display); }
.scene__chip { position: absolute; display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-radius: 999px; background: #fff; font-size: 0.875rem; font-weight: 700; box-shadow: var(--shadow-card); }
.scene__chip i { width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--accent); }
.scene__chip i::after { content: ''; display: block; width: 100%; height: 100%; background: #fff; -webkit-mask: var(--i-check) center / 60% no-repeat; mask: var(--i-check) center / 60% no-repeat; }
.scene__chip i.no { background: var(--brass); }
.scene__chip i.no::after { background: var(--ink); -webkit-mask-image: var(--i-cross); mask-image: var(--i-cross); }
.scene__chip--a { right: 0; top: 462px; }
.scene__chip--b { right: 44px; top: 516px; }
:root { --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference) {
  .hero.is-idle .scene__gauge { animation: bob 4.2s ease-in-out infinite alternate; }
  .hero.is-idle .scene__coins { animation: bob2 5s ease-in-out infinite alternate; }
  .hero.is-idle .scene__chip--a { animation: bob2 3.4s ease-in-out infinite alternate; }
  .hero.is-idle .scene__chip--b { animation: bob 3.9s ease-in-out infinite alternate; }
  .hero.is-paused * { animation-play-state: paused !important; }
}
@media (max-width: 60rem) {
  .hero__in { grid-template-columns: 1fr; }
  .scene { margin-top: 1rem; }
}
@media (max-width: 40rem) {
  /* on a phone the scene stacks: ledger first, then the gauge and the coins side by side */
  .scene { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .scene__card { position: relative; inset: auto; width: auto; }
  .scene__ledger { grid-column: 1 / -1; padding: 1.35rem; }
  .scene__gauge, .scene__coins { height: 210px; }
  .scene__gauge svg { width: 104px; height: 104px; }
  .scene__pct { top: 3.55rem; font-size: 1.625rem; }
  .scene__chip { display: none; }
  .hero__ctas .btn { flex: 1 1 auto; }
}

/* ---------- the live sum: a card on mint ---------- */
.sum { padding-block: clamp(4rem, 8vw, 6rem); }
.sum__folder { width: min(100% - 2 * var(--margin), 1240px); margin-inline: auto; padding: clamp(1.5rem, 3vw, 2.75rem); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.sum__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(12, 31, 24, 0.07); }
.sum__bar .note { max-width: 40ch; }
.sum__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; margin-top: clamp(2rem, 4vw, 3rem); }
.sum__intro { grid-column: 1 / span 5; }
.sum__intro p { margin-top: 1.25rem; max-width: 46ch; color: var(--muted); }
.sum__ledger { grid-column: 7 / span 6; }
.sum__ledger th { font-weight: 600; padding-right: 1rem; }
.sum__inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.55rem; font-size: var(--step-small); color: var(--muted); }
.sum__inputs .money { width: 9.5rem; }
.sum__inputs .input { min-height: 2.75rem; padding-block: 0.4rem; }
.sum__years { width: 4.75rem; }
.sum__fixed { display: block; margin-top: 0.3rem; font-size: var(--step-small); color: var(--muted); font-weight: 500; }
.sum__total th, .sum__total td { font-weight: 700; }
.sum__ledger tfoot .amt { font-size: var(--step-figure); }
.sum__say { margin-top: 1rem; }
.amt.is-changing { color: var(--evergreen); }
@media (max-width: 40rem) {
  .sum__folder { padding-inline: 1.1rem; }
  .sum__ledger .ledger, .sum__ledger tbody, .sum__ledger tfoot { display: block; }
  .sum__ledger tr { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 0.75rem; border-bottom: 1px solid rgba(12, 31, 24, 0.08); padding: 0.7rem 0; }
  .sum__ledger th, .sum__ledger td { border: 0; padding: 0; }
  .sum__ledger th { grid-column: 1 / -1; grid-row: 1; padding-right: 7.5rem; }
  .sum__ledger .amt { grid-column: 2; grid-row: 1; align-self: start; }
  .sum__ledger tfoot tr { border-bottom: 0; border-top: 2px solid currentColor; margin-top: 0.25rem; padding-top: 0.9rem; }
  .sum__inputs .money { width: 9rem; }
}
@media (max-width: 60rem) {
  .sum__intro, .sum__ledger { grid-column: 1 / -1; }
  .sum__bar .btn { width: 100%; }
}

/* ---------- proof: stat cards ---------- */
.proof { padding-block: clamp(4rem, 8vw, 7rem); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { min-height: 12rem; background: var(--paper-2); border-radius: var(--r-md); padding: clamp(1.1rem, 1.8vw, 1.6rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem; transition: transform var(--t-ui) var(--ease-out), box-shadow var(--t-ui) ease; }
@media (hover: hover) and (pointer: fine) { .tile:not(.tile--head):hover { transform: translateY(-4px); box-shadow: var(--shadow-card); background: #fff; } }
.tile--head { grid-column: span 2; justify-content: space-between; background: var(--deep); color: #fff; }
.tile--head .note { color: #fff; }
.tile--pic { padding: 0; gap: 0; justify-content: flex-start; overflow: hidden; background: var(--ink); color: #fff; }
.tile--pic img { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.tile--pic .tile__l { padding: 0.75rem 1.1rem; max-width: none; }
.tile__h { font-size: var(--step-figure); line-height: 1; letter-spacing: -0.03em; max-width: 10ch; }
.tile__n { font-family: var(--font-display); font-weight: 800; font-size: var(--step-figure); line-height: 1; letter-spacing: -0.035em; color: var(--evergreen); font-variant-numeric: tabular-nums lining-nums; }
.tile__l { max-width: 26ch; color: var(--muted); font-weight: 500; }
.tile--head .note { opacity: 0.85; }
@media (max-width: 60rem) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile--head { min-height: 9rem; }
  .tile { min-height: 10rem; }
}

/* ---------- how it works: an accordion of emerald panels ---------- */
.how { padding-block: clamp(4.5rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem); }
.how__intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.5rem; align-items: end; }
.how__intro h2 { grid-column: 1 / span 5; }
.how__intro .lead { grid-column: 7 / span 5; }
.stages { display: flex; gap: 8px; height: 33rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.stage { position: relative; flex: 0 0 4.75rem; min-width: 0; overflow: hidden; border-radius: var(--r-md); background: var(--bg); color: var(--fg); transition: flex-grow 300ms var(--ease-out), flex-basis 300ms var(--ease-out); }
.stage.is-open { flex: 1 1 0; }
.stage h3 { font-size: inherit; font-weight: 700; }
.stage__btn { text-align: left; font-family: var(--font-display); letter-spacing: -0.02em; }
.stage:not(.is-open) .stage__btn { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-start; padding: 1.4rem 1rem; writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--step-lead); line-height: 1.1; white-space: nowrap; transition: background-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .stage:not(.is-open) .stage__btn:hover { background: rgba(255, 255, 255, 0.12); } }
.stage.is-open .stage__btn { position: absolute; top: clamp(1.25rem, 2.2vw, 2rem); left: clamp(1.25rem, 2.2vw, 2rem); font-size: var(--step-figure); line-height: 1.05; max-width: 14ch; cursor: default; }
.stage__body { display: none; }
.stage.is-open .stage__body { display: grid; grid-template-columns: 1fr; gap: var(--gutter); height: 100%; padding: clamp(1.25rem, 2.2vw, 2rem); animation: stage-in 260ms var(--ease-out) both; }
.stage__body p { align-self: end; max-width: 30ch; font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.015em; }
.stage__pic { height: 100%; overflow: hidden; border-radius: var(--r-sm); }
.stage__pic img { width: 100%; height: 100%; object-fit: cover; }
@keyframes stage-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.how__act { margin-top: clamp(2rem, 4vw, 3rem); }
@media (max-width: 60rem) {
  .how__intro h2, .how__intro .lead { grid-column: 1 / -1; }
  .stages { flex-direction: column; height: auto; }
  .stage, .stage.is-open { flex: none; }
  .stage:not(.is-open) .stage__btn { position: static; writing-mode: horizontal-tb; transform: none; width: 100%; min-height: 4rem; padding: 0 1.25rem; align-items: center; white-space: normal; }
  .stage.is-open .stage__btn { position: static; display: block; padding: 1.5rem 1.25rem 0; }
  .stage.is-open .stage__body { grid-template-columns: 1fr; height: auto; padding: 1rem 1.25rem 1.5rem; }
  .stage__pic { height: auto; aspect-ratio: 4 / 3; order: 2; }
}

/* ---------- the photo band ---------- */
.view { position: relative; margin: clamp(3rem, 6vw, 5rem) var(--margin) 0; height: min(70svh, 44rem); overflow: hidden; display: grid; border-radius: var(--r-lg); }
.view img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.view__cap { grid-area: 1 / 1; align-self: end; justify-self: start; margin: 0 1.25rem 1.25rem; padding: 0.7rem 1rem; background: #fff; color: var(--ink); border-radius: var(--r-sm); font-size: var(--step-small); font-weight: 600; max-width: 52ch; box-shadow: var(--shadow-card); }

/* ---------- four covers, each with its own moving graphic ---------- */
.covers { padding-block: clamp(4.5rem, 9vw, 8rem); margin-top: clamp(4rem, 8vw, 7rem); }
.covers__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.25rem; align-items: end; }
.covers__head h2 { grid-column: 1 / span 6; max-width: 13ch; }
.covers__head .lead { grid-column: 8 / span 5; }
.covers__more { margin-top: 2rem; }

@media (max-width: 60rem) { .covers__head h2, .covers__head .lead { grid-column: 1 / -1; } }

/* ---------- about: a deep emerald panel with the portrait ---------- */
.brian { padding: clamp(4rem, 8vw, 7rem) var(--margin); }
.brian__panel { position: relative; overflow: hidden; max-width: 1584px; margin-inline: auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: clamp(1.75rem, 3.9vw, 3.5rem); padding-bottom: 0; border-radius: var(--r-lg); }
.brian__left { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.brian__statement { font-size: var(--step-head); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; max-width: 12ch; }
.brian__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem var(--gutter); }
.brian__block p { margin-top: 0.75rem; max-width: 40ch; opacity: 0.86; }
.brian__pic { grid-column: 8 / span 5; align-self: end; margin: 2rem 0 0; }
.brian__pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: var(--r-lg) var(--r-lg) 0 0; }
@media (max-width: 60rem) {
  .brian__left, .brian__pic { grid-column: 1 / -1; }
  .brian__blocks { grid-template-columns: 1fr; }
  .brian__pic { width: 86%; max-width: 30rem; margin-inline: auto; }
}

/* ---------- questions: an amber heading card, then one card per question ---------- */
.faq { padding: 0 var(--margin) clamp(4rem, 8vw, 7rem); max-width: 1680px; margin-inline: auto; display: grid; gap: 10px; }
.faq__head { padding: clamp(2rem, 4vw, 3rem) 0; border-radius: var(--r-lg); }
.faq__head .wrap { width: 100%; }
.faq__title { font-size: var(--step-head); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.band { border-radius: var(--r-md); }
.band.field-paper { background: var(--paper-2); }
.band.field-paper-2 { background: var(--paper-2); }
.band__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0.75rem; padding-block: clamp(1.5rem, 3vw, 2.25rem); }
.band__q { grid-column: 1 / span 5; font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.02em; }
.band__a { grid-column: 7 / span 6; color: var(--muted); }
@media (max-width: 60rem) { .band__q, .band__a { grid-column: 1 / -1; } }

/* ---------- the close: one big emerald card ---------- */
.close { padding-block: 0 clamp(4rem, 8vw, 7rem); }
.close__in { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; min-height: min(70svh, 40rem); padding: clamp(2rem, 5vw, 4.5rem); border-radius: var(--r-lg); }
.close__title { font-size: clamp(2.5rem, 1rem + 5.4vw, 6.25rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; max-width: 14ch; }
.close__foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.5rem; align-items: end; }
.close__foot .lead { grid-column: 1 / span 7; color: #fff; opacity: 0.92; }
.close__foot .btn { grid-column: 10 / span 3; justify-self: end; min-height: 3.5rem; }
@media (max-width: 60rem) { .close__foot .lead, .close__foot .btn { grid-column: 1 / -1; } .close__foot .btn { justify-self: stretch; } }
