/* Luna's birthday slideshow — 16:9 stage for a projector. */

:root {
    --bg: #070708;
    --fade: 650ms;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    cursor: none;
}

/* The stage always renders 16:9, whatever shape the window is. */
.stage {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg);
}

.frame {
    position: relative;
    width: min(100vw, 177.7778vh);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 120px rgba(0, 0, 0, 0.9);
}

/* Blurred fill so portrait photos don't sit between hard black bars. */
.backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(64px) saturate(1.15) brightness(0.32);
    transform: scale(1.18);
    transition: background-image 400ms ease, opacity 600ms ease;
    z-index: 0;
}

.photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity var(--fade) ease;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.photo.is-front {
    opacity: 1;
}

/* Faint vignette keeps the photo feeling framed on a big screen. */
.frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .photo,
    .backdrop {
        transition-duration: 1ms !important;
    }
}
