/* VITH Partners · animações da pasta animacoes/ (ver js/animacoes.js). Tudo restrito a html.completo:
   sem JS, Save-Data/2g ou movimento reduzido o site fica exatamente como antes. */

/* 1 · Serviços — AnimatedSVGIcons: o ícone animado do demo substitui o ícone de traço só depois de carregar */
.si-icon { display: none; width: 40px; height: 40px; color: var(--texto); transition: color .2s linear; }
.si-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.si-icon path[stroke] { stroke: currentColor; }
.si-icon path:not([fill="none"]) { fill: currentColor; }
html.completo .servico.si-pronto .si-icon { display: block; }
html.completo .servico.si-pronto > .ico { display: none; }
.servico:focus-within .si-icon { color: var(--vermelho); }
@media (hover: hover) and (pointer: fine) { .servico:hover .si-icon { color: var(--vermelho); } }
@media (max-width: 1023px) {
  .si-icon { grid-row: 1 / 4; width: 30px; height: 30px; }
}

/* 2 · Contato — GradientTopographyAnimation: camadas com o mesmo degradê e opacidades crescentes do demo */
.contato { overflow: clip; }
.contato > :not(.topografia) { position: relative; z-index: 1; }
.topografia { position: absolute; z-index: 0; right: -6%; bottom: -24%; width: min(64vw, 920px); height: auto;
  pointer-events: none; overflow: visible; }
.topografia path { fill: url(#topo-grad); transform-box: fill-box; transform-origin: center; }
.topografia path:nth-of-type(1) { fill-opacity: .1; }
.topografia path:nth-of-type(2) { fill-opacity: .2; }
.topografia path:nth-of-type(3) { fill-opacity: .3; }
.topografia path:nth-of-type(4) { fill-opacity: .4; }
.topografia path:nth-of-type(5) { fill-opacity: .5; }
.topografia path:nth-of-type(6) { fill-opacity: .6; }
.topografia path:nth-of-type(7) { fill-opacity: .7; }
.assinatura { cursor: pointer; }
@media (max-width: 767px) { .topografia { right: -40%; bottom: -12%; width: 130vw; } }

/* 3 · Filmes autorais — ScrollBasedLayoutAnimations: estado de partida usado só para o Flip medir */
.autorais--inicio .autoral { grid-column: 1 / -1; grid-row: 2; width: min(100%, 880px); justify-self: center; }
html.completo .autoral:nth-child(2) { position: relative; z-index: 2; } /* sem sobreposição no layout final: inofensivo */
.autorais--inicio .autoral:nth-child(3) { transform: translate(5%, 6%) rotate(4deg) scale(.9); opacity: 0; }

/* 4 · Cases — PageTransitions: keyframes originais do demo, disparados pela entrada que o site já tem (.visivel) */
html.completo .case { perspective: 1200px; }
html.completo .case .case-midia.entrar.visivel { transform-origin: 50% 0%; animation: rotateUnfoldBottom .9s both ease; }
html.completo .case .ficha .entrar.visivel, html.completo .case .case-cab .entrar.visivel {
  animation: moveFromBottomFade .7s both ease; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rotateUnfoldBottom { from { opacity: 0; transform: translateY(100%) rotateX(-90deg); } }
@keyframes moveFromBottomFade { from { opacity: .3; transform: translateY(100%); } }
@media (max-width: 767px) {
  /* celular: o mesmo efeito com percurso menor, para a mídia vertical não atravessar a tela inteira */
  html.completo .case .case-midia.entrar.visivel { animation-name: rotateUnfoldBottomCel; }
  @keyframes rotateUnfoldBottomCel { from { opacity: 0; transform: translateY(30%) rotateX(-90deg); } }
}

@media (prefers-reduced-motion: reduce) {
  .si-icon { display: none !important; }
  html.completo .servico > .ico { display: block !important; }
  .topografia { display: none; }
}

/* Celular: autorais animados pelo GSAP — sem transição CSS de transform disputando com o scrub (opacidade da entrada fica) */
.autorais--cel .case-midia, .autorais--cel .autoral h3, .autorais--cel .autoral p { transition: opacity .6s var(--ease) !important; }
.autorais--cel .case-midia img, .autorais--cel .case-midia video { transition: none !important; }

/* Celular: o loop da Ferrari é largo e escuro; mostra o quadro inteiro (sem cortar os faróis), centralizado e
   apoiado na parte de baixo da faixa, abaixo do título. O preto do vídeo funde com o fundo da seção. */
@media (max-width: 767px) {
  .nat-video { object-fit: contain; object-position: 50% 78%; }
}
