/* Ajustes responsivos compartilhados: preservam a direção de arte e eliminam
   larguras rígidas, sem mascarar o overflow da página. */

html { -webkit-text-size-adjust: 100%; }

img,
svg,
video,
canvas,
iframe {
  max-inline-size: 100%;
}

img,
video,
canvas { block-size: auto; }

button,
input,
textarea,
select { font: inherit; }

.container,
.site-header,
.site-nav,
.hero-copy,
.authority-copy,
.statement-copy,
.video-feature-grid,
.footer-inner,
.footer-bottom,
.contact-grid,
.split,
.portrait-copy,
.card-grid,
.case-grid,
.stages,
.hero-split { min-inline-size: 0; }

.site-nav a,
.nav-dropdown summary,
.button-dark,
.button-light,
.nav-cta,
.footer-bottom a { overflow-wrap: anywhere; }

.site-nav a:focus-visible,
.nav-dropdown summary:focus-visible,
.nav-toggle:focus-visible,
.top .menu:focus-visible,
.top .theme:focus-visible,
.button-dark:focus-visible,
.button-light:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--gold, #ae7b39);
  outline-offset: 3px;
}

@media (max-width: 780px) {
  .site-header {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-nav.is-open {
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-toggle span { display: none; }

  .nav-toggle {
    min-width: 48px;
    min-height: 44px;
    justify-content: flex-end;
    padding: 0;
  }

  .site-nav > a,
  .site-nav .nav-dropdown,
  .site-nav .nav-dropdown summary,
  .site-nav .nav-dropdown > div a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .site-nav .nav-dropdown summary {
    justify-content: space-between;
  }

  .site-nav .nav-dropdown > div a {
    padding-inline: 14px;
  }

  .site-nav .nav-cta,
  .button-dark,
  .button-light {
    min-width: 0;
    max-width: 100%;
  }

  .site-nav .nav-cta {
    width: 100%;
    min-height: 46px;
  }

  .container { width: 100%; padding-inline: clamp(16px, 5vw, 24px); }

  .page-hero,
  .page-hero-media,
  .page-hero:not(.page-hero-media) { min-height: 0; }

  .page-hero h1,
  .content-section h2,
  .institutional-cta h2 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .page-hero h1 { font-size: clamp(2.25rem, 10.5vw, 2.875rem); }
  .lead { max-width: 34rem; font-size: clamp(.98rem, 4.2vw, 1rem); }

  .split,
  .portrait-copy,
  .contact-grid,
  .card-grid,
  .case-grid,
  .stages,
  .hero-split,
  .footer-inner { grid-template-columns: minmax(0, 1fr); }

  .split,
  .portrait-copy,
  .contact-grid { gap: clamp(22px, 7vw, 30px); }

  .stages { margin-top: clamp(30px, 10vw, 42px); }

  .procedure-card,
  .case-card,
  .contact-grid > div { min-width: 0; }

  .procedure-card h3,
  .case-card h2 { overflow-wrap: break-word; }

  .page-hero-media .hero-split {
    display: grid;
    gap: 8px;
  }

  .page-hero-media .hero-split > div { width: 100%; }

  .page-hero-media .hero-split figure {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(72vw, 270px);
    height: clamp(310px, 84vw, 390px);
    min-height: 0;
    margin: 0 0 -2px auto;
    padding-top: 12px;
    display: grid;
    place-items: end center;
    overflow: visible;
    opacity: 1;
  }

  .page-hero-media .hero-split figure::before { inset: 12% 2% 0; z-index: 0; }

  .page-hero-media .hero-split figure img {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, #000 0 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0 84%, transparent 100%);
  }

  .portrait-copy img {
    width: 100%;
    max-width: 100%;
    object-position: center top;
  }

  .page-hero:not(.page-hero-media) {
    min-height: clamp(850px, 220vw, 920px);
  }

  .page-hero:not(.page-hero-media)::after {
    top: auto;
    right: clamp(8px, 3vw, 18px);
    bottom: 0;
    width: clamp(250px, 72vw, 290px);
    height: clamp(400px, 110vw, 460px);
    background-size: auto 100%;
    background-position: center bottom;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
    filter: drop-shadow(8px 12px 16px rgba(76, 44, 18, .13));
  }

  .page-hero.portrait-results::after,
  .page-hero.portrait-contact::after {
    right: 0;
    width: 100%;
  }

  .institutional-cta { padding-inline: clamp(18px, 6vw, 28px); }
  .institutional-cta .button-light { width: min(100%, 18rem); }

  .site-footer { padding-inline: clamp(18px, 6vw, 28px); }
  .footer-bottom { gap: 10px; }

  .top { width: 100%; max-width: 100%; }
  .top-actions { min-width: 0; }
  .top .nav.open {
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .top .nav.open > a,
  .top .nav.open details > summary,
  .top .nav.open details > div a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .top .nav.open details > summary { justify-content: space-between; }
  .top .nav.open details > div a { padding-inline: 12px; }

  .hero,
  .authority,
  .statement,
  .journey,
  .video-feature,
  .invite,
  .footer { max-width: 100%; }

  .hero-copy,
  .authority-copy,
  .statement-copy,
  .video-feature-copy { min-width: 0; }

  .hero h1,
  .authority h2,
  .statement h2,
  .journey h2,
  .invite h2,
  .video-feature h2 {
    overflow-wrap: break-word;
  }

  .hero .button,
  .authority .button,
  .invite .button { max-width: 100%; }

  .service { min-width: 0; }
  .video-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .video-facade { width: 100%; max-width: 100%; }
}

@media (max-width: 359px) {
  .site-logo img { width: 52px; }
  .nav-toggle { padding-inline: 0; }
  .page-hero h1 { font-size: clamp(2rem, 10.5vw, 2.25rem); }
  .hero h1 { font-size: clamp(2.55rem, 11.8vw, 3.2rem); }
  .authority h2,
  .statement h2 { font-size: clamp(2rem, 10vw, 2.45rem); }
  .button-dark,
  .button-light,
  .top .button { padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .site-nav *,
  .top .nav,
  .top .nav *,
  .button-dark,
  .button-light { scroll-behavior: auto !important; }
}
