/*
 * Home page hero video (index.html .hero-video-side), which replaced the old
 * scripted "terminal" panel. Behaviour: /assets/js/story-video.js
 */

/* Same box as the old terminal: the hero grid keeps its 1.15fr / 0.85fr
   columns and the panel stretches to the full height of the copy beside it
   (about 520 x 605 at 1366px wide). The clip is a 6:7 cut made for this
   shape, so object-fit: cover only trims a sliver at unusual widths. At
   <=900px the hero stacks (launchzone.css) and the panel keeps the 6:7 shape. */
.story-video-frame {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 6 / 7;
    background: var(--lz-paper, #f7f7f3);
    border: 1px solid var(--lz-ink, #090909);
    border-radius: 10px;
    box-shadow: 8px 8px 0 var(--lz-ink, #090909);
}

.story-video-player {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-video-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--lz-ink, #090909);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--lz-ink, #090909);
    border-radius: 50%;
    cursor: pointer;
}

.story-video-toggle:focus-visible {
    outline: 2px solid var(--lz-signal, #0b7f79);
    outline-offset: 2px;
}

.story-video-toggle svg {
    width: 18px;
    height: 18px;
}

.story-video-toggle .icon-play,
.story-video-toggle[aria-pressed="true"] .icon-pause {
    display: none;
}

.story-video-toggle[aria-pressed="true"] .icon-play {
    display: block;
}

/* Visitors who asked for less motion get native controls instead of autoplay. */
.story-video-frame.is-manual .story-video-toggle {
    display: none;
}

@media (min-width: 901px) {
    body.d2q-launchzone .hero-video-side .story-video-frame {
        height: 100%;
        aspect-ratio: auto;
    }
}

@media (max-width: 620px) {
    .story-video-frame {
        box-shadow: 5px 5px 0 var(--lz-ink, #090909);
    }

    .story-video-toggle {
        right: 8px;
        bottom: 8px;
    }
}
