/* Input/touch and safe-area corrections for the existing institutional site. */
:root{
 --site-safe-top:env(safe-area-inset-top,0px);
 --site-safe-right:env(safe-area-inset-right,0px);
 --site-safe-bottom:env(safe-area-inset-bottom,0px);
 --site-safe-left:env(safe-area-inset-left,0px);
 --site-header-size:124px;
 --site-gutter:clamp(24px,5.2vw,88px);
}
button,a[href]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button{-webkit-user-select:none;user-select:none}
button:enabled:active:not([aria-disabled="true"]),a[href]:active{opacity:.72}
/* Expand small targets without growing the existing icon or selected circle.
   Neighbouring theme targets get enough space to keep their hit areas separate. */
.site-theme-control{gap:8px}
.site-theme-control button,.language-control button,.site-brand,.menu-toggle,.contact-email-copy,.contact-email-open,.nav-view{position:relative}
.site-theme-control button::before,.language-control button::before,.solution-close::before,.site-brand::before,.menu-toggle::before,.contact-email-copy::before,.contact-email-open::before,.nav-view::before{
 content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%);
}
.language-control{column-gap:12px}
.contact-thanks-again{min-height:44px}
.solution-mail-link{display:inline-flex;align-items:center;min-height:44px}
.contact-email-open{-webkit-user-select:none;user-select:none}
/* Native page zoom and ordinary text selection remain available. */
.shell{padding-left:max(var(--site-gutter),calc(12px + var(--site-safe-left)));padding-right:max(var(--site-gutter),calc(12px + var(--site-safe-right)))}
.site-header{height:calc(var(--site-header-size) + var(--site-safe-top));padding-top:var(--site-safe-top)}
.site-copyright{padding-bottom:calc(25px + var(--site-safe-bottom))}
body[data-view="about"] .site-copyright,body[data-view="contact"] .site-copyright{padding-bottom:calc(18px + var(--site-safe-bottom))}
body[data-view="products"] #site-page,body[data-view="about"] #site-page{padding-top:calc(124px + var(--site-safe-top))}
body[data-view="about"] #sobre-nos{min-height:calc(100svh - 204px - var(--site-safe-top) - var(--site-safe-bottom))}
.study-stage .study-edge-control{margin-right:var(--site-safe-right);margin-bottom:var(--site-safe-bottom)}
.study-guidance{margin-left:var(--site-safe-left);margin-bottom:var(--site-safe-bottom)}
.gallery-view{padding-top:calc(124px + var(--site-safe-top));padding-bottom:calc(24px + var(--site-safe-bottom))}
.gallery-meta{padding-left:max(clamp(16px,5.2vw,88px),calc(12px + var(--site-safe-left)));padding-right:max(clamp(16px,5.2vw,88px),calc(12px + var(--site-safe-right)))}
/* Full-screen overlays follow the visible viewport; the hero stays at 100svh. */
.gallery-lightbox{height:100dvh;padding-top:calc(64px + var(--site-safe-top));padding-bottom:calc(24px + var(--site-safe-bottom));padding-left:max(clamp(20px,4vw,72px),calc(12px + var(--site-safe-left)));padding-right:max(clamp(20px,4vw,72px),calc(12px + var(--site-safe-right)))}
.gallery-lightbox-close{top:calc(12px + var(--site-safe-top));right:calc(16px + var(--site-safe-right))}
.solution-dialog{inset:var(--site-safe-top) var(--site-safe-right) var(--site-safe-bottom) var(--site-safe-left);width:min(650px,calc(100% - 32px - var(--site-safe-left) - var(--site-safe-right)));max-height:calc(100dvh - 32px - var(--site-safe-top) - var(--site-safe-bottom))}
.wms-player:is(:fullscreen,.wms-expanded) .wms-screen{top:var(--site-safe-top);bottom:calc(64px + var(--site-safe-bottom))}
.wms-player:is(:fullscreen,.wms-expanded) .wms-controls{height:calc(64px + var(--site-safe-bottom));padding-bottom:var(--site-safe-bottom);padding-left:max(clamp(16px,4vw,60px),calc(12px + var(--site-safe-left)));padding-right:max(clamp(16px,4vw,60px),calc(12px + var(--site-safe-right)))}
@media(max-width:960px){
 :root{--site-header-size:88px}
 .site-nav,.js .site-nav{top:calc(76px + var(--site-safe-top));left:max(24px,calc(12px + var(--site-safe-left)));right:max(24px,calc(12px + var(--site-safe-right)));max-height:calc(100dvh - 100px - var(--site-safe-top) - var(--site-safe-bottom))}
 .site-theme-control{gap:8px}
 .gallery-view{padding-top:calc(88px + var(--site-safe-top))}
}
@media(max-width:760px){:root{--site-gutter:25px}}
@media(max-width:650px){
 .gallery-view{padding-bottom:calc(20px + var(--site-safe-bottom))}
 .gallery-lightbox{padding-bottom:calc(20px + var(--site-safe-bottom));padding-left:max(16px,calc(12px + var(--site-safe-left)));padding-right:max(16px,calc(12px + var(--site-safe-right)))}
}
@media(max-width:560px){
 :root{--site-gutter:22px}
 body[data-view="products"] #site-page,body[data-view="about"] #site-page{padding-top:calc(80px + var(--site-safe-top))}
 body[data-view="about"] #sobre-nos{min-height:calc(100svh - 156px - var(--site-safe-top) - var(--site-safe-bottom))}
 .language-control{column-gap:12px}
}
@media(max-width:380px){.site-theme-control button{width:36px}}
@media(min-width:561px) and (max-height:500px){
 body:not(.about-open):has(.quadrant-study:not([data-phase="0"])) .site-header,body[data-view="about"] .site-header{--site-header-size:48px}
 body:not(.about-open):has(.quadrant-study:not([data-phase="0"])) .site-copyright{padding-bottom:calc(8px + var(--site-safe-bottom))}
}
@media(max-height:500px){
 .gallery-view{padding-bottom:calc(16px + var(--site-safe-bottom))}
 .gallery-lightbox{padding-top:calc(52px + var(--site-safe-top));padding-bottom:calc(12px + var(--site-safe-bottom))}
 .gallery-lightbox-close{top:calc(4px + var(--site-safe-top))}
}
.wms-controls .wms-icon{width:44px;min-width:44px}
