/* Only the corner controls sit over the scroll films. The header takes no space. */
#navigation, body[data-mobile-medtech] .mast.mast-overlay,
body[data-mobile-medtech] .mast.mast-overlay .mast-inner {
  display: contents;
}
#navigation .wordmark, .mast.mast-overlay a.hero-lockup {
  position: fixed;
  z-index: 49;
  top: max(clamp(20px, 2.8vw, 37px), env(safe-area-inset-top));
  left: max(clamp(18px, 4.5vw, 82px), env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 44px;
  margin: 0;
  background: transparent;
  color: white;
  mix-blend-mode: difference;
  transition: opacity 180ms ease, visibility 0s;
}
html[data-brand-scrolled] :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s, 180ms;
}
@media (prefers-reduced-motion: reduce) {
  :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup) { transition: none; }
}
html[data-brand-film] :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup) {
  mix-blend-mode: normal;
  color: #faf8f1;
  filter: drop-shadow(0 1px 2px rgb(12 22 19 / 70%));
}
html[data-brand-film="light"] :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup) {
  color: #10231c;
  filter: drop-shadow(0 1px 2px rgb(255 252 242 / 70%));
}
#menu-toggle, .mast.mast-overlay .home-menu-toggle {
  position: fixed;
  z-index: 50;
  right: max(22px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
}
.film-image > .direct-film-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover; object-position: var(--desktop-focus, 50%) 50%;
  z-index: 1; pointer-events: none;
}
.film-image > .direct-film-frame[hidden] { display: none; }
.farm .film-image > .direct-film-frame { object-position: center; }
.film-image > video:not([src]) { visibility: hidden; }
.motion .hero.film-scroll-ready { --travel: clamp(3600px,570svh,6500px); }
@media (min-width: 761px) {
  .hero[data-chapter="1"] .stage-copy { top: max(80px, calc(2.8vw + 52px)); }
}
@media (max-width: 767px) {
  #navigation .wordmark, .mast.mast-overlay a.hero-lockup {
    top: max(12px, env(safe-area-inset-top)); left: max(18px, env(safe-area-inset-left));
  }
  :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup)::before {
    content: ''; display: block; width: 77px; height: 20px; background: currentColor;
    -webkit-mask: url('/assets/brand/u3d-logo-white.png') center / contain no-repeat;
    mask: url('/assets/brand/u3d-logo-white.png') center / contain no-repeat;
  }
  :is(#navigation .wordmark, .mast.mast-overlay a.hero-lockup) > * { display: none; }
  #menu-toggle, .mast.mast-overlay .home-menu-toggle {
    width: 45px; height: 45px;
    top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  }
  .motion .hero.film-scroll-ready { --travel: clamp(2600px,440svh,4800px); }
  .mobile-opening.film-scroll-ready { --mobile-travel: clamp(2600px,440svh,4800px); }
}
@media (max-width:760px) and (orientation:portrait) {
  .hero .film-image > .direct-film-frame { object-position: var(--phone-focus,38%) center; }
}

/* Keep the desktop Medical opening full bleed on tall laptop windows as well as widescreen. */
@media (min-width:1024px) {
  .opening .opening-image { height: 100vh; height: 100svh; max-height: none; aspect-ratio: auto; }
}
