/* ================================================================
   AASHA Health — Premium Intro Animation Styles
   Phase 1: Full-Screen Logo Intro with Pulse Rings & Glow
   Phase 2: FLIP Traveling to Navbar Logo
   Phase 3: Hero Staggered Element Reveal
   Brand Color: #0B5E59
   ================================================================ */

/* Scroll Lock while Intro Plays */
body.intro-lock {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

/* Fullscreen White Overlay */
#intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  pointer-events: all;
}

/* Ambient Glow & Pulse Waves */
.intro-glow-wrapper {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}

.intro-ambient-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 82, 83, 0.08) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(255, 255, 255, 0) 75%);
  animation: introGlowPulse 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

.intro-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  pointer-events: none;
  animation: introPulseRing 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.intro-pulse-ring-1 {
  width: clamp(110px, 34vw, 140px);
  height: clamp(110px, 34vw, 140px);
  animation-delay: 0s;
}

.intro-pulse-ring-2 {
  width: clamp(110px, 34vw, 140px);
  height: clamp(110px, 34vw, 140px);
  animation-delay: 0.9s;
}

@keyframes introGlowPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes introPulseRing {
  0% { transform: scale(0.65); opacity: 0.9; }
  60% { opacity: 0.4; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Centered Animated Logo */
#intro-logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 3vw, 16px);
  opacity: 0;
  color: #000000;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity, filter;
  position: relative;
  z-index: 2;
  max-width: 90vw;
  justify-content: center;
}

#intro-logo .intro-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 20px rgba(11, 94, 89, 0.32));
  animation: iconHeartbeat 2.2s ease-in-out infinite;
}

@keyframes iconHeartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.08); }
  30% { transform: scale(1); }
  45% { transform: scale(1.05); }
  60% { transform: scale(1); }
}

#intro-logo .intro-logo-img {
  height: clamp(40px, 11vw, 56px);
  width: auto;
  object-fit: contain;
  display: block;
}

#intro-logo .intro-brand-name {
  font-family: var(--font-heading, 'Outfit'), 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(32px, 8.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: #000000;
  text-transform: lowercase;
}

/* Navbar Initial State During Intro */
body.intro-active .nav-links,
body.intro-active .nav-cta,
body.intro-active .mobile-menu-toggle {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.1s;
}

body.ready .nav-links,
body.ready .nav-cta,
body.ready .mobile-menu-toggle {
  opacity: 1;
  transform: none;
}

/* ================================================================
   Phase 3: Staggered Hero Reveal
   ================================================================ */
.reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, filter, transform;
}

body.ready .reveal {
  opacity: 1;
  filter: none !important;
  transform: none !important;
  will-change: auto !important;
}

/* Word-by-word blur-in for headline */
.word-reveal {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--base-d, 0.05s) + var(--wi, 0) * 0.055s);
  will-change: opacity, filter, transform;
}

body.ready .word-reveal {
  opacity: 1;
  filter: none !important;
  transform: none !important;
  will-change: auto !important;
}

