/* ══════════════════════════════════════════════════════════
   AGfarms Insight — Animations
   Scroll reveals, keyframes, micro-interactions
   ══════════════════════════════════════════════════════════ */

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HERO ENTRANCE ─── */
.hero__badge   { animation: fadeInDown 0.8s 0.2s both; }
.hero h1       { animation: fadeInUp  0.8s 0.3s both; }
.hero__sub     { animation: fadeInUp  0.8s 0.5s both; }
.hero__actions { animation: fadeInUp  0.8s 0.7s both; }
.hero__visual  { animation: fadeInRight 1s  0.6s both; }

/* Page hero entrance */
.page-hero .section-label { animation: fadeInDown 0.6s 0.1s both; }
.page-hero .section-title { animation: fadeInUp  0.7s 0.2s both; }
.page-hero .breadcrumb    { animation: fadeInDown 0.6s 0.05s both; }

/* ─── KEYFRAMES ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── PULSE (badge dot) ─── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.hero__badge::before { animation: pulse 2s infinite; }

/* ─── 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; }
  .reveal-stagger > * { opacity: 1; transform: none; }
}
