/* Full gallery: its own flow layout, independent of the homepage mosaic. */
.gallery-page .page-hero { padding-bottom: clamp(2.5rem, 5vw, 5rem); }
.gallery-page .page-hero .section-title { max-width: 17ch; font-weight: 500; }
.gallery-page__preview { margin: 1.15rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.gallery-page__chapters { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2rem; }
.gallery-page__chapters a { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; border-bottom: 1px solid var(--line); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.gallery-page__chapters span { color: var(--gold); font-size: .55rem; }
.gallery-page__chapters a:hover { border-color: var(--gold); }
.gallery-page .gallery-chapter { padding-block: clamp(2.5rem, 5vw, 5rem); scroll-margin-top: 7rem; }
.gallery-page .gallery-chapter:nth-of-type(3) { background: linear-gradient(180deg, var(--ivory), var(--section-champagne), var(--ivory)); }
.gallery-chapter__intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: clamp(1.5rem, 3vw, 2.75rem); }
.gallery-chapter__intro .section-title { color: var(--olive); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 500; }
.gallery-chapter__intro .lede { max-width: 26rem; margin: 0; font-size: .95rem; }
.gallery-page .gallery .gallery__grid--page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; gap: clamp(1rem, 2vw, 1.75rem); }
.gallery-page .gallery .gallery__item { grid-column: auto; grid-row: auto; min-width: 0; aspect-ratio: 4 / 3; }
.gallery-page .gallery .gallery__item img { min-height: 0; }
.gallery-page .gallery .gallery__item figcaption { pointer-events: none; right: 4rem; }
.gallery-page .gallery .gallery__item figcaption span { font-family: var(--sans); }
.gallery-page__expand { position: absolute; z-index: 2; bottom: 1rem; right: 1rem; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: var(--ivory); background: rgba(31,49,29,.25); transition: background-color .3s ease; }
.gallery-page .gallery__media { cursor: zoom-in; }
.gallery-page .gallery__media:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: -6px; }
.gallery-page .gallery__item:focus-within .gallery__media { transform: scale(1.025); }
.gallery-page .gallery__item:focus-within figcaption { transform: translateY(-3px); }
.gallery-page .gallery__media:hover .gallery-page__expand { background: var(--olive); }

@media (min-width: 700px) {
  .gallery-page .gallery .gallery__grid--page { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .gallery-page .gallery .gallery__item { grid-column: span 5; aspect-ratio: auto; height: clamp(19rem, 32vw, 29rem); }
  .gallery-page .gallery .gallery__item:nth-child(4n + 1),
  .gallery-page .gallery .gallery__item:nth-child(4n) { grid-column: span 7; }
}

html.has-gallery-lightbox, html.has-gallery-lightbox body { overflow: hidden; }
.gallery-lightbox { width: min(94vw, 1240px); max-width: none; max-height: 94vh; max-height: 94dvh; margin: auto; padding: 0; border: 1px solid rgba(199,164,90,.35); border-radius: 1.25rem; color: var(--ivory); background: #1c281b; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.gallery-lightbox:not([open]) { display: none; }
.gallery-lightbox::backdrop { background: rgba(12,19,12,.88); backdrop-filter: blur(8px); }
.gallery-lightbox__shell { padding: clamp(1rem, 2.5vw, 2rem); }
.gallery-lightbox__header, .gallery-lightbox__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gallery-lightbox__header { margin-bottom: .8rem; }
.gallery-lightbox__header p { margin: 0; font-size: .65rem; letter-spacing: .13em; text-transform: uppercase; }
.gallery-lightbox__header p span { display: block; margin-top: .35rem; color: var(--gold-soft); font-size: .5rem; }
.gallery-lightbox button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(199,164,90,.45); border-radius: 50%; color: var(--ivory); background: transparent; cursor: pointer; font-size: 1.35rem; transition: background-color .2s ease; }
.gallery-lightbox button:hover { background: rgba(199,164,90,.18); }
.gallery-lightbox button:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.gallery-lightbox__stage { position: relative; display: grid; place-items: center; height: min(62vh, 720px); height: min(62dvh, 720px); background: #141e13; border-radius: .5rem; overflow: hidden; }
.gallery-lightbox__stage img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s ease; }
.gallery-lightbox.is-loading .gallery-lightbox__stage img { opacity: .25; }
.gallery-lightbox__status { position: absolute; padding: .5rem 1rem; text-align: center; font-size: .8rem; color: var(--ivory); background: rgba(20,30,19,.9); }
.gallery-lightbox__footer { margin-top: 1rem; }
.gallery-lightbox__chapter { color: var(--gold-soft); margin: 0 0 .35rem; font-size: .55rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.gallery-lightbox__footer h2 { margin: 0; color: var(--ivory); font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; line-height: 1.1; }
.gallery-lightbox__count { margin: .4rem 0 0; color: var(--gold-soft); font-size: .6rem; letter-spacing: .1em; }
.gallery-lightbox__controls { display: flex; gap: .5rem; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gallery-lightbox[open], .gallery-lightbox[open]::backdrop { animation: gallery-viewer-in .22s ease both; }
  @keyframes gallery-viewer-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-page .gallery__item:focus-within .gallery__media,
  .gallery-page .gallery__item:focus-within figcaption { transform: none; }
  .gallery-page__expand, .gallery-lightbox button, .gallery-lightbox__stage img { transition: none; }
}
