/* Editorial motion layer. Static layout remains fully usable without JavaScript. */
html.is-opening,
html.is-opening body {
  overflow: hidden;
}

.opening-screen {
  position: fixed;
  z-index: calc(var(--z-skip-link) + 100);
  inset: 0;
  display: none;
  place-items: center;
  overflow: hidden;
  color: var(--color-text-on-accent);
  pointer-events: none;
  isolation: isolate;
}

.js-enabled:not(.motion-fallback) .opening-screen {
  display: grid;
}

.js-enabled.motion-complete .opening-screen,
.js-enabled.motion-fallback .opening-screen {
  display: none;
}

.opening-screen__panel {
  position: absolute;
  z-index: -1;
  right: 0;
  left: 0;
  height: 50.1%;
  background: var(--color-accent);
}

.opening-screen__panel--top {
  top: 0;
  transform-origin: center top;
}

.opening-screen__panel--bottom {
  bottom: 0;
  transform-origin: center bottom;
}

.opening-screen__content {
  width: min(calc(100% - (var(--grid-margin-mobile) * 2)), var(--content-max-width));
}

.opening-screen__eyebrow {
  margin-bottom: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: 600;
  line-height: var(--leading-caption);
  letter-spacing: 0.24em;
  opacity: 0.76;
}

.opening-screen__wordmark {
  overflow: hidden;
  font-family: var(--font-body);
  font-size: clamp(3.6rem, 10.8vw, 10.5rem);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: -0.075em;
}

.opening-screen__wordmark span {
  display: block;
}

.opening-screen__progress {
  width: 100%;
  height: var(--border-width);
  margin-top: var(--space-10);
  overflow: hidden;
  background: rgba(var(--color-elevated-rgb), 0.22);
}

.opening-screen__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-text-on-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.section-title-en {
  grid-column: 1 / -1;
  min-width: 0;
  margin-bottom: var(--space-10);
  overflow: hidden;
  color: rgba(var(--color-accent-rgb), 0.035);
  font-family: var(--font-body);
  font-size: clamp(3.05rem, 10.4vw, 9.25rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.072em;
  white-space: nowrap;
  -webkit-text-stroke: var(--border-width) rgba(var(--color-accent-rgb), 0.28);
  text-transform: uppercase;
}

.section-title-en--wide {
  font-size: clamp(2.35rem, 8.7vw, 7.75rem);
}

.section-title-en span {
  display: block;
  transform-origin: left center;
}

.motion-enhanced .stroke-text__stroke [data-stroke-char],
.motion-enhanced .stroke-text__wipe {
  animation: none;
}

.motion-enhanced .stroke-text__stroke [data-stroke-char] {
  stroke-dashoffset: 720;
}

.motion-enhanced .stroke-text__wipe {
  transform: scaleX(0);
}

/* When the opening is intentionally skipped, force the name into the
   timeline's completed state instead of inheriting its hidden start frame. */
.motion-enhanced.motion-complete .stroke-text__stroke [data-stroke-char] {
  stroke-dashoffset: 0;
}

.motion-enhanced.motion-complete .stroke-text__wipe {
  transform: scaleX(1);
}

.motion-enhanced .hero__portrait,
.motion-enhanced .hospital-card__exterior,
.motion-enhanced .media-frame {
  backface-visibility: hidden;
}

@media (min-width: 48rem) {
  .opening-screen__content {
    width: min(calc(100% - (var(--grid-margin-tablet) * 2)), var(--content-max-width));
  }

  .section-title-en {
    margin-bottom: var(--space-12);
  }
}

@media (min-width: 64rem) {
  .opening-screen__content {
    width: min(calc(100% - (var(--grid-margin-laptop) * 2)), var(--content-max-width));
  }
}

@media (min-width: 80rem) {
  .opening-screen__content {
    width: min(calc(100% - (var(--grid-margin-desktop) * 2)), var(--content-max-width));
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-opening,
  html.is-opening body {
    overflow: auto;
  }

  .js-enabled .opening-screen {
    display: none;
  }

  .section-title-en span,
  .motion-enhanced .stroke-text__wipe {
    transform: none;
  }

  .motion-enhanced .stroke-text__stroke [data-stroke-char] {
    stroke-dashoffset: 0;
  }
}
