.gallery-page { background: var(--paper); }
.gallery-page .site-header { color: var(--ink); background: rgba(243,245,243,.94); border-color: var(--line); backdrop-filter: blur(16px); }
.gallery-page .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.gallery-main { overflow: clip; }

.gallery-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(260px,.75fr);
  align-items: end;
  gap: clamp(3rem,7vw,8rem);
  min-height: min(760px,88svh);
  padding: clamp(10rem,17vh,14rem) var(--pad) clamp(5rem,9vw,8rem);
  background:
    linear-gradient(118deg, rgba(255,255,255,.34), transparent 44%),
    #bfd1cf;
}
.gallery-hero::after {
  content: "";
  position: absolute;
  right: -12vw;
  bottom: -20vw;
  width: 52vw;
  height: 52vw;
  border: 1px solid rgba(16,20,19,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 7vw rgba(255,255,255,.07), 0 0 0 14vw rgba(255,255,255,.045);
  pointer-events: none;
}
.gallery-hero > * { position: relative; z-index: 1; }
.gallery-eyebrow { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.4rem; color: #405652; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.gallery-eyebrow span { width: 34px; height: 1px; background: currentColor; }
.gallery-hero h1 { margin: 0; font-size: clamp(3.6rem,8vw,8.4rem); font-weight: 600; line-height: .83; letter-spacing: -.055em; }
.gallery-hero h1 em { color: #42645f; font-style: normal; }
.gallery-hero-copy { max-width: 440px; padding-bottom: .5rem; }
.gallery-hero-copy p { margin: 0; color: #344642; font-size: clamp(1rem,1.5vw,1.2rem); line-height: 1.75; }
.gallery-hero-copy a { display: flex; justify-content: space-between; gap: 2rem; margin-top: 2rem; padding: 1rem 0; border-top: 1px solid rgba(16,20,19,.28); border-bottom: 1px solid rgba(16,20,19,.28); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.gallery-wall { padding: clamp(5rem,9vw,9rem) var(--pad); }
.gallery-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.35fr); align-items: end; gap: 3rem; margin-bottom: clamp(3rem,6vw,5.5rem); }
.gallery-heading h2 { max-width: 780px; margin: 0; font-size: clamp(2.4rem,5vw,5.3rem); line-height: .94; letter-spacing: -.045em; }
.gallery-heading > p { max-width: 280px; margin: 0 0 .4rem auto; color: #4b5b58; line-height: 1.7; }
.gallery-grid { columns: 3 310px; column-gap: clamp(1.2rem,2vw,2rem); }
.gallery-card { display: inline-block; width: 100%; margin: 0 0 clamp(2rem,3vw,3rem); break-inside: avoid; }
.gallery-card button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #d5dfdd; cursor: zoom-in; }
.gallery-card img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.16,1,.3,1), filter .4s ease; }
.gallery-card button:hover img { transform: scale(1.025); filter: saturate(1.04); }
.gallery-card button:focus-visible { outline-offset: 5px; }
.gallery-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.gallery-card figcaption span { color: #65716f; font-size: .61rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.gallery-card figcaption strong { font-size: .83rem; font-weight: 600; text-align: right; }

.gallery-cta { padding: clamp(5rem,8vw,8rem) var(--pad); color: var(--ink); background: #dce8e6; }
.gallery-cta > div { display: flex; justify-content: space-between; align-items: end; gap: 3rem; }
.gallery-cta h2 { max-width: 840px; margin: 0; font-size: clamp(2.8rem,6vw,6rem); line-height: .92; letter-spacing: -.045em; }
.gallery-cta .button { color: #fff; background: #506f6b; }
.gallery-cta .button:hover { color: var(--ink); background: #fff; }

.gallery-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: clamp(1rem,3vw,2rem); border: 0; color: #fff; background: rgba(8,11,10,.96); }
.gallery-lightbox::backdrop { background: rgba(8,11,10,.88); }
.gallery-lightbox[open] { display: grid; place-items: center; }
.gallery-lightbox figure { display: grid; justify-items: center; gap: 1rem; max-width: min(1200px,90vw); max-height: 88dvh; margin: 0; }
.gallery-lightbox img { width: auto; max-width: 100%; height: auto; max-height: 80dvh; object-fit: contain; }
.gallery-lightbox figcaption { color: rgba(255,255,255,.72); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.gallery-lightbox-close { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 2; padding: .7rem .85rem; border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(8,11,10,.5); cursor: pointer; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 900px) {
  .gallery-hero { grid-template-columns: 1fr; align-content: end; gap: 3rem; min-height: 720px; }
  .gallery-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .gallery-heading > p { margin-left: 0; }
  .gallery-page .nav-links { color: #fff; background: var(--ink); }
}

@media (max-width: 640px) {
  .gallery-hero { min-height: 680px; padding-top: 8.5rem; }
  .gallery-hero h1 { font-size: clamp(3.2rem,15vw,5rem); }
  .gallery-wall { padding-top: 4.5rem; }
  .gallery-grid { columns: 1; }
  .gallery-card { margin-bottom: 2.6rem; }
  .gallery-card figcaption { padding-top: .75rem; }
  .gallery-cta > div { align-items: flex-start; flex-direction: column; }
  .gallery-cta .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card img { transition: none; }
}
