/* ============================================================
   ADVERITAS - Microanimações (CSS puro, sem dependência externa)
   ============================================================ */

/* Reduce motion: respeita preferência do sistema */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Pulse no like quando ativa */
@keyframes heart-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.25); }
    60%  { transform: scale(.95); }
    100% { transform: scale(1); }
}
button.is-liked i, .post-card__action.is-active i,
button[type="submit"]:has(i[data-lucide="heart"]):active i {
    animation: heart-pop .4s ease-out;
    color: #B23A48;
}

/* Bounce no botão primário ao clicar */
@keyframes btn-bump { 0% {transform: scale(1);} 50% {transform: scale(.97);} 100% {transform: scale(1);} }
.btn--primary:active { animation: btn-bump .15s ease-out; }

/* Fade-in ao carregar listas */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.feed-list > article,
.admin-list__item,
.card-list > article {
    animation: fade-in-up .25s ease-out;
    animation-fill-mode: both;
}

/* Staggered: cada item começa um pouquinho depois (até 6 itens) */
.feed-list > article:nth-child(1) { animation-delay: 0ms; }
.feed-list > article:nth-child(2) { animation-delay: 40ms; }
.feed-list > article:nth-child(3) { animation-delay: 80ms; }
.feed-list > article:nth-child(4) { animation-delay: 120ms; }
.feed-list > article:nth-child(5) { animation-delay: 160ms; }
.feed-list > article:nth-child(6) { animation-delay: 200ms; }

/* Confetti minimalista quando uma etapa do onboarding é concluída */
@keyframes confetti-fall {
    to { transform: translateY(220px) rotate(360deg); opacity: 0; }
}
.confetti-piece {
    position: absolute; width: 8px; height: 8px;
    pointer-events: none; will-change: transform, opacity;
    animation: confetti-fall 1.2s ease-out forwards;
}

/* Toast (notificação flutuante) */
@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.flash {
    animation: toast-in .25s ease-out;
}

/* Spinner leve usado pelo Ctrl+K e dropzone enquanto busca */
@keyframes spin { to { transform: rotate(360deg); } }
.is-spinning { display: inline-block; animation: spin .9s linear infinite; }

/* Pulse no badge de notificação não-lida (sutil) */
@keyframes notif-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(178,58,72,.5); }
    70%  { box-shadow: 0 0 0 6px rgba(178,58,72,0); }
    100% { box-shadow: 0 0 0 0 rgba(178,58,72,0); }
}
.icon-btn__badge, .nav-badge { animation: notif-pulse 2s ease-out infinite; }
