.hero-art.real-shot {
  min-height: 980px;
  overflow-x: clip;
}

.product-stage {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(520px, 100%);
}

.screen-stack {
  position: relative;
  width: min(400px, 82vw);
  aspect-ratio: 1206 / 2622;
}

.product-screen {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 8px solid #15171b;
  border-radius: 62px;
  background: #15171b;
  box-shadow: 0 38px 90px rgb(31 53 82 / 24%);
  opacity: 0;
  transform: translateX(-12%) scale(0.985);
  transition:
    opacity 950ms ease,
    transform 950ms cubic-bezier(0.2, 0.72, 0.2, 1),
    box-shadow 950ms ease;
  pointer-events: none;
  backface-visibility: hidden;
}

.product-screen.is-active {
  z-index: 1;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.product-screen.is-next {
  z-index: 0;
  opacity: 0.3;
  transform: translateX(88%) scale(0.9);
  box-shadow: 0 24px 60px rgb(31 53 82 / 14%);
}

.product-screen picture,
.product-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.screen-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: min(440px, 92vw);
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  box-shadow: 0 18px 50px rgb(31 53 82 / 14%);
  backdrop-filter: blur(24px) saturate(180%);
}

.screen-switcher button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.screen-switcher button[aria-pressed="true"] {
  color: var(--on-blue, #fff);
  background: var(--blue);
  box-shadow: 0 7px 18px rgb(6 117 232 / 28%);
}

.screen-switcher button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.rotation-control {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--blue);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.rotation-control:hover {
  background: color-mix(in srgb, var(--blue-soft) 70%, transparent);
}

.rotation-control:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.preview-status {
  max-width: 32rem;
  min-height: 22px;
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.build-note {
  position: absolute;
  z-index: 5;
  bottom: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chapter-visual.app-screen {
  min-height: 720px;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
}

.app-screen picture {
  display: block;
  width: min(320px, 100%);
  transform: translate3d(0, var(--screen-y, 0px), 0);
  transform-origin: center;
  will-change: transform;
}

.app-screen img {
  display: block;
  width: 100%;
  height: auto;
  border: 7px solid #15171b;
  border-radius: 52px;
  background: #15171b;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34) inset,
    0 26px 62px rgba(31, 53, 82, 0.16);
}

.learning-feature {
  border-color: color-mix(in srgb, var(--blue) 24%, transparent);
  background: linear-gradient(
    145deg,
    var(--solid),
    color-mix(in srgb, var(--blue-soft) 42%, var(--solid))
  );
}
.learning-feature .app-screen picture {
  width: min(360px, 100%);
}

@media (max-width: 850px) {
  .hero > * {
    min-width: 0;
  }

  .hero-art.real-shot {
    min-height: 940px;
  }
  .chapter-visual.app-screen {
    min-height: 690px;
  }
}

@media (max-width: 430px) {
  .hero h1 {
    font-size: clamp(46px, 13vw, 56px);
    letter-spacing: -0.055em;
  }

  .hero-art.real-shot {
    min-height: 860px;
  }
  .screen-stack {
    width: min(360px, 90vw);
  }
  .product-screen {
    border-width: 7px;
    border-radius: 54px;
  }
  .screen-switcher {
    gap: 2px;
  }
  .screen-switcher button {
    min-height: 44px;
    padding-inline: 7px;
    font-size: 14px;
  }
  .chapter-visual.app-screen {
    min-height: 620px;
  }
  .app-screen picture,
  .learning-feature .app-screen picture {
    width: min(280px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rotation-control {
    display: none;
  }
  .product-screen {
    transition: none;
  }
  .product-screen.is-active {
    transform: none;
  }
  .app-screen picture {
    transform: none;
  }
}
