/* ─────────────────────────────────────────────────────────────
   MOVIMENTO · animações de entrada (scroll), loops de vida e detalhes.
   Usa as propriedades individuais translate / rotate / scale para
   somar com os transforms que cada componente já tem, sem brigar.
   Controlado por scripts/motion.js (classe html.mv-ready).
   ───────────────────────────────────────────────────────────── */

/* ===== Revelar ao rolar ===== */
html.mv-ready .mv {
  opacity: 0;
  will-change: opacity, translate, scale;
  transition:
    opacity .85s cubic-bezier(.16, 1, .3, 1) var(--mv-d, 0ms),
    translate .95s cubic-bezier(.16, 1, .3, 1) var(--mv-d, 0ms),
    scale .95s cubic-bezier(.16, 1, .3, 1) var(--mv-d, 0ms),
    rotate .95s cubic-bezier(.16, 1, .3, 1) var(--mv-d, 0ms) !important;
}
html.mv-ready .mv-up    { translate: 0 46px; }
html.mv-ready .mv-left  { translate: -60px 0; }
html.mv-ready .mv-right { translate: 60px 0; }
html.mv-ready .mv-zoom  { translate: 0 30px; scale: .9; }
html.mv-ready .mv-pop   { translate: 0 22px; scale: .55; rotate: -6deg; }
html.mv-ready .mv-pop.mv-in { transition-timing-function: cubic-bezier(.34, 1.56, .64, 1) !important; }
html.mv-ready .mv.mv-in { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }

/* ===== Barra de progresso da página ===== */
.mv-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 4px; pointer-events: none; }
.mv-progress i {
  display: block; width: 100%; height: 100%;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--fm-rosa), var(--fm-laranja), var(--fm-amarelo), var(--fm-teal));
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(220, 165, 199, .7);
}

/* ===== Parallax (JS grava --py) ===== */
[data-parallax] { translate: 0 calc(var(--py, 0) * 1px); }
.hx-background-video[data-parallax] { scale: 1.14; }

/* ===== Decorações flutuantes ===== */
.mv-deco-host { position: relative; isolation: isolate; }
.mv-deco { position: absolute; z-index: -1; pointer-events: none; }
.mv-deco > i { display: block; opacity: .5; animation: mvDrift var(--t, 10s) ease-in-out var(--d, 0s) infinite alternate; }
.mv-deco.spin > i { animation: mvDrift var(--t, 10s) ease-in-out var(--d, 0s) infinite alternate, mvSpin calc(var(--t, 10s) * 2.4) linear infinite; }
.mv-deco svg { display: block; width: 100%; height: auto; }

/* ===== Faíscas que seguem o mouse ===== */
.mv-spark { position: fixed; z-index: 80; left: 0; top: 0; pointer-events: none; width: var(--s, 12px); height: var(--s, 12px); margin: calc(var(--s, 12px) / -2) 0 0 calc(var(--s, 12px) / -2); color: var(--c, #DCA5C7); animation: mvSpark .9s cubic-bezier(.2, .7, .3, 1) forwards; }
.mv-spark svg { position: relative; display: block; width: 100%; height: 100%; }
.mv-spark::before { content: ""; position: absolute; inset: -70%; border-radius: 50%; background: radial-gradient(circle, currentColor 0%, transparent 62%); opacity: .38; }

/* ===== Keyframes ===== */
@keyframes mvBob      { 0%, 100% { translate: 0 0; }       50% { translate: 0 -12px; } }
@keyframes mvBobSm    { 0%, 100% { translate: 0 0; }       50% { translate: 0 -6px; } }
@keyframes mvBobCq    { 0%, 100% { margin-top: 0; }        50% { margin-top: -1.3cqw; } }
@keyframes mvWiggle   { 0%, 100% { rotate: -5deg; }        50% { rotate: 5deg; } }
@keyframes mvSway     { 0%, 100% { rotate: -1.6deg; }      50% { rotate: 1.6deg; } }
@keyframes mvSwing    { 0%, 100% { rotate: -9deg; }        50% { rotate: 9deg; } }
@keyframes mvSpin     { to { rotate: 360deg; } }
@keyframes mvBreathe  { 0%, 100% { scale: .94; }           50% { scale: 1.1; } }
@keyframes mvPulse    { 0%, 100% { scale: 1; }             50% { scale: 1.14; } }
@keyframes mvDrift    { 0% { translate: -14px 6px; }       50% { translate: 12px -16px; }   100% { translate: -6px 12px; } }
@keyframes mvNudge    { 0%, 100% { translate: 0 0; }       50% { translate: 5px 0; } }
@keyframes mvNudgeY   { 0%, 100% { translate: 0 0; }       50% { translate: 0 5px; } }
@keyframes mvShine    { 0%, 55% { translate: -130% 0; }    100% { translate: 130% 0; } }
@keyframes mvMarquee  { to { transform: translateX(-50%); } }
@keyframes mvShimmer  { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes mvWobbleTx { 0%, 100% { transform: rotate(-1.8deg); } 50% { transform: rotate(-.2deg) scale(1.02); } }
@keyframes mvLine     { from { opacity: 0; translate: 0 70%; rotate: 2.5deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes mvDot      { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes mvBolt     { 0%, 60%, 100% { scale: 1; rotate: 0deg; } 70% { scale: 1.25; rotate: -12deg; } 80% { scale: 1.1; rotate: 10deg; } }
@keyframes mvSpark    { 0% { opacity: .95; transform: translate(0, 0) scale(.4) rotate(0deg); } 100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 28px)) scale(1.1) rotate(160deg); } }

/* ===== HERO ===== */
.fm-h1.hx-title > span { animation: mvLine 1s cubic-bezier(.16, 1, .3, 1) both; }
.fm-h1.hx-title > span:nth-of-type(1) { animation-delay: .15s; }
.fm-h1.hx-title > span:nth-of-type(2) { animation-delay: .32s; }
.fm-h1.hx-title > span:nth-of-type(3) { animation-delay: .5s; }
.fm-h1.hx-title .hx-mark {
  background: linear-gradient(100deg, var(--fm-rosa) 0%, #F3C9E3 35%, var(--fm-rosa) 70%, #F3C9E3 100%);
  background-size: 200% 100%;
  animation: mvLine 1s cubic-bezier(.16, 1, .3, 1) .5s both, mvShimmer 5s linear 1.5s infinite, mvWobbleTx 4.5s ease-in-out 1.5s infinite;
}
.hx-blob { animation: mvBreathe 9s ease-in-out infinite; }
.hx-blob-rosa { animation-duration: 12s; animation-delay: -3s; }
.hx-blob-amarelo { animation-duration: 10.5s; animation-delay: -6s; }
.hx-blob-rosa-claro { animation-duration: 13s; animation-delay: -2s; }
.hx-pill i, .pn-pill i, .pg-pill i { color: var(--fm-vermelho-coral); animation: mvDot 1.9s ease-out infinite; }
.pn-pill i, .pg-pill i { color: var(--fm-rosa); }

/* polaroides e selos flutuando (mantém a entrada original hxPop) */
.hx-stage .hx-polaroid, .hx-stage .hx-badge, .hx-stage .hx-stat, .hx-stage .hx-chip { animation-name: hxPop, mvBobCq; animation-duration: .8s, 6.5s; animation-timing-function: var(--fm-ease-out), ease-in-out; animation-delay: var(--hx-delay, 0s), calc(var(--hx-delay, 0s) + 1.1s); animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }
.hx-stage .hx-polaroid-left   { animation-duration: .8s, 7s; }
.hx-stage .hx-polaroid-right  { animation-duration: .8s, 5.6s; }
.hx-stage .hx-polaroid-center { animation-duration: .8s, 8s; }
.hx-stage .hx-stat  { animation-duration: .8s, 5s; }
.hx-stage .hx-chip  { animation-duration: .8s, 6s; }
.hx-stage .hx-badge { animation-name: hxPop, mvBobCq, mvSwing; animation-duration: .8s, 6.2s, 6s; animation-delay: var(--hx-delay, 0s), calc(var(--hx-delay, 0s) + 1.1s), 1.4s; animation-iteration-count: 1, infinite, infinite; animation-fill-mode: both, none, none; animation-timing-function: var(--fm-ease-out), ease-in-out, ease-in-out; }
.hx-stage .hx-star  { animation-name: hxPop, mvSpin; animation-duration: .8s, 26s; animation-timing-function: var(--fm-ease-out), linear; animation-delay: 0s, 1s; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }
.hx-chip-icon svg { animation: mvBolt 3.4s ease-in-out 2s infinite; }

/* faixa de eventos em marquee contínuo */
.hx-strip { flex-wrap: nowrap; justify-content: flex-start; gap: 0; padding: 0; overflow: hidden; }
.hx-strip-track { display: flex; width: max-content; animation: mvMarquee 30s linear infinite; }
.hx-strip:hover .hx-strip-track { animation-play-state: paused; }
.hx-strip-group { display: flex; align-items: center; gap: 40px; padding: 22px 40px 22px 0; flex: 0 0 auto; }

/* brilho que passa nos botões principais */
.fm-btn.hx-btn-primary, .fm-btn.primary, .pn-btn-primary, .pg-cta, .fm-btn.gx-btn { position: relative; overflow: hidden; isolation: isolate; }
.fm-btn.hx-btn-primary::after, .fm-btn.primary::after, .pn-btn-primary::after, .pg-cta::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .45) 50%, transparent 68%);
  translate: -130% 0;
  animation: mvShine 4.8s ease-in-out 1.2s infinite;
}
.fm-btn.primary::after { background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .55) 50%, transparent 68%); }
.hx-btn-arrow, .pg-cta-arrow, .pn-btn-arrow { animation: mvNudge 1.6s ease-in-out infinite; }
.pn-btn-arrow { animation-name: mvNudgeY; }
.hx-btn-play { animation: mvPulse 2.4s ease-in-out infinite; }
.hx-stars, .ts-rating-strip span[style*="letter-spacing"] { display: inline-block; animation: mvPulse 3s ease-in-out infinite; }

/* ===== SOBRE ===== */
#sobre .showcase-icon { animation: mvWiggle 5s ease-in-out infinite; }
#sobre .showcase-row.reverse .showcase-icon { animation-delay: -2.5s; }
#sobre .showcase-tags span { animation: mvBobSm 4.6s ease-in-out infinite; }
#sobre .showcase-tags span:nth-child(2) { animation-delay: -2.3s; }

/* ===== EQUIPAMENTOS ===== */
.sg-carousel-frame-offset { animation: mvBreathe 8s ease-in-out infinite; transform-origin: bottom right; }
.sg-frame-chip i { animation: mvDot 2s ease-out infinite; color: #fff; }
.sg-picker-nav { animation: mvPulse 3.2s ease-in-out infinite; }
.sg-picker-nav--next { animation-delay: -1.6s; }
.sg-optional-card { animation: mvBobSm 4.8s ease-in-out infinite; }
.sg-optional-card:nth-of-type(2) { animation-delay: -1.6s; }
.sg-optional-card:nth-of-type(3) { animation-delay: -3.2s; }
.sg-picker-dot.active { animation: mvPulse 1.8s ease-in-out infinite; }

/* ===== COMO CONTRATAR ===== */
#como-contratar .ps-step-card svg { animation: mvWiggle 4.2s ease-in-out infinite; transform-origin: center; }
#como-contratar .ps-step-card:nth-child(2) svg { animation-delay: -1.4s; }
#como-contratar .ps-step-card:nth-child(3) svg { animation-delay: -2.8s; }
#como-contratar .ps-step-card span[style*="Holla Monday"] { animation: mvBobSm 3.4s ease-in-out infinite; }

/* ===== PHOTONOW ===== */
#photonow .pn-video-container { animation: mvBob 7s ease-in-out infinite; }
#photonow .pn-intro-points li { animation: mvBobSm 5s ease-in-out infinite; }
#photonow .pn-intro-points li:nth-child(2) { animation-delay: -1.7s; }
#photonow .pn-intro-points li:nth-child(3) { animation-delay: -3.4s; }
#photonow .pn-loc-num { animation: mvPulse 3.4s ease-in-out infinite; }
#photonow .pn-location-item:nth-child(2) .pn-loc-num { animation-delay: -.9s; }
#photonow .pn-location-item:nth-child(3) .pn-loc-num { animation-delay: -1.8s; }
#photonow .pn-location-item:nth-child(4) .pn-loc-num { animation-delay: -2.7s; }

/* ===== GALERIA DIGITAL ===== */
.pg-phone { animation: mvBob 7.5s ease-in-out infinite; }
.pg-glow-a { animation: mvBreathe 11s ease-in-out infinite; }
.pg-glow-b { animation: mvBreathe 14s ease-in-out -4s infinite; }
.pg-shot-lock { animation: mvWiggle 3.8s ease-in-out infinite; }
.pg-shot:nth-child(2n) .pg-shot-lock { animation-delay: -1.9s; }
.pg-gate-icon { animation: mvWiggle 3.2s ease-in-out infinite; }
.pg-steps li span { animation: mvPulse 3.2s ease-in-out infinite; }
.pg-steps li:nth-child(2) span { animation-delay: -1s; }
.pg-steps li:nth-child(3) span { animation-delay: -2s; }
.pg-tags span { animation: mvBobSm 5s ease-in-out infinite; }
.pg-tags span:nth-child(2n) { animation-delay: -2.5s; }

/* ===== GALERIA (pilhas de polaroides) ===== */
.washi-tape { animation: mvSway 4.4s ease-in-out infinite; }
.polaroid-card.card-0 { animation: mvSway 6s ease-in-out infinite; }
.polaroid-card.card-1 { animation: mvSway 7s ease-in-out -2s infinite; }
.polaroid-card.card-2 { animation: mvSway 6.5s ease-in-out -4s infinite; }
.partners-marquee { cursor: default; }

/* ===== DEPOIMENTOS / FAQ / CONTATO ===== */
#depoimentos .ts-rating-strip .fm-btn { animation: mvBobSm 4s ease-in-out infinite; }
#faq .fm-btn.primary.sm { animation: mvPulse 3.2s ease-in-out infinite; }
#contato .booking-field { transition: transform 300ms var(--fm-ease-out), box-shadow 300ms var(--fm-ease-out); }
#contato .booking-field:focus-within { transform: translateY(-3px); }
.sticky-contact-wrap .sticky-contact-trigger { animation: mvPulse 3s ease-in-out infinite; }

/* ===== Telas pequenas: tira o que pesa ===== */
@media (max-width: 640px) {
  .mv-deco { display: none; }
  .mv-spark { display: none; }
  html.mv-ready .mv-left, html.mv-ready .mv-right { translate: 0 40px; }
  .hx-strip-group { gap: 24px; padding: 16px 24px 16px 0; }
}
@media (hover: none) { .mv-spark { display: none; } }
