/* Photos (/gallery/): four sections, each led by one big picture, then mixed
   sizes on a six-column grid. Lightbox below. Dark tokens from shared/kit.css. */

.ghero { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.ghero .h1 { color: var(--brand); margin-bottom: 16px; }
.ghero__lede { color: var(--fg); margin-bottom: 22px; }
.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 2px solid var(--line-strong); border-radius: var(--radius-pill); font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-decoration: none; }
.gnav a:hover { border-color: var(--fg); }

/* ---------- Sections ---------- */
.g { padding: clamp(48px, 7vw, 96px) 0; }
.g:not(.band) + .g:not(.band) { padding-top: 0; }
.g__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.g:not(.band) .g__head .h2 { color: var(--brand); }
.g__head .warm-line { margin: 0; }

/* ---------- The grid: w = columns of six, r = rows ---------- */
.g__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(64px, 7.4vw, 104px); grid-auto-flow: dense; gap: 12px; }
.g__cell { min-width: 0; }
.w6 { grid-column: span 6; } .w4 { grid-column: span 4; } .w2 { grid-column: span 2; }
.r4 { grid-row: span 4; } .r3 { grid-row: span 3; } .r2 { grid-row: span 2; }
.g__item { display: block; position: relative; width: 100%; height: 100%; overflow: clip; border-radius: var(--radius); background: var(--surface-2); cursor: zoom-in; color: var(--cream); text-decoration: none; }
.band .g__item { background: var(--panel); }
.lead .g__item { border-radius: var(--radius-lg); }
.g__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.g__item:hover img { transform: scale(1.04); }
.g__item:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.g__cap { position: absolute; inset: auto 0 0; padding: 40px 16px 14px; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .72) 32px, rgba(0, 0, 0, .8) 100%); font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.lead .g__cap { padding: 60px clamp(16px, 2.4vw, 28px) clamp(14px, 2vw, 24px); background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .72) 50px, rgba(0, 0, 0, .8) 100%); font-family: var(--font-warm); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
@media (hover: hover) {
  .g__cell:not(.lead) .g__cap { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease-out); }
  .g__cell:not(.lead) .g__item:hover .g__cap, .g__cell:not(.lead) .g__item:focus-visible .g__cap { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .g__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 84px; gap: 8px; }
  .w6, .w4 { grid-column: span 2; } .w2 { grid-column: span 1; }
  .r4, .r3, .r2 { grid-row: span 2; }
  .lead { grid-row: span 3; }
  .tall { grid-row: span 3; }
  .g__cell:not(.lead):not(.w4) .g__cap { display: none; }
}

/* ---------- Lightbox ---------- */
html:has(.lb[open]) { overflow: clip; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--surface-0); color: var(--fg); }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: lb-in .25s var(--ease-out); }
.lb::backdrop { background: rgba(0, 0, 0, .8); }
@keyframes lb-in { from { opacity: 0; } }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(12px, 3vw, 28px); }
.lb__count { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: .875rem; color: var(--fg); }
.lb__of { white-space: nowrap; }
.lb__btn { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--fg); cursor: pointer; }
.lb__btn svg { width: 22px; height: 22px; }
.lb__btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.lb__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lb__stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(6px, 2vw, 24px); padding: 0 clamp(8px, 2vw, 24px) clamp(10px, 2vw, 20px); min-height: 0; grid-template-rows: minmax(0, 1fr); }
.lb__fig { align-self: stretch; margin: 0; min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 12px; }
.lb__img { width: 100%; height: 100%; min-height: 0; object-fit: contain; opacity: 1; transition: opacity .2s; touch-action: pan-y; }
.lb__img.is-loading { opacity: .25; }
.lb__cap { text-align: center; font-size: 1rem; line-height: 1.4; }
.lb__cap [data-lb-cap] { color: var(--fg); }
.lb__cap a { margin-left: 6px; color: var(--muted); white-space: nowrap; }
.lb__cap a:hover { color: var(--fg); }
@media (max-width: 640px) {
  /* Arrows drop below the picture so it can use the full width. */
  .lb__stage { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb__fig { grid-column: 1 / -1; grid-row: 1; }
  .lb__prev { grid-row: 2; justify-self: start; }
  .lb__next { grid-row: 2; justify-self: end; }
}
