.videos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}


.video {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-inline-size: 0;
}

.video__frame {
  display: block;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--color-forest-950);
}

/* A file video takes the shape of its poster (and later of the video itself), so
   portrait clips are not pillarboxed in a 16:9 box and small posters are not upscaled. */
video.video__frame {
  align-self: center;
  inline-size: auto;
  max-inline-size: 100%;
  block-size: auto;
  max-block-size: min(75vh, 36rem);
  aspect-ratio: auto 16 / 9;
}

/* Side by side, every file video gets the same square stage and is letterboxed inside it,
   so a landscape clip next to a portrait one leaves no ragged gap under the shorter tile. */
@media (min-width: 40rem) {
  .videos--multi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .videos--multi video.video__frame {
    align-self: stretch;
    inline-size: 100%;
    max-block-size: none;
    aspect-ratio: 1;
  }
}

.video__frame--portrait {
  aspect-ratio: 9 / 16;
  max-block-size: 85vh;
  inline-size: auto;
  max-inline-size: 100%;
  margin-inline: auto;
}

.video__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: background-color var(--duration-fast) ease;
}

.video__link:hover {
  background-color: var(--color-forest-800);
}

.video__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 4rem;
  block-size: 4rem;
  border: 1px solid var(--color-gold-400);
  border-radius: var(--radius-pill);
  color: var(--color-gold-300);
}

.video__caption {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
