.reference-grid--with-video {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.9fr);
}

.reference-video {
  position: relative;
  grid-column: 4;
  grid-row: 1 / span 2;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--ink-soft);
}

.reference-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ink);
}

.reference-video figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 900px) {
  .reference-grid--with-video {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-video {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    width: min(100%, 22rem);
    aspect-ratio: 9 / 16;
  }
}
