/* ─────────────────────────────────────────────────────────────────────────
 * Animations & Transitions
 * ───────────────────────────────────────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes check-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Cards stagger-in */
.card {
  animation: fade-up .25s ease both;
}
.card:nth-child(1) { animation-delay: .03s; }
.card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3) { animation-delay: .09s; }
.card:nth-child(4) { animation-delay: .12s; }
.card:nth-child(5) { animation-delay: .15s; }

.stat-card { animation: fade-up .25s ease both; }
.stat-card:nth-child(1) { animation-delay: .03s; }
.stat-card:nth-child(2) { animation-delay: .06s; }
.stat-card:nth-child(3) { animation-delay: .09s; }
.stat-card:nth-child(4) { animation-delay: .12s; }
.stat-card:nth-child(5) { animation-delay: .15s; }
.stat-card:nth-child(6) { animation-delay: .18s; }

/* Turbo loading bar substitute — minimal top border */
.turbo-progress-bar {
  height: 2px;
  background: var(--blue);
}

/* Complete animation on check */
.task-check.completing { animation: check-pop .3s ease; }

/* Flash auto-dismiss */
.flash.removing {
  animation: fade-up .2s ease reverse both;
}

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