/* AsiaFlare v2 · video hero layer (look test). Sits inside .hero-bg, under the existing glows and vignette. */
.afv-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #06060a;
  pointer-events: none;
}
.afv-layer .afv-poster,
.afv-layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--afv-pos, 50% 50%);
}
.afv-layer video {
  opacity: 0;
  transition: opacity 1.4s ease;
}
.afv-layer.is-playing video { opacity: 1; }
.afv-layer.is-static video { display: none; }

/* Gentle drift on the still frame when video cannot or should not play. */
@media (prefers-reduced-motion: no-preference) {
  .afv-layer.is-static .afv-poster {
    animation: afv-drift 26s ease-in-out infinite alternate;
    transform-origin: 60% 45%;
  }
}
@keyframes afv-drift {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

/* Readability scrim: landscape keeps the left (headline) side dark, portrait darkens top and bottom. */
.afv-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 42% at 26% 64%, rgba(6, 6, 10, 0.62) 0%, rgba(6, 6, 10, 0.38) 55%, rgba(6, 6, 10, 0) 100%),
    linear-gradient(90deg, rgba(6, 6, 10, 0.62) 0%, rgba(6, 6, 10, 0.34) 30%, rgba(6, 6, 10, 0.1) 55%, rgba(6, 6, 10, 0.18) 100%),
    linear-gradient(180deg, rgba(6, 6, 10, 0.5) 0%, rgba(6, 6, 10, 0) 14%, rgba(6, 6, 10, 0) 70%, #06060a 100%);
}
.afv-layer[data-ratio="9x16"] .afv-shade {
  background:
    linear-gradient(180deg, rgba(6, 6, 10, 0.62) 0%, rgba(6, 6, 10, 0.5) 26%, rgba(6, 6, 10, 0.4) 46%, rgba(6, 6, 10, 0.62) 66%, rgba(6, 6, 10, 0.92) 86%, #06060a 100%);
}

/* Quiet the old abstract background while the video is present. */
.hero:has(.afv-layer) .hero-shader { opacity: 0.22 !important; }
.hero:has(.afv-layer) .hero-grid-bg { opacity: 0.18 !important; }
.hero:has(.afv-layer) .hero-glow-1,
.hero:has(.afv-layer) .hero-glow-2 { opacity: 0.55; mix-blend-mode: screen; }

/* Pause / play control (WCAG 2.2.2). */
.afv-toggle {
  position: absolute;
  z-index: 5;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(14, 14, 22, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.afv-toggle:hover { opacity: 1; background: rgba(214, 40, 57, 0.6); }
.afv-toggle:focus-visible { outline: 2px solid #ff5566; outline-offset: 3px; opacity: 1; }
.afv-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.afv-toggle .afv-i-play { display: none; }
.afv-toggle[aria-pressed="true"] .afv-i-play { display: block; }
.afv-toggle[aria-pressed="true"] .afv-i-pause { display: none; }
.afv-toggle[hidden] { display: none; }
