/* ============================================
   HERO VIDEO — Sticky text + scroll-expanding video
   Text inverts via mix-blend-mode: difference
   ============================================ */

.hero-video {
  position: relative;
  z-index: 3;
  /* Extra height = scroll runway for the expansion */
  min-height: 200vh;
}

/* --- Sticky text layer --- */
.hero-video__text {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  pointer-events: none;
  /* difference makes white text invert to black on white bg,
     and stay white on dark video */
  mix-blend-mode: difference;
  color: #fff;
}

.hero-video__subtitle {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  opacity: 0.8;
}

.hero-video__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: inherit;
}

/* --- Video container --- */
.hero-video__media {
  position: sticky;
  top: var(--spacing-lg);
  z-index: 1;
  /* Start at 80% width, centered */
  width: var(--hero-video-width, 80%);
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--hero-video-radius, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-text);
  transition: opacity 0.6s ease-out;
  will-change: transform;
}

.hero-video__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- CTA overlay at bottom of video --- */
.hero-video__cta {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  z-index: 3;
}

.hero-video__cta-primary {
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.hero-video__cta-primary:hover {
  filter: brightness(1.05);
}

.hero-video__cta-secondary {
  padding: 0.75rem 1.25rem;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.hero-video__cta-secondary:hover {
  color: #fff;
}

.hero-video__cta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

/* --- Poster overlay + play button --- */
.hero-video__overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.hero-video__overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-video__overlay-text {
  position: absolute;
  bottom: 40px;
  left: 40px;
  max-width: 500px;
}

.hero-video__overlay-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.375rem;
  line-height: 1.5;
  margin: 0;
}

.hero-video__play-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 42px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-video__play-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Video controls --- */
.hero-video__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  opacity: 1;
  pointer-events: auto;
}

.hero-video__seek {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.hero-video__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.hero-video__seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

.hero-video__mute-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hero-video__mute-btn .icon-unmuted { display: none; }
.hero-video__mute-btn.is-unmuted .icon-muted { display: none; }
.hero-video__mute-btn.is-unmuted .icon-unmuted { display: block; }

.hero-video__play-pause-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hero-video__play-pause-btn .icon-play { display: none; }
.hero-video__play-pause-btn.is-paused .icon-pause { display: none; }
.hero-video__play-pause-btn.is-paused .icon-play { display: block; }

/* --- Mobile --- */
@media (max-width: 768px) {
  .hero-video {
    min-height: 150vh;
  }

  .hero-video__media {
    width: var(--hero-video-width, 95%);
  }

  .hero-video__cta {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}
