/* ============================================================
   Videonora - self-hosted reel embeds + click-to-play lightbox
   Loaded after each page's inline <style>; relies on the page
   design tokens (--grey-*, --primary) with safe fallbacks.
   ============================================================ */

/* 3-up video wall (overrides the 5-col placeholder grid) */
.reel-wall--vid {
  grid-template-columns: repeat(3, 1fr) !important;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.reel-wall--vid .reel:nth-child(2) { transform: translateY(28px); }
.reel-wall--vid .reel:nth-child(4) { transform: none; }
@media (max-width: 620px) {
  .reel-wall--vid { grid-template-columns: repeat(3, 1fr) !important; gap: 9px; }
  .reel-wall--vid .reel:nth-child(2) { transform: none; }
}

/* the reel tile is now a button */
button.reel {
  font: inherit;
  color: inherit;
  background: var(--grey-800, #2c2c2c);
  cursor: pointer;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%;
}
button.reel:focus-visible {
  outline: 2px solid var(--primary, #D9B45A);
  outline-offset: 2px;
}
/* real first-frame poster (sits where the gradient .poster used to) */
.reel .poster-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}

/* ---------- Lightbox (built once by reels.js, appended to <body>) ---------- */
.vlb {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  background: rgba(8, 7, 5, .93);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 22px;
}
.vlb.open { display: flex; }
.vlb-stage {
  position: relative;
  height: min(88vh, 900px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
}
.vlb-stage video {
  width: 100%; height: 100%;
  border-radius: 8px; background: #000;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .6);
}
.vlb-close {
  position: absolute; top: 16px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(17, 17, 17, .82);
  border: 1px solid rgba(244, 244, 235, .35);
  color: var(--grey-200, #f4f4eb);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
}
.vlb-close:hover {
  background: var(--primary, #D9B45A);
  color: var(--grey-900, #111);
  border-color: var(--primary, #D9B45A);
}
.vlb-close svg { width: 20px; height: 20px; }
