/* ============================================================
   ConverText — Animations
   ============================================================ */

/* --- Fade In Up --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Fade Out --- */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* --- Scale In --- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Slide In from Left --- */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* --- Border Dash --- */
@keyframes dash-border {
  to {
    stroke-dashoffset: -20;
  }
}

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

/* --- Staggered children animation --- */
.animate-stagger > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(9) { animation-delay: 0.45s; }
.animate-stagger > *:nth-child(10) { animation-delay: 0.5s; }

/* --- View Transition --- */
.view-enter {
  animation: fadeInUp 0.4s ease-out;
}

.view-exit {
  animation: fadeOut 0.2s ease-in;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-surface-hover) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}
