/* ============================================================================
   story-telling-header — shared hero + base styles.
   Palette + fonts are injected by scripts/build.py from story.config.json via the
   {{PLACEHOLDER}} tokens below. Everything here is skin-agnostic.
   ============================================================================ */
:root {
  --ink:          #0e1a28;          /* dark hero/background */
  --ink-2:        #152030;         /* slightly lighter dark (stat band cells) */
  --gold:         #c9a068;         /* primary accent */
  --gold-bright:  #dcb87e;  /* headline accent on dark */
  --cream:        #f2e8dc;        /* light text on dark */
  --paper:        #fffdf8;          /* light document background */
  --body-ink:     #2b1f10;          /* body text on light */
  --body-soft:    #6a583d;
  --line:         rgba(120,80,20,.15);
  --radius:       16px;
  --shadow:       0 18px 50px rgba(30,20,6,.16);
  --serif:   "Merriweather", Georgia, "Times New Roman", serif;
  --sans:    "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--body-ink); background: var(--paper);
  line-height: 1.65; font-size: 1.0625rem; }
a { color: var(--gold); }
img { max-width: 100%; display: block; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 70; background: rgba(20,12,4,.82);
  backdrop-filter: blur(10px); border-bottom: 1px solid rgba(246,196,83,.18); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 14px 22px; display: flex;
  align-items: center; justify-content: space-between; gap: 18px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--cream);
  text-decoration: none; letter-spacing: .01em; }
.brand-mark { color: var(--gold-bright); }
.main-nav { display: flex; gap: 20px; }
.main-nav a { color: rgba(253,247,236,.82); text-decoration: none; font-size: .95rem; }
.main-nav a:hover { color: var(--gold-bright); }
.header-cta { background: var(--gold); color: var(--ink); padding: 9px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 700; padding: 13px 24px;
  border-radius: 999px; font-size: .98rem; transition: transform .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.10); }

/* ============ SCROLL-SCRUB HERO ============ */
#ascent { height: 520vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--ink); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.stage.video-on video { opacity: 1; }              /* scroll-scrubbed camera ascent */
.stage.video-on .scene { opacity: 0 !important; }  /* video supersedes the stills fallback */
.scene { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.scene:first-of-type { opacity: 1; }               /* first paint before JS runs */
.scene img { width: 100%; height: 100%; object-fit: cover; will-change: transform; transform: scale(1.12); }
.veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,12,4,.58) 0%, rgba(20,12,4,.22) 42%, rgba(20,12,4,.64) 100%); }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(12,7,2,.66) 100%); }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .05;
  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'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"); }

.beat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none; will-change: opacity, transform; padding: 0 8vw; }
.beat[data-beat="0"] { opacity: 1; }               /* first paint before JS runs */
.beat-tag { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 22px; }
.beat-tag span { border: 1px solid rgba(246,196,83,.45); padding: 6px 12px; border-radius: 3px; background: rgba(27,18,6,.35); backdrop-filter: blur(4px); }
.beat h1, .beat h2 { font-family: var(--serif); color: #fff; line-height: 1.12; text-shadow: 0 2px 28px rgba(6,4,2,.55); margin: 0; }
.beat h1 { font-weight: 900; font-size: clamp(30px, 5.2vw, 62px); max-width: 16ch; }
.beat h2 { font-weight: 700; font-size: clamp(28px, 4.6vw, 54px); max-width: 17ch; }
.beat .gold { color: var(--gold-bright); }
.beat .sub { margin-top: 20px; max-width: 52ch; font-size: clamp(15px, 1.4vw, 19px); font-weight: 400; line-height: 1.62; color: rgba(253,247,236,.9); }
.beat-center { align-items: center; text-align: center; }
.beat-center .sub { margin-left: auto; margin-right: auto; }
.hero-ctas { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-hint { margin-top: 34px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(253,247,236,.62); }

.hero-rail { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 10px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.hero-rail.show { opacity: 1; }
.hero-rail i { width: 6px; height: 6px; border-radius: 50%; background: rgba(253,247,236,.35); transition: background .3s, height .3s; display: block; }
.hero-rail i.on { background: var(--gold-bright); height: 22px; border-radius: 3px; }

/* ---------- Stat band ---------- */
.stat-band { background: var(--ink); color: var(--cream); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.stat-band .stat { padding: 26px 16px; text-align: center; background: var(--ink-2); }
.stat b { display: block; font-family: var(--serif); font-weight: 900; font-size: 1.9rem; color: var(--gold-bright); line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: .82rem; color: #e2d1aa; }

/* ---------- Document body ---------- */
main { max-width: 860px; margin: 0 auto; padding: 48px 22px; }
.sec { margin: 40px 0; }
.sec-label { font-family: var(--sans); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; display: flex; align-items: center; gap: 14px; }
.sec-label b { font-weight: 700; color: rgba(43,31,16,.35); }
.sec h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 900; margin: 0 0 16px; line-height: 1.15; }
.sec p { margin: 0 0 16px; }
.sec ul { margin: 0 0 18px; padding-left: 22px; }
.sec li { margin: 7px 0; }

.answer-box { background: linear-gradient(135deg,#fff8ea 0%,#fdefce 100%); border: 1px solid rgba(224,165,38,.4);
  border-left: 6px solid var(--gold); border-radius: var(--radius); padding: 22px 26px; margin: 8px 0 34px; box-shadow: var(--shadow); }
.answer-label { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.answer-q { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 10px; }
.answer-a { font-size: 1.1rem; margin: 0; }

/* proposal-specific */
.deliv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.d-item { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); padding: 18px 20px; border-radius: 10px; }
.d-check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(224,165,38,.12); border: 1px solid rgba(224,165,38,.55); display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 700; }
.d-item h4 { margin: 0 0 4px; font-size: 1rem; }
.d-item p { margin: 0; font-size: .9rem; color: var(--body-soft); }
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; position: relative; }
.price-card.best { border: 1.5px solid var(--gold); box-shadow: 0 16px 40px rgba(224,165,38,.14); }
.price-card .amt { font-family: var(--serif); font-size: 2.4rem; font-weight: 900; }
.price-card ul { list-style: none; padding: 16px 0 0; margin: 0; }
.price-card li { padding: 6px 0 6px 24px; position: relative; }
.price-card li:before { content: "\2713"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band { margin: 52px auto; max-width: 900px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #0e1a28 0%, #c9a068 130%); border-radius: 22px; padding: 44px 30px; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem,3vw,2.1rem); margin: 0 0 12px; }
.cta-band p { color: #fbefd7; max-width: 54ch; margin: 0 auto 24px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9d9b6; margin-top: 64px; text-align: center; padding: 40px 22px; }
.site-footer a { color: var(--gold-bright); }

/* ---------- Scroll reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .stat-band { grid-template-columns: repeat(2, 1fr); } .deliv, .price-cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .main-nav { display: none; } .beat { padding: 0 7vw; } .hero-rail { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  #ascent { height: auto; }
  .stage { position: relative; height: 100vh; }
  .stage video { display: none; }
  .scene { opacity: 0 !important; }
  .scene:first-of-type { opacity: 1 !important; }
  .scene img { transform: none !important; }
  .beat { opacity: 0 !important; }
  .beat[data-beat="0"] { opacity: 1 !important; }
  .stage > .beat:not([data-beat="0"]) { display: none; }
}
