/* ==========================================================================
   IMMERSIVE SCROLL REVEAL ANIMATIONS
   ========================================================================== */

/* Base reveal transition settings */
.reveal {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
  filter: blur(5px);
}

/* Scroll reveal directions */
.reveal-up {
  transform: translateY(50px);
}

.reveal-down {
  transform: translateY(-50px);
}

.reveal-left {
  transform: translateX(-60px);
}

.reveal-right {
  transform: translateX(60px);
}

.reveal-scale {
  transform: scale(0.92);
}

/* Activated reveal states - when the element enters the viewport */
.reveal.reveal-active {
  opacity: 1;
  transform: translate(0) scale(1);
  filter: blur(0);
}

/* Stagger delays for grids and grouped items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Custom durations */
.reveal-slow {
  transition-duration: 1.5s;
}

.reveal-fast {
  transition-duration: 0.6s;
}

/* ==========================================================================
   KEYFRAME & GLOW ANIMATIONS
   ========================================================================== */

/* Infinite speed tunnel animation for the Hero section */
@keyframes tunnelMove {
  0% {
    stroke-dashoffset: 800;
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

.tunnel-ray {
  stroke-dasharray: 400;
  animation: tunnelMove 3s linear infinite;
}

.tunnel-ray-1 { animation-delay: 0s; stroke: var(--primary-orange); }
.tunnel-ray-2 { animation-delay: 0.75s; stroke: var(--primary-yellow); }
.tunnel-ray-3 { animation-delay: 1.5s; stroke: var(--primary-orange); }
.tunnel-ray-4 { animation-delay: 2.25s; stroke: var(--primary-yellow); }

/* Speed lines on background */
@keyframes speedLines {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.speed-line {
  position: absolute;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--primary-orange), transparent);
  opacity: 0.15;
  animation: speedLines 2.5s linear infinite;
}

/* Infinite float animation for graphics */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

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

/* Spin animation for spinner/indicators */
@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* Pulsing glow for highlighted plans/badges */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 75, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 75, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 75, 0, 0);
  }
}

.featured-glow {
  animation: pulse-glow 2s infinite;
}

/* Shiny hover overlay effect for cards */
.shine-overlay {
  position: relative;
  overflow: hidden;
}

.shine-overlay::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: rgba(255, 255, 255, 0.13);
  transform: rotate(30deg);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.shine-overlay:hover::after {
  transform: translate(300%, -50%) rotate(30deg);
}

/* ==========================================================================
   ORANGE LIGHT FLARES BACKGROUND DECORATION
   ========================================================================== */
.light-flare {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 75, 0, 0.22) 0%, rgba(255, 166, 0, 0.04) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
  animation: pulse-flare 10s ease-in-out infinite alternate;
}

.flare-1 {
  width: 350px;
  height: 350px;
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.flare-2 {
  width: 480px;
  height: 480px;
  bottom: -10%;
  right: 5%;
  background: radial-gradient(circle, rgba(255, 166, 0, 0.18) 0%, rgba(255, 75, 0, 0.03) 60%, transparent 70%);
  animation-delay: 3s;
  animation-duration: 15s;
}

.flare-3 {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 45%;
  background: radial-gradient(circle, rgba(255, 75, 0, 0.15) 0%, transparent 70%);
  animation-delay: 1.5s;
  animation-duration: 8s;
}

@keyframes pulse-flare {
  0% {
    transform: scale(0.85) translate(0, 0);
    opacity: 0.4;
  }
  50% {
    opacity: 0.75;
  }
  100% {
    transform: scale(1.15) translate(25px, -25px);
    opacity: 0.55;
  }
}

/* ==========================================================================
   COLORFUL SPARKLES (DESTELLOS DE COLORES EN MOVIMIENTO)
   ========================================================================== */
.color-spark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  filter: blur(2px);
  opacity: 0;
  will-change: transform, opacity;
}

/* Colors and Sizes */
.spark-orange-1 {
  width: 10px;
  height: 10px;
  background-color: #FF4B00;
  box-shadow: 0 0 12px 3px rgba(255, 75, 0, 0.8);
  top: 25%;
  left: -5%;
  animation: sparkFlow1 8s linear infinite;
}

.spark-yellow-2 {
  width: 8px;
  height: 8px;
  background-color: #FFD600;
  box-shadow: 0 0 12px 3px rgba(255, 214, 0, 0.8);
  top: 45%;
  left: -5%;
  animation: sparkFlow2 6s linear infinite 1.5s;
}

.spark-orange-2 {
  width: 9px;
  height: 9px;
  background-color: #FF6D00;
  box-shadow: 0 0 12px 3px rgba(255, 109, 0, 0.8);
  top: 75%;
  left: -5%;
  animation: sparkFlow1 10s linear infinite 2s;
}

.spark-yellow-1 {
  width: 7px;
  height: 7px;
  background-color: #FFEA00;
  box-shadow: 0 0 10px 2px rgba(255, 234, 0, 0.8);
  top: 15%;
  left: -5%;
  animation: sparkFlow2 7s linear infinite 3s;
}

.spark-orange-3 {
  width: 11px;
  height: 11px;
  background-color: #FF3D00;
  box-shadow: 0 0 15px 4px rgba(255, 61, 0, 0.8);
  top: 55%;
  left: -5%;
  animation: sparkFlow3 9s linear infinite 0.5s;
}

.spark-yellow-3 {
  width: 10px;
  height: 10px;
  background-color: #FFD600;
  box-shadow: 0 0 12px 3px rgba(255, 214, 0, 0.8);
  top: 35%;
  left: -5%;
  animation: sparkFlow3 7.5s linear infinite 4s;
}

/* Animations for movement along sweeping curves */
@keyframes sparkFlow1 {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  90% {
    opacity: 0.95;
  }
  100% {
    transform: translate(1600px, 180px) scale(1.1);
    opacity: 0;
  }
}

@keyframes sparkFlow2 {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  100% {
    transform: translate(1600px, -220px) scale(1);
    opacity: 0;
  }
}

@keyframes sparkFlow3 {
  0% {
    transform: translate(0, 0) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  88% {
    opacity: 0.95;
  }
  100% {
    transform: translate(1600px, -60px) scale(1.2);
    opacity: 0;
  }
}
