/* Off-canvas artwork and the closed drawer must not enlarge Safari's zoomable page.
   clip preserves vertical scrolling and nested horizontal carousels. */
html,body{overflow-x:clip}
/* Absolute drawers need the body as their clipping boundary, not the viewport. */
body{position:relative}
:root{--safari-top-bleed:0px;--safari-bottom-bleed:0px;--safari-scene-bleed:0px}
.safari-full-bleed body{min-height:calc(100dvh + var(--safari-top-bleed))}
.safari-full-bleed [data-hero]{
  height:calc(100svh + var(--safari-top-bleed) + var(--safari-scene-bleed))!important;
  min-height:max(calc(100svh + var(--safari-top-bleed) + var(--safari-scene-bleed)),calc(640px + var(--safari-top-bleed) + var(--safari-scene-bleed)))!important;
  padding-top:calc(clamp(16px,2.2vw,28px) + var(--safari-top-bleed))!important;
}
.safari-full-bleed [data-intro]{height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important}
.safari-full-bleed [data-intro]>button{top:calc(clamp(16px,3vh,28px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-i-frame],.safari-full-bleed [data-i-vid]{top:calc(50dvh + var(--safari-top-bleed))!important}
.safari-full-bleed [data-i-tag]{top:calc(50dvh + var(--safari-top-bleed) + min(36vh,39vw))!important}
.safari-full-bleed [data-i-count]{bottom:calc(clamp(24px,5vh,44px) + var(--safari-bottom-bleed))!important}
/* The inset navigation capsule leaves the browser's top edge free to show the page. */
.safari-full-bleed header[aria-label="Navegación"]{top:12px!important;left:12px!important;right:12px!important;border-radius:14px}
.safari-full-bleed [data-b-hero]{height:calc(100svh + var(--safari-top-bleed) + var(--safari-scene-bleed))!important}
.safari-full-bleed [data-b-hero]>header{top:var(--safari-top-bleed)!important}
.safari-full-bleed [data-b-kicker]{top:calc(clamp(80px,12vh,120px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-safari-intro]{height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important}
.safari-full-bleed [data-safari-intro]>span{bottom:calc(clamp(24px,5vh,48px) + var(--safari-bottom-bleed))!important}
.safari-full-bleed [data-safari-intro]>[data-safari-bar]{bottom:calc(clamp(30px,5.6vh,54px) + var(--safari-bottom-bleed))!important}
@media(max-width:640px){.safari-full-bleed [data-b-photo]{height:82svh!important}}
.safari-full-bleed [data-safari-page]{padding-top:calc(var(--safari-page-pad,0px) + var(--safari-top-bleed))!important;min-height:calc(100dvh + var(--safari-top-bleed))!important;box-sizing:border-box}
.safari-full-bleed [data-safari-nav]{top:12px!important;margin:0 12px;border-radius:14px}
/* Full-screen scenes must paint into Safari toolbar pockets; their own frames clip media. */
.safari-full-bleed body:has([data-screen-label="Catálogo"],.stage,#gl){overflow:visible}
.safari-full-bleed [data-screen-label="Catálogo"],
.safari-full-bleed [data-catalog-column]{position:absolute!important;inset:0 auto auto 0!important;width:100%!important;height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important;border-radius:0!important}
.safari-full-bleed [data-catalog-nav]{padding-top:calc(max(14px,env(safe-area-inset-top,0px)) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-acts]{top:calc(clamp(96px,18%,170px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-catalog-caption]{bottom:var(--safari-bottom-bleed)!important}
/* Pinned scenes keep their artwork above the browser edge, with the copy in the safe area. */
.safari-full-bleed [data-stack],
.safari-full-bleed [data-journey]>div,
.safari-full-bleed [data-b-st]>div,
.safari-full-bleed [data-b-test]>div{
  position:relative!important;top:0!important;translate:none;transform:translateY(var(--safari-pin-shift,0px));
  height:calc(100svh + var(--safari-top-bleed) + var(--safari-scene-bleed))!important;
}
.safari-full-bleed [data-stack-copy]{padding-top:calc(clamp(20px,3vw,40px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-journey]>div{padding-top:calc(clamp(60px,8vh,90px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-b-test]>div{padding-top:calc(clamp(70px,10vh,110px) + var(--safari-top-bleed))!important}
.safari-full-bleed [data-st-ph],.safari-full-bleed [data-st-b]{top:calc(50svh + var(--safari-top-bleed))!important}
.safari-full-bleed #gl,.safari-full-bleed .vig,.safari-full-bleed .grain,
.safari-full-bleed .stage,.safari-full-bleed .fog,
.safari-full-bleed body[data-safari-map="3d"] .ov{
  position:absolute!important;inset:0 auto auto 0!important;
  width:100%!important;height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important;
}
.safari-full-bleed .load{position:absolute!important;inset:0 auto auto 0!important;width:100%!important;height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important}

/* Keep full-width backgrounds throughout section transitions. Inner artwork still animates. */
.safari-full-bleed section[data-screen-label],
.safari-full-bleed footer[data-screen-label]{clip-path:none!important;transform:none!important}
/* Keep the controls anchored without viewport-fixed layers triggering Safari's flat tint. */
.safari-full-bleed header[data-safari-float],
.safari-full-bleed [data-safari-float]{position:absolute!important;top:var(--safari-float-top)!important;bottom:auto!important}

.safari-full-bleed [data-safari-overlay][data-safari-float]{top:calc(var(--safari-float-top) - var(--safari-top-bleed))!important;height:calc(100dvh + var(--safari-top-bleed) + var(--safari-bottom-bleed))!important}
.safari-full-bleed aside[data-safari-overlay]{padding-top:calc(clamp(18px,2.2vw,28px) + var(--safari-top-bleed))!important;padding-bottom:calc(clamp(18px,2.2vw,28px) + var(--safari-bottom-bleed))!important}

/* Use the transform matrix rather than the individual translate property:
   Safari otherwise mispaints nested blurred text while the scene is pinned.
   Native scroll timelines keep artwork in sync with Safari's compositor.
   Scene geometry is measured only when layout changes, never on every scroll frame. */
@keyframes safari-pin-scroll{from{transform:translateY(0)}to{transform:translateY(var(--safari-pin-limit))}}
.safari-native-scroll [data-safari-pin]{
  translate:none;
  animation:safari-pin-scroll 1s linear both;
  animation-timeline:scroll(root block);
  animation-range:var(--safari-pin-start) var(--safari-pin-end);
}

.safari-full-bleed aside[data-safari-overlay][aria-hidden="true"]{height:0!important;padding-top:0!important;padding-bottom:0!important;overflow:clip}
/* Safari samples the canvas beyond the document when it reaches the footer. */
html.safari-full-bleed[data-safari-footer-active],
.safari-full-bleed[data-safari-footer-active] body{background-color:var(--safari-footer-color)!important}

/* The footer keeps its own navigation and contact links; floating actions stay outside. */
html[data-footer-actions-hidden] [aria-label="Volver arriba"],
html[data-footer-actions-hidden] [data-safari-chat],
html[data-footer-actions-hidden] [data-b-cta]{visibility:hidden!important;pointer-events:none!important}


/* The visual surfaces animate while their Safari overscan frames stay in place. */
@media(hover:none) and (pointer:coarse){
 [aria-label="Volver arriba"],[aria-label="Contactar por WhatsApp"],[data-b-cta]{transform:none!important;transition:background-color .15s,color .15s,opacity .3s!important}
 [data-h-title]{font-size:clamp(48px,16vw,64px)!important}
 [data-big]>div:not([data-big-img]){font-size:clamp(30px,9vw,46px)!important}
 [data-st-a]{bottom:100px!important}
 [data-j-step]{width:40%!important;max-width:40%!important}
 [data-j-step="0"]{left:25%!important;top:20%!important}
 [data-j-step="1"]{left:75%!important;top:20%!important}
 [data-j-step="2"]{left:75%!important;top:80%!important}
 [data-j-step="3"]{left:25%!important;top:80%!important}
 [data-stack-copy] h3{font-size:clamp(34px,9vw,52px)!important}
 [data-stack-in]>span{font-size:40px!important}
 [data-stack-copy] p{font-size:13px!important;line-height:1.45!important}
 [data-stack-copy] h4{font-size:28px!important}
 [data-stack-copy]>div:last-child{gap:12px!important;padding-bottom:24px}
}

/* Keep Safari from zooming the page when a mobile form receives focus. */
@media(max-width:760px){input,select,textarea{font-size:16px!important}}

/* Reserve dialogs share the catalogue frame, with actions in the visible safe area. */
.safari-full-bleed [data-catalog-book]{padding-top:calc(16px + var(--safari-top-bleed))!important;padding-bottom:calc(16px + var(--safari-bottom-bleed))!important;box-sizing:border-box}

.safari-full-bleed [data-safari-overlay][role="dialog"]{box-sizing:border-box;padding-top:calc(12px + var(--safari-top-bleed))!important;padding-bottom:calc(12px + var(--safari-bottom-bleed))!important}

/* Stable artwork behind the lower toolbar; copy retains its original visible height. */
.safari-full-bleed [data-hero]{padding-bottom:calc(clamp(16px,2.2vw,28px) + var(--safari-scene-bleed))!important}
.safari-full-bleed [data-stack-copy]{padding-bottom:calc(clamp(20px,3vw,40px) + var(--safari-scene-bleed))!important}
.safari-full-bleed [data-b-name]{bottom:calc(clamp(20px,4vh,48px) + var(--safari-scene-bleed))!important}
.safari-full-bleed [data-b-hero]>span[data-b-in]{bottom:calc(clamp(28px,5vh,56px) + var(--safari-scene-bleed))!important}
.safari-full-bleed [data-journey]>div,.safari-full-bleed [data-b-test]>div{padding-bottom:var(--safari-scene-bleed)!important;box-sizing:border-box}
.safari-full-bleed [data-screen-label="404"]{min-height:calc(100svh + var(--safari-top-bleed) + var(--safari-scene-bleed))!important;padding-bottom:calc(clamp(16px,2.2vw,28px) + var(--safari-scene-bleed))!important}
@media(max-width:640px){.safari-full-bleed [data-b-photo]{height:calc(82svh + var(--safari-scene-bleed))!important}}
