.gallery-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 18%, rgba(100, 77, 40, 0.08) 0 1px, transparent 1.4px),
    radial-gradient(circle at 73% 62%, rgba(100, 77, 40, 0.06) 0 1px, transparent 1.4px),
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(56, 38, 17, 0.05)),
    var(--paper);
  background-size: 9px 9px, 13px 13px, auto, auto;
}

.gallery-site-header .nav-group a.active::after {
  transform: scaleX(1);
}

.gallery-index-intro,
.gallery-hero,
.gallery-index-section,
.photo-section,
.gallery-request-band {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.gallery-index-intro,
.gallery-hero {
  padding: clamp(3.2rem, 7vw, 6.5rem) 0 clamp(2.4rem, 5vw, 4.5rem);
}

.gallery-index-intro h1,
.gallery-hero h1 {
  max-width: 930px;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 0.98;
}

.gallery-index-intro > p:last-child,
.gallery-hero > p:last-child {
  max-width: 760px;
  margin: 1.2rem 0 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.gallery-index-section,
.photo-section {
  padding: 0 0 clamp(3rem, 6vw, 5.5rem);
}

.gallery-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  position: relative;
  display: block;
  min-height: 410px;
  overflow: hidden;
  color: var(--paper-light);
  background: var(--navy-deep);
  border: 1px solid #8d7755;
  border-radius: var(--radius);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(4, 26, 43, 0.96));
}

.gallery-card img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.025);
}

.gallery-card-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
}

.gallery-card-copy strong {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.06;
}

.gallery-card-copy > span:last-child,
.gallery-card-meta {
  font-size: 0.78rem;
}

.gallery-card-meta {
  color: #d9bd82;
  font-weight: 700;
  text-transform: uppercase;
}

.gallery-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--brass);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gallery-support {
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
  padding: 1rem max(1rem, calc((100% - var(--max)) / 2));
  color: var(--paper-light);
  background: var(--navy);
  border-top: 2px solid #92713b;
  border-bottom: 2px solid #92713b;
}

.gallery-support strong,
.gallery-support p {
  display: block;
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.gallery-support strong {
  font-size: 1.05rem;
}

.gallery-support p {
  margin-top: 0.25rem;
  margin-bottom: 0;
  color: rgba(247, 240, 223, 0.82);
  font-size: 0.88rem;
}

.photo-section > .section-title-row > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.photo-grid {
  column-count: 4;
  column-gap: 0.65rem;
}

.photo-tile {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 0.65rem;
  overflow: hidden;
  padding: 0;
  background: var(--navy-deep);
  border: 1px solid #9c896a;
  border-radius: 4px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 180ms ease, opacity 180ms ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  transform: scale(1.02);
  opacity: 0.9;
}

.photo-tile > span {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  padding: 0.15rem 0.3rem;
  color: var(--paper-light);
  background: rgba(4, 31, 51, 0.78);
  font-size: 0.62rem;
  font-weight: 700;
}

.gallery-request-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-request-band h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.5rem);
}

.gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 1rem clamp(3.2rem, 7vw, 6rem);
  color: var(--paper-light);
  background: rgba(3, 19, 31, 0.97);
  border: 0;
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.gallery-lightbox::backdrop {
  background: rgba(3, 19, 31, 0.86);
}

.gallery-lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: calc(100vh - 2rem);
  margin: 0;
}

.gallery-lightbox figure > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.gallery-lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
  padding-top: 0.65rem;
  font-size: 0.78rem;
}

.gallery-lightbox figcaption strong {
  display: block;
  color: #d9bd82;
}

.lightbox-close,
.lightbox-arrow {
  z-index: 2;
  color: var(--paper-light);
  background: transparent;
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 2.1rem;
}

.lightbox-arrow {
  width: 44px;
  height: 44px;
  font-size: 2rem;
}

.lightbox-previous {
  margin-left: -3rem;
}

.lightbox-next {
  margin-right: -3rem;
}

.gallery-footer {
  margin-top: 0;
}

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

  .photo-grid {
    column-count: 3;
  }
}

@media (max-width: 560px) {
  .gallery-index-intro,
  .gallery-hero,
  .gallery-index-section,
  .photo-section,
  .gallery-request-band {
    width: min(100% - 1rem, var(--max));
  }

  .gallery-index-intro,
  .gallery-hero {
    padding: 2.2rem 0 2rem;
  }

  .gallery-index-intro h1,
  .gallery-hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.25rem);
  }

  .gallery-index-intro > p:last-child,
  .gallery-hero > p:last-child {
    line-height: 1.42;
  }

  .gallery-card-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card img {
    min-height: 340px;
  }

  .gallery-support {
    padding-block: 0.85rem;
  }

  .photo-grid {
    column-count: 2;
    column-gap: 0.45rem;
  }

  .photo-tile {
    margin-bottom: 0.45rem;
  }

  .gallery-request-band {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-request-band .button {
    width: 100%;
  }

  .gallery-lightbox {
    padding: 3.2rem 0.5rem 0.5rem;
  }

  .gallery-lightbox[open] {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox figure {
    height: calc(100vh - 3.7rem);
  }

  .gallery-lightbox figcaption {
    align-items: stretch;
    flex-direction: column;
    min-height: 110px;
  }

  .gallery-lightbox figcaption .button {
    width: 100%;
  }

  .lightbox-arrow {
    position: absolute;
    top: 45%;
    width: 42px;
    height: 52px;
    background: rgba(3, 19, 31, 0.64);
  }

  .lightbox-previous {
    left: 0;
    margin: 0;
  }

  .lightbox-next {
    right: 0;
    margin: 0;
  }
}
