/* ============================================================
   ANIMATIONS — NovaCentrax Design System
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────── */

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

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

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

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

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

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

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 110, 247, 0.4); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 12px rgba(79, 110, 247, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 110, 247, 0); }
}

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

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

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

/* ── Scroll-triggered animation classes ─────────────────── */
/* Elements start hidden; JS adds .is-visible to trigger */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.animate-fade.is-visible {
  opacity: 1;
}

.animate-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Stagger delays ─────────────────────────────────────── */
.delay-100 { transition-delay: 100ms !important; }
.delay-150 { transition-delay: 150ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }
.delay-500 { transition-delay: 500ms !important; }
.delay-600 { transition-delay: 600ms !important; }
.delay-700 { transition-delay: 700ms !important; }
.delay-800 { transition-delay: 800ms !important; }

/* ── Persistent animation utilities ─────────────────────── */
.anim-float {
  animation: float 4s ease-in-out infinite;
}
.anim-float-slow {
  animation: float 6s ease-in-out infinite;
}
.anim-pulse-ring {
  animation: pulse-ring 2.5s ease-out infinite;
}
.anim-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

/* ── Hover card lift ─────────────────────────────────────── */
.card-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  cursor: pointer;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-fade,
  .animate-left,
  .animate-right,
  .animate-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .anim-float,
  .anim-float-slow,
  .anim-pulse-ring,
  .anim-gradient {
    animation: none !important;
  }
  .card-lift:hover {
    transform: none;
  }
}
