/* =============================================================
   Charging Bull — wrapper styles for the assembled long-form
   Visual language matches the three embedded chapters:
   dark navy bg #0a0a10, fg #f5f3ee, gold #c9a961 / #e8c87c
   ============================================================= */

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

:root {
  --bg:      #0a0a10;
  --fg:      #f5f3ee;
  --muted:   rgba(245,243,238,0.55);
  --gold:    #c9a961;
  --accent:  #e8c87c;
  --crisis:  #ff6b5c;
  --up:      #6bd29a;
}

html, body {
  background: var(--bg);
  color:      var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: auto;
}
/* NB: do NOT set `overflow-x: hidden` on html/body — it implicitly turns
 * `overflow-y` to `auto` on the root element, which changes the sticky
 * containing block and can prevent the iframe inside .iframe-wrap from
 * smoothly sliding off-screen at the end of its sticky range. */
body { font-weight: 300; overflow-x: clip; }

::selection { background: var(--gold); color: #000; }

/* ---------- progress rail (fixed at top) -------------------- */
.rail {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.05);
  z-index: 999;
  pointer-events: none;
}
.rail-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--gold), var(--accent));
  box-shadow: 0 0 12px var(--gold);
  transition: width 0.1s linear;
}

/* ---------- LEAD section ------------------------------------ */
.lead {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  /* Subtle radial spotlight so the type sits on something */
  background:
    radial-gradient(ellipse at 50% 40%, rgba(201,169,97,0.10) 0%, rgba(10,10,16,0) 60%),
    var(--bg);
}
.lead-inner {
  max-width: 880px;
  text-align: center;
}
.kicker {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 28px;
}
.lead-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -1px;
  margin-bottom: 36px;
}
.lead-deck {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.7;
  color: rgba(245,243,238,0.85);
  max-width: 640px;
  margin: 0 auto;
}
.scroll-cue {
  margin-top: 64px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  50.1%{ transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- iframe wrappers --------------------------------- *
   Each wrapper occupies enough scroll-space (set via data-vh in
   JS) that scrolling past it walks the embedded chapter through
   its own internal scroll via postMessage.
   The iframe itself is sticky inside the wrapper.
   ----------------------------------------------------------- */
.iframe-wrap {
  position: relative;
  width: 100%;
  background: var(--bg);
}
.chapter-frame {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  border: 0;
  display: block;
  background: var(--bg);
}

/* ---------- chapter break slides ---------------------------- */
.break {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse at center, rgba(201,169,97,0.06) 0%, rgba(10,10,16,0) 65%),
    var(--bg);
  position: relative;
}
.break::before, .break::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(201,169,97,0.45));
}
.break::before { top: 0; }
.break::after { bottom: 0; transform: translateX(-50%) rotate(180deg); }
.break-inner {
  max-width: 720px;
  text-align: center;
}
.break-numeral {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(96px, 14vw, 200px);
  font-weight: 600;
  line-height: 0.9;
  color: var(--gold);
  margin-bottom: 16px;
}
.break-rule {
  width: 56px; height: 1px;
  background: var(--gold);
  margin: 0 auto 32px;
}
.break-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin-bottom: 24px;
}
.break-sub {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.7;
  color: rgba(245,243,238,0.7);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* ---------- prose blocks ------------------------------------ */
.prose {
  padding: 140px 24px;
  background: var(--bg);
}
.prose-dark {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.012), rgba(255,255,255,0.0)),
    var(--bg);
}
.prose-inner {
  max-width: 720px;
  margin: 0 auto;
}
.prose p {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
  color: rgba(245,243,238,0.86);
  margin-bottom: 26px;
}
.prose p:last-child { margin-bottom: 0; }
.prose-lede { font-size: clamp(17px, 1.4vw, 21px) !important; line-height: 1.6 !important; color: var(--fg) !important; }
.prose b { font-weight: 600; color: var(--fg); }
.prose b.hl-up   { color: var(--up); }
.prose b.hl-down { color: var(--crisis); }
.prose em { font-style: italic; color: var(--accent); font-weight: 400; }
.prose-h {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.3px;
  margin-bottom: 36px;
  position: relative;
  padding-left: 0;
}
.prose-h::before {
  content: '';
  display: block;
  width: 36px; height: 1px;
  background: var(--gold);
  margin-bottom: 22px;
}
.prose-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px) !important;
  line-height: 1.4 !important;
  color: var(--accent) !important;
  border-left: 2px solid var(--gold);
  padding: 8px 0 8px 28px;
  margin: 40px 0 !important;
}
.prose-quote-by {
  display: block;
  margin-top: 14px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.5);
  font-weight: 500;
}

/* ---------- outro ------------------------------------------- */
.outro {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(201,169,97,0.08), rgba(10,10,16,0) 65%),
    var(--bg);
}
.outro-inner { text-align: center; max-width: 720px; }
.outro-rule {
  width: 56px; height: 1px;
  background: var(--gold);
  margin: 0 auto 48px;
}
.outro-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.15;
  color: rgba(245,243,238,0.8);
}
.outro-line-em {
  font-style: italic;
  color: var(--gold);
  margin-bottom: 64px;
}
.outro-credit {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2;
}

/* ---------- mobile tweaks ----------------------------------- */
@media (max-width: 720px) {
  .lead-title { font-size: 44px; }
  .break-numeral { font-size: 100px; }
  .prose { padding: 80px 18px; }
  .prose p { font-size: 15px; line-height: 1.7; }
}
