/* Valverde Serviços – movimento do site (tokens e animações compartilhadas) */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* 1. Entrada do banner (uma vez, ao abrir a página) */
@keyframes vs-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js-motion .hero nav[aria-label="Navegação estrutural"],
.js-motion .hero :has(> h1) > *,
.js-motion .hero h1 ~ * {
  animation: vs-rise 640ms var(--ease-out) both;
}
.js-motion .hero nav[aria-label="Navegação estrutural"] { animation-delay: 40ms; }
.js-motion .hero :has(> h1) > :first-child:not(h1) { animation-delay: 90ms; }
.js-motion .hero h1 { animation-delay: 140ms; }
.js-motion .hero h1 + * { animation-delay: 220ms; }
.js-motion .hero h1 + * + * { animation-delay: 300ms; }
.js-motion .hero h1 + * + * + * { animation-delay: 360ms; }

/* 2. Zoom lento nas fotos do banner (efeito “câmera”) */
@keyframes vs-settle { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero-slideshow .slide.active { animation: vs-settle 6.5s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
.hero > img:first-child { animation: vs-settle 9s cubic-bezier(0.25, 0.1, 0.25, 1) both; }

/* 3. Conteúdo surgindo ao rolar a página (com escalonamento nas grades) */
.animate-on-scroll,
.js-motion .reveal {
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.animate-on-scroll { transform: translateY(8px); }
.js-motion .reveal:not(.is-visible) { opacity: 0; transform: translateY(8px); }
.js-motion .reveal.is-visible { opacity: 1; transform: none; }

/* 4. Cabeçalho ganha sombra ao rolar */
header.sticky { transition: box-shadow 220ms var(--ease-out), background-color 220ms var(--ease-out); }
header.sticky.is-scrolled { box-shadow: 0 1px 0 rgba(9, 9, 11, .04), 0 10px 30px -18px rgba(9, 9, 11, .35); }

/* 5. Menu do celular abre suavemente */
@keyframes vs-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#mobile-menu:not(.hidden) { animation: vs-drop 200ms var(--ease-out); }

/* 6. Resposta ao toque/clique nos botões */
a.inline-flex, button.inline-flex, button[type="submit"] {
  transition-property: color, background-color, border-color, text-decoration-color, box-shadow, transform !important;
  transition-timing-function: var(--ease-out) !important;
  transition-duration: 160ms !important;
}
a.inline-flex:active, button.inline-flex:active, button[type="submit"]:active:not(:disabled) { transform: scale(0.97); }
.whatsapp-button:active { transform: scale(0.94); }

/* 7. Perguntas frequentes: resposta aparece em vez de “pular” */
@keyframes vs-fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
details[open] > :not(summary) { animation: vs-fade-down 220ms var(--ease-out); }

/* 8. Foto ampliada da galeria */
.lightbox img { transform: scale(0.96); transition: transform 280ms var(--ease-out); }
.lightbox.visible img { transform: none; }

/* 9. Seta do “Saiba mais” acompanha o mouse */
@media (hover: hover) and (pointer: fine) {
  .group .fa-arrow-right { transition: transform 200ms var(--ease-out); }
  .group:hover .fa-arrow-right, a:hover > .fa-arrow-right { transform: translateX(3px); }
}
/* Zoom das fotos dos cards só onde existe mouse */
@media (hover: none) {
  .group:hover .group-hover\:scale-105 { transform: none; }
}

/* Quem pede menos movimento: só esmaecimento, sem deslocamento nem zoom */
@media (prefers-reduced-motion: reduce) {
  .js-motion .hero nav[aria-label="Navegação estrutural"],
  .js-motion .hero :has(> h1) > *,
  .js-motion .hero h1 ~ * { animation-name: vs-fade; animation-duration: 300ms; }
  .hero-slideshow .slide.active, .hero > img:first-child { animation: none; }
  .animate-on-scroll, .js-motion .reveal, .js-motion .reveal:not(.is-visible) { transform: none; transition-property: opacity; }
  #mobile-menu:not(.hidden), details[open] > :not(summary) { animation: none; }
  a.inline-flex:active, button.inline-flex:active, button[type="submit"]:active, .whatsapp-button:active { transform: none; }
}
@keyframes vs-fade { from { opacity: 0; } to { opacity: 1; } }
