/* ============================================================
   ANIMATIONS — Alfa Confecção
============================================================ */

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
  will-change: opacity, transform;
}

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

/* Stagger delays */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

/* ── Keyframes ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.3; }
}

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

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes counter-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* ── Hero load animations ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-badge.reveal.visible { transition-delay: 0ms; }
  .hero-title.reveal.visible  { transition-delay: 100ms; }
  .hero-subtitle.reveal.visible { transition-delay: 200ms; }
  .hero-actions.reveal.visible { transition-delay: 300ms; }
  .hero-stats.reveal.visible  { transition-delay: 450ms; }

  .hero-glow.glow-1 {
    animation: float 8s ease-in-out infinite;
  }
  .hero-glow.glow-2 {
    animation: float 10s ease-in-out 2s infinite reverse;
  }

  .whatsapp-float {
    animation: fade-in-up 0.6s 1.5s var(--ease-out) both;
  }
}

/* Respect reduced motion */
@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 {
    opacity: 1;
    transform: none;
  }
}

/* ── Strip marquee (optional enhancement) ── */
@media (max-width: 640px) {
  .strip-list {
    animation: marquee 20s linear infinite;
    flex-wrap: nowrap;
    width: max-content;
  }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
