/* ============================================================
   PutOn — Video Showcase (scroll-driven cinematic section)
   Video fades in from transparent, auto-plays when idle,
   reveals "PutOn" at the end, has play/pause controls.
   ============================================================ */

/* ── Section container ─────────────────────────────────────── */
.video-showcase {
  position: relative;
  height: 500vh;
  margin-top: 0;
}

/* ── Sticky viewport ───────────────────────────────────────── */
.vs-sticky {
  position: -webkit-sticky;  /* Safari < 13 */
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Video wrapper — starts transparent ────────────────────── */
.vs-video-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: opacity;
  -webkit-transform: translateZ(0);  /* Safari compositing hint */
  transform: translateZ(0);
}

.vs-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-filter: brightness(0.6) saturate(1.1);
  filter: brightness(0.6) saturate(1.1);
}

/* ── Blur edges (left & right) ─────────────────────────────── */
.vs-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  z-index: 3;
  pointer-events: none;
}

.vs-edge--left {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.3) 60%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  mask-image: linear-gradient(to right, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 40%, transparent 100%);
}

.vs-edge--right {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.3) 60%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  mask-image: linear-gradient(to left, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 0%, black 40%, transparent 100%);
}

/* ── Overlay gradient ──────────────────────────────────────── */
.vs-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 18%),
    linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 22%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(26,107,255,0.06) 0%, transparent 60%);
}

/* ── Text container ────────────────────────────────────────── */
.vs-texts {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ── Text cards — slide from sides ─────────────────────────── */
.vs-text-card {
  position: absolute;
  top: 50%;
  max-width: 520px;
  padding: 2.5rem 3rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  opacity: 0;
  will-change: transform, opacity, filter;
  transition: none;
}

.vs-text-card[data-vs-side="left"] {
  left: 6%;
  transform: translateX(-120px) translateY(-50%);
}

.vs-text-card[data-vs-side="right"] {
  right: 6%;
  transform: translateX(120px) translateY(-50%);
  text-align: right;
}

.vs-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1rem;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
}

.vs-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.15;
}

.vs-title span {
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vs-desc {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin: 0;
}

/* ── End Reveal — "PutOn" title over fading video ──────────── */
.vs-reveal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

.vs-reveal-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #ffffff, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 60px rgba(192,132,252,0.25));
}

.vs-reveal-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin: 0;
}

/* ── Playback Controls ─────────────────────────────────────── */
.vs-controls {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.vs-controls.is-visible {
  opacity: 1;
  pointer-events: all;
}

.vs-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.vs-btn-play:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.vs-time {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-variant-numeric: tabular-nums;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

/* ── Progress bar ──────────────────────────────────────────── */
.vs-progress {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
  z-index: 6;
}

.vs-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #c084fc, #f472b6);
  box-shadow: 0 0 12px rgba(192,132,252,0.5);
  transition: width 0.05s linear;
}

/* ── Dots navigation ───────────────────────────────────────── */
.vs-dots {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.vs-dots.is-visible {
  opacity: 1;
  pointer-events: all;
}

.vs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  border: none;
  padding: 0;
}

.vs-dot.is-active {
  background: #c084fc;
  transform: scale(1.5);
  box-shadow: 0 0 12px #c084fc;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .video-showcase { height: 400vh; }
  .vs-edge { width: 8%; }

  .vs-text-card {
    max-width: 85%;
    padding: 1.5rem 1.5rem;
  }

  /* Center cards on mobile — override left/right positioning AND reset the
     desktop's ±120px initial transform (JS re-applies per-frame, but without
     this reset the first paint shows cards shifted off-screen). */
  .vs-text-card[data-vs-side="left"],
  .vs-text-card[data-vs-side="right"] {
    left: 50%;
    right: auto;
    text-align: center;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
  }

  .vs-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .vs-desc {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .vs-label {
    font-size: 0.6rem;
    padding: 3px 10px;
  }

  .vs-reveal-title {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .vs-reveal-sub {
    font-size: 0.95rem;
  }

  .vs-dots { right: 0.8rem; }

  .vs-controls {
    bottom: 4.2rem;
    gap: 10px;
  }

  .vs-btn-play {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .vs-time {
    font-size: 0.7rem;
  }

  .vs-progress {
    bottom: 2rem;
    width: 120px;
  }
}

@media (max-width: 480px) {
  .video-showcase { height: 350vh; }

  .vs-edge {
    width: 4%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .vs-text-card {
    padding: 1.1rem 1.2rem;
    max-width: 92%;
  }

  .vs-title {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }

  .vs-desc {
    font-size: 0.8rem;
  }
}
