/* ============================================================
   3:16 GALLERY SLIDESHOW  (added for homepage v2 redesign)
   Uses existing brand tokens from base.css / style.css:
   INK #0A0A0A · GOLD #C9A04A · CREAM #F5F1E8
   Fonts: --font-display (Clash Display) / --font-body (General Sans)
   ============================================================ */

.slideshow {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 420px;
  max-height: 760px;
  overflow: hidden;
  background: #0A0A0A;
  touch-action: pan-y;
}

.slideshow__track {
  position: absolute;
  inset: 0;
}

/* Each slide is stacked and cross-fades */
.slideshow__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
  will-change: opacity;
}

.slideshow__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease, visibility 0s linear 0s;
}

.slideshow__slide picture,
.slideshow__slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.slideshow__slide img {
  object-fit: cover;
  object-position: center;
  min-height: 100%; /* guard against 0px-height lazy-load collapse */
}

/* Subtle top+bottom vignette so arrows/dots/caption stay legible */
.slideshow__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.28) 0%, rgba(10,10,10,0) 22%),
    linear-gradient(0deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0) 34%);
}

/* Caption overlay — bottom-left, INK gradient bg, gold accent line */
.slideshow__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  padding: 20px 26px 22px 30px;
  background: linear-gradient(120deg, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.35) 78%, rgba(10,10,10,0) 100%);
  max-width: min(90%, 560px);
}

.slideshow__caption-line {
  display: block;
  width: 42px;
  height: 2px;
  background: #C9A04A;
  margin-bottom: 12px;
}

.slideshow__caption-text {
  font-family: var(--font-display, 'Clash Display', sans-serif);
  color: #F5F1E8;
  font-size: clamp(1rem, 0.85rem + 0.9vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
}

.slideshow__caption-text b { color: #C9A04A; font-weight: 700; }

/* Arrows */
.slideshow__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245,241,232,0.35);
  border-radius: 50%;
  background: rgba(10,10,10,0.35);
  color: #F5F1E8;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.slideshow__arrow:hover,
.slideshow__arrow:focus-visible {
  background: rgba(10,10,10,0.6);
  color: #C9A04A;
  border-color: #C9A04A;
  outline: none;
}

.slideshow__arrow:active { transform: translateY(-50%) scale(0.94); }

.slideshow__arrow svg { width: 22px; height: 22px; }
.slideshow__arrow--prev { left: 20px; }
.slideshow__arrow--next { right: 20px; }

/* Dots */
.slideshow__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 99px;
  background: rgba(10,10,10,0.3);
  backdrop-filter: blur(2px);
}

.slideshow__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(245,241,232,0.4);
  transition: background 0.25s ease, transform 0.25s ease;
}

.slideshow__dot:hover { background: rgba(245,241,232,0.7); }

.slideshow__dot.is-active {
  background: #C9A04A;
  transform: scale(1.25);
}

.slideshow__dot:focus-visible {
  outline: 2px solid #C9A04A;
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 720px) {
  .slideshow {
    height: 50vh;
    min-height: 340px;
  }
  .slideshow__arrow { width: 40px; height: 40px; }
  .slideshow__arrow--prev { left: 12px; }
  .slideshow__arrow--next { right: 12px; }
  .slideshow__arrow svg { width: 18px; height: 18px; }
  /* Lift the caption above the dots so they don't collide */
  .slideshow__caption {
    padding: 14px 18px 16px 20px;
    bottom: 44px;
    max-width: 100%;
    background: linear-gradient(0deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.35) 70%, rgba(10,10,10,0) 100%);
  }
  .slideshow__caption-line { margin-bottom: 8px; }
  .slideshow__dots { bottom: 12px; }
}

/* Respect reduced motion — no cross-fade animation.
   (JS also disables auto-advance when this is set.) */
@media (prefers-reduced-motion: reduce) {
  .slideshow__slide {
    transition: none;
  }
  .slideshow__slide.is-active {
    transition: none;
  }
}
