/* ============================================================
   NEXPORT — ANIMATIONS
   ============================================================ */

/* ─── KEYFRAMES ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(1deg); }
  66%       { transform: translateY(-4px) rotate(-1deg); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,194,255,.2); }
  50%       { box-shadow: 0 0 40px rgba(0,194,255,.4), 0 0 80px rgba(0,194,255,.1); }
}
@keyframes glowGreen {
  0%, 100% { box-shadow: 0 0 20px rgba(16,185,129,.2); }
  50%       { box-shadow: 0 0 40px rgba(16,185,129,.4); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0,194,255,.2); }
  50%       { border-color: rgba(0,194,255,.6); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes typewriter {
  from { width: 0; } to { width: 100%; }
}
@keyframes blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0; }
}
@keyframes particleDrift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(var(--dx,40px), var(--dy,-80px)) rotate(360deg); opacity: 0; }
}
@keyframes heroGridMove {
  0%   { transform: perspective(800px) rotateX(8deg) translateY(0); }
  100% { transform: perspective(800px) rotateX(8deg) translateY(-60px); }
}
@keyframes morphBlob {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(100%) scale(0.95); }
}
@keyframes revealBar {
  from { width: 0; } to { width: var(--bar-width, 70%); }
}
@keyframes numberRoll {
  0%   { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* ─── ANIMATION CLASSES ───────────────────────────────────── */
.animate-fade-in     { animation: fadeIn       0.5s ease both; }
.animate-fade-in-up  { animation: fadeInUp     0.6s ease both; }
.animate-fade-in-down{ animation: fadeInDown   0.6s ease both; }
.animate-scale-in    { animation: scaleIn      0.4s ease both; }
.animate-float       { animation: float        4s ease-in-out infinite; }
.animate-float-slow  { animation: floatSlow    6s ease-in-out infinite; }
.animate-pulse       { animation: pulse        2s ease-in-out infinite; }
.animate-pulse-soft  { animation: pulseSoft    3s ease-in-out infinite; }
.animate-spin        { animation: spin         1s linear infinite; }
.animate-glow-pulse  { animation: glowPulse    3s ease-in-out infinite; }
.animate-glow-green  { animation: glowGreen    3s ease-in-out infinite; }
.animate-gradient    { animation: gradientShift 6s ease infinite; background-size: 200% 200%; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}
.animate-morph { animation: morphBlob 8s ease-in-out infinite; }

/* ─── DELAY UTILITIES ─────────────────────────────────────── */
.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; }

/* ─── HOVER TRANSITIONS ───────────────────────────────────── */
.hover-lift { transition: transform var(--transition-base), box-shadow var(--transition-base); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

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

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

/* ─── SCROLL REVEAL (JS triggered) ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

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

/* ─── PROGRESS BAR ANIMATION ──────────────────────────────── */
.progress-bar-fill {
  animation: revealBar 1.2s cubic-bezier(.4,0,.2,1) both;
}

/* ─── STAGGER CHILDREN ────────────────────────────────────── */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 100ms; }
.stagger > *:nth-child(3) { animation-delay: 200ms; }
.stagger > *:nth-child(4) { animation-delay: 300ms; }
.stagger > *:nth-child(5) { animation-delay: 400ms; }
.stagger > *:nth-child(6) { animation-delay: 500ms; }

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