/* ═══════════════════════════════════════════════════
   ANIMATIONS — Smooth, iOS/macOS-inspired motion
   ═══════════════════════════════════════════════════ */

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

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

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.8) translateY(10px); }
    60%  { transform: scale(1.03) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes eyeBlink {
    0%, 95%, 100% { transform: scaleY(1); }
    97%           { transform: scaleY(0.1); }
}

@keyframes barPulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Staggered entry for cards / grid items ── */
.stagger-enter > * {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp var(--duration-normal) var(--ease-out) forwards;
}
.stagger-enter > *:nth-child(1) { animation-delay: 0ms; }
.stagger-enter > *:nth-child(2) { animation-delay: 50ms; }
.stagger-enter > *:nth-child(3) { animation-delay: 100ms; }
.stagger-enter > *:nth-child(4) { animation-delay: 150ms; }
.stagger-enter > *:nth-child(5) { animation-delay: 200ms; }
.stagger-enter > *:nth-child(6) { animation-delay: 250ms; }
.stagger-enter > *:nth-child(7) { animation-delay: 300ms; }
.stagger-enter > *:nth-child(8) { animation-delay: 350ms; }

/* ── Hover elevation ── */
.hover-lift { transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast); }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ── Button press ── */
.btn:active { transform: scale(0.97); }

/* ── Toast exit ── */
.toast--exit {
    animation: slideOutRight var(--duration-normal) var(--ease-in) forwards;
}

@keyframes slideOutRight {
    to { opacity: 0; transform: translateX(100%); }
}

/* ── Glow pulse (for Klozy FAB) ── */
.glow-pulse {
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: var(--shadow-glow-cyan), var(--shadow-md); }
    50%      { box-shadow: 0 0 30px rgba(0,229,255,0.3), var(--shadow-lg); }
}

/* ── Chart reveal ── */
.chart-reveal canvas {
    animation: fadeIn var(--duration-slow) var(--ease-out);
}
