:root {
  --bg:             #0c1018;
  --surface:        #0c1018;
  --border:         rgba(255,255,255,0.07);
  --text-primary:   #f0ece4;
  --text-secondary: rgba(240,236,228,0.45);
  --accent:         #FFCD00;
  --accent-dim:     rgba(255,205,0,0.12);
  --font-display:   'Big Shoulders Display', sans-serif;
  --font-body:      'DM Sans', sans-serif;
  --font-mono:      'DM Mono', monospace;
}

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

a { color: var(--accent); }
html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* ─── FILM GRAIN ──────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.038;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
}

/* ─── PROGRESS BAR ────────────────────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 9000;
  transition: width 0.05s linear;
  box-shadow: 0 0 10px var(--accent), 0 0 24px rgba(255,205,0,0.35);
}

/* ─── CHAPTER INDICATOR ───────────────────────────────────────────────────── */
.chapter-indicator {
  position: fixed;
  right: 2rem; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.75rem;
  z-index: 100;
  opacity: 0; transition: opacity 0.5s;
}
.chapter-indicator.visible { opacity: 1; }

.chapter-dot {
  width: 4px; height: 4px;
  border-radius: 0;
  background: var(--text-secondary);
  transition: all 0.3s;
}
.chapter-dot.active {
  background: var(--accent);
  transform: scale(1.8);
  box-shadow: 0 0 6px var(--accent);
}

/* ─── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 4rem 5rem 5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Yellow left stripe */
.hero::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--accent);
  z-index: 2;
}

/* Large faded background numeral */
.hero-bg-num {
  position: absolute;
  top: -0.08em; right: -0.04em;
  font-family: var(--font-display);
  font-size: clamp(14rem, 32vw, 28rem);
  font-weight: 900;
  color: rgba(255,205,0,0.032);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  z-index: 0;
}

/* Top meta bar */
.hero-meta-bar {
  position: absolute;
  top: 2.75rem; left: 5rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  z-index: 2;
}
.hero-meta-sep { color: var(--accent); }

/* Main content block */
.hero-content-block {
  position: relative; z-index: 2;
  max-width: 860px;
}

/* Eyebrow: yellow chip badge */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0.38rem 0.9rem;
  margin-bottom: 1.25rem;
}

/* Bold rule between eyebrow and title */
.hero-title-rule {
  width: 70px; height: 4px;
  background: var(--accent);
  margin-bottom: 1.25rem;
}

/* Main title — BIG and uppercase */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 900;
  line-height: 0.93;
  letter-spacing: -0.025em;
  max-width: 100%;
  margin-bottom: 1.75rem;
  color: var(--text-primary);
  text-transform: uppercase;
}
.hero-title em { font-style: italic; color: var(--accent); }

/* Subtitle */
.hero-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.75;
  font-weight: 300;
}
.hero-subtitle a { color: var(--accent); text-decoration: none; }
.hero-subtitle a:hover { text-decoration: underline; }

/* Bottom bar */
.hero-bottom-bar {
  position: absolute;
  bottom: 3.5rem; left: 5rem; right: 4rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  z-index: 2;
}

/* Scroll hint */
.scroll-hint {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem;
}
.scroll-hint-label {
  font-family: var(--font-body);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  animation: pulseHint 2.5s ease-in-out infinite;
}
.scroll-hint-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: growLine 2.5s ease-in-out infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
@keyframes growLine {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; }
  50%       { transform: scaleY(1);   transform-origin: top; }
}

/* Logos row */
.hero-logos {
  display: flex; gap: 1.5rem;
  align-items: center; flex-wrap: wrap; justify-content: flex-end;
}

@media (max-width: 768px) {
  .hero { padding: 0 1.5rem 5rem 2.5rem; }
  .hero-meta-bar { left: 2.5rem; }
  .hero-bg-num { opacity: 0.02; }
  .hero-bottom-bar { left: 2.5rem; right: 1.5rem; flex-direction: column; gap: 2rem; align-items: flex-start; }
  .hero-logos { justify-content: flex-start; }
}

/* ─── SCROLL CONTAINER ────────────────────────────────────────────────────── */
.scroll-container { position: relative; }

/* ─── STICKY SCENE ────────────────────────────────────────────────────────── */
.sticky-scene {
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.video-wrapper { position: relative; width: 100%; height: 100%; }
#main-canvas   { width: 100%; height: 100%; display: block; }

/* ─── VIDEO PLACEHOLDER ───────────────────────────────────────────────────── */
.video-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  flex-direction: column; gap: 1rem;
}
.video-placeholder-icon {
  width: 72px; height: 72px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.video-placeholder-icon svg { opacity: 0.25; }
.video-placeholder p {
  font-family: var(--font-body);
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--text-secondary); text-transform: uppercase;
}
.video-placeholder .placeholder-hint { font-size: 0.55rem; opacity: 0.4; }

/* ─── SCENE OVERLAYS ──────────────────────────────────────────────────────── */
.scene-overlay         { position: absolute; inset: 0; pointer-events: none; }
.scene-overlay-bottom  { background: none; }
.scene-overlay-left    { background: none; }

/* ─── TEXT OVERLAY LAYER ──────────────────────────────────────────────────── */
.text-overlay { position: absolute; inset: 0; pointer-events: none; }

.chapter-text {
  position: absolute;
  max-width: 400px; opacity: 0;
  top: 50%; transform: translateY(-50%);
  background: rgba(10,14,20,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 2rem 2rem 2rem 1.75rem;
  border-left: 3px solid var(--accent);
}

.chapter-text.pos-left        { left: 4vw; right: auto; text-align: left; }
.chapter-text.pos-right       { right: 4vw; left: auto; text-align: left; }
.chapter-text.pos-center      { left: 50%; transform: translate(-50%,-50%); text-align: center; }
.chapter-text.pos-bottom-left { left: 4vw; bottom: 8vh; top: auto; transform: none; }

.ct-eyebrow {
  font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem; display: block;
  transform: translateY(10px); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
}
.ct-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 900; line-height: 1.0;
  color: #fff; margin-bottom: 1rem; text-transform: uppercase;
  transform: translateY(16px); opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1) 0.06s, opacity 0.45s ease 0.06s;
}
.ct-headline em { font-style: italic; color: var(--accent); }
.ct-body {
  font-size: 0.95rem; line-height: 1.7;
  color: rgba(255,255,255,0.78); font-weight: 300;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1) 0.12s, opacity 0.45s ease 0.12s;
}
.ct-tag {
  display: inline-block; margin-top: 1.25rem;
  font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.2em; padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255,205,0,0.4); color: var(--accent);
  text-transform: uppercase;
  transform: translateY(10px); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1) 0.18s, opacity 0.4s ease 0.18s;
}

.chapter-text.state-in   .ct-eyebrow,
.chapter-text.state-hold .ct-eyebrow,
.chapter-text.state-in   .ct-headline,
.chapter-text.state-hold .ct-headline,
.chapter-text.state-in   .ct-body,
.chapter-text.state-hold .ct-body,
.chapter-text.state-in   .ct-tag,
.chapter-text.state-hold .ct-tag { transform: translateY(0); opacity: 1; }

.chapter-text.state-out .ct-eyebrow,
.chapter-text.state-out .ct-headline,
.chapter-text.state-out .ct-body,
.chapter-text.state-out .ct-tag { transform: translateY(-12px); opacity: 0; transition-duration: 0.3s; transition-delay: 0s; }

.chapter-text.state-in,
.chapter-text.state-hold,
.chapter-text.state-out { opacity: 1; }

/* ─── IMAGE OVERLAY LAYER ─────────────────────────────────────────────────── */
.image-overlay { position: absolute; inset: 0; pointer-events: none; }

.chapter-image {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
.chapter-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chapter-image.pos-full img { object-fit: cover; width: 100%; height: 100%; }
.chapter-image.state-in, .chapter-image.state-hold, .chapter-image.state-out { opacity: 1; }
.chapter-image.state-in  { animation: fadeIn  0.5s ease forwards; }
.chapter-image.state-out { animation: fadeOut 0.3s ease forwards; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ─── SCROLL TRIGGER ZONES ────────────────────────────────────────────────── */
.scroll-body  { position: relative; z-index: 1; }
.trigger-zone { position: relative; }

/* ─── OUTRO ───────────────────────────────────────────────────────────────── */
.outro {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 5rem 2rem 4rem;
  border-top: 1px solid var(--border);
  flex-direction: column; gap: 1.5rem;
  position: relative; overflow: hidden;
}
.outro-bg-word {
  position: absolute;
  bottom: -0.1em; right: -0.02em;
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 18rem); font-weight: 900;
  color: rgba(255,205,0,0.025); line-height: 1;
  pointer-events: none; user-select: none; letter-spacing: -0.04em;
}

.outro-rule { width: 50px; height: 4px; background: var(--accent); margin-bottom: 0.5rem; }

.outro-eyebrow {
  font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent);
}
.outro-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900;
  max-width: 600px; text-transform: uppercase; line-height: 1.0;
}
.outro-body {
  color: var(--text-secondary); max-width: 420px;
  line-height: 1.75; font-size: 0.9rem; font-weight: 300;
}
.outro-cta {
  display: inline-block; margin-top: 0.5rem;
  padding: 0.85rem 2.5rem;
  border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-body); font-size: 0.65rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  text-decoration: none; background: transparent;
  cursor: pointer; border-radius: 0;
  transition: background 0.25s, color 0.25s;
}
.outro-cta:hover { background: var(--accent); color: var(--bg); }
.outro-logos {
  display: flex; gap: 1.5rem; align-items: center;
  justify-content: center; flex-wrap: wrap; margin-top: 1rem;
}

/* ─── LOADING OVERLAY ─────────────────────────────────────────────────────── */
body.loading { overflow: hidden; }

.loading-overlay {
  position: fixed; inset: 0;
  z-index: 9500;
  background: var(--bg);
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 4rem 5rem;
  transition: opacity 0.7s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }

.loading-inner {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 0.4rem;
}

/* Giant percentage — hero of the loading screen */
.loading-count {
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 16rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.05em;
  line-height: 0.88;
  order: -1;
}

.loading-label {
  font-family: var(--font-body);
  font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--text-secondary);
  padding-left: 0.15em;
}

.loading-track {
  width: 180px; height: 1px;
  background: var(--border);
  position: relative; overflow: hidden;
  margin-top: 0.75rem;
}
.loading-fill {
  position: absolute; top: 0; left: 0;
  height: 100%; width: 0%;
  background: var(--accent);
  transition: width 0.15s linear;
  box-shadow: 0 0 6px var(--accent);
}

/* Vertical label in top-right corner of loading screen */
.loading-corner-label {
  position: absolute; top: 3rem; right: 4rem;
  font-family: var(--font-display);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-secondary);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ─── DEBUG PHASE LABEL ───────────────────────────────────────────────────── */
.phase-label {
  display: none;
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  font-family: var(--font-body); font-size: 0.58rem;
  letter-spacing: 0.12em; color: var(--accent);
  z-index: 9999;
  background: rgba(6,8,12,0.92);
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255,205,0,0.2);
  border-left: 3px solid var(--accent);
}
body[data-debug] .phase-label { display: block; }

/* ─── SECTION LOGOS ───────────────────────────────────────────────────────── */
.section-logo {
  height: 60px; width: auto; max-width: 180px;
  object-fit: contain; opacity: 0.8;
  transition: opacity 0.3s ease;
  background: white; padding: 0.4rem 0.6rem;
}
.section-logo:hover { opacity: 1; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CALLOUTS — Editorial annotation style
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.callout-layer {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 15;
}

/* Callout container */
.callout {
  position: absolute;
  display: flex; align-items: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
  opacity: 0;
}
.callout.visible { opacity: 1; }

/* Directional layouts */
.callout.side-right  { flex-direction: row;          transform: translateY(-50%); }
.callout.side-left   { flex-direction: row-reverse;  transform: translate(-100%, -50%); }
.callout.side-top    { flex-direction: column-reverse; align-items: flex-start; transform: translate(-20px, -100%); }
.callout.side-bottom { flex-direction: column;        align-items: flex-start; transform: translateX(-20px); }

/* Anchor: sharp yellow square */
.callout-anchor {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 0;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 3px rgba(255,205,0,0.18),
    0 0 14px rgba(255,205,0,0.5);
  pointer-events: none;
  transition: opacity 0.2s ease;
  opacity: 0;
}
.callout-anchor.visible { opacity: 1; }

/* Tail: accent yellow arrows */
.callout-tail { width: 0; height: 0; flex-shrink: 0; }

.side-right .callout-tail {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 8px solid var(--accent);
}
.side-left .callout-tail {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
}
.side-top .callout-tail {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--accent);
  margin-left: 11px;
}
.side-bottom .callout-tail {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--accent);
  margin-left: 11px;
}

/* Bubble: editorial dark with directional accent border */
.callout-bubble {
  padding: 10px 14px 11px;
  border-radius: 0;
  width: 180px; min-width: 80px;
  background: rgba(9,13,20,0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 28px rgba(0,0,0,0.75), 0 1px 0 rgba(255,205,0,0.08);
  word-wrap: break-word; overflow-wrap: break-word;
}

/* Accent border on the connecting side */
.callout.side-right  .callout-bubble { border-left:   2px solid var(--accent); }
.callout.side-left   .callout-bubble { border-right:  2px solid var(--accent); }
.callout.side-top    .callout-bubble { border-bottom: 2px solid var(--accent); }
.callout.side-bottom .callout-bubble { border-top:    2px solid var(--accent); }

/* Override any theme — all editorial dark */
.callout.theme-light .callout-bubble,
.callout.theme-dark  .callout-bubble,
.callout:not([class*="theme"]) .callout-bubble {
  background: rgba(9,13,20,0.96) !important;
}

/* Label */
.callout-label {
  font-family: var(--font-body);
  font-size: clamp(7px, 0.65vw, 9px);
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 5px; font-weight: 500;
  color: var(--accent) !important;
}

/* Text */
.callout-text {
  font-family: var(--font-display);
  font-size: clamp(11px, 1.15vw, 14px);
  font-weight: 600; line-height: 1.3;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text-primary) !important;
  text-transform: uppercase;
}


/* em accent in headline */
.callout-text em { font-style: italic; color: var(--accent); }

/* Body — lighter paragraph copy below the headline */
.callout-body {
  font-family: var(--font-body);
  font-size: clamp(9px, 0.82vw, 11px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(240, 236, 228, 0.72);
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}
.callout-body em { font-style: italic; color: var(--accent); }

/* Tag — small accent badge below body */
.callout-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: clamp(6px, 0.56vw, 7.5px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(255, 205, 0, 0.35);
  color: var(--accent);
}

@media (max-width: 768px) {
  .callout-bubble { padding: 8px 11px 9px; }
  .callout-label  { font-size: 7px; }
  .callout-text   { font-size: 10px; }
  .callout-body   { font-size: 9px; }
  .callout-tag    { font-size: 6px; }
  .callout-anchor { width: 7px; height: 7px; }
}
