/* ================================================
   STEWSKIM — Video lightbox
   Standalone. Loaded after styles.css so a design
   refresh of styles.css never clobbers the player.
   ================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(0.7);
  backdrop-filter: blur(22px) saturate(0.7);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.lightbox.is-open { display: flex; }
.lightbox.is-visible { opacity: 1; }

/* Stop the page behind from scrolling while the player is up */
body.lightbox-locked { overflow: hidden; }

.lb-shell {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.lightbox.is-visible .lb-shell { transform: none; }

.lb-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.lb-heading { min-width: 0; }
.lb-eyebrow {
  font: 500 10px 'IBM Plex Mono', monospace;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #a855f7;
  margin-bottom: 7px;
}
.lb-title {
  font-family: 'Archivo Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1;
  font-size: clamp(17px, 2.6vw, 30px);
  color: #f2eefa;
}

.lb-close {
  flex: none;
  font: 700 11px 'IBM Plex Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 15px;
  background: #a855f7;
  color: #0a0a0a;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.lb-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}
.lb-close:focus-visible { outline: 2px solid #f2eefa; outline-offset: 3px; }

.lb-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: calc(76vh * 16 / 9);
  margin: 0 auto;
  background: #000;
  border: 1.5px solid rgba(232, 230, 238, 0.28);
  border-radius: 2px;
  overflow: hidden;
}
.lb-frame iframe,
.lb-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Shown when a film has no video wired up yet */
.lb-pending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.lb-pending .disp { font-size: clamp(15px, 2vw, 22px); }

/* Posters become real buttons */
.poster-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.poster-btn:focus-visible .poster {
  border-color: #a855f7;
  outline: 2px solid #f2eefa;
  outline-offset: 3px;
}

/* Featured player on Mini Movies — plays itself, no play button.
   Click anywhere on it to open the full film with sound. */
.mm-player { cursor: pointer; }
.mm-player .mm-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* A short scrim only behind the NOW PLAYING label, so the label stays
   readable over a bright frame without dimming the entire video. */
.mm-player::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 84px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
}
.mm-player .now-playing { z-index: 2; }

/* Only surfaces on hover, so the default state is just the film */
.mm-player::after {
  content: 'CLICK FOR SOUND';
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  font: 500 9px 'IBM Plex Mono', monospace;
  letter-spacing: 0.24em;
  color: #f2eefa;
  background: rgba(0, 0, 0, 0.72);
  padding: 5px 9px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.mm-player:hover::after { opacity: 1; }
@media (hover: none) { .mm-player::after { display: none; } }

@media (max-width: 768px) {
  .lightbox { padding: 14px; }
  .lb-shell { gap: 10px; }
  .lb-bar { align-items: center; }
  .lb-close { padding: 7px 11px; font-size: 9px; letter-spacing: 0.12em; }
  .lb-frame { max-width: calc(62vh * 16 / 9); }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lb-shell { transition: none; }
  .lb-shell { transform: none; }
}

/* Pre-roll banner video.
   .mm-player is already aspect-ratio 16/9 and so is the video, so the iframe
   just fills it exactly. No cover-scaling: viewport units (100vw / 177.77vh)
   size against the WINDOW, not this box, which made the video wider than its
   frame and cropped it. */
.mm-preroll {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  border: 0;
  object-fit: cover;
  transform: none;
  opacity: 1;                /* it's the feature here, not a backdrop */
  pointer-events: none;      /* clicks fall through to the lightbox */
}
