/**
 * VictoriaOS Landing - Animaciones Avanzadas CSS
 * Sistema de animaciones de nivel premio para landing page
 */

/* ============================================================================
   KEYFRAMES ANIMATIONS
============================================================================ */

/* Gradient Background Animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Float Animation - Smooth vertical movement */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Float Reverse - For alternating elements */
@keyframes float-reverse {
  0%, 100% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(0px);
  }
}

/* Pulse Scale - Breathing effect */
@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Glow Pulse - For highlights and CTAs */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(104, 65, 234, 0.4),
      0 0 40px rgba(104, 65, 234, 0.2),
      0 10px 40px rgba(104, 65, 234, 0.3);
  }
  50% {
    box-shadow:
      0 0 40px rgba(104, 65, 234, 0.6),
      0 0 80px rgba(104, 65, 234, 0.3),
      0 15px 60px rgba(104, 65, 234, 0.5);
  }
}

/* Shimmer - Shining effect */
@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(200%) rotate(45deg);
  }
}

/* Slide In From Bottom */
@keyframes slide-in-bottom {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In From Top */
@keyframes slide-in-top {
  from {
    opacity: 0;
    transform: translateY(-60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In From Left */
@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide In From Right */
@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Fade In */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Bounce In */
@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* Rotate In */
@keyframes rotate-in {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Blur In */
@keyframes blur-in {
  from {
    opacity: 0;
    filter: blur(20px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

/* Wave */
@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: rotate(-10deg);
  }
  20%, 40%, 60%, 80% {
    transform: rotate(10deg);
  }
}

/* Heartbeat */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(0.9);
  }
  20%, 40%, 50% {
    transform: scale(1.1);
  }
}

/* Text Gradient Animation */
@keyframes text-gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Particle Float */
@keyframes particle-float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -10px) rotate(5deg);
  }
  50% {
    transform: translate(-5px, -20px) rotate(-5deg);
  }
  75% {
    transform: translate(-10px, -10px) rotate(5deg);
  }
}

/* ============================================================================
   UTILITY CLASSES
============================================================================ */

/* Animated Gradient Background */
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* Float Animations */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

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

/* Pulse Animations */
.animate-pulse-scale {
  animation: pulse-scale 3s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Shimmer Effect */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s infinite;
  pointer-events: none;
}

/* Slide In Animations */
.slide-in-bottom {
  animation: slide-in-bottom 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-top {
  animation: slide-in-top 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-left {
  animation: slide-in-left 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-right {
  animation: slide-in-right 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scale & Fade */
.scale-in {
  animation: scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.bounce-in {
  animation: bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.rotate-in {
  animation: rotate-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.blur-in {
  animation: blur-in 1s ease-out forwards;
}

/* Animated Text Gradient */
.text-gradient-animate {
  background: linear-gradient(
    90deg,
    #6841ea,
    #8f72f3,
    #6841ea,
    #5132b8
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-gradient 4s ease infinite;
}

/* Wave Animation */
.animate-wave {
  animation: wave 2s ease-in-out;
  transform-origin: 70% 70%;
  display: inline-block;
}

/* Heartbeat Animation */
.animate-heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* Particle Animation */
.animate-particle {
  animation: particle-float 4s ease-in-out infinite;
}

/* ============================================================================
   HOVER EFFECTS
============================================================================ */

/* Lift on Hover */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Scale on Hover */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Glow on Hover */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow:
    0 0 30px rgba(104, 65, 234, 0.4),
    0 0 60px rgba(104, 65, 234, 0.2),
    0 10px 40px rgba(104, 65, 234, 0.3);
}

/* Rotate on Hover */
.hover-rotate {
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Tilt on Hover */
.hover-tilt {
  transition: transform 0.3s ease;
}

.hover-tilt:hover {
  transform: perspective(1000px) rotateX(10deg) rotateY(-10deg);
}

/* Shine on Hover */
.hover-shine {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.hover-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.hover-shine:hover::after {
  left: 100%;
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ============================================================================
   SCROLL REVEAL (For non-AOS elements)
============================================================================ */

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

.scroll-reveal {
  opacity: 0;
  animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS
============================================================================ */

/* Use GPU acceleration for animations */
.gpu-accelerate {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

  .animate-float,
  .animate-float-reverse,
  .animate-pulse-scale,
  .animate-glow-pulse,
  .animate-gradient,
  .text-gradient-animate {
    animation: none !important;
  }
}

/* ============================================================================
   SPECIAL EFFECTS
============================================================================ */

/* Glass morphism effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon glow effect */
.neon-glow {
  text-shadow:
    0 0 10px rgba(104, 65, 234, 0.8),
    0 0 20px rgba(104, 65, 234, 0.6),
    0 0 30px rgba(104, 65, 234, 0.4),
    0 0 40px rgba(104, 65, 234, 0.2);
}

/* Gradient border animation */
@keyframes border-gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.border-gradient-animate {
  position: relative;
  background: linear-gradient(90deg, #6841ea, #8f72f3, #6841ea);
  background-size: 200% 100%;
  animation: border-gradient 3s ease infinite;
  padding: 2px;
  border-radius: 12px;
}

.border-gradient-animate > * {
  border-radius: 10px;
  background: white;
}

/* ============================================================================
   INTERACTIVE ELEMENTS
============================================================================ */

/* Button Press Effect */
.btn-press {
  transition: all 0.1s ease;
}

.btn-press:active {
  transform: scale(0.95);
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
}

.ripple:active::after {
  animation: ripple 0.6s ease-out;
}
