/* "Take a look round": a strip of shots from the demo office. On wide screens the section holds
   still while the strip pans sideways with the scroll (js/motion.js); on phones you swipe it. */
.gallery {
  padding-top: clamp(100px, 16vh, 200px);
  overflow: hidden;
}

.gallery-pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  gap: clamp(32px, 5vh, 56px);
}

.gallery-head {
  display: grid;
  gap: 16px;
}

.gallery-track {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 28px);
  width: max-content;
  padding-inline: max(24px, (100vw - 1320px) / 2);
}

.frame {
  flex: none;
  margin: 0;
}

.frame-media {
  position: relative;
  overflow: hidden;
  height: clamp(280px, 52vh, 560px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.8);
}

.frame-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Scenes are a little larger than their frames so they can drift as the strip pans. */
.frame-wide .frame-media img {
  transform: scale(1.14);
}

.frame-wide .frame-media {
  aspect-ratio: 16 / 10;
}

.frame-card .frame-media {
  aspect-ratio: 4 / 5;
  border-color: rgb(255 255 255 / 0.35);
}

.frame-phone .frame-media {
  aspect-ratio: 9 / 19;
  border: 6px solid #1b212b;
  border-radius: 34px;
}

.frame figcaption {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Phones (and reduced motion): a strip you swipe, snapping to each shot. */
@media (max-width: 900px) {
  .gallery-pin {
    min-height: 0;
  }

  .gallery-track {
    width: auto;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gallery-track::-webkit-scrollbar {
    display: none;
  }

  .frame {
    scroll-snap-align: center;
  }

  .frame-media {
    height: 300px;
  }
}

html:not(.motion) .gallery-track {
  width: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
