/* ═══════════════════════════════════════════
   GALLERY — Controlled drag scroll
═══════════════════════════════════════════ */

.gallery {
  background: var(--ivory, #F5F0E8);
  padding: 100px 0 80px; /* cinematic — intentionally tighter than system */
  overflow: hidden;
  margin-top: -60px;
  position: relative;
  z-index: 3;
}

.gallery-header {
  text-align: center;
  padding: 0 60px;
  margin-bottom: 48px;
}

.gallery-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 300;
  font-style: italic;
  color: var(--obsidian, #1A1611);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 16px;
}

.gallery-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26, 22, 17, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gallery-hint::before,
.gallery-hint::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(26, 22, 17, 0.15);
}

/* Viewport — overflow hidden, full width */
.gallery-viewport {
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-viewport:active {
  cursor: grabbing;
}

/* Track — scrollable row of items */
.gallery-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 40px 60px;
  width: max-content;
  will-change: transform;
  transition: transform 0.05s linear;
}

/* Items */
.gallery-item {
  flex-shrink: 0;
  width: 340px;
  height: 460px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 0;
}

.gallery-item--tall {
  width: 300px;
  height: 560px;
}

.gallery-item--wide {
  width: 560px;
  height: 380px;
}

/* Vertical stagger — every card sits at a slightly different height */
.gallery-item:nth-child(4n+1) { transform: translateY(-40px); }
.gallery-item:nth-child(4n+2) { transform: translateY(20px);  }
.gallery-item:nth-child(4n+3) { transform: translateY(-15px); }
.gallery-item:nth-child(4n+4) { transform: translateY(35px);  }

/* Override stagger on hover zoom so they don't snap back */
.gallery-item:nth-child(4n+1):hover img,
.gallery-item:nth-child(4n+2):hover img,
.gallery-item:nth-child(4n+3):hover img,
.gallery-item:nth-child(4n+4):hover img { transform: scale(1.04); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  transition: transform 0.6s ease;
}

/* Portrait-heavy shots in wide frames — keep faces visible */
.gallery-item--focus-top img {
  object-position: center top;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* Controls */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 60px 0;
}

.gallery-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-green, #2a5c45);
  background: transparent;
  color: var(--color-green, #2a5c45);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}

.gallery-arrow:hover {
  background: var(--color-green, #2a5c45);
  color: #fff;
}

.gallery-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.gallery-progress {
  flex: 1;
  max-width: 240px;
  height: 1px;
  background: rgba(26, 22, 17, 0.12);
  border-radius: 1px;
  overflow: hidden;
}

.gallery-progress-fill {
  height: 100%;
  background: var(--color-green, #2a5c45);
  border-radius: 1px;
  width: 0%;
  transition: width 0.1s ease;
}

/* Mobile */
@media (max-width: 767px) {
  .gallery { padding: 72px 0 60px; }
  .gallery-header { padding: 0 24px; margin-bottom: 32px; }
  .gallery-track { padding: 32px 24px; gap: 10px; }
  .gallery-item { width: 240px; height: 320px; }
  .gallery-item--tall { width: 220px; height: 400px; }
  .gallery-item--wide { width: 380px; height: 260px; }
  .gallery-controls { padding: 28px 24px 0; }
}
