/* Uma fé que se vive · movimento da página de venda */

@keyframes m-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes m-stage { from { opacity: 0; scale: 0.985; } to { opacity: 1; scale: 1; } }
@keyframes m-rise { from { opacity: 0; translate: 0 56px; } to { opacity: 1; translate: 0 0; } }
@keyframes m-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes m-drift { from { scale: 1; translate: 0 0; } to { scale: 1.08; translate: -1.5% -1%; } }
@keyframes m-sweep { 0% { translate: -130% 0; } 16% { translate: 130% 0; } 100% { translate: 130% 0; } }
@keyframes m-fade { from { opacity: 0; scale: 0.97; } to { opacity: 1; scale: 1; } }
@keyframes m-ticker {
  0% { opacity: 0; translate: 0 6px; }
  4%, 30% { opacity: 1; translate: 0 0; }
  34%, 100% { opacity: 0; translate: 0 -6px; }
}

/* entrada da primeira tela */
.m-in { animation: m-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.m-stage { animation: m-stage 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.m-book { animation: m-rise 1.2s 0.25s cubic-bezier(0.16, 0.84, 0.24, 1) both, m-float 7s 1.6s ease-in-out infinite; }
.m-drift { animation: m-drift 26s ease-in-out infinite alternate; }

/* reflexo do hot stamping passando pela capa */
.m-gloss { position: relative; overflow: hidden; }
.m-gloss::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 236, 190, 0.6) 50%, rgba(255, 255, 255, 0) 62%);
  mix-blend-mode: screen;
  translate: -130% 0;
  animation: m-sweep 8s 1.4s cubic-bezier(0.35, 0.5, 0.25, 1) infinite;
  pointer-events: none;
}

/* troca de foto na galeria */
.m-fade { animation: m-fade 0.45s ease-out both; }

/* barra do topo: uma mensagem por vez */
.m-ticker { display: grid; justify-items: center; }
.m-ticker > span { grid-area: 1 / 1; animation: m-ticker 12s linear infinite both; }

/* botões e miniaturas */
.m-cta { transition: filter 0.2s ease, translate 0.2s ease, box-shadow 0.2s ease; }
.m-cta:hover { filter: brightness(1.12); translate: 0 -1px; box-shadow: 0 10px 24px -12px rgba(20, 40, 74, 0.6); }
.m-cta:focus-visible, .m-thumb:focus-visible { outline: 2px solid #D9B566; outline-offset: 3px; }
.m-thumb { transition: opacity 0.2s ease, border-color 0.2s ease; }
.m-thumb:hover { opacity: 1 !important; }

/* revelações ao rolar (só onde o navegador acompanha a rolagem) */
@supports (animation-timeline: view()) {
  @keyframes m-reveal { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
  @keyframes m-grow { from { opacity: 0; scale: 0.5; } to { opacity: 1; scale: 1; } }
  @keyframes m-settle { from { opacity: 0; translate: 0 48px; scale: 0.94; } to { opacity: 1; translate: 0 0; scale: 1; } }
  @keyframes m-par { from { translate: 0 -6%; } to { translate: 0 6%; } }
  .m-reveal { animation: m-reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
  .m-grow { transform-origin: 50% 100%; animation: m-grow linear both; animation-timeline: view(); animation-range: entry 20% cover 38%; }
  .m-settle { animation: m-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  .m-parallax { animation: m-par linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .m-in, .m-stage, .m-book, .m-drift, .m-fade, .m-reveal, .m-grow, .m-settle, .m-parallax, .m-gloss::after, .m-ticker > span { animation: none !important; }
  .m-cta, .m-thumb { transition: none; }
}

/* vídeos: quem pede menos movimento vê a foto parada que fica por baixo */
@media (prefers-reduced-motion: reduce) {
  .m-video { display: none; }
}
