/* Motion Preferences Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Enhanced Animation Classes */
.animate-bounce-soft {
  animation: bounce-soft 0.6s ease-out;
}

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

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

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

.animate-slide-in-left {
  animation: slide-in-left 0.8s ease-out;
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in-bottom {
  animation: slide-in-bottom 0.8s ease-out;
}

@keyframes slide-in-bottom {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive Animation Utilities */
.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }
.animate-stagger-5 { animation-delay: 0.5s; }

/* Enhanced Glow Effects */
.glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.glow-cyan-intense {
  box-shadow: 
    0 0 20px rgba(6, 182, 212, 0.3),
    0 0 40px rgba(6, 182, 212, 0.2),
    0 0 60px rgba(6, 182, 212, 0.1);
}

/* Intersection Observer Helper Classes */
.intersection-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.intersection-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease-out;
}

/* Loading State Animations */
.loading-pulse {
  animation: loading-pulse 1.5s ease-in-out infinite;
}

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

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:hover::before {
  width: 300px;
  height: 300px;
}

/* Enhanced Button Hover Effects */
.btn-nexrai-primary {
  position: relative;
  overflow: hidden;
}

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

.btn-nexrai-primary:hover::after {
  left: 100%;
}

/* Card Hover Enhancement */
.card-nexrai,
.card-nexrai-glass {
  transition: all 0.3s ease-out;
}

.card-nexrai:hover,
.card-nexrai-glass:hover {
  transform: translateY(-2px);
}

/* Timeline Connection Lines */
.timeline-line {
  position: relative;
}

.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  right: -50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
  animation: timeline-flow 3s ease-in-out infinite;
}

@keyframes timeline-flow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Counter Animation Enhancement */
.counter-glow {
  position: relative;
}

.counter-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(20px);
  opacity: 0.3;
  z-index: -1;
  animation: counter-pulse 2s ease-in-out infinite;
}

@keyframes counter-pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.05);
  }
}

/* Form Animation States */
.form-success {
  animation: form-success 0.8s ease-out forwards;
}

@keyframes form-success {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.98);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
}

.success-appear {
  animation: success-appear 0.8s ease-out forwards;
}

@keyframes success-appear {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Progress Bar Animations */
.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Icon Hover Animations */
.icon-hover-spin {
  transition: transform 0.3s ease-out;
}

.icon-hover-spin:hover {
  transform: rotate(180deg);
}

.icon-hover-bounce {
  transition: transform 0.2s ease-out;
}

.icon-hover-bounce:hover {
  animation: bounce-soft 0.6s ease-out;
}

.icon-hover-scale {
  transition: transform 0.2s ease-out;
}

.icon-hover-scale:hover {
  transform: scale(1.2);
}

/* Background Animation Enhancements */
.floating-orb {
  animation: float-complex 6s ease-in-out infinite;
}

@keyframes float-complex {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(5deg);
  }
  66% {
    transform: translateY(5px) rotate(-3deg);
  }
}

/* Accessibility Enhancements */
.focus-visible:focus {
  outline: 2px solid rgba(6, 182, 212, 0.8);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

/* Print Styles */
@media print {
  .animate-fade-in-up,
  .animate-slide-in-right,
  .animate-glow,
  .animate-pulse-cyan,
  .animate-float,
  .animate-scale-in {
    animation: none !important;
  }
  
  .card-nexrai,
  .card-nexrai-glass {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc !important;
  }
}