/* ============= GALERIE — page-specific styles ============= */

.gal-hero {
  /* keep the .shell horizontal gutter so the hero aligns with the
     project grid below (and never hits a 0px left edge on mobile) */
  padding: clamp(72px, 11vw, 160px) var(--pad-x) clamp(32px, 4vw, 56px);
}
.gal-hero .row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: end;
}
.gal-hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(42px, 10vw, 130px);
  line-height: 0.94;
  margin: 0;
}
.gal-hero h1 em { font-style: italic; color: var(--accent); }
.gal-hero .lead { max-width: 48ch; margin: 0; }
@media (max-width: 900px) { .gal-hero .row { grid-template-columns: 1fr; } }

.gal-grid-section { padding-bottom: var(--section-y); }
.grid-projects {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2vw, 32px) clamp(20px, 1.8vw, 28px);
}
.proj { display: block; cursor: zoom-in; }
.proj .image-frame { width: 100%; overflow: hidden; }
.proj .image-frame img {
  transition: transform .8s var(--ease-reveal);
}
.proj:hover .image-frame img { transform: scale(1.03); }

.proj.s-7 { grid-column: span 7; }
.proj.s-7 .image-frame { aspect-ratio: 4/3; }
.proj.s-5 { grid-column: span 5; }
.proj.s-5 .image-frame { aspect-ratio: 3/4; }
.proj.s-6 { grid-column: span 6; }
.proj.s-6 .image-frame { aspect-ratio: 4/3; }
.proj.s-4 { grid-column: span 4; }
.proj.s-4 .image-frame { aspect-ratio: 3/4; }
.proj.s-12 { grid-column: span 12; }
.proj.s-12 .image-frame { aspect-ratio: 21/9; }

.proj.offset { margin-top: clamp(40px, 6vw, 96px); }

@media (max-width: 800px) {
  .proj { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .proj .image-frame { aspect-ratio: 4/3 !important; }
}

/* Closing band */
.gal-closing { text-align: center; }
.gal-closing .body-text { max-width: 52ch; margin: 24px auto 36px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 64px);
  background: rgba(var(--night-rgb), 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow-lightbox);
  transform: scale(0.97);
  transition: transform .45s var(--ease-reveal);
  cursor: default;
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: clamp(16px, 2.5vw, 32px);
  right: clamp(16px, 2.5vw, 32px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(var(--cream-rgb), 0.4);
  border-radius: 50%;
  color: var(--on-deep-hi);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.lightbox__close:hover {
  background: rgba(var(--cream-rgb), 0.12);
  border-color: rgba(var(--cream-rgb), 0.7);
}
