.gallery-strip {
  padding-top: clamp(3rem, 6vw, 5.25rem);
}
.gallery-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.1rem 2rem;
  margin-bottom: clamp(1.3rem, 3vw, 2.3rem);
}
.gallery-section-heading .button { flex: none; }

.gallery-strip__tiles {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  aspect-ratio: 2.35;
}
.gallery-feature {
  position: relative;
  display: grid;
  align-items: end;
  background: #251c16;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
}
.gallery-feature--lead { grid-row: span 2; }
.gallery-feature img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, #100b08, transparent 62%);
}
.gallery-feature__caption {
  padding: .85rem 1rem;
  font: 400 clamp(1.25rem, 2.8vw, 2rem)/1.1 var(--script);
}
.gallery-feature--lead .gallery-feature__caption {
  padding: clamp(1rem, 3vw, 2rem);
  font-size: clamp(1.65rem, 4.1vw, 3.35rem);
}
.gallery-feature:hover { border-color: var(--ember); }

.gallery-page {
  padding-block: clamp(3.1rem, 7vw, 6rem) clamp(4rem, 7vw, 6rem);
}
.gallery-page + .site-footer { border-top: 1px solid var(--rule); }
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  border-top: 1px solid var(--rule);
  padding-block: 1.25rem;
  margin-bottom: .65rem;
}
.gallery-filters button {
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--panel);
  color: var(--muted);
  font-size: 1.3rem;
}
.gallery-filters button[aria-pressed="true"] {
  border-color: var(--ember);
  background: #37231d;
  color: var(--paper);
}
.gallery-filters button:hover { color: var(--paper); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.05rem) clamp(.9rem, 2vw, 1.5rem);
}
.gallery-grid figure, .photo-dialog figure { margin: 0; min-width: 0; }
.gallery-tile {
  width: 100%;
  display: block;
  position: relative;
  padding: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #251c16;
}
.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-tile__expand {
  position: absolute;
  inset: auto .55rem .55rem auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: rgba(16, 16, 16, .86);
  border: 1px solid rgba(245, 241, 234, .5);
  border-radius: 2px;
}
.gallery-tile:hover, .gallery-tile:hover .gallery-tile__expand { border-color: var(--ember); }
.gallery-grid figcaption {
  margin-top: .65rem;
  font: 400 1.6rem/1.22 var(--script);
}

html:has(.photo-dialog[open]) { overflow: hidden; }
.photo-dialog {
  position: fixed;
  width: min(100% - 1.5rem, 960px);
  max-width: none;
  padding: 0;
  border: 1px solid #5d4841;
  background: #151211;
  color: var(--paper);
  border-radius: 3px;
}
.photo-dialog::backdrop { background: rgba(8, 7, 6, .88); }
.photo-dialog__close, .photo-dialog__arrow {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  background: #201a17;
  color: var(--paper);
  border: 1px solid #5d4841;
  border-radius: 2px;
}
.photo-dialog__close {
  position: absolute;
  z-index: 1;
  top: .7rem;
  right: .7rem;
}
.photo-dialog__image {
  display: block;
  width: 100%;
  height: min(72dvh, 690px);
  background: #080706;
  object-fit: contain;
}
.photo-dialog__bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .8rem;
  text-align: center;
  padding: .65rem;
}
.photo-dialog__bar span { font: 400 clamp(1.45rem, 3vw, 1.85rem)/1.22 var(--script); }
.photo-dialog__arrow--previous .icon { transform: rotate(180deg); }
.photo-dialog__arrow:disabled { opacity: .4; cursor: default; }
.photo-dialog__arrow:enabled:hover, .photo-dialog__close:hover { border-color: var(--ember); }

@media (max-width: 950px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .gallery-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .gallery-strip__tiles {
    aspect-ratio: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .gallery-feature { aspect-ratio: 5 / 4; }
  .gallery-feature--lead { grid-row: auto; grid-column: span 2; aspect-ratio: 3 / 2; }
  .gallery-feature__caption { padding: .65rem; }
  .gallery-filters { gap: .4rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}
