/* SoftecNova - Animations & Keyframes */

/* ===== KEYFRAME ANIMATIONS ===== */
@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 fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

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

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

/* ===== ANIMATION CLASSES ===== */
.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease forwards;
}

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

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

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

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

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

/* Delayed animations */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Animation duration */
.duration-300 { animation-duration: 300ms; }
.duration-500 { animation-duration: 500ms; }
.duration-700 { animation-duration: 700ms; }
.duration-1000 { animation-duration: 1000ms; }

/* ===== SCROLL ANIMATIONS ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 500ms; }

.stagger-children.animate-in > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FLOATING DECORATIVE ELEMENTS ===== */
.floating-element {
  position: absolute;
  border-radius: var(--radius-full);
  backdrop-filter: var(--backdrop-blur-light);
}

.floating-element-1 {
  width: 80px;
  height: 80px;
  background: rgba(96, 165, 250, 0.2);
  animation: pulse 3s ease-in-out infinite, float 8s ease-in-out infinite;
}

.floating-element-2 {
  width: 60px;
  height: 60px;
  background: rgba(167, 139, 250, 0.2);
  animation: pulse 3s ease-in-out infinite 1s, float 7s ease-in-out infinite 0.5s;
}

.floating-element-3 {
  width: 50px;
  height: 50px;
  background: rgba(34, 211, 238, 0.2);
  animation: pulse 3s ease-in-out infinite 0.5s, float 6s ease-in-out infinite 1s;
}

/* ===== BACKGROUND DECORATION ANIMATIONS ===== */
.bg-blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}

.bg-blur-circle-blue {
  background: rgba(59, 130, 246, 0.2);
}

.bg-blur-circle-purple {
  background: rgba(139, 92, 246, 0.2);
}

.bg-blur-circle-cyan {
  background: rgba(34, 211, 238, 0.2);
}

/* ===== HOVER ANIMATIONS ===== */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

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

.hover-glow {
  transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

/* ===== COUNTER ANIMATION ===== */
.counter {
  display: inline-block;
}

.counter.animate {
  animation: countUp 0.5s ease forwards;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 25%,
    var(--color-gray-100) 50%,
    var(--color-gray-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ===== PAGE TRANSITION ===== */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== REDUCE MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-animate,
  .scroll-animate-left,
  .scroll-animate-right,
  .scroll-animate-scale {
    opacity: 1;
    transform: none;
  }
}
