/**
 * @file
 * Lazy images (Blazy's .media--blazy > img.b-lazy) fade in once loaded
 * (js/images.js).
 *
 * A cover in the secondary surface lies over the image from the first paint
 * (Drupal sets html.js in the page head, before any image draws) and fades
 * out once js/images.js marks the image loaded and decoded. The picture itself
 * never animates: Chrome scales an image whose opacity is animating at low
 * quality and sharpens it afterwards (the "soft, then sharp" James saw,
 * 2026-11-10), and a picture still downloading draws under the cover, not on
 * screen. A broken image keeps its cover, a grey frame. Without JavaScript
 * there is no cover. The image keeps its own opacity (a teaser card's is .5),
 * and the card's title, later in the card, stays above the cover. Blazy's
 * .media--blazy is positioned (blazy.css), so the cover is the image's own.
 */
@media not print {
  html.js .media--blazy:has(> img.b-lazy)::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: var(--bs-secondary-bg);
    transition: opacity var(--biopama-duration-slow, 320ms) var(--biopama-ease, cubic-bezier(0.2, 0, 0, 1));
  }

  html.js .media--blazy:has(> img.b-lazy.akp-image-loaded)::after {
    opacity: 0;
  }
}
