/* Scroll expansion adapted for the Arquify demo: natural scroll, entire frame. */
.demo-expand {
  --demo-screen: 100vh;
  --demo-safe: 24px;
  --demo-stage: min(calc(var(--demo-screen) - var(--header)), calc(1200px * 9 / 16 + 48px), calc(78vw * 9 / 16 + 48px));
  --demo-scale: 1;
  --demo-lift: 0px;
  padding: 70px 0 0;
  background: #fff;
}
@supports (height: 100svh) {
  .demo-expand { --demo-screen: 100svh; }
}
.demo-expand > h2 { padding: 0 24px; }
.demo-scroll-track { margin-top: 24px; }
.demo-sticky {
  display: grid;
  place-items: center;
  padding: var(--demo-safe);
}
.demo-frame {
  width: min(88%, 1200px, calc((var(--demo-stage) - 2 * var(--demo-safe)) * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #fff;
  transform: translateY(var(--demo-lift)) scale(var(--demo-scale));
  transform-origin: center;
}
.demo-expand .demo-loop, .demo-still {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.demo-still { display: none; }
.demo-expand.is-enhanced .demo-scroll-track {
  height: calc(var(--demo-stage) + 72px);
}
.demo-expand.is-enhanced .demo-sticky {
  position: sticky;
  top: var(--header);
  height: var(--demo-stage);
}
.demo-expand.is-enhanced .demo-frame { will-change: transform; }
@media (max-width: 700px) {
  .demo-expand { --demo-safe: 12px; --demo-stage: min(calc(var(--demo-screen) - var(--header)), calc((100vw - 24px) * 9 / 16 + 48px)); padding-top: 50px; }
  .demo-expand > h2 { max-width: 390px; }
  .demo-frame { width: min(100%, calc((var(--demo-stage) - 2 * var(--demo-safe)) * 16 / 9)); }
  .demo-expand.is-enhanced .demo-scroll-track {
    height: calc(var(--demo-stage) + 48px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-expand.is-enhanced .demo-scroll-track { height: auto; }
  .demo-expand.is-enhanced .demo-sticky { position: static; height: auto; }
  .demo-expand .demo-frame { transform: none; will-change: auto; }
  .demo-expand .demo-loop { display: none; }
  .demo-still { display: block; }
}
