/* Promo "quick peek" player (see promo-video.js). Theme it with the --pv-* variables. */
.promo-player {
  --pv-ratio: 1.7778;
  --pv-radius: 16px;
  --pv-bg: #000;
  --pv-line: rgba(255, 255, 255, 0.18);
  --pv-accent: #fff;
  --pv-accent-fg: #000;
  --pv-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --pv-font: inherit;
  width: 100%;
  max-width: var(--pv-max, 960px);
  margin: 0 auto;
  font-family: var(--pv-font);
}
.promo-frame {
  position: relative;
  aspect-ratio: var(--pv-ratio);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--pv-line);
  border-radius: var(--pv-radius);
  background: var(--pv-bg);
  box-shadow: var(--pv-shadow);
}
.promo-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--pv-bg);
}
.promo-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.promo-open:focus-visible,
.promo-mute:focus-visible {
  outline: 3px solid var(--pv-accent);
  outline-offset: -4px;
}
.promo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  font-size: 0; /* label lives in the button's aria-label; the circle is the visible control */
  line-height: 0;
  pointer-events: none;
}
.promo-play i {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pv-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.promo-play i::after {
  content: "";
  margin-left: 5px;
  border-left: 20px solid var(--pv-accent-fg);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}
.promo-open:hover .promo-play i { transform: scale(1.06); }
.promo-mute {
  position: absolute;
  right: 64px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.promo-mute svg { width: 22px; height: 22px; }
.promo-player.is-static .promo-mute { display: none; }
.promo-expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.promo-expand svg { width: 20px; height: 20px; }
.promo-expand:focus-visible { outline: 3px solid var(--pv-accent); outline-offset: -4px; }
/* Seek bar: only while playing with sound. Absolute, so nothing shifts when it appears. */
.promo-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--pv-accent);
  background: transparent;
  cursor: pointer;
}
.promo-player.is-engaged .promo-progress { display: block; }
.promo-player.is-live .promo-play { opacity: 0; visibility: hidden; }
.promo-player.is-engaged .promo-open:focus-visible { outline-offset: -4px; }
.promo-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  transform: none;
  box-shadow: none;
}
.promo-frame:fullscreen .promo-video { object-fit: contain; }
.promo-frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  transform: none;
  box-shadow: none;
}
.promo-frame:-webkit-full-screen .promo-video { object-fit: contain; }
@media (max-width: 520px) {
  .promo-play i { width: 56px; height: 56px; }
  .promo-play i::after { border-left-width: 17px; border-top-width: 10px; border-bottom-width: 10px; }
  .promo-mute { right: 56px; bottom: 8px; }
  .promo-expand { right: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-play i { transition: none; }
}

/* Bored theme: portrait video in a phone-shaped frame, beside the hero text */
.promo-player {
  --pv-ratio: 0.5625;
  --pv-radius: 34px;
  --pv-accent: var(--yellow);
  --pv-accent-fg: var(--ink);
  --pv-line: rgba(255, 255, 255, 0.64);
  --pv-bg: var(--ink);
  --pv-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pv-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  --pv-max: 340px;
  margin: 0 auto;
}

.promo-phone .promo-frame {
  border-width: 10px;
  transform: rotate(2deg);
}

.promo-phone .promo-mute {
  right: 62px;
  bottom: 10px;
}

.promo-phone .promo-expand {
  right: 10px;
  bottom: 10px;
}

@media (max-width: 640px) {
  /* Existing rule hides .hero-phone on small screens; the promo phone stacks under the text instead. */
  .promo-phone .promo-frame {
    transform: none;
    border-width: 8px;
    border-radius: 28px;
  }
  .promo-player { --pv-max: min(300px, 78vw); }
}
