/* Let the next section remain visible beneath viewport-height photographs. */
.opening,
html.cinematic .opening,
.opening-stage,
html.cinematic .opening-stage {
  min-height: min(var(--report-hero-height), max(30rem, calc(100svh - 20px)));
}
.hero-photo,
.hero-photo img {
  height: min(var(--report-hero-height), max(30rem, calc(100svh - 20px)));
}

/* Cap full-width scenes; paired portraits and the photo grid keep their frames. */
.scene:not(.fundraising):not(.portrait):not(.invitation) > .scene-visual > img[data-report-photo]:not([data-report-photo="20"]):not([data-report-photo="21"]),
.testimony .reflection-sequence .scene-visual > img[data-report-photo] {
  max-height: calc(100svh - 20px);
}

@media (min-width: 64.001rem) {
  .scene.voice[data-source-panel="9"] .scene-visual {
    max-width: none;
  }

  .scene.voice[data-source-panel="9"] .scene-visual > img[data-report-photo="22"] {
    min-height: 100%;
    object-position: 60% 61.7052%;
  }

  .scene.voice[data-source-panel="9"] > .reading {
    align-self: stretch;
    width: min(35rem, 45%);
    display: grid;
    align-content: center;
    margin-block: 0;
  }

  .textile .reflection-sequence .scene-visual,
  html.cinematic .textile .reflection-sequence .scene-visual {
    height: calc(100svh - 20px);
  }
  .textile .reflection-sequence .scene-visual > img[data-report-photo] {
    height: 100%;
  }

  /* A small additional crop in the invitation's existing right-hand frame. */
  .invitation .scene-visual > img[data-report-photo="28"] {
    transform: scale(1.06);
    transform-origin: 42% center;
  }
}

/* The requested panoramic group crop keeps every person in the photograph. */
.closing-photo img[data-report-photo="29"] {
  height: auto;
  max-height: none;
  aspect-ratio: 6240 / 2100;
  object-fit: contain;
  margin: 0;
}

.scene.photo-heading[data-source-panel="4"] .scene-title {
  color: var(--paper) !important;
}

/* Reveal the rightmost part of Local Spending within its accepted frame. */
.textile .reflection-sequence .scene-visual > img[data-report-photo="8"] {
  object-position: right center;
  transform: scale(1.125);
  transform-origin: right center;
  /* Clip the enlarged photograph back to its unchanged frame. */
  clip-path: inset(5.555556% 0 5.555556% 11.111111%);
}

@media (max-width: 40rem) and (orientation: portrait),
       (max-width: 60rem) and (max-height: 31rem) and (orientation: landscape),
       (max-device-width: 45rem) and (any-pointer: coarse) and (orientation: portrait),
       (max-device-width: 64rem) and (max-device-height: 31rem) and (any-pointer: coarse) and (orientation: landscape) {
  .textile .reflection-sequence .scene-visual > img[data-report-photo="8"] {
    --embroidery-zoom: 1.3;
    --embroidery-inset: calc(100% - 100% / var(--embroidery-zoom));
    object-position: right bottom;
    transform: scale(var(--embroidery-zoom));
    transform-origin: right bottom;
    clip-path: inset(var(--embroidery-inset) 0 0 var(--embroidery-inset));
  }
}

/* Carry the existing stitch through the pause above Local Spending. */
.scene.textile {
  padding-top: 60px;
  background-color: var(--forest);
}
