.vp_stage {
  --vp-bg:       #ebebe9;
  --vp-ink:      rgba(16, 16, 16, 0.92);
  --vp-ink-soft: rgba(16, 16, 16, 0.62);
  --vp-margin:   40px;
  --vp-sans:     'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
}

.vp_stage {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  padding: var(--vp-margin);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vp-bg);
  color: var(--vp-ink);
  font-family: var(--vp-sans);
  -webkit-font-smoothing: antialiased;
}






/* The slot. It keeps its 16:9 box in the page while the surface is fixed to
   the viewport, so nothing reflows. Width is capped by the viewport height so
   the whole demo fits one screen. */
.vp_player {
  --vp-fg:     rgba(255, 250, 242, 0.92);
  --vp-line:   rgba(255, 255, 255, 0.22);
  --vp-buffer: rgba(255, 255, 255, 0.3);
  --vp-focus:  rgba(255, 255, 255, 0.35);
  --vp-radius: 20px;
  position: relative;
  width: min(100%, calc((100dvh - var(--vp-margin) * 2) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--vp-radius);
  background: rgba(16, 16, 16, 0.06);
  font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
}

.vp_player.vp_is_lifted {
  z-index: 1000;
}

.vp_backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0a0a0a;
  opacity: 0;
  visibility: hidden;
}

/* Flip resizes THIS box. Fullscreen only swaps absolute for fixed - the video
   is never re-parented, which is what keeps it playing through the move. */
.vp_surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--vp-radius);
  background: #101010;
  color: var(--vp-fg);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vp_player.vp_is_expanded .vp_surface {
  position: fixed;
}

.vp_player.vp_is_idle .vp_surface {
  cursor: none;
}

.vp_surface:focus {
  outline: none;
}

.vp_surface:focus-visible {
  outline: 1px solid rgba(16, 16, 16, 0.3);
  outline-offset: 2px;
}

.vp_player.vp_is_expanded .vp_surface:focus-visible {
  outline-color: var(--vp-focus);
  outline-offset: -4px;
}

.vp_video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vp_scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0));
  pointer-events: none;
}

/* Centred with margins, not a transform: GSAP owns transform on every
   element it scales. */
.vp_big_play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(255, 250, 242, 0.92);
  color: #101010;
  cursor: pointer;
  transition: background-color 0.5s cubic-bezier(0.3, 0.9, 0.1, 1);
}

.vp_big_play:hover {
  background-color: rgba(255, 250, 242, 1);
}

.vp_big_play:focus-visible {
  outline: 1px solid var(--vp-focus);
  outline-offset: 4px;
}

.vp_big_play_icon {
  display: block;
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.vp_bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 52px;
  border-radius: 999px;
  cursor: default;
}

/* Never fade a backdrop-filter element: its blur radius and tint are tweened
   instead, the content layer above it carries the opacity. */
.vp_bar_bg {
  --vp-bar-blur: 14px;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: rgba(16, 16, 16, 0.32);
  -webkit-backdrop-filter: blur(var(--vp-bar-blur));
  backdrop-filter: blur(var(--vp-bar-blur));
}

.vp_bar_inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 6px;
}

.vp_btn {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0);
  color: inherit;
  cursor: pointer;
  transition: background-color 0.5s cubic-bezier(0.3, 0.9, 0.1, 1);
}

.vp_btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.vp_btn:focus-visible,
.vp_slider:focus-visible {
  outline: 1px solid var(--vp-focus);
  outline-offset: 2px;
}

.vp_icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}

.vp_icon_alt {
  opacity: 0;
  visibility: hidden;
}

.vp_sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Our own caption line, kept clear of the bar. */
.vp_cues {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 84px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  will-change: transform;
}

.vp_cues.vp_is_hidden {
  display: none;
}

.vp_cue {
  max-width: 80%;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.72);
  color: rgba(255, 250, 242, 0.96);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-align: center;
}

.vp_player.vp_is_expanded .vp_cue {
  font-size: 20px;
}

.vp_btn.vp_is_hidden {
  display: none;
}

/* The replay glyph sits on top of the play glyph; JS crossfades the pair. */
.vp_big_play_icon.vp_icon_alt {
  position: absolute;
  margin-left: 0;
}

.vp_time {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vp_time_sep,
.vp_time_total {
  opacity: 0.75;
}

.vp_slider {
  --vp-p: 0;
  --vp-b: 0;
  --vp-h: 0;
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}

.vp_scrub {
  flex: 1 1 auto;
  min-width: 0;
}

.vp_volume {
  --vp-p: 1;
  flex: 0 0 auto;
  width: 64px;
  margin-right: 6px;
}

.vp_track {
  position: relative;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--vp-line);
}

.vp_track_buffered,
.vp_track_fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
}

.vp_track_buffered {
  background: var(--vp-buffer);
  transform: scaleX(var(--vp-b));
}

.vp_track_fill {
  background: var(--vp-fg);
  transform: scaleX(var(--vp-p));
}

.vp_thumb_pos {
  position: absolute;
  top: 50%;
  left: calc(var(--vp-p) * 100%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.vp_thumb {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--vp-fg);
}

.vp_tip_pos {
  position: absolute;
  bottom: 100%;
  left: calc(var(--vp-h) * 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vp_tip {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.78);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
}

.vp_player.vp_is_native .vp_bar,
.vp_player.vp_is_native .vp_big_play,
.vp_player.vp_is_native .vp_scrim {
  display: none;
}

@media (max-width: 991px) {
  .vp_player {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .vp_stage {
    --vp-margin: 20px;
    gap: 32px;
  }



  .vp_big_play {
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
  }

  .vp_bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: 48px;
  }

  .vp_bar_inner {
    gap: 8px;
    padding: 4px;
  }

  .vp_volume {
    display: none;
  }
}

@media (max-width: 479px) {
  .vp_time_sep,
  .vp_time_total,
  .vp_mute {
    display: none;
  }
}
