/* ===========================================================================
   HERO VSL - THE PREMIERE STAGE (js/wl-vsl.js)

   A title card in front of Voomly's player. The card is the poster everyone
   sees (Voomly has no thumbnail for this video), and pressing play dissolves
   it into the film's first frame, which opens on the same warm black and
   amber light. While the film plays the hero dims (#wl-hero.is-vsl-playing).

   The bezel keeps the gallery's shared glass recipe (white-label-sales.css,
   "HERO VIDEO - SAME GLASS"), and the screen inside it takes the concentric
   corner there too. Everything else about the stage lives here.
   =========================================================================== */

.wl-vsl-stage {
  position: relative;
  isolation: isolate;
  width: min(100%, 62rem);
  margin: 0;
}
/* Settles in with the headline. Plain CSS, so it never waits on page.js's load. */
@media (prefers-reduced-motion: no-preference) {
  .wl-vsl-stage { animation: wl-vsl-in 900ms var(--ease-brand) 200ms both; }
}
@keyframes wl-vsl-in { from { opacity: 0; transform: scale(0.985); } }

.wl-vsl-stage [hidden] { display: none !important; }

/* ---------------------------------------------------------------------------
   THE SCREEN
   16:9 inside the bezel. The player sits underneath the card and stays inert
   until the film is playing; the card is the whole click target.
   ------------------------------------------------------------------------ */
.wl-vsl-stage .wl-vsl { width: 100%; }
.wl-vsl__screen {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0e0a07;
}
/* No layer inside the screen rounds its own corners. The screen's clip-path
   (white-label-sales.css) rounds them all once; a second rounded edge laid on
   top of the first leaves a hairline of whatever is underneath (the film,
   Voomly's grey placeholder) tracing each corner. */
.wl-vsl__player { position: absolute; inset: 0; }
.wl-vsl__player:focus { outline: none; }
.wl-vsl__player:focus-visible { outline: 2px solid var(--cream-050); outline-offset: -2px; }

/* ---------------------------------------------------------------------------
   THE TITLE CARD
   Warm black, an amber key light from the top left and a deep-orange bounce
   from the bottom right: the film's own opening frame, so the cut is soft.
   ------------------------------------------------------------------------ */
.wl-vsl__poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0; /* the screen's clip-path rounds it (THE SCREEN, above) */
  color: var(--cream-050);
  font: inherit;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(85% 75% at 10% 0%, rgba(254, 160, 2, 0.34), transparent 58%),
    radial-gradient(70% 65% at 100% 100%, rgba(191, 78, 11, 0.22), transparent 62%),
    #0e0a07;
  -webkit-tap-highlight-color: transparent;
}
/* the key light lifts as the pointer arrives */
.wl-vsl__poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 14% 0%, rgba(254, 160, 2, 0.22), transparent 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms var(--ease-out);
}
/* film grain: the bezel's own noise, laid over the card */
.wl-vsl__poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.07;
  pointer-events: none;
}
.wl-vsl__poster:focus-visible { outline: none; }
.wl-vsl__poster:focus-visible .wl-vsl__pill { outline: 2px solid var(--cream-050); outline-offset: 4px; }
.wl-vsl-stage[data-state='loading'] .wl-vsl__poster { cursor: progress; }

/* viewfinder corners, drawn as eight 1px strokes */
.wl-vsl__marks {
  --m: clamp(10px, 1.7vw, 18px);
  --c: rgba(251, 249, 246, 0.28);
  position: absolute;
  inset: clamp(12px, 2vw, 22px);
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--m),
    linear-gradient(var(--c), var(--c)) top right / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--m),
    linear-gradient(var(--c), var(--c)) bottom left / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--m),
    linear-gradient(var(--c), var(--c)) bottom right / var(--m) 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--m);
  background-repeat: no-repeat;
}

/* the slate: who made it and how long it runs */
.wl-vsl__slate {
  position: absolute;
  top: clamp(20px, 3vw, 36px);
  left: clamp(26px, 3.8vw, 48px);
  right: clamp(26px, 3.8vw, 48px);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-500);
  font-variant-numeric: tabular-nums;
}

.wl-vsl__center {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.wl-vsl__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--cream-050);
  text-wrap: balance;
}
.wl-vsl__title em { font-style: normal; color: var(--accent); }

/* ---------------------------------------------------------------------------
   THE PLAY PILL
   Frosted glass holding the ember. The ember is the CTA's sunset made round,
   with the CTA's dark ink for the glyph.
   ------------------------------------------------------------------------ */
.wl-vsl__pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 6px 24px 6px 6px;
  border-radius: 999px;
  background: rgba(14, 10, 7, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 0 0 1px rgba(251, 249, 246, 0.14),
    inset 0 1px 0 rgba(251, 249, 246, 0.12),
    0 18px 40px -18px rgba(0, 0, 0, 0.7);
  transition: box-shadow 120ms var(--ease-out);
}
.wl-vsl__ember {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--app-primary-fg);
  background: radial-gradient(circle at 34% 28%, #ffd28a 0%, var(--accent) 42%, var(--app-sunset-2) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -6px 12px rgba(191, 78, 11, 0.45),
    0 0 0 6px rgba(254, 160, 2, 0.1),
    0 8px 26px rgba(255, 94, 0, 0.45);
  transition: scale 120ms var(--ease-out);
}
.wl-vsl__ember svg { width: 18px; height: 18px; translate: 1.5px 0; }
/* The stage's one idle loop: a slow breath around the ember, until the first
   play, and only while the stage is on screen. */
.wl-vsl__ember::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(254, 160, 2, 0.55);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .wl-vsl-stage:not(.is-played):not(.is-offscreen) .wl-vsl__ember::before {
    animation: wl-vsl-breath 3.2s var(--ease-ping) infinite;
  }
}
@keyframes wl-vsl-breath {
  0% { opacity: 0.6; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.45); }
}

.wl-vsl__label,
.wl-vsl__label-state {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--cream-050);
  white-space: nowrap;
}
.wl-vsl__label-state { display: none; }
.wl-vsl__time {
  padding-left: 14px;
  border-left: 1px solid rgba(251, 249, 246, 0.16);
  font-size: 13px;
  color: var(--cream-400);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* states, set by wl-vsl.js on the stage */
.wl-vsl-stage:is([data-state='loading'], [data-state='ready'], [data-state='error']) .wl-vsl__label { display: none; }
.wl-vsl-stage:is([data-state='loading'], [data-state='ready'], [data-state='error']) .wl-vsl__label-state { display: inline; }
.wl-vsl-stage[data-state='loading'] .wl-vsl__ember svg { opacity: 0; }
.wl-vsl-stage[data-state='loading'] .wl-vsl__ember::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(31, 31, 30, 0.22);
  border-top-color: var(--app-primary-fg);
  border-radius: 50%;
  animation: wl-vsl-spin 0.8s linear infinite;
}
@keyframes wl-vsl-spin { to { transform: rotate(1turn); } }

@media (hover: hover) and (pointer: fine) {
  .wl-vsl__poster:hover::before { opacity: 1; transition-duration: 160ms; }
  .wl-vsl__poster:hover .wl-vsl__pill {
    transition-duration: 160ms;
    box-shadow:
      inset 0 0 0 1px rgba(254, 160, 2, 0.42),
      inset 0 1px 0 rgba(251, 249, 246, 0.14),
      0 18px 44px -16px rgba(255, 94, 0, 0.35);
  }
  .wl-vsl__poster:hover .wl-vsl__ember { scale: 1.06; transition-duration: 160ms; }
}
.wl-vsl__poster:active .wl-vsl__ember { scale: 0.9; transition-duration: 120ms; }

/* ---------------------------------------------------------------------------
   SOUND HINT, CONSENT NOTE, FLARE
   ------------------------------------------------------------------------ */
.wl-vsl__sound,
.wl-vsl__note {
  position: absolute;
  bottom: clamp(18px, 2.8vw, 34px);
}
.wl-vsl__sound {
  left: clamp(26px, 3.8vw, 48px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-500);
}
.wl-vsl__sound svg { width: 14px; height: 14px; }
.wl-vsl-stage.is-gated .wl-vsl__sound { display: none; }
/* centred by margins, not translate: GSAP clears `translate` when it fades the note out */
.wl-vsl__note {
  left: 0;
  right: 0;
  width: min(36ch, 80%);
  margin-inline: auto;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cream-400);
}

/* where the ember ignites; wl-vsl.js centres it on the ember (xPercent/yPercent) and scales it */
.wl-vsl__flare {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 138, 0.9) 0%, rgba(254, 160, 2, 0.55) 32%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   THE END CARD
   ------------------------------------------------------------------------ */
.wl-vsl__end {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(14px, 2.2vw, 26px);
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(85% 75% at 10% 0%, rgba(254, 160, 2, 0.3), transparent 58%),
    radial-gradient(70% 65% at 100% 100%, rgba(191, 78, 11, 0.2), transparent 62%),
    rgba(14, 10, 7, 0.86);
  /* frosted, so the film's last frame and Voomly's own end screen blur away
     behind the card instead of ghosting through its words */
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.wl-vsl__end-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--cream-050);
}
.wl-vsl__end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.wl-vsl__end .btn--primary { min-height: 52px; padding-inline: 28px; font-size: 16px; }
.wl-vsl__replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(251, 249, 246, 0.06);
  box-shadow: inset 0 0 0 1px rgba(251, 249, 246, 0.16);
  color: var(--cream-050);
  font: 500 15px/1 var(--font-body);
  cursor: pointer;
  transition: background-color 120ms var(--ease-out);
}
.wl-vsl__replay svg { width: 16px; height: 16px; }
.wl-vsl__replay:hover { background: rgba(251, 249, 246, 0.1); transition-duration: 160ms; }
.wl-vsl__replay:focus-visible { outline: 2px solid var(--cream-050); outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   LIGHTS DOWN
   While the film plays the beams, the dots and the headline block recede.
   The CTA block underneath stays at full strength. The beams are painted by
   their ::after, so this never fights their entrance animation.
   ------------------------------------------------------------------------ */
#wl-hero .wl-hero-light::after,
#wl-hero .wl-hero-dots,
#wl-hero .wl-offer-hero__copy:not(.wl-offer-hero__copy--cta) {
  transition: opacity 700ms var(--ease-out);
}
#wl-hero.is-vsl-playing .wl-hero-light::after,
#wl-hero.is-vsl-playing .wl-hero-dots,
#wl-hero.is-vsl-playing .wl-offer-hero__copy:not(.wl-offer-hero__copy--cta) {
  transition-duration: 1200ms;
  transition-delay: 150ms;
}
#wl-hero.is-vsl-playing .wl-hero-light::after,
#wl-hero.is-vsl-playing .wl-hero-dots { opacity: 0.28; }
#wl-hero.is-vsl-playing .wl-offer-hero__copy:not(.wl-offer-hero__copy--cta) { opacity: 0.5; }

/* ---------------------------------------------------------------------------
   PHONES
   ------------------------------------------------------------------------ */
@media (max-width: 640px) {
  .wl-vsl__marks { --m: 10px; inset: 10px; }
  .wl-vsl__slate { top: 16px; left: 22px; right: 22px; letter-spacing: 0.14em; }
  .wl-vsl__center { gap: 12px; }
  .wl-vsl__pill { height: 52px; gap: 10px; padding: 6px 18px 6px 6px; }
  .wl-vsl__ember { width: 40px; height: 40px; }
  .wl-vsl__ember svg { width: 15px; height: 15px; }
  .wl-vsl__label-more { display: none; }
  .wl-vsl__label { font-size: 15px; }
  .wl-vsl__label-state { font-size: 14px; }
  .wl-vsl__time { padding-left: 10px; font-size: 12px; }
  .wl-vsl-stage:is([data-state='loading'], [data-state='ready'], [data-state='error']) .wl-vsl__time { display: none; }
  .wl-vsl__sound { display: none; }
  .wl-vsl__note { bottom: 10px; width: 92%; font-size: 11px; line-height: 1.35; }
  /* the consent note needs the room: the slate steps aside (the pill still says how long) */
  .wl-vsl-stage.is-gated .wl-vsl__slate { display: none; }
  .wl-vsl-stage.is-gated .wl-vsl__center { translate: 0 -14px; }
  .wl-vsl__end { gap: 12px; padding: 14px; }
  .wl-vsl__end .btn--primary { min-height: 44px; padding-inline: 18px; font-size: 14px; }
  .wl-vsl__replay { min-height: 44px; padding: 0 14px; font-size: 14px; }
}

/* ---------------------------------------------------------------------------
   REDUCED MOTION, REDUCED TRANSPARENCY
   Reduced motion keeps the composition and drops the travel: no settle, no
   breath (both gated above), no magnet or flare (wl-vsl.js), and the lights
   change in a blink rather than a fade.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  #wl-hero .wl-hero-light::after,
  #wl-hero .wl-hero-dots,
  #wl-hero .wl-offer-hero__copy:not(.wl-offer-hero__copy--cta) {
    transition-duration: 150ms !important;
    transition-delay: 0s !important;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .wl-vsl__pill { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ink-800); }
  .wl-vsl__end { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #0e0a07; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .wl-vsl__pill { background: rgba(14, 10, 7, 0.85); }
  .wl-vsl__end { background-color: #0e0a07; }
}
