/* motion.css · TODAS as keyframes (M2–M16 do brief). Cada loop só roda com .is-ready
   na seção (posta pelo IntersectionObserver em motion.js) e pausa fora da tela. */

/* M2–M4 · marquee */
@keyframes m-marquee { to { transform: translateX(-50%); } }

/* M5 · botão vivo: pulso + anel */
@keyframes m-glow {
  0%, 40%, 100% { scale: 1;     box-shadow: 0 8px 22px  rgb(var(--cta-rgb) / .28), 0 0 0 0    rgb(var(--cta-rgb) / 0); }
  12%           { scale: 1.045; box-shadow: 0 12px 38px rgb(var(--cta-rgb) / .75), 0 0 0 0    rgb(var(--cta-rgb) / .95); }
  30%           { scale: 1;     box-shadow: 0 8px 26px  rgb(var(--cta-rgb) / .38), 0 0 0 18px rgb(var(--cta-rgb) / 0); }
}
/* M5 · feixe de luz atravessando */
@keyframes m-beam {
  0%        { transform: translateX(-80px) skewX(-20deg); }
  13%       { transform: translateX(calc(var(--btn-w, 320px) + 80px)) skewX(-20deg); }
  13.01%, 100% { transform: translateX(-80px) skewX(-20deg); }
}
/* M5 · estrelinha */
@keyframes m-twinkle {
  0%, 20%   { opacity: 0; transform: scale(0) rotate(0deg); }
  28%       { opacity: 1; transform: scale(1.15) rotate(45deg); }
  40%, 100% { opacity: 0; transform: scale(0) rotate(90deg); }
}

/* M7 · número da timeline acendendo */
@keyframes m-acende {
  0%   { box-shadow: 0 0 0 0   rgb(var(--accent-rgb) / 0),   0 0 0    rgb(var(--accent-rgb) / 0); }
  35%  { box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / .25), 0 0 20px rgb(var(--accent-rgb) / .8); }
  100% { box-shadow: 0 0 0 0   rgb(var(--accent-rgb) / 0),   0 0 0    rgb(var(--accent-rgb) / 0); }
}

/* M8 · símbolo girando */
@keyframes m-spin { to { rotate: 360deg; } }

/* M16 · borda de luz girando */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes m-borda { to { --ang: 360deg; } }

/* extras: entrada suave, digitação do chat, flutuação do vidro */
@keyframes m-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes m-dots { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes m-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---- ligações ---- */
.faixa.is-ready .faixa__track,
.is-ready .faixa__track { animation: m-marquee var(--dur, 60s) linear infinite; }
.faixa--reverse .faixa__track { animation-direction: reverse !important; }

.is-ready .btn--vivo, .btn--vivo.is-ready { animation: m-glow 3.2s ease-out infinite; }
.is-ready .btn--vivo .btn__beam, .btn--vivo.is-ready .btn__beam { animation: m-beam 3.2s ease-in-out infinite; }
.is-ready .btn--vivo .btn__star, .btn--vivo.is-ready .btn__star { animation: m-twinkle 3.2s ease-in-out infinite; }

.is-ready .simbolo-gira { animation: m-spin 40s linear infinite; }
.is-ready .vidro { animation: m-float 7s ease-in-out infinite; }
.is-ready .card-luz::before { animation: m-borda 4s linear infinite; }

.js .reveal { opacity: 0; }
.is-seen .reveal, .reveal.is-seen { animation: m-rise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }

/* pausa fora da tela */
.m-paused, .m-paused * { animation-play-state: paused !important; }

/* acessibilidade: sem loops com movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; }
}
