/* ============================================================
   MICROSYSTEM — Animations
   ============================================================ */

/* --- Keyframe Animations --- */

/* Floating / breathing for Sara AI */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

/* Floating cards around hero */
@keyframes float-card {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

/* Pulse glow for CTA button */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.45), 0 0 60px rgba(255, 107, 0, 0.15);
  }
}

/* Blinking dot */
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Particle floating */
@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.5);
  }
  20% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
    transform: translateY(-40px) scale(1);
  }
  80% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(0.5);
  }
}

/* Rotating ring behind Sara */
@keyframes rotate-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pulse ring glow */
@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* Network node pulse */
@keyframes node-pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
  }
}

/* Infinite marquee scroll */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Check mark pop in */
@keyframes check-pop {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Counter number scale */
@keyframes counter-pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Slide up with fade */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in from left */
@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Glow text shimmer */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Scale in */
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gradient border animation */
@keyframes border-glow {
  0%, 100% {
    border-color: rgba(0, 168, 255, 0.15);
  }
  50% {
    border-color: rgba(0, 168, 255, 0.35);
  }
}

/* Stagger delay utility classes */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }

/* Hero text entrance animation */
.hero-text > * {
  opacity: 0;
  transform: translateY(30px);
}

.hero-text.animated > * {
  animation: slideUp 0.8s var(--ease-out) forwards;
}

.hero-text.animated > *:nth-child(1) { animation-delay: 0.1s; }
.hero-text.animated > *:nth-child(2) { animation-delay: 0.3s; }
.hero-text.animated > *:nth-child(3) { animation-delay: 0.5s; }
.hero-text.animated > *:nth-child(4) { animation-delay: 0.7s; }
.hero-text.animated > *:nth-child(5) { animation-delay: 0.9s; }

/* Hero image entrance */
.hero-image {
  opacity: 0;
  transform: translateX(60px);
}

.hero-image.animated {
  animation: slideInRight 1s var(--ease-out) 0.5s forwards;
}

/* Feature check animation on reveal */
.feature-check {
  opacity: 0;
  transform: scale(0);
}

.feature-item.visible .feature-check {
  animation: check-pop 0.5s var(--ease-bounce) forwards;
}

.feature-item:nth-child(1).visible .feature-check { animation-delay: 0.1s; }
.feature-item:nth-child(2).visible .feature-check { animation-delay: 0.3s; }
.feature-item:nth-child(3).visible .feature-check { animation-delay: 0.5s; }

/* Counter / Traction card animations are now handled in style.css traction-card rules */

/* Bento cards stagger animation */
.bento-card {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.bento-card.visible {
  animation: slideUp 0.6s var(--ease-out) forwards;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none !important;
  }

  .hero-text > * {
    opacity: 1;
    transform: none;
  }

  .hero-image {
    opacity: 1;
    transform: none;
  }
}
