/* Homepage-only visual repair and progressive directional journey. */

main[data-home-journey] .home-hero__logo-frame,
.home-journey-transition-clone .home-hero__logo-frame {
  aspect-ratio: 1342 / 1172;
  max-height: none;
  background: var(--surface-strong);
}

main[data-home-journey] .home-hero__logo-frame img,
.home-journey-transition-clone .home-hero__logo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

main[data-home-journey] [data-home-journey-section] {
  scroll-margin-top: clamp(5.5rem, 10vh, 7.5rem);
}

.home-journey-transition-stage {
  position: fixed;
  inset: 0;
  z-index: 1999;
  margin: 0;
  overflow: hidden;
  pointer-events: auto;
  background: var(--bg);
  contain: strict;
  isolation: isolate;
}

.home-journey-transition-layer {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  contain: layout paint style;
  will-change: transform;
  backface-visibility: hidden;
}

.home-journey-transition-content {
  position: absolute;
  left: 0;
  /* Width is captured from the real section, excluding the scrollbar gutter. */
  margin: 0;
  pointer-events: none;
}

.home-journey-transition-clone {
  width: 100%;
  max-width: 100%;
  margin: 0;
  pointer-events: none;
}

.home-journey-transition-poster {
  display: block;
}

.home-journey-transition-clone,
.home-journey-transition-clone * {
  animation: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-journey-transition-stage {
    display: none !important;
  }
}
