/* Lunchdate home: the light layer (light.js draws into this canvas).
   Fixed behind all page content. Without WebGL, with a shader error or when
   frames are too slow, light.js removes the canvas and the page shows its
   plain --bg exactly as before. Until the first frame it stays invisible, then fades in over 1.2 s (and
   out the same way if it gives up later). */

.ld-light {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    /* A canvas is a replaced element: without an explicit width it takes the
       width its buffer's aspect ratio gives it, not the viewport's. */
    width: 100%;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.light-on .ld-light {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .ld-light {
        transition: none;
    }
}

@media (forced-colors: active), print {
    .ld-light {
        display: none;
    }
}
