/* Responsive and loading refinements. Original hero geometry and colors remain intact. */
html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
body { -webkit-text-size-adjust: 100%; }
:is(button, a, summary, input, select, textarea) { touch-action: manipulation; }
:is(main, section, article, figure, .section-head, .quote-panel, .quote-form) { min-width: 0; }
:is(.footer-contact, .footer-links, .source-note, .related-services, .discovery-area-note) { overflow-wrap: anywhere; }
.home-page :is(.service-link, .footer-links a, .footer-contact a, .footer-social a) { min-height: 44px; display: inline-flex; align-items: center; }
.home-page .service-link { width: 100%; text-align: left; }
.home-page .quote-form { max-width: 100%; }
.home-page input, .home-page select, .home-page textarea { min-width: 0; max-width: 100%; }
.home-page .proof::before {
  background-image: linear-gradient(90deg, rgba(4,22,30,.97), rgba(4,22,30,.8)), var(--section-photo, none);
}
.home-page .quote::before {
  background-image: linear-gradient(90deg, rgba(4,22,30,.98) 0%, rgba(4,22,30,.92) 32%, rgba(4,22,30,.5) 58%, rgba(4,22,30,.1) 100%), var(--section-photo, none);
}
.home-page .hero-bg[data-gallery-paused] .hero-slide { animation-play-state: paused; }
.home-page :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.home-page .form-status a { display: inline-block; padding-block: 8px; text-decoration: underline; }
.service-photo picture, .detail-reference picture, .city-reference picture { display: block; }
.modern-page .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.modern-page .site-footer nav { display: grid; align-content: start; }
.modern-page :is(h1, h2, h3) { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 1080px) {
  .home-page .main-nav { visibility: hidden; overscroll-behavior: contain; padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
  .home-page .main-nav.open { visibility: visible; }
  .home-page .main-nav:not(.open) .dropdown-menu { visibility: hidden; }
  .home-page.menu-open .site-header { transform: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .home-page.menu-open :is(.mobile-cta-bar, .floating-whatsapp) { visibility: hidden; }
  .home-page .nav-contact { min-width: 0; }
}
@media (max-width: 980px) {
  .modern-page { scroll-padding-top: 96px; }
  .modern-page .site-header { position: sticky; top: 0; }
  .modern-page .main-nav { max-height: calc(100vh - 84px); max-height: calc(100dvh - 84px); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .modern-page .service-facts { grid-template-columns: 1fr; }
  .modern-page :is(section[id], main[id]) { scroll-margin-top: 100px; }
}
@media (max-width: 860px) {
  /* Match the preloaded WebP; same photo, position and gradient as the original. */
  .home-page .hero-bg { background-image: linear-gradient(180deg, rgba(4,22,30,.05), rgba(4,22,30,.4)), url('assets/hero-servicos-clean.webp'); }
  .home-page .mobile-cta-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .home-page .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .home-page.form-editing .mobile-cta-bar { visibility: hidden; }
  .home-page .quote::before { background-image: linear-gradient(180deg, rgba(4,22,30,.7), rgba(4,22,30,.95)), var(--section-photo, none); }
  .home-page .quote-form label { min-width: 0; }
  .home-page :is(input, select, textarea) { font-size: 16px; scroll-margin-block: 100px; }
  .home-page .quote { scroll-margin-top: 84px; }
}
@media (max-width: 380px) {
  .home-page .nav-contact { grid-template-columns: 1fr; }
  .modern-page .process-grid { grid-template-columns: 1fr; }
  .modern-page .button { padding-inline: 16px; }
  .home-page .form-submit { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .main-nav, .home-page .main-nav > * { transition: none; }
}
