/* Gallery page — matches the approved Home v2 visual system. */
.gallery-banner {
  position: relative;
  min-height: 224px;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #22251e;
}
.gallery-banner-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.gallery-banner-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(17,18,15,.88), rgba(17,18,15,.46) 48%, rgba(17,18,15,.14));
}
.gallery-banner-content { color: #f8f3ea; padding-block: 34px; }
.gallery-banner h1 {
  margin: 0;
  font: 500 clamp(62px, 6.5vw, 92px)/.93 var(--serif);
  letter-spacing: -.035em;
}
.gallery-banner-rule { display: block; width: 47px; height: 2px; margin-top: 23px; background: var(--copper); }
.gallery-section { background: var(--paper); padding: 72px 0 104px; }
.gallery-rows { display: grid; gap: 56px; }
.gallery-row { display: grid; gap: 19px; align-items: start; }
/* Widths follow each original image's aspect ratio. No cropping or stretching. */
.gallery-row-1 { grid-template-columns: 1.5fr 1fr 1fr 1.236fr; }
.gallery-row-2 { grid-template-columns: 1.333fr .75fr .75fr; }
.gallery-row-3 { grid-template-columns: .699fr .75fr .75fr; }
.gallery-artwork { margin: 0; min-width: 0; }
.artwork-trigger { display: block; width: 100%; margin: 0; border: 0; padding: 0; background: none; cursor: zoom-in; }
.artwork-trigger img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  box-shadow: 0 9px 26px rgba(25,24,19,.095);
  transition: box-shadow .18s ease, transform .18s ease;
}
.artwork-trigger:hover img { box-shadow: 0 14px 32px rgba(25,24,19,.18); transform: translateY(-2px); }
.artwork-trigger:focus-visible { outline: 3px solid var(--copper); outline-offset: 5px; }
.gallery-artwork figcaption {
  margin-top: 12px;
  font: italic 500 19px/1.28 var(--serif);
  color: #45392f;
}
/* Full-size lightbox; the original artwork files are displayed with contain. */
.lightbox {
  width: min(96vw, 1260px);
  height: min(94dvh, 950px);
  max-width: 1260px;
  max-height: 94dvh;
  margin: auto;
  padding: 16px 22px 22px;
  overflow: hidden;
  border: 1px solid #443b33;
  background: #181714;
  color: #eee9e0;
  box-shadow: 0 25px 90px rgba(0,0,0,.45);
}
.lightbox::backdrop { background: rgba(7,7,6,.88); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-topbar,
.lightbox-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lightbox-topbar { min-height: 42px; flex: 0 0 auto; }
.lightbox-label { font: 600 10px/1.3 var(--sans); letter-spacing: .18em; color: #bdb5a9; }
.lightbox-close { padding: 0 5px; border: 0; background: none; color: white; cursor: pointer; font: 400 34px/1 var(--sans); }
.lightbox-viewer { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; gap: 16px; flex: 1 1 auto; min-height: 0; align-items: center; }
#lightbox-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-arrow { width: 44px; height: 54px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.055); color: #f6efe7; cursor: pointer; font: 300 42px/1 var(--serif); }
.lightbox-arrow:hover, .lightbox-arrow:focus-visible, .lightbox-close:focus-visible { outline: 2px solid #c5956b; outline-offset: 2px; }
.lightbox-bottom { padding: 11px 6px 0; flex: 0 0 auto; }
.lightbox-medium { font: italic 500 21px/1.2 var(--serif); }
.lightbox-count { font: 500 12px/1.3 var(--sans); letter-spacing: .1em; color: #c7beb2; }
@media (max-width: 920px) {
  .gallery-rows { gap: 42px; }
  .gallery-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 18px; }
  .gallery-section { padding: 52px 0 78px; }
}
@media (max-width: 680px) {
  .gallery-banner { min-height: 178px; }
  .gallery-banner h1 { font-size: 62px; }
  .gallery-section { padding: 36px 0 56px; }
  .gallery-rows { gap: 34px; }
  .gallery-row { grid-template-columns: 1fr; gap: 32px; }
  .gallery-artwork figcaption { margin-top: 9px; font-size: 19px; }
  .lightbox { width: 100vw; height: 100dvh; max-height: 100dvh; padding: 10px; border: 0; }
  .lightbox-viewer { grid-template-columns: 30px minmax(0,1fr) 30px; gap: 6px; }
  .lightbox-arrow { width: 30px; height: 48px; font-size: 31px; }
  .lightbox-label { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .artwork-trigger img { transition: none; }
}
