/* ==========================================================================
   HOPE FOUNDATION (HF) NEPAL — CINEMATIC MOTION & SCROLL SYSTEM
   ========================================================================== */

/* ==========================================================================
   SHUTTER INTRO ANIMATION — 6 SECOND SPLIT REVEAL
   ========================================================================== */

.shutter-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  pointer-events: all;
}

/* Background hero preview inside shutter */
.shutter-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.shutter-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: brightness(0.7);
  animation: shutterBgZoom 6s ease-out forwards;
}

.shutter-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.45) 0%, rgba(13, 17, 23, 0.92) 100%);
}

/* The two shutter panels */
.shutter-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(160deg, rgba(13,17,23,0.92) 0%, rgba(26,35,50,0.88) 50%, rgba(15,25,35,0.92) 100%);
  transition: transform 1.3s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 1;
  will-change: transform;
}

.shutter-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, transparent 60%);
}

.shutter-left  { left: 0; transform: translateX(0); }
.shutter-right { right: 0; transform: translateX(0); }

/* When dismissed — panels slide apart */
.shutter-intro.dismissed .shutter-left  { transform: translateX(-100%); }
.shutter-intro.dismissed .shutter-right { transform: translateX(100%); }
.shutter-intro.dismissed .shutter-center { opacity: 0; transition: opacity 0.4s ease; }
.shutter-intro.dismissed .shutter-hero-bg { opacity: 0; transition: opacity 0.5s ease; }

/* Hide whole overlay after panels exit */
.shutter-intro.dismissed {
  pointer-events: none;
  transition: visibility 0s 1.4s;
  visibility: hidden;
}

/* Center brand content — sits above panels */
.shutter-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* Welcome typography badge */
.shutter-welcome-badge {
  font-size: clamp(0.75rem, 1.8vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.45em;
  color: #d4af37;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  text-shadow: 0 0 20px rgba(212,175,55,0.4);
  animation: shutterTextFadeUp 0.7s ease 0.3s both;
}

/* Logo */
.shutter-logo-wrap {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  border: 1.5px solid rgba(212,175,55,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 45px rgba(212,175,55,0.3), 0 0 90px rgba(212,175,55,0.12);
  animation: shutterLogoReveal 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both, shutterLogoPulse 3s ease-in-out 1.5s infinite alternate;
}

.shutter-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(212,175,55,0.6));
}

/* Brand name EN */
.shutter-brand-name {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.35em;
  color: #f8f4e8;
  text-transform: uppercase;
  margin: 0;
  animation: shutterTextFadeUp 0.7s ease 1.0s both;
}

/* Brand name NE */
.shutter-brand-ne {
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: rgba(212,175,55,0.9);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  margin-bottom: 1.2rem;
  animation: shutterTextFadeUp 0.7s ease 1.3s both;
}

/* Gold divider line */
.shutter-divider {
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.9), transparent);
  margin: 0 auto 1.4rem;
  animation: shutterDividerExpand 0.8s ease 1.6s both;
}

/* Main slogan */
.shutter-slogan {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.7);
  animation: shutterTextFadeUp 0.9s ease 1.9s both;
}

/* Sub-tagline */
.shutter-tagline {
  font-size: clamp(0.65rem, 1.5vw, 0.82rem);
  letter-spacing: 0.32em;
  color: rgba(212,175,55,0.7);
  text-transform: uppercase;
  margin-top: 0.9rem;
  animation: shutterTextFadeUp 0.7s ease 2.3s both;
}

/* Skip button */
.shutter-skip-btn {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.25 ease;
  backdrop-filter: blur(6px);
  animation: shutterTextFadeUp 0.5s ease 2.6s both;
}

.shutter-skip-btn:hover {
  background: rgba(212,175,55,0.2);
  border-color: rgba(212,175,55,0.5);
  color: #ffffff;
}

/* Keyframes */
@keyframes shutterBgZoom {
  0%   { transform: scale(1.15); filter: brightness(0.5); }
  100% { transform: scale(1.0);  filter: brightness(0.85); }
}

@keyframes shutterLogoReveal {
  from { opacity: 0; transform: scale(0.5) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shutterLogoPulse {
  0%   { box-shadow: 0 0 35px rgba(212,175,55,0.25), 0 0 70px rgba(212,175,55,0.1); }
  100% { box-shadow: 0 0 55px rgba(212,175,55,0.5), 0 0 110px rgba(212,175,55,0.25); }
}

@keyframes shutterTextFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shutterDividerExpand {
  from { opacity: 0; width: 0; }
  to   { opacity: 1; width: 70px; }
}

/* ==========================================================================

/* Cinematic Vignette & Subtle Film Grain Overlay */
.cinematic-vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  box-shadow: inset 0 0 120px rgba(15, 23, 42, 0.04);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 65%, rgba(15, 23, 42, 0.03) 100%);
}

/* Custom Fluid Magnetic Cursor (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: default;
  }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary-teal, #0d9488);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    will-change: transform;
  }

  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(13, 148, 136, 0.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    will-change: transform;
  }

  body.cursor-hover .cursor-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-amber, #f59e0b);
  }

  body.cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: rgba(245, 158, 11, 0.65);
    background-color: rgba(245, 158, 11, 0.08);
  }
}

@media (hover: none) or (pointer: coarse) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   SCROLL REVEAL & PROGRESSIVE ANIMATIONS (SILKY 60FPS UPWARD FLOATS)
   ========================================================================== */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-stagger > *,
.fullbleed-caption {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  filter: blur(4px);
  will-change: opacity, transform, filter;
}

.reveal-left {
  transform: translateX(-35px) translateY(15px);
}

.reveal-right {
  transform: translateX(35px) translateY(15px);
}

.reveal-scale {
  transform: scale(0.93) translateY(30px);
}

/* When visible / scrolled into view */
.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible,
.fullbleed-caption.is-visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0px) !important;
}

/* Staggered Child Reveal for Scenes as Page Scrolls Up */
.fullbleed-caption.is-visible .scene-slogan-badge,
.fullbleed-caption.is-visible .takeover-seal-wrap {
  animation: floatUpChild 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.fullbleed-caption.is-visible .scene-title-hero,
.fullbleed-caption.is-visible .scene-title-large,
.fullbleed-caption.is-visible .step-giant-number {
  animation: floatUpChild 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.fullbleed-caption.is-visible .scene-subtitle-ne,
.fullbleed-caption.is-visible .scene-subtitle-nepali,
.fullbleed-caption.is-visible .step-huge-title,
.fullbleed-caption.is-visible blockquote {
  animation: floatUpChild 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.fullbleed-caption.is-visible .scene-one-liner,
.fullbleed-caption.is-visible .step-one-liner,
.fullbleed-caption.is-visible .scene-call-box,
.fullbleed-caption.is-visible .impact-numbers-bar {
  animation: floatUpChild 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
}

.fullbleed-caption.is-visible .takeover-btn-gold,
.fullbleed-caption.is-visible .takeover-btn-glass,
.fullbleed-caption.is-visible .scene-link-btn,
.fullbleed-caption.is-visible .scene-huge-phone-btn {
  animation: floatUpChild 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.48s both;
}

@keyframes floatUpChild {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.08s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.18s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.28s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.38s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.48s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.58s; opacity: 1 !important; transform: translateY(0) !important; filter: blur(0) !important; }

/* Gentle Parallax Shift on Full-Bleed Background Images */
.fullbleed-bg {
  transform: translate3d(0, 0, 0) scale(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}


body.reveal-enabled .mask-wipe-img.is-visible {
  opacity: 1;
  transform: scale(1);
}


/* 3D Tilt Card Container */
.tilt-card-3d {
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  will-change: transform;
}

/* Idle Float Keyframes */
@keyframes subtleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes softPulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(13, 148, 136, 0.15);
  }
  50% {
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.35);
  }
}

.animate-float {
  animation: subtleFloat 5.5s ease-in-out infinite;
}

.animate-glow {
  animation: softPulseGlow 3.5s ease-in-out infinite;
}

/* Magnetic Button Base */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Full-Screen Immersive Hero Takeover Animations */
@keyframes kenBurnsZoom {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(-1%, -1%);
  }
  100% {
    transform: scale(1.15) translate(1%, 0.5%);
  }
}

@keyframes mistDrift {
  0% {
    transform: translateX(-5%) translateY(0);
    opacity: 0.25;
  }
  50% {
    transform: translateX(5%) translateY(-10px);
    opacity: 0.45;
  }
  100% {
    transform: translateX(-5%) translateY(0);
    opacity: 0.25;
  }
}

@keyframes takeoverFadeIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scrollIndicatorBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.8;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

.animate-kenburns {
  animation: kenBurnsZoom 24s ease-in-out infinite alternate;
  will-change: transform;
}

.animate-mist {
  animation: mistDrift 18s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
  .animate-kenburns, .animate-mist {
    animation: none !important;
  }
}

