/* =============================================================================
   СЛЕД Design System — Animations
   Smooth, purposeful motion. Less is more in frequency, more in polish.
   ============================================================================= */

/* Keyframes */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes pulse-scale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(196, 149, 90, 0.2); }
  50% { box-shadow: 0 0 40px rgba(196, 149, 90, 0.4); }
}

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

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

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

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

@keyframes borderGlow {
  0%, 100% { border-color: rgba(196, 149, 90, 0.1); }
  50% { border-color: rgba(196, 149, 90, 0.3); }
}

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

/* Scroll-triggered reveal — add .reveal class, JS adds .revealed */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.revealed {
  animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays for children */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* Utility classes */
.animate-spin { animation: spin 1s linear infinite; }
.animate-spin-slow { animation: spin 2s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-pulse-scale { animation: pulse-scale 2.5s ease-in-out infinite; }
.animate-glow-pulse { animation: glow-pulse 2.5s ease-in-out infinite; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fadeInDown { animation: fadeInDown 0.4s ease-out forwards; }
.animate-slideInLeft { animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slideInRight { animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-scaleIn { animation: scaleIn 0.3s ease-out forwards; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-border-glow { animation: borderGlow 2.5s ease-in-out infinite; }

.animate-shimmer {
  background: linear-gradient(90deg, var(--bg-panel) 0%, var(--bg-elevated) 50%, var(--bg-panel) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* Delays */
.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-700 { animation-delay: 700ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Transition utilities */
.transition-all { transition: all var(--transition-normal); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }
.transition-smooth { transition: all var(--transition-smooth); }
.transition-colors { transition: color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal); }

/* Hover effects */
.hover-lift:hover { transform: translateY(-2px); }
.hover-glow:hover { box-shadow: var(--glow-accent); }

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