/* =========================================================
   Poster Carousel — full-screen homepage hero slider
   - Stage absolutely-positioned slides cross-fade in / out
   - GSAP owns the entrance/exit; CSS only sets resting state
   - Slides have a Ken-Burns-style slow scale on the image
   - Controls: prev/next arrows + dots + autoplay progress bar
   ========================================================= */

.poster-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  max-height: 920px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.poster-carousel__stage {
  position: absolute; inset: 0;
}

.poster-carousel__slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* GSAP overrides these on activate; this is the rest state */
}
.poster-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.poster-carousel__media {
  position: absolute; inset: 0;
  overflow: hidden;
}
.poster-carousel__media img,
.poster-carousel__media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Ken-Burns starting state — GSAP scales toward 1 over the slide's life */
  transform: scale(1.08);
  will-change: transform;
}
.poster-carousel__media video {
  background: #000;
}

.poster-carousel__shade {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(21,17,15,0.10) 0%, rgba(21,17,15,0.65) 100%),
    linear-gradient(90deg, rgba(21,17,15,0.55) 0%, transparent 55%);
}

.poster-carousel__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(80px, 12vh, 140px);
  z-index: 2;
}
.poster-carousel__copy > .container {
  /* All copy now lives inside the standard site container so the
     eyebrow / title / button left edge lines up exactly with the
     section headlines below the carousel. */
  max-width: var(--container-wide);
}
.poster-carousel__copy > .container > * {
  max-width: 720px; /* keep the lede readable at extreme widths */
}
.poster-carousel__copy .eyebrow {
  color: var(--gold);
  margin-bottom: 18px;
}
.poster-carousel__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 4.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 20px;
  /* descender padding (Lora) */
  padding-bottom: 0.12em;
}
.poster-carousel__lede {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 560px;
  margin: 0 0 32px;
}

/* ----- Controls ----- */
.poster-carousel__controls {
  position: absolute;
  bottom: clamp(24px, 4vh, 48px);
  right: clamp(28px, 6vw, 96px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 8px 14px;
  background: rgba(21, 17, 15, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.poster-carousel__nav {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent;
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: none;
  transition: background-color .25s ease, transform .25s ease;
}
.poster-carousel__nav:hover { background: rgba(255,255,255,0.12); transform: translateX(0); }
.poster-carousel__nav--prev:hover { transform: translateX(-2px); }
.poster-carousel__nav--next:hover { transform: translateX(2px); }

.poster-carousel__dots {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.poster-carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: none;
  transition: background-color .25s ease, transform .25s ease, width .35s ease;
}
.poster-carousel__dot:hover { background: rgba(255, 255, 255, 0.7); }
.poster-carousel__dot.is-active {
  background: var(--gold);
  width: 28px;
  border-radius: 999px;
}

/* ----- Bottom autoplay progress bar ----- */
.poster-carousel__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 3;
}
.poster-carousel__progress-bar {
  display: block;
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--accent-soft));
  transform-origin: left center;
}

@media (max-width: 760px) {
  .poster-carousel { height: 88vh; min-height: 480px; }
  .poster-carousel__copy {
    bottom: clamp(80px, 12vh, 120px);
  }
  .poster-carousel__controls {
    right: 50%; transform: translateX(50%);
    bottom: 24px;
  }
  .poster-carousel__nav { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .poster-carousel__media img,
  .poster-carousel__media video { transform: none; }
}
