/* ===== Animation Keyframes & Scroll Trigger ===== */

/* ============================================
   SCROLL-TRIGGERED FADE-IN
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for grid children */
.bento-grid .bento-card.fade-in:nth-child(1) { transition-delay: 0ms; }
.bento-grid .bento-card.fade-in:nth-child(2) { transition-delay: 50ms; }
.bento-grid .bento-card.fade-in:nth-child(3) { transition-delay: 100ms; }
.bento-grid .bento-card.fade-in:nth-child(4) { transition-delay: 150ms; }
.bento-grid .bento-card.fade-in:nth-child(5) { transition-delay: 200ms; }
.bento-grid .bento-card.fade-in:nth-child(6) { transition-delay: 250ms; }
.bento-grid .bento-card.fade-in:nth-child(7) { transition-delay: 300ms; }
.bento-grid .bento-card.fade-in:nth-child(8) { transition-delay: 350ms; }
.bento-grid .bento-card.fade-in:nth-child(9) { transition-delay: 400ms; }

.stats-grid .stat-item.fade-in:nth-child(1) { transition-delay: 0ms; }
.stats-grid .stat-item.fade-in:nth-child(2) { transition-delay: 100ms; }
.stats-grid .stat-item.fade-in:nth-child(3) { transition-delay: 200ms; }
.stats-grid .stat-item.fade-in:nth-child(4) { transition-delay: 300ms; }

.contact-grid .contact-card.fade-in:nth-child(1) { transition-delay: 0ms; }
.contact-grid .contact-card.fade-in:nth-child(2) { transition-delay: 100ms; }
.contact-grid .contact-card.fade-in:nth-child(3) { transition-delay: 200ms; }

/* ============================================
   FLOATING ELEMENT ANIMATIONS
   ============================================ */

.floating-element {
  animation: float-gentle 4s ease-in-out infinite;
}

.floating-element:nth-child(2) {
  animation-delay: -1.5s;
}

.floating-element:nth-child(3) {
  animation-delay: -3s;
}

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

/* ============================================
   HERO PARTICLE ANIMATION
   ============================================ */

/* Particle styles are inline via JS for randomization */

/* ============================================
   GLOW PULSE
   ============================================ */

.hero__glow--1 {
  animation: glow-pulse 8s ease-in-out infinite;
}

.hero__glow--2 {
  animation: glow-pulse 10s ease-in-out infinite reverse;
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.1);
  }
}

/* ============================================
   VERSION TAG PULSE
   ============================================ */

.hero__version-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

/* ============================================
   PHONE MOCKUP FLOAT
   ============================================ */

.hero .phone-mockup {
  animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

/* ============================================
   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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .floating-element {
    animation: none;
  }

  .hero .phone-mockup {
    animation: none;
  }

  .hero__glow--1,
  .hero__glow--2 {
    animation: none;
  }

  .badge::after {
    animation: none;
  }
}
