/* ==========================================================================
   TERA LATAM - ANIMATIONS & SCROLL EFFECTS
   Animaciones avanzadas con CSS3 & Hardware Acceleration
   ========================================================================== */

/* Keyframe Animations */
@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 230, 118, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

@keyframes pulse-gold {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

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

@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes energy-flow {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes glow-border {
  0%, 100% {
    border-color: rgba(0, 230, 118, 0.3);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.15);
  }
  50% {
    border-color: rgba(0, 230, 118, 0.8);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.35);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(1000%);
  }
}

/* Utility Animation Classes */
.animate-float {
  animation: float-subtle 5s ease-in-out infinite;
}

.animate-pulse-green {
  animation: pulse-dot 2s infinite;
}

.animate-pulse-gold {
  animation: pulse-gold 2.2s infinite;
}

.pulse-border {
  animation: glow-border 4s ease-in-out infinite;
}

/* ==========================================================================
   SCROLL REVEAL & INTERSECTION OBSERVER STATES
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  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-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-fade-in {
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: opacity;
}

.reveal-fade-in.is-visible {
  opacity: 1;
}

.reveal-scale-up {
  opacity: 0;
  transform: scale(0.94);
  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-scale-up.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger Delays for child cards */
.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; }

/* SVG Circuit Path Drawing Effects */
.flow-line-animated {
  stroke-dasharray: 8, 8;
  animation: energy-flow 1.5s linear infinite;
}

/* Reduced motion preference accessibility */
@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-on-scroll,
  .reveal-scale-up {
    opacity: 1 !important;
    transform: none !important;
  }
}
