/* Destination-first photographic archive. Always visible, including without JS. */
.gallery-intro { padding-block: clamp(3rem, 7vw, 6rem) 0; }
.gallery-intro__layout { display: grid; gap: 2rem; align-items: end; }
.gallery-intro h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: .98; letter-spacing: -.055em; margin: 0; }
.gallery-intro h1 em { font-style: normal; color: var(--orange-text); }
.gallery-intro .lead { max-width: 34ch; margin: 0; }
.gallery-index { display: grid; gap: 0; margin-top: 3rem; border-top: 1px solid var(--line); }
.gallery-index a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; padding: .8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 1rem; }
.gallery-index a:hover { color: var(--orange-text); }
.gallery-index__count { font-variant-numeric: tabular-nums; color: var(--orange-text); }
.gallery-section { padding-block: clamp(3.5rem, 7vw, 7rem); scroll-margin-top: 100px; }
.gallery-section + .gallery-section { border-top: 1px solid var(--line); }
.gallery-section__heading { display: grid; gap: 1.25rem; margin-bottom: 2rem; }
.gallery-section h2 { font-size: clamp(2.1rem, 4.5vw, 4.5rem); line-height: 1.05; margin-bottom: 0; max-width: 17ch; }
.gallery-section__heading p { max-width: 48ch; }
.gallery-section__heading .eyebrow { color: var(--orange-text); }
.gallery-collection { columns: 1; column-gap: 1.25rem; }
.gallery-item { break-inside: avoid; margin-bottom: 1.25rem; }
.gallery-photo { position: relative; display: block; min-height: 44px; text-decoration: none; }
.gallery-photo img { display: block; width: 100%; height: auto; object-fit: contain; }
.gallery-photo__expand { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 32px; height: 32px; background: var(--surface); color: var(--ink); pointer-events: none; transition: background-color .15s ease; }
.gallery-photo__expand svg { width: 18px; height: 18px; }
.gallery-photo:is(:hover,:focus-visible) .gallery-photo__expand { background: var(--orange); }
.gallery-photo:focus-visible { outline-offset: 4px; }
.gallery-viewer { padding: 0; border: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; inset: 0; margin: 0; background: #171814; color: #f2e4cc; }
.gallery-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.gallery-viewer::backdrop { background: #171814; }
.gallery-viewer__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left)); }
.gallery-viewer__toolbar p { font-size: .95rem; margin: 0; }
.gallery-viewer button { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #7b786c; border-radius: 0; background: transparent; color: #f2e4cc; cursor: pointer; }
.gallery-viewer button:hover { background: #33352c; }
.gallery-viewer button:focus-visible { outline: 3px solid #f2e4cc; outline-offset: 3px; }
.gallery-viewer button svg { width: 24px; height: 24px; }
.gallery-viewer__stage { display: grid; place-items: center; min-height: 0; padding: 0 16px; }
.gallery-viewer__stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-viewer__controls { display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 12px 16px max(16px,env(safe-area-inset-bottom)); }
.gallery-viewer__controls span { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; }
[data-gallery-prev] svg { transform: rotate(180deg); }
body.gallery-viewer-open { overflow: hidden; }
@media (min-width: 601px) {
  .gallery-index { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 2rem; }
  .gallery-collection { columns: 2; }
  .gallery-collection--messum-crater { columns: 1; max-width: 1040px; }
}
@media (min-width: 1101px) {
  .gallery-intro__layout { grid-template-columns: 1.6fr 1fr; }
  .gallery-index { grid-template-columns: repeat(5,minmax(0,1fr)); column-gap: 1.5rem; }
  .gallery-index a { align-items: start; }
  .gallery-section__heading { grid-template-columns: 1.6fr 1fr; gap: 4rem; align-items: end; }
  .gallery-collection { columns: 3; column-gap: 1.5rem; }
  .gallery-item { margin-bottom: 1.5rem; }
  .gallery-collection--messum-crater { columns: 1; }
  .gallery-collection--spitzkoppe { columns: 2; }
}
@media (prefers-reduced-motion: reduce) { .gallery-photo__expand { transition: none; } }
