/* ============================================================
   SCROLL HERO — Video canvas scroll-driven
   Mama Tava Travel
   ============================================================ */

/* ── Section: 350vh gives ~250vh of scroll range ─────────── */
.scroll-hero {
  position: relative;
  height: 350vh;
}

/* ── Sticky viewport ─────────────────────────────────────── */
.sh-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* ── Canvas — cover fit, painted from preloaded JPG sequence ── */
#sh-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#sh-canvas.loaded,
.sh-sticky:not(.loading) #sh-canvas {
  opacity: 1;
}

/* ── Cinematic vignette ──────────────────────────────────── */
.sh-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.45) 0%,
      rgba(0,0,0,0.10) 30%,
      rgba(0,0,0,0.10) 60%,
      rgba(0,0,0,0.65) 100%
    ),
    radial-gradient(ellipse 120% 100% at 50% 50%,
      transparent 40%,
      rgba(0,0,0,0.40) 100%
    );
}

/* ── Content overlay ─────────────────────────────────────── */
.sh-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(24px, 6vw, 80px) clamp(60px, 10vh, 120px);
  pointer-events: none;
  transition: opacity 0.1s linear;
}

.sh-inner {
  pointer-events: auto;
  max-width: 820px;
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.sh-eyebrow {
  display: block;
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffffff;
  margin-bottom: clamp(10px, 1.5vh, 18px);
}

/* ── Headline ────────────────────────────────────────────── */
.sh-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  line-height: 1;
}

.sh-hl-sm {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 5.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  line-height: 1.1;
}

.sh-hl-lg {
  font-family: 'Bangond', Georgia, serif;
  font-size: clamp(3rem, 7.5vw, 9rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 0.92;
  text-shadow: 0 4px 40px rgba(0,0,0,0.3);
  -webkit-text-stroke: 0px;
  font-weight: 100;
}

/* ── Subtitle ────────────────────────────────────────────── */
.sh-sub {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
  margin: 0 0 clamp(24px, 3.5vh, 36px);
  max-width: 480px;
}

/* ── CTAs ────────────────────────────────────────────────── */
.sh-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.sh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 9999px;
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  white-space: nowrap;
}

.sh-btn--primary {
  background: rgba(131,193,198,0.18);
  border: 1px solid rgba(131,193,198,0.55);
  color: #fff;
  backdrop-filter: blur(10px);
}

.sh-btn--primary:hover {
  background: rgba(131,193,198,0.32);
  border-color: rgba(131,193,198,0.85);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.sh-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.28);
  color: #ffffff;
}

.sh-btn--ghost:hover {
  border-color: rgba(255,255,255,0.60);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* ── Scroll hint ─────────────────────────────────────────── */
.sh-scroll-hint {
  position: absolute;
  bottom: clamp(24px, 4vh, 40px);
  right: clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.4s;
}

.sh-scroll-hint span {
  font-family: 'TAN Kindred', Georgia, serif;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  writing-mode: vertical-rl;
}

.sh-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(131,193,198,0.70), rgba(131,193,198,0));
  animation: sh-line-pulse 2s ease-in-out infinite;
}

@keyframes sh-line-pulse {
  0%, 100% { transform: scaleY(1);   opacity: 1;   }
  50%       { transform: scaleY(0.5); opacity: 0.4; }
}

/* ── Loading state ───────────────────────────────────────── */
/* The global preloader already covers the page during initial load,
   so we no longer need an internal curtain that depends on the video's
   `canplay` event (which is unreliable on off-screen videos). The
   sticky's own background:#000 is enough to keep the headline readable
   while the canvas is still empty. */
.sh-sticky.loading {
  /* intentionally empty — class is kept for JS hooks/animations */
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .scroll-hero { height: 280vh; }
  .sh-overlay  { align-items: flex-end; padding-bottom: 48px; }
  .sh-hl-lg    { font-size: clamp(4rem, 18vw, 8rem); }
}

@media (max-width: 480px) {
  .scroll-hero { height: 250vh; }
  .sh-actions  { flex-direction: column; }
  .sh-btn      { justify-content: center; }
}
