/* ════════════════════════════════════════════════════════════════════════
   leoamf-vimeo.css  ·  Reusable branded Vimeo player for the funnel
   --------------------------------------------------------------------------
   Pairs with leoamf-vimeo.js. Any container marked data-vimeo-id becomes a
   silent autoplay loop (muted, GIF-style) on load. A clean green play overlay
   sits on top. Click play -> the video restarts at 0, unmutes, plays through.
   Then the overlay becomes a full-bleed, invisible click layer: a click
   anywhere toggles play/pause (lv-paused brings the center glyph back), like a
   normal video. No scrubber, no seek, no bottom control, no Vimeo chrome.
   The container keeps whatever poster/border/radius the page already gave it
   (.vsl, .st-vid); this only fills it with the iframe + overlay layers.
   ════════════════════════════════════════════════════════════════════════ */

/* solid branded backdrop UNDER the iframe. The host already paints a poster
   background, but a transparent iframe can flash Vimeo's own black canvas while
   it boots. This sits at z-index 0 so there is never a black box: brand ink +
   a soft emerald top-glow that matches the host poster treatment. */
.lv-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(29, 185, 84, 0.16), transparent 60%),
    linear-gradient(165deg, #1a1a1a 0%, #0a0a0a 100%);
}

/* the iframe lives full-bleed inside the host container. Sizing here is a
   defense-in-depth backup to the inline width/height the JS sets at creation,
   so even before this stylesheet loads the iframe can never lay out at Vimeo's
   intrinsic 640x360 default (the "small frame" flash) once CSS applies. */
.lv-frame {
  position: absolute;
  top: 0;
  left: 0;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  border: 0;
  display: block;
  z-index: 1;
  /* stay transparent until ready so the branded backdrop shows through, never
     Vimeo's black canvas */
  background: transparent;
}

/* while the SDK is still booting, the loop frame may be undrawn/black; keep the
   iframe fully transparent (backdrop shows) and fade it in only once the JS
   confirms a real frame is rendering. No black box should ever be visible. */
.lv-host .lv-frame {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out, ease);
}
.lv-host.lv-ready .lv-frame {
  opacity: 1;
}

/* ── bottom-right logo + chrome mask ──────────────────────────────────────
   The Vimeo account plan is "starter", which cannot reliably strip the Vimeo
   logo via the embed preset. We use controls=0 (no native UI) AND paint our
   own soft corner gradients so any stray logo / chrome is covered by brand
   ink. Pointer-events:none so it never blocks our overlay clicks. */
.lv-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.lv-mask::after {
  /* bottom-right wedge where the Vimeo logo would sit */
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 30%;
  background: radial-gradient(
    120% 120% at 100% 100%,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.55) 42%,
    rgba(10, 10, 10, 0) 72%
  );
}
.lv-mask::before {
  /* top-right wedge (watch-later / share area) for extra safety */
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 34%;
  height: 26%;
  background: radial-gradient(
    120% 120% at 100% 0%,
    rgba(10, 10, 10, 0.78) 0%,
    rgba(10, 10, 10, 0.32) 45%,
    rgba(10, 10, 10, 0) 72%
  );
}

/* ── fullscreen toggle, top-right ─────────────────────────────────────────
   Sits over the top-right corner mask. Standard Fullscreen API on the whole
   player container (so our masks + custom controls stay, no Vimeo chrome
   reappears). Toggles between an expand and a contract icon. */
.lv-fs {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s var(--ease-out, ease),
    transform 0.18s var(--ease-out, ease), color 0.2s var(--ease-out, ease);
}
.lv-fs:hover {
  background: rgba(10, 10, 10, 0.74);
  color: #fff;
}
.lv-fs:active {
  transform: scale(0.94);
}
.lv-fs-ic {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}
.lv-fs .lv-ic-fs-close {
  display: none;
}
.lv-fs.is-fs .lv-ic-fs-open {
  display: none;
}
.lv-fs.is-fs .lv-ic-fs-close {
  display: block;
}
.st-vid .lv-fs {
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

/* fullscreen layout: the host normally has a fixed aspect-ratio. When it owns
   the screen, let it fill so the video is not boxed in by 16/9 / 9/16. The
   iframe still absolute-fills; object-fit:contain on the player keeps the whole
   frame visible with brand ink (the backdrop) around any letterbox bars. */
.lv-host.lv-fs-on {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  display: flex;
}
.lv-host.lv-fs-on .lv-frame {
  position: absolute;
  inset: 0;
}
:fullscreen.lv-host {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}
:-webkit-full-screen.lv-host {
  width: 100vw;
  height: 100vh;
}

/* ── big centered play overlay (shown over the silent loop) ───────────────
   Reuses the page's existing .vsl-play / .st-play styling for the button via
   class composition, so it matches the host. We only add the dim veil. */
.lv-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  border: 0;
  width: 100%;
  appearance: none;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.28) 0%,
    rgba(10, 10, 10, 0.42) 100%
  );
  transition: opacity 0.3s var(--ease-out, ease);
}
.lv-overlay-btn {
  width: clamp(64px, 14vw, 86px);
  height: clamp(64px, 14vw, 86px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(
    180deg,
    var(--emerald-2, #1db954) 0%,
    var(--emerald, #16a34a) 52%,
    var(--green-deep, #117536) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s var(--ease-out, ease),
    box-shadow 0.22s var(--ease-out, ease);
  padding-left: 4px; /* optically center the glyph */
  pointer-events: none; /* the whole overlay is the click target */
}
.lv-overlay:hover .lv-overlay-btn {
  transform: scale(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 30px rgba(0, 0, 0, 0.5);
}
.lv-overlay-label {
  font-family: var(--font-mono, "Poppins", system-ui, sans-serif);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
/* a vertical (st-vid) host gets a slightly smaller play button */
.st-vid .lv-overlay-btn {
  width: clamp(62px, 16vw, 76px);
  height: clamp(62px, 16vw, 76px);
}

/* ── overlay as the play/pause click surface (normal-video feel) ───────────
   While the real watch is PLAYING the overlay stays a full-bleed, full-size
   click target but goes invisible: no dim veil, no center glyph, no label. A
   click anywhere toggles play/pause through the SDK, like a normal player. */
.lv-host.lv-playing .lv-overlay {
  background: transparent;
  gap: 0;
}
.lv-host.lv-playing .lv-overlay-btn,
.lv-host.lv-playing .lv-overlay-label {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* PAUSED: bring the big center play glyph back so the viewer can see the video
   is paused and click anywhere to resume. The overlay stays full-size + the
   button reappears (label stays hidden, the glyph alone reads as "resume"). */
.lv-host.lv-playing.lv-paused .lv-overlay {
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.28) 0%,
    rgba(10, 10, 10, 0.42) 100%
  );
}
.lv-host.lv-playing.lv-paused .lv-overlay-btn {
  opacity: 1;
  visibility: visible;
}

/* keep the existing placeholder play button hidden once we take over */
.lv-host .vsl-inner,
.lv-host .st-vid-inner {
  display: none;
}

/* keep the personal "From leoamf" badge floating above the iframe */
.lv-host .st-vid-tag {
  z-index: 5;
}

/* ── volume control, bottom-left ──────────────────────────────────────────
   Mute toggle + slim slider in a glassy chip, matching the fullscreen button.
   Hidden during the silent preview (it is muted by design); appears once the
   real watch starts. On coarse pointers (phones/tablets) the slider is hidden:
   hardware buttons set the level there, so only the mute toggle shows. */
.lv-vol {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  /* solid ink, NOT backdrop-filter: a blur chip sitting on a playing video
     re-blurs every frame (measurable jank); flat rgba reads the same here */
  background: rgba(10, 10, 10, 0.62);
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out, ease), background 0.2s var(--ease-out, ease);
}
.lv-host.lv-playing .lv-vol {
  opacity: 1;
  visibility: visible;
}
.lv-vol:hover {
  background: rgba(10, 10, 10, 0.78);
}
.lv-mute {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.2s var(--ease-out, ease), transform 0.18s var(--ease-out, ease);
}
.lv-mute:hover {
  color: #fff;
}
.lv-mute:active {
  transform: scale(0.94);
}
.lv-mute-ic {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}
.lv-vol .lv-ic-vol-off {
  display: none;
}
.lv-vol.is-muted .lv-ic-vol-on {
  display: none;
}
.lv-vol.is-muted .lv-ic-vol-off {
  display: block;
}
.lv-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 38px;
  margin: 0;
  padding: 0 12px 0 2px;
  background: transparent;
  cursor: pointer;
}
.lv-vol-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}
.lv-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border-radius: 50%;
  border: 0;
  background: var(--emerald-2, #1db954);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.lv-vol-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}
.lv-vol-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--emerald-2, #1db954);
}
.lv-vol-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--emerald-2, #1db954);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.lv-vol-slider:focus-visible {
  outline: 2px solid var(--emerald-2, #1db954);
  outline-offset: 2px;
  border-radius: 999px;
}
/* muted -> the slider dims so the state reads at a glance */
.lv-vol.is-muted .lv-vol-slider {
  opacity: 0.45;
}
@media (pointer: coarse) {
  .lv-vol-slider {
    display: none;
  }
}
.st-vid .lv-vol {
  left: 9px;
  bottom: 9px;
  height: 34px;
  border-radius: 9px;
}
.st-vid .lv-mute {
  width: 34px;
  height: 34px;
}

/* while the video is actually playing, the fullscreen chip drops its
   backdrop-filter too (same per-frame re-blur cost as above) */
.lv-host.lv-playing .lv-fs {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10, 10, 10, 0.62);
}

/* ── watch mode: shed ambient rendering load ──────────────────────────────
   leoamf-vimeo.js holds `lv-watching` on <body> while the genuine watch is
   PLAYING (not the muted preview, not while paused). Fullscreen is smooth
   because nothing else renders; windowed must match it, so the page's
   infinite decorative animations pause — marquees, glow pulses, gauges,
   floats. One-shot reveals and spinners are intentionally NOT touched. */
body.lv-watching .marquee-track,
body.lv-watching .wa-marquee,
body.lv-watching .eyebrow .dot,
body.lv-watching .hero::before,
body.lv-watching .lt-ms-fill,
body.lv-watching .lt-ms-path,
body.lv-watching .lt-ms-d,
body.lv-watching .lt-ms-week .bar,
body.lv-watching .pkg-phone,
body.lv-watching .placeholder-icon {
  animation-play-state: paused !important;
}
