/* Animações do sistema (home, compra e admin). Tudo some com "reduzir movimento" do sistema. */

@keyframes m-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-pop { 0% { transform: scale(1); } 45% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes m-pulse-ring { 0% { box-shadow: 0 4px 0 var(--ink, #0b1220), 0 0 0 0 rgba(21, 128, 61, .55); } 70%, 100% { box-shadow: 0 4px 0 var(--ink, #0b1220), 0 0 0 14px rgba(21, 128, 61, 0); } }
@keyframes m-stripes { to { background-position: 40px 0; } }
@keyframes m-blink { 50% { opacity: .25; } }
@keyframes m-zoom { from { transform: scale(1.07); } to { transform: none; } }
@keyframes m-shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes m-fall {
  0% { transform: translate3d(0, -20px, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0), 460px, 0) rotate(var(--rot, 540deg)); opacity: 0; }
}
@keyframes m-slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* ---------- entrada da home ---------- */
.rifa .rf-camp { animation: m-rise .7s var(--ease) backwards; }
.rifa .rf-buy { animation: m-rise .7s var(--ease) .12s backwards; }
.rifa .rf-strip { animation: m-fade .6s backwards; }
.rf-flyer img { animation: m-zoom 1.2s var(--ease) backwards; transition: transform .5s var(--ease); }
.rf-flyer:hover img { transform: scale(1.035); }
.rf-ribbon::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #fff; animation: m-blink 1.4s infinite; vertical-align: 1px; }
.rf-ribbon.closed::before { animation: none; }
.rf-info h1, .rf-sub, .rf-code { animation: m-rise .7s var(--ease) backwards; }
.rf-info h1 { animation-delay: .1s; }
.rf-sub { animation-delay: .2s; }

/* barra de progresso com listras em movimento */
.rf-track i { background-size: 40px 40px; animation: m-stripes 1.1s linear infinite; background-image: repeating-linear-gradient(-45deg, var(--green) 0 10px, #1ea34d 10px 20px); }

/* ---------- compra ---------- */
.bump { animation: m-pop .38s var(--ease); }
.rp[aria-pressed="true"] { animation: m-pop .32s var(--ease); }
.rp { transition: border-color .15s, background .15s, transform .2s var(--ease), box-shadow .2s; }
.rp:hover { box-shadow: 0 6px 0 rgba(11, 18, 32, .12); }
.rf-qbtn { transition: transform .12s, filter .15s; }
.rf-qbtn:hover { filter: brightness(1.06); }
.rf-qbtn:active { transform: scale(.92); }
.rf-go:not(:disabled) { animation: m-pulse-ring 2.6s ease-out infinite; }
.rf-go:hover, .rf-go:focus-visible { animation: none; }
.rf-bar i { transition: width .6s var(--ease); }
.rf-next b { display: inline-block; animation: m-pop .4s var(--ease); }

/* ---------- listas com entrada escalonada (ativada quando entram na tela) ---------- */
.js .st { opacity: 0; }
.in .st, .st.now { opacity: 1; animation: m-rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.rank-in .st { animation-name: m-slide-in; }
.rf-tk { transition: transform .22s var(--ease), box-shadow .22s; }
.rf-tk:not(.won):hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 8px 0 rgba(11, 18, 32, .14); }
.rk { transition: transform .2s var(--ease), border-color .2s; }
.rk:hover { transform: translateX(4px); border-color: var(--ink); }
.rf-prem li, .rf-steps li { transition: transform .22s var(--ease); }
.rf-prem li:hover { transform: translateY(-3px); }
.rf-faq p { animation: m-fade .35s backwards; }
.rf-faq[open] summary::after { animation: m-pop .3s; }

/* ---------- janela de compra ---------- */
#dlg-body > * { animation: m-fade .3s backwards; }
#dlg-body > :nth-child(n+3) { animation-name: m-rise; animation-duration: .4s; }
.numbers span { animation: m-pop .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 14ms); }
.prize-hit { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); background-size: 200% 100%; animation: m-shine 2.2s ease-in-out 2; }
.stepper i { transition: background .4s; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.confetti i { position: absolute; top: 0; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: m-fall var(--t, 2.4s) cubic-bezier(.25, .6, .4, 1) var(--d, 0s) forwards; }

/* ---------- admin ---------- */
.tabs + div { animation: m-fade .35s backwards; }
.grid-stats .stat { animation: m-rise .5s var(--ease) backwards; }
.grid-stats .stat:nth-child(2) { animation-delay: .04s; } .grid-stats .stat:nth-child(3) { animation-delay: .08s; }
.grid-stats .stat:nth-child(4) { animation-delay: .12s; } .grid-stats .stat:nth-child(5) { animation-delay: .16s; }
.grid-stats .stat:nth-child(6) { animation-delay: .2s; } .grid-stats .stat:nth-child(7) { animation-delay: .24s; }
.grid-stats .stat:nth-child(n+8) { animation-delay: .28s; }
.panel.center-card { animation: m-rise .5s var(--ease) backwards; }
.tab { transition: background .2s, color .2s, transform .15s; }
.tab:active { transform: scale(.96); }
.table-wrap tbody tr { animation: m-fade .4s backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .st { opacity: 1; }
  .confetti { display: none; }
}
