/* GALLERY: kicker + title on the grid, then one wide photo at a time. The stage is inset between the
   margins (like the logo strip), so the thread runs down the left margin beside it, never over a photo.
   Slides are stacked; the JS (modules/gallery.js) crossfades them with GSAP: no CSS transitions on
   opacity, visibility or the image scale. */
.gallery { padding-block: clamp(5rem, 12vh, 10rem); }
.gallery__head { row-gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.gallery__head .kicker { grid-column: 1 / -1; }
.gallery__title { grid-column: 1 / span 8; max-width: 11em; margin-left: -0.04em; }

/* Stage: 16:9, never taller than the screen */
.gallery__stage {
  margin-inline: var(--margin);
  aspect-ratio: 16 / 9;
  max-height: 88svh;
  min-height: 18rem;
  touch-action: pan-y;
  user-select: none;
}
.gallery[data-gallery] .gallery__stage { cursor: grab; }
.gallery__stage.is-dragging { cursor: grabbing; }
.gallery__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.gallery__slide.is-active { opacity: 1; visibility: visible; }
.gallery__stage .gallery__img { transition: none; -webkit-user-drag: none; }

/* Controls: counter, autoplay progress, round arrows */
.gallery__controls { margin-top: clamp(1.25rem, 2.5vw, 2rem); align-items: center; row-gap: 1rem; }
.gallery__count { grid-column: 1 / span 2; display: flex; gap: 0.4rem; font-size: var(--t-s); font-weight: 500; letter-spacing: 0.01em; }
.gallery__count-sep { color: var(--c-muted); }
.gallery__progress { grid-column: 3 / span 8; height: 1px; background: var(--c-line-strong); position: relative; overflow: clip; }
.gallery__progress span { position: absolute; inset: 0; background: var(--c-accent); transform-origin: left; transform: scaleX(0); }
.gallery__buttons { grid-column: 11 / -1; display: flex; justify-content: end; gap: 0.5rem; }
.gallery__btn {
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  border: 1px solid var(--c-line-strong); border-radius: 50%;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.gallery__btn span { transition: translate 0.45s var(--ease-out); }
@media (hover: hover) {
  .gallery__btn:hover { background: var(--c-accent); border-color: var(--c-accent); }
  [data-gallery-prev]:hover span { translate: -0.2rem 0; }
  [data-gallery-next]:hover span { translate: 0.2rem 0; }
}

/* Without the script (or before it boots) the controls keep their space but stay hidden */
.gallery__controls { visibility: hidden; }
.gallery.is-ready .gallery__controls { visibility: visible; }

@media (max-width: 767px) {
  .gallery { padding-block: 3.5rem 4.5rem; }
  .gallery__title { grid-column: 1 / -1; }
  .gallery__stage { aspect-ratio: 4 / 5; max-height: 75svh; }
  .gallery__progress { grid-column: 1 / -1; grid-row: 1; }
  .gallery__count { grid-column: 1 / span 3; }
  .gallery__buttons { grid-column: 4 / -1; }
  .gallery__btn { width: 2.9rem; height: 2.9rem; }
}
