/* ═══════════════════════════════════════════════════════════
   WILDROOT hero scrub section. Frosted caption cards read on any
   frame (cream studio → golden swirl → green meadow).
   Keep the .scrub-stage background-image rule (rule 1: no black flash).
   ═══════════════════════════════════════════════════════════ */

.scrub-section { position: relative; background: var(--cream); }

.scrub-head {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gut) clamp(1.5rem, 4vw, 3rem);
  max-width: 780px; margin-inline: auto;
}
.scrub-head .eyebrow { display: block; margin-bottom: 0.9rem; }
.scrub-head h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 0.8rem; }
.scrub-head p { color: var(--ink-soft); max-width: 54ch; margin-inline: auto; }
.scrub-hint {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.3rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--taupe);
}
.scrub-hint .arrow { animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.scrub-stage {
  position: relative; height: 100svh; overflow: hidden;
  background: #b8a074 url('../seq/frame-0001.jpg') center / cover no-repeat;
}

/* ── hero overlay: the homepage headline lives ON the animation ── */
.scrub-hero {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center;
  will-change: opacity, transform;
}
.scrub-hero__scrim {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(102deg, var(--cream) 0%, rgba(251,246,236,.9) 27%, rgba(251,246,236,.5) 47%, rgba(251,246,236,.04) 70%, transparent 86%),
    linear-gradient(0deg, rgba(33,29,23,.12) 0%, transparent 20%);
}
.scrub-hero__inner { position: relative; z-index: 1; max-width: 660px; padding-block: 2rem; }
.scrub-hero__inner .h-display { margin: 0.4rem 0 1.1rem; }
.scrub-hero__inner .hero__eyebrow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.3rem; }
.scrub-hero__lede { margin-bottom: 1.9rem; color: var(--ink-soft); }
.scrub-hero .hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }
.scrub-hero .hero__trust { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; }
.scrub-hero__cue {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--cream-90); padding: 0.5rem 1rem; border-radius: 100px;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.scrub-hero__cue .arrow { animation: nudge 1.6s var(--ease) infinite; }

@media (max-width: 720px) {
  .scrub-hero { align-items: flex-end; }
  .scrub-hero__inner { padding-bottom: 4.5rem; max-width: none; }
  .scrub-hero__scrim {
    background: linear-gradient(180deg, rgba(251,246,236,.32) 0%, rgba(251,246,236,.72) 44%, rgba(251,246,236,.95) 76%, var(--cream) 100%);
  }
}
@media (prefers-reduced-motion: reduce) { .scrub-hero__cue .arrow { animation: none; } }
#scrub-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* subtle vignette so caption cards always have contrast footing */
.scrub-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(33,29,23,.10) 0%, transparent 22%, transparent 62%, rgba(33,29,23,.22) 100%);
}

.scrub-buffer {
  position: absolute; right: 1.4rem; bottom: 1.4rem; z-index: 4;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  color: rgba(33,29,23,.5); background: var(--cream-90);
  padding: 0.3em 0.7em; border-radius: 100px;
  transition: opacity 0.5s;
}
.scrub-buffer.hidden { opacity: 0; }

/* progress rail across the pin */
.scrub-rail {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 4;
  background: rgba(255,255,255,.28);
}
.scrub-rail i {
  display: block; height: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--amber), var(--pumpkin));
}

/* ── caption cards ── */
.scrub-caption {
  position: absolute; left: clamp(1.1rem, 5vw, 5rem); bottom: clamp(2.5rem, 10vh, 6rem);
  max-width: min(46ch, 82vw); z-index: 3; opacity: 0;
  padding: 1.5rem 1.7rem 1.7rem;
  background: linear-gradient(155deg, rgba(251,246,236,.975), rgba(251,246,236,.92));
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.5);
}
.scrub-caption .scrub-tag {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600;
}
.scrub-caption h3 {
  font-size: clamp(1.7rem, 4.2vw, 3rem); line-height: 1.02; margin: 0.55rem 0 0.5rem;
  color: var(--ink); letter-spacing: -0.025em;
}
.scrub-caption p { max-width: 40ch; color: var(--ink-soft); font-size: clamp(0.92rem, 1vw, 1.05rem); }
.scrub-caption .num { color: var(--pumpkin); font-variant-numeric: tabular-nums; }
.scrub-cta { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 1.1rem; font-weight: 700; color: var(--forest); border-bottom: 2px solid var(--forest); padding-bottom: 2px; }
.scrub-cta:hover { color: var(--pumpkin); border-color: var(--pumpkin); }

@media (max-width: 620px) {
  .scrub-caption { left: 0.9rem; right: 0.9rem; bottom: 1.4rem; max-width: none; padding: 1.15rem 1.25rem 1.3rem; }
}

/* static fallback (reduced motion / GSAP missing): the hero overlay stays put
   as the resting homepage; the scrubbed story captions remain hidden. */
body.scrub-static .scrub-caption { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scrub-caption { opacity: 0; } }
