/* The image determines the width of the poster; the row sets its height. */
.poster-reel .poster-slide {
  width: calc(var(--poster-height) * var(--poster-ratio));
}
.poster-reel .poster-art {
  display: block;
  width: 100%;
  height: var(--poster-height);
  aspect-ratio: auto;
  background: transparent;
}
.poster-reel .poster-art img,
.work-card-grid[data-work-type="posters"] .work-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.work-card-grid[data-work-type="posters"] {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(28px, 3vw, 50px) clamp(12px, 1.35vw, 22px);
  container-type: inline-size;
}
.work-card-grid[data-work-type="posters"] > .work-card {
  /* The widest artwork is slightly wider than 2:1. Keeping a common height
     leaves it an entire row on a phone without making it smaller than its peers. */
  --row-height: min(38cqw, 470px);
  flex: 0 0 auto;
  width: min(100%, calc(var(--row-height) * var(--poster-ratio)));
}
.work-card-grid[data-work-type="posters"] .work-card-art {
  display: block;
  width: 100%;
  height: var(--row-height);
  aspect-ratio: auto;
  background: transparent;
}
@media (max-width: 600px) {
  .poster-reel { --poster-height: min(41vh, 335px, 48vw); }
  .work-card-grid[data-work-type="posters"] > .work-card { --row-height: 49cqw; }
}
