/* ─────────────────────────────────────────────────────────────
   INSIDE THE PRACTICE V3 — VIDEO PLAYER
   Full-screen overlay · Placeholder · Progress bar · Toast
   ───────────────────────────────────────────────────────────── */

/* ─── OVERLAY SHELL ──────────────────────────────────────── */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-player);
  background: #050810;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s var(--ease-smooth);
  outline: none;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
}

.player-overlay:not(.is-open) {
  visibility: hidden;
}

.player-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  isolation: isolate;
}

/* ─── TOP BAR ────────────────────────────────────────────── */
.player-topbar {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: env(safe-area-inset-top, 0) 16px 0;
  min-height: calc(58px + env(safe-area-inset-top, 0));
  z-index: 50;
  pointer-events: auto;
  background: linear-gradient(to bottom, rgba(5,8,16,0.98) 0%, rgba(5,8,16,0.88) 100%);
}

.player-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.player-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.player-close svg { width: 14px; height: 14px; }

.player-perspective-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.player-sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.player-sound-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.player-sound-btn svg { width: 15px; height: 15px; }

/* Expand — mobile only (shown via JS when playing) */
.player-pause-btn {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  margin-left: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.player-pause-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.player-pause-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px), (pointer: coarse) {
  .player-pause-btn:not([hidden]) {
    display: inline-flex;
  }
}

.player-stage-tap {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.player-overlay.is-mobile-playing .player-stage-tap:not([hidden]) {
  display: block;
}

.player-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.player-expand-btn:hover,
.player-expand-btn.is-expanded {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.player-expand-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

@media (max-width: 900px), (pointer: coarse) {
  .player-expand-btn:not([hidden]) {
    display: inline-flex;
  }
}

/* Muted state */
.player-sound-btn.is-muted { color: var(--text-faint); }
.player-sound-btn.is-muted .player-sound-label::before { content: "Sound off"; }
.player-sound-btn.is-muted .player-sound-label         { font-size: 0; }
.player-sound-btn.is-muted .player-sound-label::before { font-size: 10px; }

/* ─── VIDEO STAGE ────────────────────────────────────────── */
.player-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #050810;
  z-index: 1;
}

.player-overlay.has-ceo-cta .player-stage {
  padding-bottom: 96px;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050810;
}

.player-poster-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(to bottom,
      rgba(5, 8, 16, 0.18) 0%,
      rgba(5, 8, 16, 0.42) 55%,
      rgba(5, 8, 16, 0.82) 100%);
  border: none;
  cursor: pointer;
  transition: opacity 0.35s var(--ease-smooth), visibility 0.35s var(--ease-smooth);
}

.player-stage.is-playing:not(.is-paused) .player-poster-hit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-stage.is-playing.is-paused .player-poster-hit {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  background: rgba(5, 8, 16, 0.62);
  cursor: pointer;
}

.player-video {
  cursor: pointer;
}

.player-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px 20px;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth), transform 0.35s var(--ease-smooth);
}

.player-stage.is-playing .player-meta {
  opacity: 0;
  transform: translateY(12px);
}

/* Play ring */
.player-play-ring {
  width: 84px;
  height: 84px;
  max-width: 84px;
  max-height: 84px;
  flex: 0 0 84px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: rgba(5, 8, 16, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.player-poster-hit:hover .player-play-ring {
  transform: scale(1.06);
  box-shadow: 0 0 32px rgba(227, 172, 23, 0.22);
}

.player-play-ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(227, 172, 23, 0.10);
}

.player-play-ring svg {
  width: 26px; height: 26px;
  color: var(--gold);
  margin-left: 3px;
}

/* Text */
.player-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.15;
}

.player-runtime {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Context copy */
.player-context {
  font-size: 14px;
  color: var(--text-faint);
  line-height: 1.75;
  max-width: 420px;
  margin-top: 12px;
}

/* ─── IN-VIDEO CEO CTA (appears at 1:40) ─────────────────── */
.player-ceo-cta {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(12px + env(safe-area-inset-bottom, 0)));
  transform: translateX(-50%) translateY(16px);
  z-index: 50;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 28px 13px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--text-navy);
  box-shadow: 0 8px 32px rgba(227, 172, 23, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.45s var(--ease-out),
              transform 0.45s var(--ease-out),
              visibility 0.45s var(--ease-out);
  max-width: calc(100% - 48px);
  text-align: center;
}

.player-ceo-cta.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
  animation: unlock-flash 1.1s var(--ease-out) forwards;
}

.player-ceo-cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(2, 43, 86, 0.58);
}

.player-ceo-cta-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.player-ceo-cta-label svg {
  width: 14px;
  height: 14px;
}

.player-ceo-cta-sub {
  font-size: 11px;
  color: rgba(2, 43, 86, 0.52);
  line-height: 1.3;
}

.player-ceo-cta:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 36px rgba(227, 172, 23, 0.42);
}

/* ─── PROGRESS BAR ───────────────────────────────────────── */
.player-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  z-index: 36;
  pointer-events: none;
}

@media (pointer: coarse) {
  .player-overlay.has-ceo-cta .player-video {
    pointer-events: none;
  }
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
  transition: width 0.3s ease;
}

/* ─── UNLOCK TOAST ───────────────────────────────────────── */
.unlock-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(10, 15, 30, 0.94);
  border: 1px solid var(--gold-border);
  border-radius: 100px;
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
}

.unlock-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.unlock-toast-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  animation: lock-breathe 2s ease-in-out infinite;
}
