/* Printed stills take their shape from the photograph. The sequence controls
   their scale and placement. Films retain their own stage choreography. */
.milk-pin > .study-surface > .study-red {
  width: auto;
  height: auto;
  max-width: 78vw;
  max-height: 78svh;
  justify-self: start;
  object-position: 50% 18%;
}
.study-motion .study-surface > .study-red {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.companion-surface,
.catalogue-lead-image {
  height: auto;
  aspect-ratio: auto;
  width: fit-content;
  max-width: 100%;
}
.companion-surface img,
.catalogue-lead-image img,
.catalogue-row img,
.window-layout figure img,
.window-right > figure:first-child img,
.mirror-arrival .mirror-collage figure:nth-child(n) img,
.closing-frame img,
.reading-hero figure img,
.reading-pair figure:nth-child(n) img,
.room-offer img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-position: 50% 18%;
}
.window-layout figure button { height: auto; }
.window-layout .window-inset img { height: auto !important; }
.companion-surface { width: 100%; }
.catalogue-lead-image img {
  width: auto;
  max-width: 100%;
  max-height: 78svh;
}
.catalogue-row img {
  width: auto;
  max-width: 100%;
  max-height: clamp(4rem, 8vw, 7rem);
  justify-self: end;
}
.red-companion { max-width: min(42vw, 35svh); }
.study-motion .red-companion { width: min(19vw, 22svh); }

.archive-results .archive-card .archive-cover,
.archive-results:not(.index-view) .archive-card:first-of-type .archive-cover {
  display: block;
  width: fit-content;
  max-width: 100%;
  height: auto;
  padding: 0;
  aspect-ratio: auto;
}
.archive-results .archive-card .archive-cover .archive-main,
.edition-opening .publication-cover img,
.publication-page .publication-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-position: 50% 18%;
}
.archive-results .archive-main { max-height: 78svh; }
.archive-results.index-view .archive-main { max-height: 9rem; }
.archive-results .archive-cover:hover .archive-main { transform: none; }
.edition-opening .publication-cover button,
.publication-page .publication-frame button {
  height: auto;
  width: fit-content;
  max-width: 100%;
}
.edition-opening .publication-cover button { margin-left: auto; }
.publication-page .publication-frame button { justify-self: start; }
.room-offer img { max-height: 62svh; width: auto; max-width: 100%; margin-inline: auto; }
#menu-photo .cover__inner img {
  position: absolute;
  inset: 50% 0 auto auto;
  transform: translateY(-50%);
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-position: 50% 18%;
}
.atrium-room img,
.atrium-print img,
.courtyard-portrait img,
.courtyard-scene img { object-position: 50% 18%; }

/* Keep the first large edition plate inside the reading area below the header. */
.publication-page .publication-frame img,
.publication-page .publication-frame:first-child img { max-height: 80svh; }

.atrium-pin .atrium-end { color: var(--paper); text-shadow: none; }
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .atrium-pin .atrium-end {
    top: 16%;
    left: var(--pad);
    bottom: auto;
    right: auto;
    text-align: left;
    isolation: isolate;
    text-shadow: 0 1px 8px #172318;
  }
  .atrium-end::before {
    content: "";
    position: absolute;
    inset: -14% -24%;
    z-index: -1;
    background: radial-gradient(ellipse, #19251be8 15%, #19251b99 45%, transparent 72%);
    pointer-events: none;
  }
}
@media (min-width: 701px) {
  .archive-results:not(.index-view) .archive-card:first-of-type {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(32px, 7vw, 100px);
  }
  .archive-results:not(.index-view) .archive-card:first-of-type[hidden] { display: none; }
  .archive-results:not(.index-view) .archive-card:first-of-type .archive-cover {
    grid-row: 1 / 5;
    justify-self: end;
  }
  .archive-results:not(.index-view) .archive-card:first-of-type .archive-title {
    margin: 0;
    align-self: end;
  }
  .archive-results:not(.index-view) .archive-card:first-of-type .archive-metadata {
    align-self: start;
  }
  .edition-opening .publication-cover figure { width: fit-content; max-width: 100%; margin-left: auto; }
}
@media (max-width: 700px) {
  .archive-results:not(.index-view) .archive-card:first-of-type { grid-column: 1 / -1; }
  #menu-photo .cover__inner img { top: 4%; transform: none; }
  .study-motion .red-companion { width: min(24vw, 13svh); }
  .edition-opening .publication-cover button { margin-left: 0; }
  .archive-results.index-view .archive-main { max-height: 7rem; }
  .mirror-arrival .mirror-collage { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .atrium-pin .atrium-room,
  .atrium-pin .atrium-print,
  .courtyard-pin .courtyard-scene,
  .courtyard-pin .courtyard-portrait {
    height: auto !important;
  }
  .atrium-room img, .atrium-print img, .courtyard-scene img, .courtyard-portrait img {
    height: auto;
  }
  .atrium-pin :is(.atrium-room,.atrium-print),
  .courtyard-pin .courtyard-portrait {
    width: fit-content !important;
    max-width: 100%;
  }
  .atrium-pin :is(.atrium-room,.atrium-print) img,
  .courtyard-pin .courtyard-portrait img {
    width: auto;
    max-width: 100%;
    max-height: 78svh;
  }
}
