.hero-screen-lineup {
  container-type: inline-size;
}

.hero-screen-lineup > .hero-screen-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Use the same contain box for the photograph and the projected e-ink frames. */
.minimal-site .sales-hero .rotation-stage[data-product-size] .hero-screen-lineup {
  position: relative;
  width: min(100%, 360px);
  height: min(68svh, 660px);
  aspect-ratio: auto;
  min-height: 0;
  overflow: visible;
}

.minimal-site .sales-hero .rotation-stage[data-product-size] .hero-screen-lineup > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.hero-screen-enter {
  animation: hero-screen-fade 360ms ease-out both;
}

@keyframes hero-screen-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
  .minimal-site .sales-hero .rotation-stage[data-product-size] .hero-screen-lineup {
    width: min(100%, 310px);
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-screen-enter { animation: none; }
}

/* Pin the same opening composition for the reference site's scroll distance. */
@media (prefers-reduced-motion: no-preference) {
  .minimal-site .sales-hero.rotation-page[data-turn-ready] {
    height: calc(185svh - var(--s4-nav));
    min-height: 0;
    overflow: visible;
  }
  .minimal-site .sales-hero[data-turn-ready] .rotation-stage {
    position: sticky;
    top: var(--s4-nav);
    height: calc(100svh - var(--s4-nav));
    min-height: 0;
  }
}
.hero-turn-model {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: var(--model-mix, 0);
}
.hero-turn-model canvas { display: block; width: 100%; height: 100%; }
.hero-screen-lineup > :is(img, .hero-screen-overlay) { opacity: calc(1 - var(--model-mix, 0)); }
