/* -- Gallery section --------------------------------------- */
.gallery {
  background: var(--dark);
  border-top: 1px solid var(--mid);
  padding: 6rem 5rem;
}

.gallery-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.gallery-header {
  margin-bottom: 3.5rem;
}

/* -- Grid -------------------------------------------------- */
.gallery-grid {
  --gallery-gap: 1.25rem;
  --gallery-columns: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gallery-gap);
  list-style: none;
}

.gallery-item {
  position: relative;
  flex: none;
  width: calc((100% - (var(--gallery-columns) - 1) * var(--gallery-gap)) / var(--gallery-columns) - 0.1px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--mid);
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--filter-editorial);
  transition: filter var(--t-base), transform 4s ease;
}

.gallery-item:hover .gallery-img,
.gallery-item:focus-within .gallery-img {
  filter: var(--filter-editorial-hover);
  transform: scale(1.03);
}

.gallery-item .lb-trigger:focus-visible {
  outline: 2px solid var(--off-white);
  outline-offset: -4px;
}

/* -- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .gallery {
    padding: 5rem 1.25rem;
  }

  .gallery-header {
    margin-bottom: 2.5rem;
    padding: 0 0.75rem;
  }

  .gallery-grid {
    --gallery-gap: 0.625rem;
    --gallery-columns: 2;
  }
}
