/* The showreel window and its player, shared by the homepage and the Work page. */
.video-lightbox-frame video {
  object-fit: contain;
  background: #000;
}

/* The reel opens as a framed part of the site, with a gentle entrance. */
.showreel-heading { display: none; }
.video-lightbox--showreel {
  width: min(94vw, 1180px, calc((100svh - 112px) * 16 / 9 + 26px));
  padding: 0 12px 12px;
  border: 1px solid rgba(226, 216, 200, 0.3);
  border-radius: 6px;
  background: #141414;
  color: #e2d8c8;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.55);
}
.video-lightbox--showreel[open] {
  animation: showreel-open 320ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.video-lightbox--showreel::backdrop {
  background: rgba(8, 8, 8, 0.74);
  backdrop-filter: blur(8px);
  animation: showreel-backdrop 260ms ease-out both;
}
.video-lightbox--showreel .showreel-heading {
  display: flex;
  align-items: center;
  height: 48px;
  padding-inline: 6px 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.video-lightbox--showreel .video-lightbox-frame {
  max-height: none;
  border: 1px solid rgba(226, 216, 200, 0.14);
  border-radius: 3px;
  box-shadow: none;
}
.video-lightbox--showreel .video-lightbox-close {
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-color: rgba(226, 216, 200, 0.24);
  border-radius: 4px;
  color: #e2d8c8;
  background: transparent;
}
.video-lightbox--showreel .video-lightbox-close:hover,
.video-lightbox--showreel .video-lightbox-close:focus-visible { border-color: rgba(226, 216, 200, 0.7); }
@keyframes showreel-open {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes showreel-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .video-lightbox--showreel[open], .video-lightbox--showreel::backdrop { animation: none; }
}

/* Light theme: the window, backdrop, title and close button follow the page; the picture stays on black. */
:root[data-theme="light"] .video-lightbox--showreel {
  border-color: rgba(23, 23, 23, 0.14);
  background: #f4f1ea;
  color: #171717;
  box-shadow: 0 28px 100px rgba(48, 38, 26, 0.28);
}
:root[data-theme="light"] .video-lightbox--showreel::backdrop {
  background: rgba(236, 227, 214, 0.78);
}
:root[data-theme="light"] .video-lightbox--showreel .video-lightbox-frame {
  border-color: rgba(23, 23, 23, 0.1);
}
:root[data-theme="light"] .video-lightbox--showreel .video-lightbox-close {
  border-color: rgba(23, 23, 23, 0.2);
  color: #171717;
}
:root[data-theme="light"] .video-lightbox--showreel .video-lightbox-close:hover,
:root[data-theme="light"] .video-lightbox--showreel .video-lightbox-close:focus-visible {
  border-color: rgba(23, 23, 23, 0.6);
}

.showreel-player {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  color: #e2d8c8;
  background: #000;
  color-scheme: dark;
}
.showreel-player:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.showreel-player video { cursor: pointer; touch-action: manipulation; }
.showreel-controls {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 22px 14px;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.88));
  opacity: 1;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.showreel-controls > * { pointer-events: auto; }
.showreel-player.is-controls-hidden .showreel-controls { opacity: 0; pointer-events: none; }
.showreel-player.is-controls-hidden .showreel-controls > * { pointer-events: none; }
.showreel-player.is-controls-hidden video { cursor: none; }
.showreel-control-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.showreel-control-row button {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.showreel-control-row button:hover { background: rgba(226, 216, 200, 0.12); }
.showreel-control-row svg { width: 22px; height: 22px; }
.showreel-time { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.showreel-time span { margin-inline: 4px; opacity: 0.45; }
.showreel-audio { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.showreel-controls input[type="range"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  accent-color: #e2d8c8;
}
.showreel-controls .showreel-seek { width: 100%; }
.showreel-controls .showreel-volume { width: 64px; }
.showreel-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(226, 216, 200, 0.35);
  border-radius: 2px;
}
.showreel-controls .showreel-seek::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #e2d8c8 var(--progress, 0%), rgba(226, 216, 200, 0.35) var(--progress, 0%));
}
.showreel-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #e2d8c8;
}
.showreel-controls input[type="range"]::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(226, 216, 200, 0.35); }
.showreel-controls input[type="range"]::-moz-range-progress { height: 2px; background: #e2d8c8; }
.showreel-controls input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #e2d8c8; }
.showreel-quality select {
  min-height: 36px;
  padding: 5px 8px;
  border: 1px solid rgba(226, 216, 200, 0.22);
  border-radius: 3px;
  background: rgba(12, 12, 12, 0.55);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.showreel-quality option { background: #141414; color: #e2d8c8; }
.showreel-controls :focus-visible { outline: 1px solid #e2d8c8; outline-offset: 3px; }
.showreel-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  max-width: 85%;
  border-radius: 3px;
  background: rgba(12, 12, 12, 0.8);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}
.showreel-status[hidden], .showreel-control-row button[hidden] { display: none; }
.showreel-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .showreel-controls { padding: 28px 12px 8px; }
  .showreel-control-row { gap: 6px; }
  .showreel-control-row button { flex-basis: 32px; width: 32px; height: 36px; padding: 5px; }
  .showreel-controls .showreel-volume { width: 38px; }
  .showreel-time { font-size: 11px; }
  .showreel-time span { margin-inline: 2px; }
  .showreel-quality select { padding-inline: 4px; font-size: 11px; }
}
@media (max-width: 360px) { .showreel-controls .showreel-volume { display: none; } }
@media (prefers-reduced-motion: reduce) { .showreel-controls { transition: none; } }

.showreel-note { display: none; }
.video-lightbox--showreel .showreel-note { display: block; margin: 12px 6px 2px; font-size: 13px; line-height: 1.5; opacity: 0.78; }
.video-lightbox--showreel .showreel-note a { color: inherit; border-bottom: 1px solid currentColor; }
