/* ━━━━━━━━━━━━━━ HERO SCROLL-SCRUB (GSAP prototype) ━━━━━━━━━━━━━━ */
#hero.hero-scrub {
  position: relative;
  /* Tall section = scroll distance that drives the video scrub.
     The inner pin holds the video on screen while this scrolls. */
  height: 320vh;
  background: #0B0A08;
}

.hero-scrub-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hero-scrub-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cinematic grade — dark edges plus a title scrim rising from the
   bottom-left, where the text lives. No white haze anywhere. */
.hero-scrub-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 18% 88%,
      rgba(8,8,6,0.52) 0%, rgba(8,8,6,0.28) 45%, rgba(8,8,6,0) 100%),
    linear-gradient(180deg,
      rgba(8,8,6,0.32) 0%,
      rgba(8,8,6,0.00) 30%,
      rgba(8,8,6,0.00) 62%,
      rgba(8,8,6,0.40) 100%),
    radial-gradient(circle at center, rgba(8,8,6,0) 55%, rgba(8,8,6,0.20) 100%);
}

.hero-scrub-content {
  position: absolute;
  left: 52px;
  bottom: 64px;
  z-index: 3;
  max-width: 720px;
}

.hero-scrub-content .hero-eyebrow { margin-bottom: 18px; }

/* Title lives on the video — scrim + soft shadow keep it readable */
.hero-scrub-content .hero-title,
.hero-scrub-content .hero-eyebrow {
  text-shadow: 0 1px 24px rgba(8,8,6,0.55), 0 1px 2px rgba(8,8,6,0.35);
}

/* ── Stats: one slim glass bar (the data gets guaranteed protection) ── */
.hero-scrub-content .hero-stats {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin-top: 28px;
  padding: 18px 8px;
  border-radius: 14px;
  background: rgba(12,11,9,0.34);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(240,235,227,0.12);
  box-shadow: 0 8px 32px rgba(8,8,6,0.25);
}
.hero-scrub-content .hero-stats .stat {
  padding: 0 28px;
  border-right: 1px solid rgba(240,235,227,0.14);
  white-space: nowrap;
}
.hero-scrub-content .hero-stats .stat:last-child { border-right: none; }

/* Scroll cue: bare text + line, soft shadow only */
.hero-scrub-cue span {
  color: rgba(240,235,227,0.75);
  text-shadow: 0 1px 12px rgba(8,8,6,0.6);
}
.hero-scrub-cue .cue-line { height: 34px; }

/* Scroll cue — bottom right, clear of the stats row */
.hero-scrub-cue {
  position: absolute;
  bottom: 36px;
  right: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  transition: opacity 0.5s;
}
.hero-scrub-cue.faded { opacity: 0; }
.hero-scrub-cue span {
  font-size: 8px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(240,235,227,0.55);
}
.hero-scrub-cue .cue-line {
  width: 1px;
  height: 56px;
  overflow: hidden;
  position: relative;
}
.hero-scrub-cue .cue-line::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 1px;
  background: var(--accent);
  animation: cueDrop 2.2s ease-in-out infinite;
}
@keyframes cueDrop {
  0%   { transform: translateY(-100%); }
  50%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Progress hairline along the right edge while scrubbing */
.hero-scrub-progress {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 120px;
  background: rgba(240,235,227,0.16);
  z-index: 3;
}
.hero-scrub-progress .fill {
  width: 100%;
  height: 0%;
  background: var(--accent-lt);
}

/* Narrow desktops: stats wrap into a 2×2 glass card; cue would collide — hide it */
@media (max-width: 1100px) {
  .hero-scrub-cue { display: none; }
  .hero-scrub-content .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 18px;
    padding: 20px 8px;
  }
  .hero-scrub-content .hero-stats .stat:nth-child(2n) { border-right: none; }
}

/* Mobile: same scrub, adapted. svh units keep the pin stable while
   Safari's address bar collapses; shorter scroll distance for thumbs. */
@media (max-width: 768px) {
  #hero.hero-scrub { height: 280svh; }
  .hero-scrub-pin { height: 100svh; }
  .hero-scrub-content { left: 20px; bottom: max(40px, env(safe-area-inset-bottom, 0px) + 28px); right: 20px; }
  .hero-scrub-content .hero-title { font-size: clamp(40px, 11vw, 64px); }
  .hero-scrub-content .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
    padding: 16px 4px;
    margin-top: 20px;
  }
  .hero-scrub-content .hero-stats .stat { padding: 0 18px; }
  .hero-scrub-content .hero-stats .stat:nth-child(2n) { border-right: none; }
  .hero-scrub-progress { display: none; }
}

/* JS safety net: video metadata never loaded → plain looping background */
#hero.hero-scrub.scrub-fallback { height: 100svh; }
#hero.hero-scrub.scrub-fallback .hero-scrub-pin { position: relative; height: 100svh; }
#hero.hero-scrub.scrub-fallback .hero-scrub-cue,
#hero.hero-scrub.scrub-fallback .hero-scrub-progress { display: none; }
/* Reduced motion: the scrub stays (it's user-driven); only the
   self-playing cue animation stops. */
@media (prefers-reduced-motion: reduce) {
  .hero-scrub-cue .cue-line::after { animation: none; }
}
