/* ==========================================================================
   GROWN Design System - Animations & Micro-Interactions
   Subtle, expensive, smooth motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page Load Stagger Sequences
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.anim-fade-in {
  animation: fadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-slide-up {
  opacity: 0;
  animation: slideUpFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-delay-100 { animation-delay: 100ms; }
.anim-delay-200 { animation-delay: 200ms; }
.anim-delay-300 { animation-delay: 300ms; }
.anim-delay-400 { animation-delay: 400ms; }
.anim-delay-500 { animation-delay: 500ms; }
.anim-delay-600 { animation-delay: 600ms; }

/* --------------------------------------------------------------------------
   2. Scroll Reveal Animations (IntersectionObserver triggered)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-stagger-1 { transition-delay: 80ms; }
.reveal-stagger-2 { transition-delay: 160ms; }
.reveal-stagger-3 { transition-delay: 240ms; }
.reveal-stagger-4 { transition-delay: 320ms; }
.reveal-stagger-5 { transition-delay: 400ms; }
.reveal-stagger-6 { transition-delay: 480ms; }

/* --------------------------------------------------------------------------
   3. Subtle Floating & Ambient Movement
   -------------------------------------------------------------------------- */
@keyframes floatSubtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-slow {
  animation: floatSubtle 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.cta-spotlight {
  animation: pulseGlow 8s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   4. Number Counter Transition
   -------------------------------------------------------------------------- */
.counter-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   5. Accessibility: Reduced Motion Support
   -------------------------------------------------------------------------- */
@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 !important;
    transform: none !important;
  }
  .anim-slide-up,
  .anim-fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
  .cta-spotlight {
    animation: none !important;
  }
  .float-slow {
    animation: none !important;
  }
}
