.gallery-v4 {
  padding-block: clamp(32px, 5.5vw, 76px) 28px;
  background: var(--white);
}

.gallery-v4-heading { margin-block-end: clamp(20px, 3.5vw, 40px); }
.gallery-v4-heading .eyebrow { margin-block-end: 11px; }
.gallery-v4-heading h2 { margin-block-end: 0; }
.gallery-v4-figure { width: 100%; margin: 0; }

.gallery-v4-stage {
  position: relative;
  overflow: hidden;
  height: clamp(300px, 50vw, 690px);
  background: #20242b;
}

.gallery-v4-stage .gallery-v4-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 2s ease, visibility 0s linear 2s;
}

.gallery-v4-stage .gallery-v4-image.is-current {
  opacity: 1;
  visibility: visible;
  transition: opacity 2s ease;
}

.gallery-v4-credits {
  display: grid;
  padding-block: 9px 12px;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.5;
  text-align: center;
}

.gallery-v4-credit { grid-area: 1 / 1; overflow-wrap: anywhere; }
.gallery-v4-credit[inert] { visibility: hidden; }
.gallery-v4-credit a { color: inherit; text-underline-offset: .2em; }

html:is([data-text-size="large"],[data-text-size="largest"]) .gallery-v4-credits { font-size: .86rem; }
html[data-contrast="true"] .gallery-v4-credits { color: var(--ink); }

@media (max-width: 640px) {
  .gallery-v4-stage { height: clamp(235px, 86vw, 405px); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-v4-stage .gallery-v4-image, .gallery-v4-stage .gallery-v4-image.is-current { transition: none; }
}
