/* The world gallery on Home: a sideways strip of places that snaps picture by picture. js/gallery.js pins it
   (.pinned): the stage stays on screen under the header while the page's scroll moves the strip, and a bar
   shows how far along it is. Without the script, or with reduced motion, it is the plain strip with arrows. */
.pin:not(.pinned) { padding-block: clamp(56px, 9vw, 120px); }
.pinned .pin-stage {
  position: sticky; top: var(--head, 69px); height: calc(100svh - var(--head, 69px)); overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 0;
}
.pinned .section-head { margin-bottom: 24px; }
.pinned .gallery { overflow: hidden; scroll-snap-type: none; grid-auto-columns: min(78vw, 880px, (100svh - 340px) * 16 / 9); }
.pin-progress { display: none; }
.pinned .pin-progress { display: block; height: 3px; margin-top: 22px; background: var(--line); }
.pinned .pin-progress::after { content: ""; display: block; height: 100%; width: calc(var(--part, 0) * 100%); background: var(--accent); }
/* The gallery lines up with the page width on the left and runs off the screen on the right */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 880px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding-inline: max(var(--gutter), (100% - 1240px) / 2); scroll-padding-inline: max(var(--gutter), (100% - 1240px) / 2);
  padding-bottom: 14px;
}
.gallery figure { position: relative; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; border: var(--border); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 22px 18px; background: linear-gradient(180deg, transparent, rgba(11, 14, 20, 0.9)); color: var(--muted); }
.gallery figcaption strong { display: block; font: 700 1.3rem/1.2 "Chakra Petch", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.arrows { display: flex; gap: 10px; }
.arrows button { width: 48px; height: 48px; border-radius: var(--radius); border: var(--border); background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.arrows button:hover { border-color: var(--accent); color: var(--accent-text); }
.arrows[hidden] { display: none; }
@media (max-width: 600px) {
  .gallery { grid-auto-columns: 86vw; }
  .gallery figcaption { padding: 32px 14px 10px; font-size: 0.85rem; line-height: 1.35; }
  .gallery figcaption strong { font-size: 1rem; }
}
