/* ==========================================================================
   Vrind Homestay — Animations
   ========================================================================== */

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.45; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-animate .eyebrow,
.hero-animate .hero-title,
.hero-animate .hero-text,
.hero-animate .hero-actions {
  opacity: 1;
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-animate .eyebrow { animation-delay: 0.12s; }
.hero-animate .hero-title { animation-delay: 0.28s; }
.hero-animate .hero-text { animation-delay: 0.44s; }
.hero-animate .hero-actions { animation-delay: 0.6s; }

.scroll-indicator-line {
  animation: scrollPulse 1.8s ease-in-out infinite;
  transform-origin: top;
}

.floating-wa {
  animation: floatSoft 3.2s ease-in-out infinite;
}

/* Scroll reveals — hidden only after JS boots; never stay blank if JS fails */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

html.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.reveal-stagger > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.js .reveal-stagger:not(.is-visible) > * {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.54s; }

.reveal-stagger.is-visible > * {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-animate .eyebrow,
  .hero-animate .hero-title,
  .hero-animate .hero-text,
  .hero-animate .hero-actions,
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .floating-wa {
    animation: none;
  }

  .site-marquee-track {
    animation: none !important;
    transform: none !important;
  }

  .auto-slider-track {
    transition: none !important;
  }

  .auto-slider-progress-bar.is-running {
    animation: none !important;
  }

  .auto-slide-media img {
    transition: none !important;
  }
}
