﻿/* ======================================
   Animations - VAMOS Theme
   Bold, Dramatic, Dynamic
====================================== */

/* ======================================
   Scroll Reveal Animations
====================================== */
.js-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.js-fade-up.delay-100 {
  transition-delay: 0.1s;
}

.js-fade-up.delay-200 {
  transition-delay: 0.2s;
}

.js-fade-up.delay-300 {
  transition-delay: 0.3s;
}

.js-fade-up.delay-400 {
  transition-delay: 0.4s;
}

.js-fade-up.delay-500 {
  transition-delay: 0.5s;
}

/* Fade from sides */
.js-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-fade-left.is-visible,
.js-fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale In */
.js-scale-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.js-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ======================================
   Red Glow Pulse
====================================== */
@keyframes pulse-red {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }

  50% {
    box-shadow: 0 0 30px 15px rgba(220, 38, 38, 0);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.3));
  }

  50% {
    filter: drop-shadow(0 0 40px rgba(220, 38, 38, 0.5));
  }
}

.pulse-red {
  animation: pulse-red 2s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ======================================
   Shimmer Effect
====================================== */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
  pointer-events: none;
}

/* ======================================
   Text Gradient Animation
====================================== */
@keyframes gradient-text-flow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.gradient-text-animated {
  background: linear-gradient(270deg,
      var(--color-primary),
      var(--color-primary-light),
      var(--color-accent),
      var(--color-primary));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-text-flow 5s ease infinite;
}

/* ======================================
   Float Animations
====================================== */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

@keyframes float-subtle {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

@keyframes float-rotate {

  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

.float-subtle {
  animation: float-subtle 8s ease-in-out infinite;
}

.float-rotate {
  animation: float-rotate 5s ease-in-out infinite;
}

/* ======================================
   Bounce Animation
====================================== */
@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-12px);
  }

  60% {
    transform: translateY(-6px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

/* ======================================
   Glitch Effect (Optional)
====================================== */
@keyframes glitch {

  0%,
  100% {
    transform: translate(0);
    filter: none;
  }

  20% {
    transform: translate(-2px, 2px);
    filter: hue-rotate(90deg);
  }

  40% {
    transform: translate(-2px, -2px);
    filter: none;
  }

  60% {
    transform: translate(2px, 2px);
    filter: hue-rotate(-90deg);
  }

  80% {
    transform: translate(2px, -2px);
    filter: none;
  }
}

.glitch:hover {
  animation: glitch 0.3s ease;
}

/* ======================================
   Line Draw Animation
====================================== */
@keyframes line-draw {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

.line-draw::after {
  animation: line-draw 0.5s ease forwards;
}

/* ======================================
   Fade In Keyframes
====================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-down {
  animation: fadeInDown 0.6s ease forwards;
}

.fade-in-scale {
  animation: fadeInScale 0.6s ease forwards;
}

/* ======================================
   Zoom Background
====================================== */
@keyframes bgZoom {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

/* ======================================
   Card & Button Hover Effects
====================================== */
.pg-card-h,
.day-btn,
.btn {
  transition: transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
}

.pg-card-h:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.day-btn:hover,
.btn:hover {
  transform: translateY(-3px);
}

/* ======================================
   3D Card Tilt
====================================== */
.card-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(3deg) rotateY(-3deg) translateY(-8px);
}

/* ======================================
   Underline Reveal
====================================== */
.underline-reveal {
  position: relative;
  display: inline-block;
}

.underline-reveal::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.underline-reveal:hover::after,
.underline-reveal.is-visible::after {
  width: 100%;
}

/* ======================================
   Rotate In
====================================== */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }

  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

.rotate-in {
  animation: rotateIn 0.6s ease forwards;
}

/* ======================================
   Counter Animation
====================================== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-up {
  animation: countUp 0.5s ease forwards;
}

/* ======================================
   Particle Float (Background)
====================================== */
@keyframes particleFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }

  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }

  50% {
    transform: translateY(-40px) translateX(-10px);
    opacity: 0.4;
  }

  75% {
    transform: translateY(-20px) translateX(15px);
    opacity: 0.6;
  }
}

.particle {
  animation: particleFloat 10s ease-in-out infinite;
}

/* ======================================
   Loading Spinner
====================================== */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-surface-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ======================================
   VAMOS Energy: Speed Lines (Hero BG)
====================================== */
.hero-speed-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero-speed-lines span {
  position: absolute;
  display: block;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(220, 38, 38, 0.15), transparent);
  transform: rotate(-35deg);
  animation: speedLine 4s linear infinite;
}

.hero-speed-lines span:nth-child(1) { left: 10%; height: 200px; animation-delay: 0s; animation-duration: 3.5s; }
.hero-speed-lines span:nth-child(2) { left: 25%; height: 300px; animation-delay: 0.8s; animation-duration: 4.2s; }
.hero-speed-lines span:nth-child(3) { left: 40%; height: 150px; animation-delay: 1.6s; animation-duration: 3s; }
.hero-speed-lines span:nth-child(4) { left: 55%; height: 250px; animation-delay: 2.4s; animation-duration: 3.8s; }
.hero-speed-lines span:nth-child(5) { left: 70%; height: 180px; animation-delay: 0.4s; animation-duration: 4.5s; }
.hero-speed-lines span:nth-child(6) { left: 85%; height: 220px; animation-delay: 3.2s; animation-duration: 3.2s; }

@keyframes speedLine {
  0% {
    top: -20%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 120%;
    opacity: 0;
  }
}

/* ======================================
   VAMOS Energy: Fire Sparks
====================================== */
.energy-sparks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.energy-sparks .spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-primary-light);
  box-shadow: 0 0 6px 2px rgba(220, 38, 38, 0.6);
  bottom: -5%;
  opacity: 0;
  animation: sparkRise linear infinite;
  animation-fill-mode: backwards;
}

.energy-sparks .spark:nth-child(1) { left: 20%; animation-duration: 4s; animation-delay: 0s; }
.energy-sparks .spark:nth-child(2) { left: 35%; animation-duration: 5s; animation-delay: 1s; width: 2px; height: 2px; }
.energy-sparks .spark:nth-child(3) { left: 50%; animation-duration: 3.5s; animation-delay: 2s; }
.energy-sparks .spark:nth-child(4) { left: 65%; animation-duration: 4.5s; animation-delay: 0.5s; width: 2px; height: 2px; }
.energy-sparks .spark:nth-child(5) { left: 80%; animation-duration: 5.5s; animation-delay: 1.5s; }
.energy-sparks .spark:nth-child(6) { left: 45%; animation-duration: 3s; animation-delay: 3s; width: 4px; height: 4px; }
.energy-sparks .spark:nth-child(7) { left: 30%; animation-duration: 6s; animation-delay: 2.5s; width: 2px; height: 2px; }
.energy-sparks .spark:nth-child(8) { left: 70%; animation-duration: 4s; animation-delay: 3.5s; }

@keyframes sparkRise {
  0% {
    bottom: -5%;
    opacity: 0;
    transform: translateX(0) scale(1);
  }
  15% {
    opacity: 1;
  }
  50% {
    transform: translateX(15px) scale(0.8);
  }
  85% {
    opacity: 0.5;
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(-10px) scale(0.3);
  }
}

/* ======================================
   VAMOS Energy: Card Hover Lift
====================================== */
.highlight-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(220, 38, 38, 0.25), 0 0 20px rgba(220, 38, 38, 0.1);
}

/* ======================================
   VAMOS Energy: Countdown Digit Flip
====================================== */
.digit-flip {
  animation: digitFlip 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes digitFlip {
  0% {
    transform: translateY(-8px) scale(1.15);
    opacity: 0.4;
  }
  50% {
    transform: translateY(2px) scale(0.95);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

