/* Bayeux Watch page + player. Rendered inside the bayeux.com theme, so it
   uses the theme's fonts/buttons and only styles its own bx- classes. */
.bx-watch {
  --bx-ink: rgb(var(--color-foreground, 20 22 28));
  --bx-muted: rgba(var(--color-foreground, 20 22 28), 0.68);
  --bx-line: rgba(var(--color-foreground, 20 22 28), 0.16);
  --bx-screen: #000;
  --bx-on-screen: #fff;
  padding-top: 40px;
  padding-bottom: 64px;
  color: var(--bx-ink);
}
.bx-watch__eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-muted); }
.bx-watch__title { margin: 0 0 12px; }
.bx-watch__status { margin: 0 0 20px; color: var(--bx-muted); font-size: 15px; }
.bx-watch__message { max-width: 640px; padding: 32px 0; }
.bx-watch__message h2 { margin: 0 0 12px; }
.bx-watch__message p { margin: 0 0 24px; color: var(--bx-muted); }
.bx-watch__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bx-watch__terms { margin: 24px 0 0; font-size: 14px; color: var(--bx-muted); max-width: 760px; }
.bx-watch__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--bx-line); font-size: 13px; color: var(--bx-muted); }
.bx-watch__legal a { color: inherit; }

/* Player ------------------------------------------------------------------ */
/* --bx-ratio is the film's width / height (set by the Worker, or from the video
   once it loads). On phones the box keeps that shape (never taller than the
   screen), so a vertical film fills the width; laptops get a 16:9 screen below. */
.bx-player {
  container-type: inline-size;
  position: relative;
  aspect-ratio: var(--bx-ratio, 16 / 9);
  width: min(100%, calc(85vh * var(--bx-ratio, 1.7778)));
  width: min(100%, calc(85svh * var(--bx-ratio, 1.7778)));
  margin-inline: auto;
  background: var(--bx-screen);
  color: var(--bx-on-screen);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline: none;
}
.bx-player:focus-visible { box-shadow: 0 0 0 3px rgba(var(--color-foreground, 20 22 28), 0.5); }
.bx-player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.bx-player__shield { position: absolute; inset: 0; z-index: 2; }
.bx-player__wm {
  position: absolute;
  z-index: 3;
  max-width: 80%;
  padding: 4px 8px;
  font: 600 clamp(11px, 1.6vw, 18px) / 1.2 system-ui, sans-serif;
  font-size: clamp(11px, 3.4cqi, 18px);
  color: #fff;
  opacity: 0.05; /* faint on purpose: still recoverable from a screen recording, barely visible */
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: left 4s ease-in-out, top 4s ease-in-out;
}
.bx-player__big-play {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
}
.bx-player__big-play svg { width: 40px; height: 40px; fill: currentColor; margin-left: 4px; }
.bx-player__big-play:hover, .bx-player__big-play:focus-visible { background: rgba(0, 0, 0, 0.85); outline: 2px solid #fff; outline-offset: 3px; }
.bx-player__big-play[hidden] { display: none; }
.bx-player__overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
}
.bx-player__overlay[hidden] { display: none; }
.bx-player__overlay p { margin: 0; max-width: 520px; color: #fff; font-size: 17px; }
.bx-player__overlay .button[hidden] { display: none; }
.bx-player__controls {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  transition: opacity 0.3s;
}
.bx-player.is-idle .bx-player__controls { opacity: 0; }
.bx-player.is-idle { cursor: none; }
.bx-player__btn { flex: none; width: 40px; height: 40px; padding: 8px; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 4px; }
.bx-player__btn svg { width: 24px; height: 24px; fill: currentColor; }
.bx-player__btn:focus-visible { outline: 2px solid #fff; }
.bx-player__time { flex: none; font: 13px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.bx-player__seek-wrap { position: relative; flex: 1; min-width: 60px; display: flex; align-items: center; }
.bx-player__seek, .bx-player__volume { width: 100%; accent-color: #fff; cursor: pointer; margin: 0; }
.bx-player__volume { flex: none; width: 80px; }
.bx-player__ticks { position: absolute; inset: 0; pointer-events: none; }
.bx-player__tick { position: absolute; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; background: rgba(255, 255, 255, 0.7); }

/* Page-filling full screen (iPhone, or when the Fullscreen API is refused). */
.bx-player.is-pseudo-fs { position: fixed; inset: 0; z-index: 2147483000; aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; }
html.bx-noscroll, html.bx-noscroll body { overflow: hidden; }
.bx-player:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; }

/* Laptops and desktops: a wide 16:9 screen whatever the film's shape; a vertical
   film sits in the middle of it. */
@media (min-width: 990px) {
  .bx-player { aspect-ratio: 16 / 9; width: 100%; }
}

@media (max-width: 749px) {
  .bx-watch { padding-top: 24px; }
  .bx-player__volume, .bx-player__controls > .bx-player__time:last-of-type { display: none; }
  .bx-player__big-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .bx-player__big-play svg { width: 30px; height: 30px; }
}

/* A narrow player (vertical film) has no room for the volume slider. */
@container (max-width: 520px) {
  .bx-player__volume { display: none; }
}

/* Chapters ---------------------------------------------------------------- */
.bx-chapters { margin-top: 32px; }
.bx-chapters__title { margin: 0 0 12px; }
.bx-chapters__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bx-line); }
.bx-chapters__item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--bx-line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bx-chapters__item:hover .bx-chapters__name, .bx-chapters__item[aria-current] .bx-chapters__name { text-decoration: underline; }
.bx-chapters__item[aria-current] { font-weight: 700; }
.bx-chapters__item:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.bx-chapters__num, .bx-chapters__at { color: var(--bx-muted); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .bx-player__wm, .bx-player__controls { transition: none; }
}
