/* ===========================
   ANIMATIONS & MICRO-INTERACTIONS
   =========================== */

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes popIn {
  0%   { transform: scale(0.8); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes boardCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes notificationIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes notificationOut {
  from { opacity: 1; transform: translateY(0); max-height: 60px; }
  to   { opacity: 0; transform: translateY(-8px); max-height: 0; }
}

/* --- Entrance animations --- */
.anim-fade-in    { animation: fadeIn 0.3s ease forwards; }
.anim-pop-in     { animation: popIn 0.3s cubic-bezier(.34,1.56,.64,1) forwards; }
.anim-scale-in   { animation: fadeInScale 0.25s ease forwards; }
.anim-slide-left { animation: slideInLeft 0.3s ease forwards; }

/* --- Stagger children --- */
.stagger-children > * { opacity: 0; animation: fadeIn 0.3s ease forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.04s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.12s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.16s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.24s; }
.stagger-children > *:nth-child(n+7) { animation-delay: 0.28s; }

/* --- Drag & Drop --- */
.task-card.dragging {
  opacity: 0.45;
  transform: rotate(2deg) scale(0.97);
  box-shadow: var(--shadow-lg);
}
.column-drop-target {
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-md);
}
.drop-placeholder {
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  margin: 4px 0;
  transition: all 0.15s ease;
}

/* --- Hover ripple button --- */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn:active::after { opacity: 1; }
