@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 0.8s linear infinite !important;
}

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

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(193, 163, 95, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(193, 163, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(193, 163, 95, 0); }
}

.animate-fade {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide {
  animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Hover Micro-animations */
.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-glow:hover {
  box-shadow: 0 0 15px var(--glass-glow);
}

/* ─── STAGGERED CASCADING TRANSITIONS ─── */
@keyframes cascadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cascade-item {
  opacity: 0;
  animation: cascadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--index, 0) * 0.08s);
}

/* ─── EXIT TRANSITIONS ─── */
@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

.page-exit-active {
  animation: fadeOutDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

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

.page-exit-active .cascade-item {
  animation: cascadeDown 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  animation-delay: calc((8 - var(--index, 0)) * 0.02s) !important;
}

