/* Ajustes de reflow, toque e altura de tela, após as camadas visuais. */
:root {
  --site-header-height: 110px;
}

html {
  scroll-padding-top: calc(var(--site-header-height) + 16px);
}

.section-heading > *, .catalog-heading > *, .model-grid > *,
.life-selector > *, .essence-grid > *, .difference-grid > *,
.planning-banner > *, .process > *, .faq > *, .form-row > *,
.footer-top > *, .footer-nav > *, .footer-bottom > * {
  min-width: 0;
}

h1, h2, h3, .model-tag, .model-dimensions, .button, .text-link,
.life-tabs > button, .model-cta, .footer-nav, .footer-bottom {
  overflow-wrap: anywhere;
}

.button, .text-link { max-width: 100%; }
.button > span, .text-link > span { flex-shrink: 0; }
.model-info h3 { hyphens: auto; }
.difference-grid .text-link { font-size: 12px; min-height: 44px; }
.product-view-controls button { min-height: 44px; }
.finish-swatch {
  width: 44px;
  height: 44px;
  border: 12px solid transparent;
  background-clip: padding-box;
  box-shadow: none;
  position: relative;
}
.finish-swatch::after { content: ''; position: absolute; inset: -2px; border: 1px solid #193e8266; border-radius: 50%; }
.finish-swatch[aria-pressed=true] { box-shadow: none; }
.finish-swatch[aria-pressed=true]::after { inset: -4px; border: 2px solid var(--ink); }
@media (min-width: 600px) {
  .product-bottom { right: max(var(--gutter), 88px); }
}
@media (min-width: 900px) and (min-height: 601px) and (prefers-reduced-motion: no-preference) {
  .product-render-front {
    transform: translateY(calc((1 - var(--intro-progress)) * 12px)) rotateZ(calc(-9deg + var(--intro-progress) * 17deg)) rotateY(calc(-8deg + var(--intro-progress) * 8deg)) scale(calc(.75 + var(--intro-progress) * .29));
  }
}
.model-tag { font-size: 9px; }
.model-info .eyebrow { font-size: 9px; }
.model-dimensions { font-size: 11px; line-height: 1.7; }
.model-cta { min-height: 44px; font-size: 12px; gap: 8px; text-align: left; }
.catalog-footnote > p { font-size: 12px; }
.filter-button { min-height: 44px; font-size: 12px; }
.gallery-note, .project-caption p { font-size: 10px; line-height: 1.7; }
.footer-nav, .footer-nav > button, .footer-bottom,
.footer-bottom button, .back-top { font-size: 12px; line-height: 1.7; }
.footer-nav a, .footer-nav button, .footer-bottom a,
.footer-bottom button, .back-top { min-height: 44px; display: inline-flex; align-items: center; }
.faq-intro { top: calc(var(--site-header-height) + 28px); }

/* O controle permanece acessível mesmo após rolar o conteúdo do diálogo. */
dialog {
  --dialog-pad-top: 0px;
  --dialog-pad-inline: 0px;
  overflow: auto;
  max-height: calc(100dvh - 28px);
  scrollbar-gutter: stable;
}
.brief-dialog { --dialog-pad-top: 43px; --dialog-pad-inline: 45px; }
.privacy-dialog { --dialog-pad-top: 45px; --dialog-pad-inline: 45px; }
.dialog-close {
  position: sticky;
  top: 12px;
  right: auto;
  z-index: 10;
  width: 44px;
  height: 44px;
  margin-top: calc(12px - var(--dialog-pad-top));
  margin-right: calc(12px - var(--dialog-pad-inline));
  margin-bottom: calc(var(--dialog-pad-top) - 56px);
  margin-left: auto;
  background: #fbfcfc;
  box-shadow: 0 2px 12px #193e8217;
}
.brief-dialog > .eyebrow, .privacy-dialog > .eyebrow { padding-right: 24px; }
form label, .consent, .consent button, .form-privacy { font-size: 12px; }
input:not([type=checkbox]), select, textarea { font-size: 16px; }
.consent input { width: 20px; height: 20px; }
.brief-result pre { overflow-wrap: anywhere; }

@media (max-width: 1100px) and (min-width: 900px) and (min-height: 601px) {
  .hero-product .hero-second-copy { top: 145px; width: 270px; }
  .hero-product .hero-second-copy h2 { font-size: 43px; }
  .hero-product .hero-second-copy .eyebrow { margin-bottom: 18px; }
  .hero-product .hero-second-copy h3 { margin-top: 18px; }
  .hero-product .hero-second-copy > p:not(.eyebrow) { margin: 12px 0; }
  .product-specs { margin-bottom: 12px; }
  .product-specs li { padding: 7px 0; }
  .product-pool-stage {
    left: calc(50% + var(--intro-progress) * 21%);
    width: calc(77vw - var(--intro-progress) * 27vw);
    height: 55svh;
  }
  .product-render-top { transform: rotate(-90deg) scale(1); }
  .product-callout { display: none; }
}

@media (max-width: 899px) {
  .menu-toggle { width: 44px; height: 44px; flex-shrink: 0; align-items: center; margin-left: 0; }
  .mobile-menu {
    max-height: calc(100dvh - var(--site-header-height) - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .mobile-menu a { flex-shrink: 0; min-height: 56px; }
  .catalog-heading, .life-selector, .essence-grid, .process, .faq {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .life-preview-caption { left: 0; right: 0; padding: 24px; }
  .life-preview-caption .text-link { font-size: 11px; gap: 12px; }
  .product-view-controls button { min-height: 44px; font-size: 11px; gap: 6px; }
  .product-view-controls button > span { font-size: 9px; }
  .product-finish-controls { gap: 5px; }
}

@media (max-width: 899px) and (min-height: 601px) and (prefers-reduced-motion: no-preference) {
  .hero-scroll .hero-product .hero-content { top: 125px; }
  .hero-product .hero-second-copy {
    top: 120px;
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    max-width: 430px;
  }
  .hero-product .hero-second-copy h2 { font-size: clamp(36px, 5.7vw, 48px); }
  .hero-product .hero-second-copy .eyebrow { margin-bottom: 14px; }
  .hero-product .hero-second-copy h3 { margin-top: 15px; }
  .hero-product .hero-second-copy > p:not(.eyebrow) { margin: 10px 0; max-width: 360px; font-size: 12px; line-height: 1.7; }
  .product-specs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
  .product-specs li { border: 0; padding: 3px 0; font-size: 10px; }
  .product-specs li::before { margin-right: 5px; }
  .hero-product .hero-second-copy .text-link { font-size: 11px; min-height: 36px; }
  .hero-product .hero-second-copy .product-next { display: inline-flex; margin: 0 0 0 18px; font-size: 10px; gap: 10px; }
  .product-pool-stage {
    width: 94vw;
    height: 42svh;
    left: 50%;
    top: calc(66% + var(--intro-progress) * 7%);
  }
  .product-render-top { transform: rotate(-90deg) scale(calc(.84 + var(--intro-progress) * .10)); }
  .product-callout { display: none; }
}

@media (max-width: 599px) {
  .site-header { gap: 6px; }
  .official-logo { width: 96px; height: 44px; }
  .header-cta { min-height: 44px; font-size: 10px; padding: 10px; gap: 6px; letter-spacing: 0; }
  .catalog-heading, .life-selector, .essence-grid, .process, .faq { grid-template-columns: minmax(0, 1fr); }
  .model-grid { gap: 32px 16px; }
  .model-photo { height: clamp(210px, 58vw, 300px); }
  .model-tag { font-size: 10px; padding: 6px; }
  .model-info .eyebrow { font-size: 9px; letter-spacing: .03em; }
  .model-info h3 { font-size: 28px; }
  .model-dimensions { font-size: 11px; }
  .model-cta { font-size: 12px; padding-top: 10px; }
  .catalog-cta { padding: 24px; }
  .catalog-cta .button { font-size: 12px; }
  .life-preview-caption { position: relative; margin-top: -100px; margin-left: 18px; }
  .life-selector-preview { padding-bottom: 0; }
  .life-preview-caption .eyebrow { font-size: 9px; }
  .life-preview-caption .text-link { font-size: 12px; }
  .difference-grid .text-link { font-size: 12px; }
  .planning-copy .button, .contact-content .button { font-size: 12px; }
  .contact-direct { font-size: 12px; line-height: 1.8; }
  .product-bottom { bottom: 16px; padding-top: 8px; gap: 4px 8px; }
  .hero-product .scroll-cue { font-size: 7px; }
  .product-finish-controls { margin-right: 0; }
  .product-view-controls { gap: 5px; margin-right: 48px; }
  .product-view-controls button { font-size: 11px; gap: 4px; padding: 6px 0; }
  .product-view-controls button > span { font-size: 8px; }
  .product-model-label { bottom: 132px; }
  .brief-dialog, .privacy-dialog { --dialog-pad-top: 35px; --dialog-pad-inline: 24px; }
  .brief-dialog h2, .privacy-dialog h2 { font-size: clamp(37px, 11vw, 49px); }
  .project-dialog-copy h2 { font-size: clamp(32px, 10vw, 42px); }
  .footer-nav { gap: 6px 24px; }
  .footer-nav > button { flex-basis: auto; }
  .footer-bottom { padding-right: 42px; gap: 8px 18px; }
}

@media (max-width: 479px) {
  .hero-product .product-model-label { display: none; }
}

@media (max-width: 599px) and (min-height: 601px) and (max-height: 700px) and (prefers-reduced-motion: no-preference) {
  .hero-product .hero-second-copy { top: 102px; }
  .hero-product .hero-second-copy h2 { font-size: 34px; }
  .product-pool-stage { height: 37svh; top: calc(66% + var(--intro-progress) * 5%); }
}

@media (max-width: 359px) {
  .model-grid { grid-template-columns: minmax(0, 1fr); }
  .model-photo { height: 330px; }
  .model-tag { font-size: 10px; }
  .model-info h3 { font-size: 34px; }
  .header-cta { font-size: 9px; }
  .brand .official-logo { width: 90px; }
  .product-view-controls button { font-size: 10px; }
}

@media (min-width: 1600px) {
  .hero-product .hero-description { font-size: 15px; }
  .hero-product .hero-second-copy > p:not(.eyebrow) { font-size: 14px; }
  .product-specs li { font-size: 13px; }
  .product-view-controls button { font-size: 12px; }
  .product-model-label > small { font-size: 12px; }
}

/* Em janelas baixas o conteúdo flui: nenhuma ação fica fora da tela fixa. */
@media (max-height: 600px) {
  .js .hero-scroll { height: auto; }
  .hero-scroll .hero.hero-product {
    position: relative;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 32px 40px;
    padding: 120px var(--gutter) 30px;
  }
  .hero-scroll .hero-product .hero-content {
    position: relative;
    top: auto; left: auto; right: auto;
    grid-column: 1;
    max-width: none;
    padding: 0;
    opacity: 1;
    transform: none;
    text-align: left;
  }
  .hero-product .hero-eyebrow { justify-content: flex-start; font-size: 8px; }
  .hero-scroll .hero-product h1 { font-size: clamp(38px, 5.2vw, 68px); }
  .hero-product .hero-description { font-size: 12px; }
  .hero-product .hero-content .button { position: static; min-height: 44px; min-width: 0; font-size: 12px; margin-top: 20px; }
  .product-pool-stage {
    position: relative;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: 100%;
    height: clamp(300px, 45vw, 520px);
    max-height: none;
    left: auto; top: auto;
    transform: none;
  }
  .product-render-front { opacity: 1; transform: rotate(-6deg) scale(.95); }
  .product-render-top { opacity: 0; transform: rotate(-90deg) scale(.94); }
  .hero-product[data-fixed-product-view=top] .product-render-front { opacity: 0; }
  .hero-product[data-fixed-product-view=top] .product-render-top { opacity: 1; }
  .hero-product .hero-second-copy {
    position: relative;
    grid-column: 1;
    top: auto; left: auto; right: auto;
    width: auto; max-width: none;
    opacity: 1; transform: none;
  }
  .hero-product .hero-second-copy h2 { font-size: 38px; }
  .hero-product .hero-second-copy .eyebrow { margin-bottom: 16px; }
  .hero-product .hero-second-copy h3 { margin-top: 18px; font-size: 13px; }
  .hero-product .hero-second-copy > p:not(.eyebrow) { max-width: none; font-size: 12px; line-height: 1.8; }
  .product-specs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .product-specs li { font-size: 11px; border: 0; padding: 4px 0; }
  .hero-product .hero-second-copy .text-link { min-height: 44px; font-size: 12px; }
  .hero-product .hero-second-copy .product-next { display: flex; margin: 4px 0 0; }
  .product-bottom { position: relative; grid-column: 1 / -1; top: auto; bottom: auto; left: auto; right: auto; margin-right: 48px; }
  .product-view-controls { margin-right: 0; }
  .product-finish-controls { margin-right: 0; }
  .product-callout, .product-model-label { display: none; }
  .faq-intro { position: static; }
}

@media (max-height: 600px) and (max-width: 599px) {
  .hero-scroll .hero.hero-product { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 110px; }
  .hero-scroll .hero-product .hero-content { text-align: center; }
  .hero-product .hero-eyebrow { justify-content: center; }
  .hero-scroll .hero-product h1 { font-size: clamp(40px, 10.8vw, 62px); }
  .product-pool-stage { grid-column: 1; grid-row: 2; height: 320px; width: 100%; }
  .hero-product .hero-second-copy { grid-row: 3; }
  .product-bottom { grid-row: 4; margin-right: 0; }
  .product-view-controls { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product .hero-second-copy { display: none; }
}
