/* ========================================
   XONIX - Animations CSS
   Keyframes and Animation Classes
   ======================================== */

/* ========================================
   Primary Animations
   ======================================== */

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

@keyframes blink {
  0%,
  49%,
  100% {
    opacity: 1;
  }
  50%,
  99% {
    opacity: 0;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========================================
   Gradient Animations
   ======================================== */

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

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

/* ========================================
   Neural Glass Effects
   ======================================== */

@keyframes neuralPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes neuralGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(0, 158, 255, 0.5),
      0 0 20px rgba(0, 158, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 158, 255, 0.8),
      0 0 30px rgba(0, 158, 255, 0.5), 0 0 40px rgba(0, 158, 255, 0.3);
  }
}

@keyframes orangeGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(247, 147, 30, 0.5),
      0 0 20px rgba(247, 147, 30, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(247, 147, 30, 0.8),
      0 0 30px rgba(247, 147, 30, 0.5), 0 0 40px rgba(247, 147, 30, 0.3);
  }
}

@keyframes neural-glow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(0, 158, 255, 0.5),
      0 0 20px rgba(0, 158, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 158, 255, 0.8),
      0 0 30px rgba(0, 158, 255, 0.5), 0 0 40px rgba(0, 158, 255, 0.3);
  }
}

@keyframes neuralFlow {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes neuralConnection {
  0% {
    stroke-dashoffset: 100;
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.2;
  }
}

/* ========================================
   Circuit and Grid Animations
   ======================================== */

@keyframes circuitGlow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(0, 158, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 158, 255, 0.8),
      0 0 30px rgba(247, 147, 30, 0.4);
  }
}

@keyframes gridPulse {
  0%,
  100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ========================================
   Particle Animations
   ======================================== */

@keyframes energyWave {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

@keyframes particleBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(-20px);
  }
  75% {
    transform: translateY(-10px);
  }
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.8;
  }
  25% {
    transform: translate(10px, -10px);
  }
  50% {
    transform: translate(-5px, -20px);
    opacity: 1;
  }
  75% {
    transform: translate(-15px, -10px);
  }
}

@keyframes particleFade {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* ========================================
   Hexagon Animations
   ======================================== */

@keyframes hexagonRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes hexagonPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ========================================
   Glow Effects
   ======================================== */

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(0, 158, 255, 0.2);
  }
  to {
    box-shadow: 0 0 30px rgba(0, 158, 255, 0.4),
      0 0 40px rgba(247, 147, 30, 0.2);
  }
}

@keyframes blueGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(0, 158, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 158, 255, 0.8), 0 0 40px rgba(0, 158, 255, 0.5);
  }
}

@keyframes orangeGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(247, 147, 30, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(247, 147, 30, 0.8),
      0 0 35px rgba(247, 147, 30, 0.5);
  }
}

/* ========================================
   Hover Effects
   ======================================== */

@keyframes scaleHover {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

@keyframes liftHover {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

/* ========================================
   Loading and Progress
   ======================================== */

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* ========================================
   Typing Animation
   ======================================== */

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes typingCursor {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* ========================================
   Text Effects
   ======================================== */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes colorShift {
  0% {
    color: var(--xonix-blue);
  }
  50% {
    color: var(--xonix-orange);
  }
  100% {
    color: var(--xonix-blue);
  }
}

/* ========================================
   Background Animations
   ======================================== */

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

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.15;
  }
  25% {
    transform: translate(30px, -30px);
    opacity: 0.2;
  }
  50% {
    transform: translate(0, -50px);
    opacity: 0.15;
  }
  75% {
    transform: translate(-30px, -30px);
    opacity: 0.2;
  }
}

/* ========================================
   Card Animations
   ======================================== */

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

@keyframes cardHover {
  from {
    box-shadow: 0 8px 32px rgba(0, 36, 41, 0.3);
  }
  to {
    box-shadow: 0 20px 50px rgba(0, 158, 255, 0.2);
  }
}

/* ========================================
   Animation Classes
   ======================================== */

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

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

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

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

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-bounce-slow {
  animation: bounce 2s infinite;
}

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

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

.animate-spin-slower {
  animation: spin 5s linear infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-slow {
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-slower {
  animation: pulse 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-slide-up {
  animation: slideUp 0.5s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

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

.animate-blue-glow {
  animation: blueGlow 2s ease-in-out infinite;
}

.animate-orange-glow {
  animation: orangeGlow 2s ease-in-out infinite;
}

.animate-neural-pulse {
  animation: neuralPulse 4s ease-in-out infinite;
}

.animate-neural-glow {
  animation: neuralGlow 2s ease-in-out infinite;
}

.animate-circuit-glow {
  animation: circuitGlow 4s ease-in-out infinite;
}

.animate-gradient-shift {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

.animate-energy-wave {
  animation: energyWave 6s linear infinite;
}

.animate-typing {
  animation: typing 4s steps(40, end);
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 15s ease infinite;
}

.animate-particle-bounce {
  animation: particleBounce 2s ease-in-out infinite;
}

.animate-particle-float {
  animation: particleFloat 4s ease-in-out infinite;
}

.animate-hexagon-rotate {
  animation: hexagonRotate 20s linear infinite;
}

/* ========================================
   Glow Effects
   ======================================== */

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(0, 158, 255, 0.2);
  }
  to {
    box-shadow: 0 0 30px rgba(0, 158, 255, 0.4),
      0 0 40px rgba(247, 147, 30, 0.2);
  }
}

@keyframes blueGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(0, 158, 255, 0.3), 0 0 20px rgba(0, 158, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 158, 255, 0.6), 0 0 30px rgba(0, 158, 255, 0.3),
      0 0 40px rgba(0, 158, 255, 0.1);
  }
}

@keyframes orangeGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(247, 147, 30, 0.3),
      0 0 20px rgba(247, 147, 30, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(247, 147, 30, 0.6),
      0 0 30px rgba(247, 147, 30, 0.3), 0 0 40px rgba(247, 147, 30, 0.1);
  }
}

/* ========================================
   Energy Wave
   ======================================== */

@keyframes energyWave {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* ========================================
   Particle Animations
   ======================================== */

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

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-20px) translateX(0px);
  }
  75% {
    transform: translateY(-10px) translateX(-5px);
  }
}

@keyframes particleFade {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* ========================================
   Animation Delays
   ======================================== */

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-1000 {
  animation-delay: 1s;
}

.delay-2000 {
  animation-delay: 2s;
}

.delay-3000 {
  animation-delay: 3s;
}

/* ========================================
   Stagger Animations
   ======================================== */

.stagger-child:nth-child(1) {
  animation-delay: 0s;
}

.stagger-child:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-child:nth-child(3) {
  animation-delay: 0.2s;
}

.stagger-child:nth-child(4) {
  animation-delay: 0.3s;
}

.stagger-child:nth-child(5) {
  animation-delay: 0.4s;
}

.stagger-child:nth-child(6) {
  animation-delay: 0.5s;
}

/* ========================================
   Hover Animation Triggers
   ======================================== */

.hover-scale:hover {
  animation: scaleHover 0.3s ease forwards;
}

.hover-lift:hover {
  animation: liftHover 0.3s ease forwards;
}

/* ========================================
   Accessibility - Respect prefers-reduced-motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Performance Optimization
   ======================================== */

.will-animate {
  will-change: transform;
  transform: translateZ(0);
}

.gpu-accelerate {
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}
