/*
  animations.css - Keyframes, transiciones y utilidades de animación
  Prioridad: NON-CRITICAL - Puede lazy load
  Tamaño: ~4KB
*/

/* ============================================
   KEYFRAMES - Animaciones globales
   ============================================ */

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 122, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 122, 0, 0.5);
  }
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes liquidFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shimmerSweep {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(30deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  60% {
    transform: translateX(100%) translateY(100%) rotate(30deg);
    opacity: 1;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(30deg);
    opacity: 0;
  }
}

@keyframes photonFloat {
  0% {
    transform: translate3d(0, -6px, 0) scale(1);
  }
  50% {
    transform: translate3d(4px, 6px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-2px, -4px, 0) scale(0.98);
  }
}

@keyframes solarPulseSubtle {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(255, 122, 0, 0.12),
      0 2px 8px rgba(255, 122, 0, 0.08),
      0 0 0 1px rgba(255, 160, 80, 0.15),
      inset 0 1px 2px rgba(255, 255, 255, 0.2),
      inset 0 -1px 2px rgba(200, 80, 0, 0.08);
  }
  50% {
    box-shadow:
      0 6px 20px rgba(255, 122, 0, 0.18),
      0 3px 10px rgba(255, 122, 0, 0.12),
      0 0 0 1px rgba(255, 160, 80, 0.22),
      inset 0 1px 2px rgba(255, 255, 255, 0.25),
      inset 0 -1px 2px rgba(200, 80, 0, 0.1);
  }
}

@keyframes solarRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes glowPulseSubtle {
  from {
    opacity: 0.4;
    transform: scale(0.98);
  }
  to {
    opacity: 0.65;
    transform: scale(1.02);
  }
}

/* ============================================
   SCROLL REVEAL UTILITIES
   ============================================ */

.home-landing .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-landing .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   STAGGER DELAYS
   ============================================ */

.home-landing .stagger-1 {
  transition-delay: 0.1s;
}

.home-landing .stagger-2 {
  transition-delay: 0.2s;
}

.home-landing .stagger-3 {
  transition-delay: 0.3s;
}

/* ============================================
   HOVER & INTERACTION EFFECTS
   ============================================ */

.home-landing .hover-lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-landing .hover-lift:hover {
  transform: translateY(-8px) scale(1.005);
}

.home-landing .cta-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* ============================================
   ICON INTEGRATION
   ============================================ */

.home-landing .icon-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-landing .icon-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: row-reverse;
}

.home-landing .icon-sm {
  width: 1rem;
  height: 1rem;
}

.home-landing .icon-md {
  width: 1.25rem;
  height: 1.25rem;
}

.home-landing .icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

.home-landing .icon-bounce:hover svg,
.home-landing .icon-bounce:focus svg {
  animation: iconBounce 0.6s ease-in-out;
}

.home-landing a:hover .icon-glow,
.home-landing button:hover .icon-glow {
  filter: drop-shadow(0 0 6px rgba(255, 122, 0, 0.4));
  transition: filter 0.3s ease;
}

/* ============================================
   REDUCED MOTION SUPPORT
   Deshabilitar todas las animaciones si el usuario lo prefiere
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .home-landing .animate-on-scroll,
  .home-landing .hover-lift,
  .home-landing .cta-pulse,
  .home-landing .icon-bounce:hover svg,
  .home-landing .icon-bounce:focus svg {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ============================================
   BEMCO OVERRIDES
   ============================================ */

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 32, 91, 0.28);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 58, 140, 0.42);
  }
}

@keyframes solarPulseSubtle {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(0, 32, 91, 0.14),
      0 2px 8px rgba(0, 32, 91, 0.10),
      0 0 0 1px rgba(0, 58, 140, 0.16),
      inset 0 1px 2px rgba(255, 255, 255, 0.20),
      inset 0 -1px 2px rgba(0, 32, 91, 0.10);
  }
  50% {
    box-shadow:
      0 6px 20px rgba(0, 32, 91, 0.22),
      0 3px 10px rgba(0, 32, 91, 0.14),
      0 0 0 1px rgba(0, 58, 140, 0.22),
      inset 0 1px 2px rgba(255, 255, 255, 0.24),
      inset 0 -1px 2px rgba(0, 32, 91, 0.12);
  }
}

.home-landing a:hover .icon-glow,
.home-landing button:hover .icon-glow {
  filter: drop-shadow(0 0 6px rgba(249, 176, 63, 0.45));
}
