/* ============================================================
   CASA DO AGRO — Animações (animations.css)
   Keyframes + estados de revelação por scroll (IntersectionObserver).
   Respeita prefers-reduced-motion.
   ============================================================ */

/* ---------- KEYFRAMES ---------- */
@keyframes ripple-anim {
  to { transform: scale(2.6); opacity: 0; }
}
@keyframes scroll-dot {
  0%   { transform: translateX(-50%) translateY(0);   opacity: 1; }
  70%  { transform: translateX(-50%) translateY(12px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}
@keyframes float-slow {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-14px); }
}
@keyframes pulse-glow {
  0%,100% { opacity: 0.85; }
  50%     { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- REVELAÇÃO AO SCROLL ---------- */
/* Estado inicial: escondido. .is-inview (adicionado via JS) revela. */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="fade"]  { transform: none; }

[data-reveal].is-inview {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* atraso escalonado (stagger) via variável --i definida no HTML/JS */
[data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }

/* elementos flutuantes */
.float { animation: float-slow 6s var(--ease-inout) infinite; }

/* brilho pulsante do hero */
.hero__glow { animation: pulse-glow 5s var(--ease-inout) infinite; }

/* shimmer para skeleton/destaques */
.shimmer {
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.12) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}

/* contador de números anima opacidade na entrada */
.count { font-variant-numeric: tabular-nums; }

/* ---------- REDUZIR MOVIMENTO ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scroll-cue, .float, .hero__glow { animation: none !important; }
}
