/* The iPhone renders: the app's real screens on a studio photo of the phone, baked on the
   page's own black. Video has no alpha and the figure's scroll transform isolates any blend, so
   the edges are feathered instead: the stage fades out where the phone begins, never at a box.
   The stops sit just outside the phone: 8% and 92% across, 3% and 97% down. */
.studio-phone {
  --feather-x: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  --feather-y: linear-gradient(transparent, #000 3%, #000 96%, transparent);
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-mask-image: var(--feather-x), var(--feather-y);
  -webkit-mask-composite: source-in;
  mask-image: var(--feather-x), var(--feather-y);
  mask-composite: intersect;
}

/* Side A's first figure: a recording of the iPhone app, a mix shared to Spiral and opened in
   Want, on the phone render. share-video.js plays it on screen. */
.scene-figure {
  position: relative;
}

.scene-figure .studio-phone {
  width: auto;
  height: min(72svh, 700px);
}

/* The pause control hangs under the phone, so showing it moves nothing. */
.scene-figure .motion-toggle {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
}

/* Portrait: the phone takes the band above the copy, however tall the copy wraps, and the pause
   control stands beside it. */
@media (max-width: 760px), (max-aspect-ratio: 9/10) {
  .scene-figured .scene-pin {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .scene-figured .scene-copy {
    grid-row: 2;
    padding-top: var(--space-4);
    background: linear-gradient(transparent, var(--surface) var(--space-4));
  }
  .scene-figure {
    align-self: stretch;
    justify-self: stretch;
    min-height: 0;
  }
  .scene-figure .studio-phone {
    height: min(100%, 560px);
    margin: 0 auto;
    object-fit: contain;
  }
  .scene-figure .motion-toggle {
    top: auto;
    bottom: 0;
    right: 0;
    left: auto;
    translate: none;
  }
}
