.gallery-page main {
  min-height: 100vh;
  padding-bottom: 100px;
}

.gallery-page .desktop-nav a[aria-current="page"]::after { right: 0; }

.gallery-hero {
  position: relative;
  min-height: 760px;
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  color: #fff;
  background: var(--green-dark);
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 27, 22, .82) 0, rgba(8, 27, 22, .47) 43%, transparent 72%);
}

.gallery-hero-photo { min-width: 0; min-height: 0; }
.gallery-hero-photo-main { grid-row: 1 / 3; }
.gallery-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-hero-photo-pool { border-top: 6px solid var(--green-dark); }

.gallery-hero-copy {
  position: absolute;
  z-index: 2;
  left: max(32px, calc((100vw - 1240px) / 2));
  top: 50%;
  width: min(710px, calc(100vw - 64px));
  transform: translateY(-50%);
}

.gallery-hero h1 {
  max-width: 700px;
  margin-bottom: 25px;
  font-family: var(--serif);
  font-size: clamp(4rem, 7.5vw, 7.8rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .86;
}

.gallery-hero-copy > p:not(.eyebrow) {
  max-width: 590px;
  margin-bottom: 34px;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.48;
}

.gallery-hero-facts {
  position: absolute;
  z-index: 2;
  right: max(32px, calc((100vw - 1240px) / 2));
  bottom: 38px;
  display: flex;
  gap: 28px;
  color: rgba(255,255,255,.78);
}

.gallery-hero-facts span { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.4); font-size: .68rem; }
.gallery-hero-facts span:first-child { padding-left: 0; border-left: 0; }
.gallery-hero-facts strong { display: block; margin-bottom: 4px; color: #fff; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }

.gallery-browser { padding-top: 105px; }
.gallery-intro { margin-bottom: 55px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; align-items: end; }
.gallery-intro h2 { max-width: 680px; margin-bottom: 0; }
.gallery-intro > p { max-width: 570px; margin-bottom: 6px; color: var(--ink-soft); font-family: var(--serif); font-size: 1.18rem; line-height: 1.6; }

.gallery-filter-wrap {
  position: sticky;
  z-index: 20;
  top: 86px;
  margin: 0 calc((100vw - var(--shell)) / -2) 34px;
  padding: 14px max(32px, calc((100vw - 1240px) / 2));
  background: rgba(237,245,246,.93);
  border-block: 1px solid rgba(40,77,90,.13);
  box-shadow: 0 12px 28px rgba(23,33,29,.06);
  backdrop-filter: blur(14px);
}

.gallery-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery-filters::-webkit-scrollbar { display: none; }
.gallery-filters button { min-height: 42px; padding: 0 16px; flex: 0 0 auto; color: var(--ink-soft); border: 1px solid rgba(40,77,90,.18); border-radius: 999px; background: rgba(255,255,255,.68); font-size: .72rem; font-weight: 720; cursor: pointer; }
.gallery-filters button span { margin-left: 4px; color: #82908a; font-size: .61rem; }
.gallery-filters button:hover { border-color: var(--green); }
.gallery-filters button.is-active { color: #fff; background: var(--green); border-color: var(--green); }
.gallery-filters button.is-active span { color: rgba(255,255,255,.67); }
.gallery-result { margin: 10px 4px 0; color: var(--ink-soft); font-size: .62rem; }

.gallery-grid { columns: 4 260px; column-gap: 13px; }
.gallery-card { position: relative; width: 100%; margin: 0 0 13px; padding: 0; break-inside: avoid; overflow: hidden; border: 0; border-radius: 10px; background: var(--cream-deep); box-shadow: 0 6px 20px rgba(23,33,29,.08); cursor: zoom-in; }
.gallery-card[hidden] { display: none; }
.gallery-card img { width: 100%; height: auto; transition: transform .45s ease, filter .3s ease; }
.gallery-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(8,27,22,.66), transparent 45%); opacity: 0; transition: opacity .25s ease; }
.gallery-card span { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; color: #fff; text-align: left; font-size: .68rem; font-weight: 680; line-height: 1.35; opacity: 0; transform: translateY(7px); transition: opacity .25s ease, transform .25s ease; }
.gallery-card:hover img { transform: scale(1.025); filter: brightness(.94); }
.gallery-card:hover::after, .gallery-card:focus-visible::after, .gallery-card:hover span, .gallery-card:focus-visible span { opacity: 1; }
.gallery-card:hover span, .gallery-card:focus-visible span { transform: translateY(0); }

.gallery-empty { padding: 80px 20px; text-align: center; color: var(--ink-soft); font-family: var(--serif); font-size: 1.35rem; }

.gallery-next { margin-top: 105px; padding: 75px; color: #fff; background: linear-gradient(120deg, var(--green-dark), var(--river-deep)); border-radius: 26px; box-shadow: var(--shadow); }
.gallery-next h2 { max-width: 820px; margin-bottom: 36px; }
.gallery-next > div { display: flex; align-items: center; gap: 28px; }

.gallery-lightbox { position: fixed; inset: 14px; width: calc(100vw - 28px); height: calc(100vh - 28px); max-width: none; max-height: none; overflow: hidden; color: #fff; background: rgba(7,16,13,.98); border-radius: 18px; }
.gallery-lightbox .lightbox-topbar { position: absolute; z-index: 2; left: 24px; right: 24px; top: 20px; display: flex; align-items: center; justify-content: space-between; }
.lightbox-topbar p { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.lightbox-topbar span { font-family: var(--serif); font-size: 1.1rem; }
.lightbox-topbar small { color: rgba(255,255,255,.55); font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lightbox-topbar button { width: 42px; height: 42px; color: #fff; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1.45rem; cursor: pointer; }
.gallery-lightbox figure { width: 100%; height: 100%; margin: 0; padding: 72px 86px 28px; display: grid; grid-template-rows: minmax(0,1fr) auto; align-items: center; justify-items: center; }
.gallery-lightbox figure img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.gallery-lightbox figcaption { min-height: 32px; padding-top: 13px; color: rgba(255,255,255,.72); font-family: var(--serif); font-size: .92rem; }
.lightbox-arrow { position: absolute; z-index: 2; top: 50%; width: 48px; height: 48px; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.08); cursor: pointer; transform: translateY(-50%); }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

@media (max-width: 1080px) {
  .gallery-hero { min-height: 680px; grid-template-columns: 1.2fr .8fr; }
  .gallery-hero-facts { display: none; }
  .gallery-filter-wrap { top: 86px; }
  .gallery-grid { columns: 3 240px; }
}

@media (max-width: 760px) {
  .gallery-page main { padding-bottom: 0; }
  .gallery-hero { min-height: 720px; display: block; }
  .gallery-hero-photo-main { position: absolute; inset: 0; }
  .gallery-hero-photo-pool { display: none; }
  .gallery-hero::after { background: linear-gradient(0deg, rgba(8,27,22,.87) 0, rgba(8,27,22,.42) 58%, rgba(8,27,22,.14)); }
  .gallery-hero-copy { left: 22px; right: 22px; top: auto; bottom: 50px; width: auto; transform: none; }
  .gallery-hero h1 { font-size: clamp(3.8rem, 18vw, 5.5rem); }
  .gallery-hero-copy > p:not(.eyebrow) { font-size: 1.05rem; }
  .gallery-browser { padding-top: 70px; }
  .gallery-intro { margin-bottom: 36px; grid-template-columns: 1fr; gap: 24px; }
  .gallery-intro > p { font-size: 1.03rem; }
  .gallery-filter-wrap { top: 74px; margin-inline: -16px; padding: 11px 16px; }
  .gallery-filters button { min-height: 40px; padding-inline: 14px; }
  .gallery-grid { columns: 2 140px; column-gap: 6px; }
  .gallery-card { margin-bottom: 6px; border-radius: 6px; }
  .gallery-card::after, .gallery-card span { display: none; }
  .gallery-next { width: 100%; margin-top: 70px; padding: 65px 22px 80px; border-radius: 0; }
  .gallery-next > div { align-items: flex-start; flex-direction: column; }
  .gallery-lightbox { inset: 6px; width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .gallery-lightbox .lightbox-topbar { left: 16px; right: 16px; top: 12px; }
  .lightbox-topbar small { display: none; }
  .gallery-lightbox figure { padding: 68px 12px 76px; }
  .gallery-lightbox figcaption { padding-inline: 12px; text-align: center; font-size: .82rem; }
  .lightbox-arrow { top: auto; bottom: 14px; transform: none; }
  .lightbox-prev { left: 18px; }
  .lightbox-next { right: 18px; }
}
