/* ── Film ────────────────────────────────────────────────────
   Figma (Gallery): desktop 1366:89948, mobile 1366:90059. A
   still (or the silent loop over it) under a beamwood wash, the
   play button and the words centred; the film plays in a lightbox.
   ─────────────────────────────────────────────────────────── */

.film {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 618px;
    padding: 64px var(--pad-x);
    overflow: hidden;
    background: var(--color-beamwood);
    color: #FCFBFA;
    text-align: center;
}

.film__media {
    position: absolute;
    inset: 0;
}

.film__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(20, 13, 12, 0.45);
    pointer-events: none;
}

.film__image,
.film__loop {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Over the still, shown once it is playing (no black frame first) */
.film__loop {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.film__loop.is-playing {
    opacity: 1;
}

.film__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 52px;
    max-width: 838px;
}

.film__play {
    display: block;
    width: 95px;
    height: 99px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: transform var(--transition);
}

.film__play:hover {
    transform: scale(1.06);
}

.film__play:focus-visible {
    outline: 2px solid #FCFBFA;
    outline-offset: 4px;
}

.film__play-icon {
    display: block;
    width: 100%;
    height: 100%;
}

.film__words {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.film__title {
    font-size: 56px;
    font-weight: 300;
    line-height: normal;
    color: #FCFBFA;
}

.film__title em {
    color: inherit;
}

.film__text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-style: italic;
    color: rgba(252, 251, 250, 0.85);
}

/* The lightbox: the film 16:9, as big as fits, on a dark overlay; the
   page stays put behind it */
html:has(.film__dialog[open]) {
    overflow: hidden;
}

.film__dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 72px var(--pad-x);
    border: 0;
    background: none;
    overflow: hidden;
}

.film__dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.film__dialog::backdrop {
    background: rgba(20, 13, 12, 0.92);
}

.film__frame {
    width: min(100%, 1280px, (100vh - 144px) * 16 / 9);
    aspect-ratio: 16 / 9;
    background: #000000;
}

.film__frame iframe,
.film__player {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.film__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: none;
    color: #FCFBFA;
    cursor: pointer;
    transition: opacity var(--transition);
}

.film__close:hover {
    opacity: 0.7;
}

.film__close:focus-visible {
    outline: 2px solid #FCFBFA;
    outline-offset: 2px;
}

.film__close svg {
    width: 40px;
    height: 40px;
}


/* Tablet and mobile — 1024px and below */
@media (max-width: 1024px) {
    .film {
        min-height: 454px;
        padding: var(--pad-y) var(--pad-x);
    }

    .film__inner {
        gap: 32px;
    }

    .film__play {
        width: 64px;
        height: 67px;
    }

    .film__words {
        gap: 12px;
    }

    .film__title {
        font-size: 32px;
        line-height: 1.06;
    }

    .film__text {
        font-size: 16px;
    }
}
