/* =====================================================
   Casa Du Vovô — animations.css
   Keyframes, scroll reveal, hero entrance
   ===================================================== */

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(32px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-25%); }
}

/* ---------- Animation Utilities ---------- */
.anim-fade-up {
  animation: fadeUp 0.8s var(--ease) forwards;
}

.anim-fade-in {
  animation: fadeIn 1s ease forwards;
}

.anim-scale-in {
  animation: scaleIn 0.7s var(--ease) forwards;
}

/* ---------- Hero Entrance ---------- */
.hero [data-anim] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.hero.loaded [data-anim="1"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.hero.loaded [data-anim="2"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.hero.loaded [data-anim="3"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.hero.loaded [data-anim="4"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.65s;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Bounce (scroll indicator) ---------- */
.icon-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* ---------- Stat star animation ---------- */
.stat-card__star:nth-child(1) { animation-delay: 0s; }
.stat-card__star:nth-child(2) { animation-delay: 0.1s; }
.stat-card__star:nth-child(3) { animation-delay: 0.2s; }
.stat-card__star:nth-child(4) { animation-delay: 0.3s; }
.stat-card__star:nth-child(5) { animation-delay: 0.4s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero [data-anim] {
    opacity: 1;
    transform: none;
  }
}
