/* Round the corners surrounded by the mat. Edges cropped by the mat stay straight. */
.shot-crop {
  --shot-x: 12%; --shot-y: 10%;
  position: absolute; right: var(--shot-x); top: var(--shot-y);
  display: flex; justify-content: flex-end; align-items: flex-start;
  width: max-content; max-width: calc(100% - var(--shot-x));
  height: max-content; max-height: calc(100% - var(--shot-y));
  overflow: hidden; border-radius: 0 var(--work-image-radius) 0 0; box-shadow: 0 3px 12px rgb(22 20 35 / 12%);
}
.shot-crop img {
  display: block; flex: none; margin: 0; max-width: none; max-height: none;
  width: var(--shot-width, 90cqw); height: var(--shot-height, auto);
  border-radius: 0; box-shadow: none; transform-origin: var(--shot-origin, right top);
}
.story-shot:is(:first-of-type, :nth-of-type(3), :nth-of-type(4)) .shot-crop,
.gallery-case:nth-child(even) .shot-crop { right: auto; left: var(--shot-x); justify-content: flex-start; }
.story-shot:first-of-type .shot-crop {
  --shot-x: 10.25%; --shot-y: 5.5%; --shot-width: 79.75cqw;
  border-top-left-radius: var(--work-image-radius);
}
.story-shot:nth-of-type(3) .shot-crop, .gallery-case:nth-child(even) .shot-crop {
  --shot-x: 5%; --shot-width: 102cqw; --shot-origin: left bottom;
  top: auto; bottom: var(--shot-y); align-items: flex-end;
  border-radius: 0 0 0 var(--work-image-radius);
}
.story-shot:nth-of-type(4) .shot-crop {
  --shot-x: 39%; --shot-y: 0%; --shot-width: 80cqw;
  border-radius: 0;
}
.story-shot:nth-of-type(4) img { margin-top: -5cqh; }
.market-pulse-shot .shot-crop { --shot-y: 13%; --shot-width: 89.5cqw; }
.story-shot.insights-shot .shot-crop { --shot-width: auto; --shot-height: 96cqh; }
.story-shot.phone-shot .shot-crop { --shot-width: 69cqw; }
.story-shot.phone-shot img { outline: 0; }
.search-results-shot > :is(a, .record-window):not([data-shot-slot]):not([data-crop]) .shot-crop {
  inset: 0 0 10% 5%; width: auto; height: auto; max-width: none; max-height: none;
  border-radius: 0 0 0 var(--work-image-radius);
}
.search-results-desktop > :is(a, .record-window):not([data-shot-slot]):not([data-crop]) .shot-crop {
  inset: 13% 12% 0 0;
  border-radius: 0 var(--work-image-radius) 0 0;
}
.search-results-shot > :is(a, .record-window):not([data-shot-slot]):not([data-crop]) img {
  width: 100%; height: 100%; margin: 0; object-fit: cover; object-position: 50% 37%;
}
.search-results-desktop > :is(a, .record-window):not([data-shot-slot]):not([data-crop]) img {
  position: absolute; left: -41%; top: -115%; width: 300%; height: auto;
}

:is(.story-shot,.gallery-case) :is(a, .record-window)[data-crop="left"] .shot-crop { inset: 8% auto auto 5%; max-height: 92%; --shot-width: 110cqw; justify-content: flex-start; align-items: flex-start; border-radius: var(--work-image-radius) 0 0 0; }
:is(.story-shot,.gallery-case) :is(a, .record-window)[data-crop="right"] .shot-crop { inset: 8% 5% auto auto; max-height: 92%; --shot-width: 110cqw; justify-content: flex-end; align-items: flex-start; border-radius: 0 var(--work-image-radius) 0 0; }
:is(.story-shot,.gallery-case) :is(a, .record-window)[data-crop="center"] .shot-crop { inset: 6% 9% auto; width: 82%; max-width: 82%; max-height: 94%; justify-content: center; align-items: flex-start; --shot-width: 82cqw; border-radius: var(--work-image-radius) var(--work-image-radius) 0 0; }
:is(.story-shot,.gallery-case) :is(a, .record-window)[data-crop="phone"] .shot-crop { inset: 0 0 auto auto; width: 62%; max-width: 62%; max-height: 100%; --shot-width: 64cqw; border-radius: 0; }
:is(.story-shot,.gallery-case) :is(a, .record-window)[data-crop]:not([data-crop="auto"]) .shot-crop img { margin-top: 0; --shot-height: auto; }
.story-shot :is(a, .record-window)[data-shot-slot] .shot-crop img,.gallery-case :is(a, .record-window)[data-shot-slot] .shot-crop img { min-height:94cqh; object-fit:cover; object-position:center top; }
.story-shot:nth-of-type(3) :is(a, .record-window)[data-shot-slot] .shot-crop img,.gallery-case:nth-child(even) :is(a, .record-window)[data-shot-slot] .shot-crop img { object-position:center bottom; }

@media screen {
  .story-reel {
    --shot-gap: clamp(.75rem, 2.25vw, 2rem);
    display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--shot-gap);
  }
  .story-reel > .story-shot { flex: 0 0 calc((100% - 2 * var(--shot-gap)) / 3); min-width: 0; }
  .story-reel > .story-shot:first-of-type, .story-reel > :not(figure, .story-shot) { flex-basis: 100%; text-align: center; }
}
@media screen and (max-width: 700px) {
  .story-reel > .story-shot { flex-basis: 100%; }
}
@media screen and (min-width: 701px) {
  .story-reel:has(> .story-shot:nth-of-type(5)) > .story-shot:not(:first-of-type) {
    flex-basis: calc((100% - var(--shot-gap)) / 2);
  }
  .story-reel:has(> .story-shot:nth-of-type(5)) > .story-shot:nth-of-type(3) {
    margin-block-start: clamp(.875rem, 1.6vw, 1.375rem);
  }
  .story-reel:has(> .story-shot:nth-of-type(5)) > .story-shot:nth-of-type(4) {
    margin-block-start: clamp(.625rem, 1vw, 1rem);
  }
}
