/* entrance.css
   Purpose: the first-screen scene set up by entrance.js: pinned hero, push-in on the reception sign, film of the letters.
   NOT for: the curtain's dimming (motion.css) or "Step inside" (walkthrough.css).
   WHY large viewport units: on iPhone the toolbars collapse while scrolling. A 100svh hero would leave a pale strip
   under the pinned picture, so the picture fills 100lvh and the padding keeps the text inside the small viewport.
   WHY a media query and not a class from JS: the layout must be final at first paint. A class added by a deferred
   script moved the intro card off screen after it was drawn (CLS 0.41 in Lighthouse). Without JS (scripting:none)
   or with reduced motion none of this applies; entrance.js adds html.no-entrance for data saver and old browsers. */
.entrance-track,.hero-seq{display:none}

@media(prefers-reduced-motion:no-preference) and (scripting:enabled){
  html:not(.no-entrance) .curtain .hero{position:sticky;top:var(--hero-top,0px);min-height:100vh;min-height:100lvh;padding-bottom:calc(72px + 100lvh - 100svh)}
  /* Scroll length is the scene's duration: almost two screens of push-in and crossfade, then one of orbit.
     --fx/--fy/--fs keep the film on the photo's sign during the crossfade (entrance.js); --eb is the photo's exposure. */
  html:not(.no-entrance) .entrance-track{display:block;height:300vh;height:300svh}
  html:not(.no-entrance) .hero-seq{display:block;position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;pointer-events:none;opacity:var(--seq,0);transform:translate3d(var(--fx,0px),var(--fy,0px),0) scale(calc(var(--fs,1)*(1 + var(--hp,0)*.08)))}
  html:not(.no-entrance) .curtain .hero-photo{transform:translate3d(var(--ex,0px),var(--ey,0px),0) scale(var(--ez,1));filter:brightness(var(--eb,1));will-change:transform}
  html:not(.no-entrance) .curtain .hero-scrim{opacity:calc(1 - var(--text,0))}
  html:not(.no-entrance) .curtain .hero-content{opacity:calc(1 - var(--text,0));transform:translateY(calc(var(--text,0)*-56px))}
  /* Faded links must not catch taps: a tap to stop the scroll would otherwise dial the office. */
  html:not(.no-entrance) .curtain .hero-content.is-out{pointer-events:none}
  /* A keyboard user tabbing to a hero link must see it, wherever the scene is, with its dark backing. focus-visible,
     not focus-within: Chrome also focuses a link on a click or tap, and the faded links would then stay for good. */
  html:not(.no-entrance) .curtain .hero-content:has(:focus-visible){opacity:1;transform:none;pointer-events:auto}
  html:not(.no-entrance) .curtain .hero:has(:focus-visible) .hero-scrim{opacity:1}
}
@media(prefers-reduced-motion:no-preference) and (scripting:enabled) and (max-width:900px){
  html:not(.no-entrance) .curtain .hero{padding-bottom:calc(44px + 100lvh - 100svh)}
}
