.gallery-section {
  position: relative;
  padding: 104px 0;
  background: #f1efe8;
}
.gallery-anchor {
  position: absolute;
  top: 0;
}
.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 56px;
}
.gallery-heading .eyebrow {
  margin-top: 0;
}
.gallery-intro {
  margin: 0 0 3px;
  max-width: 390px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.7;
}
.gallery-notice {
  margin: 32px 0;
  padding: 18px 22px;
  border: 1px solid #d8d2c6;
  color: #5e5d55;
  font-size: 14px;
  line-height: 1.7;
}
.gallery-notice strong {
  color: var(--ink);
}
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-filter {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #cacbc4;
  background: transparent;
  color: var(--ink);
  border-radius: 2px;
  font-weight: 650;
  cursor: pointer;
}
.gallery-filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.gallery-filter:hover:not([aria-pressed="true"]) {
  background: #e6e4dc;
}
.gallery-count {
  flex-shrink: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}
.gallery-card {
  display: block;
  min-width: 0;
  background: white;
  border: 1px solid #d9dcd4;
}
.gallery-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #ddd9ce;
}
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}
.gallery-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 25px;
}
.gallery-card:hover .gallery-image img {
  transform: scale(1.025);
}
.gallery-card:focus-visible {
  outline-offset: 5px;
}
.gallery-caption {
  padding: 23px 25px 26px;
}
.gallery-kind {
  color: #806447;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gallery-caption h3 {
  margin: 12px 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 750;
}
.gallery-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.gallery-dialog {
  width: min(1200px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 0;
  background: #20241f;
  color: white;
  overflow: auto;
  overscroll-behavior: contain;
}
.gallery-dialog::backdrop {
  background: rgb(16 18 15 / 88%);
}
.gallery-dialog:not([open]) {
  display: none;
}
.gallery-dialog-inner {
  padding: 16px 22px 23px;
}
.gallery-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
}
.gallery-dialog-label {
  color: #d4c09f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gallery-close,
.gallery-prev,
.gallery-next {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #747b70;
  color: white;
  background: #20241f;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
}
.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
  background: #444d3e;
}
.gallery-close {
  flex-shrink: 0;
  font-size: 33px;
}
.gallery-viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.gallery-full-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 235px);
  object-fit: contain;
}
.gallery-prev,
.gallery-next {
  position: absolute;
  top: calc(50% - 24px);
  z-index: 1;
}
.gallery-prev {
  left: 12px;
}
.gallery-next {
  right: 12px;
}
.gallery-dialog-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}
.gallery-dialog-caption h3 {
  margin: 0 0 7px;
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.03em;
}
.gallery-dialog-caption p {
  margin: 0;
  color: #c4c9bf;
  font-size: 12px;
  line-height: 1.6;
}
.gallery-position {
  flex-shrink: 0;
}
@media (max-width: 980px) {
  .gallery-section {
    padding: 76px 0;
  }
  .gallery-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .gallery-intro {
    max-width: 590px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .gallery-section {
    padding: 60px 0;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .gallery-toolbar {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .gallery-filter {
    padding-inline: 14px;
  }
  .gallery-notice {
    padding: 16px 18px;
  }
  .gallery-caption {
    padding: 21px;
  }
  .gallery-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .gallery-dialog-inner {
    padding: 10px 10px 18px;
  }
  .gallery-full-image {
    max-height: calc(100dvh - 230px);
  }
  .gallery-prev {
    left: 4px;
  }
  .gallery-next {
    right: 4px;
  }
  .gallery-dialog-caption {
    gap: 14px;
    padding: 16px 5px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-image img {
    transition: none;
  }
}
