/* ===== Camada extra de movimento e interação ===== */

/* rastro de cruzinhas no topo (mouse e dedo) */
.rastro{position:absolute;z-index:4;pointer-events:none;font-family:var(--fT);font-weight:800;line-height:1;translate:-50% -50%;animation:rastro 1s ease-out forwards}
@keyframes rastro{0%{opacity:.95;transform:scale(.4) rotate(0)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.15) rotate(var(--rot))}}

/* mascote do topo clicável */
.fachada-mascote .mascote{cursor:pointer;-webkit-tap-highlight-color:transparent}
.mascote.boing{animation:boing .6s cubic-bezier(.3,1.6,.5,1)}
@keyframes boing{0%{scale:1 1}25%{scale:1.08 .9}50%{scale:.94 1.08;translate:0 -26px}75%{scale:1.03 .97;translate:0 0}100%{scale:1}}
.mascote.some{opacity:0;transition:opacity .15s}
.toque-dica{position:absolute;left:50%;bottom:8%;translate:-50% 0;z-index:3;background:rgba(255,255,255,.95);color:var(--verm);font-weight:800;font-size:.78rem;padding:6px 12px;border-radius:999px;box-shadow:0 8px 18px -10px rgba(0,0,0,.5);white-space:nowrap;pointer-events:none;animation:dica 2.4s ease-in-out 2.5s infinite both}
.toque-dica.foi{display:none}
@keyframes dica{0%,100%{opacity:0;translate:-50% 6px}15%,80%{opacity:1;translate:-50% 0}}

/* títulos entram palavra por palavra */
.pal{display:inline-block;opacity:0;translate:0 .55em;rotate:4deg;transition:opacity .5s,translate .7s cubic-bezier(.2,1.3,.4,1),rotate .7s cubic-bezier(.2,1.3,.4,1);transition-delay:calc(var(--i)*55ms)}
.palavras-ok .pal{opacity:1;translate:0 0;rotate:0deg}

/* cartões com inclinação 3D e brilho que segue o mouse */
.inclina{transform:perspective(800px) rotateX(calc(var(--ry,0)*-8deg)) rotateY(calc(var(--rx,0)*10deg));transition:transform .25s ease-out,box-shadow .25s;position:relative;isolation:isolate}
.inclina::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;opacity:0;transition:opacity .3s;background:radial-gradient(circle at calc(50% + var(--rx,0)*100%) calc(50% + var(--ry,0)*100%),rgba(255,255,255,.55),transparent 55%)}
.inclina.ativo::after{opacity:1}
.inclina.ativo{box-shadow:0 22px 34px -20px rgba(90,8,14,.45)}

/* mascotes das seções: balancinho com o pé no chão e pulinho ao tocar */
.vivo{transform-origin:50% 100%;cursor:pointer;-webkit-tap-highlight-color:transparent}
.vivo.balanca{animation:balanca 4.5s ease-in-out infinite}
@keyframes balanca{0%,100%{rotate:0deg}30%{rotate:-2.2deg}70%{rotate:2.2deg}}
.vivo.pulo{animation:pulinho .65s cubic-bezier(.3,1.6,.5,1)}
@keyframes pulinho{0%{scale:1 1;translate:0 0}25%{scale:1.06 .92}50%{scale:.95 1.07;translate:0 -22px}100%{scale:1;translate:0 0}}

/* confete */
.confete{position:fixed;z-index:9999;pointer-events:none;width:10px;height:10px;top:0;left:0}
.confete.cruz{clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%)}
.confete.pilula{width:14px;height:7px;border-radius:7px}

/* cruzes flutuando no fundo das seções claras (parallax) */
.deco{position:relative;overflow:clip}
.deco>.w{position:relative;z-index:1}
.deco-cruz{position:absolute;z-index:0;pointer-events:none;width:var(--t);height:var(--t);background:var(--c);opacity:.13;clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%);translate:0 calc(var(--sy,0)*1px);rotate:calc(var(--sy,0)*.15deg)}

/* botões magnéticos */
.bt.ima{translate:calc(var(--bx,0)*1px) calc(var(--by,0)*1px)}

/* número do topo dá um "tchan" ao terminar */
.numeros b.fim{animation:tchan .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes tchan{50%{scale:1.18;color:#fff3a6}}

@media (prefers-reduced-motion:reduce){
  .pal{opacity:1;translate:none;rotate:none;transition:none}
  .vivo.balanca,.toque-dica{animation:none}
  .deco-cruz{translate:none;rotate:none}
}
.bt.ima{transition:transform .25s cubic-bezier(.3,1.6,.5,1),box-shadow .25s,background .25s,translate .3s ease-out}
.fachada-mascote .mascote{aspect-ratio:477/820;object-fit:contain;object-position:50% 100%}
