/*
 * motion.css — animações de entrada, saída e selos flutuantes.
 * Só usa transform e opacity (leve, sem recalcular layout).
 * Tudo roda apenas com JavaScript ativo e sem a preferência de "reduzir movimento".
 * O hero anima no carregamento por CSS. As demais seções entram e saem com assets/js/reveal.js.
 */

@media (prefers-reduced-motion: no-preference) {
  /* ---------- Hero: entrada no carregamento ---------- */
  .hero__photo { animation: rise .8s var(--ease) both; }
  .hero__headline h1, .hero__headline .hero__note { animation: rise .8s .2s var(--ease) both; }
  .hero__card { animation: slide-from-right .9s .18s var(--ease) both; }
  .hero__car { animation: drive-in 1.2s .3s var(--ease) both; }
  .hero__dot { animation: pop .6s var(--ease) both, float 5.5s ease-in-out infinite alternate; }
  .hero__dot--a { animation-delay: .9s, 1.5s; }

  /* Faixa de texto: corre sem parar e pausa com o mouse em cima */
  .marquee__track { animation: marquee 38s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }

  /* Selos redondos das outras seções: flutuam devagar */
  .cta__dot, .phones__dot { animation: float 5.5s ease-in-out infinite alternate; }
  .cta__dot--b, .phones__dot--b { animation-delay: 1.4s; }
  .cta__dot--c { animation-delay: 2.6s; }

  /* ---------- Demais seções: entram e saem ao rolar ---------- */
  @media (scripting: enabled) {
    [data-reveal] {
      opacity: 0;
      transform: translate3d(0, 30px, 0);
      transition: opacity .7s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
      will-change: opacity, transform;
    }
    [data-reveal="left"] { transform: translate3d(-48px, 0, 0); }
    [data-reveal="right"] { transform: translate3d(48px, 0, 0); }
    [data-reveal="zoom"] { transform: scale(.94); }
    [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }
  }
}

@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
@keyframes slide-from-right { from { opacity: 0; transform: translate3d(56px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes drive-in { from { opacity: 0; transform: translate3d(140px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -9px, 0); } }

/* Com "reduzir movimento": a faixa fica parada e mostra só uma cópia da lista */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee__list + .marquee__list { display: none; }
}
