.hero-video-frame,
.home-video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #171717;
}

.hero-video-frame img,
.home-video-frame img,
.hero-video-frame video,
.home-video-frame video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-video-frame video:not([src]) { visibility: hidden; }
.hero-video-frame video { opacity: 0; }
.hero-video[data-preview-visible] video { opacity: 1; }

.hero-video-toggle {
    position: absolute;
    inset-inline-end: 12px;
    inset-block-end: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #171717d9;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hero-video figcaption { margin-top: 8px; }
.hero-video-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: .35em;
    color: var(--fg);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: underline;
}

.home-video {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: clamp(28px, 6vw, 96px);
    align-items: center;
}

.home-video-copy { max-width: 620px; }
.home-video-frame { border: 1px solid var(--border); }
.home-video-frame video { object-fit: contain; background: #171717; }
.home-video-start { margin-top: 12px; }
.home-video [data-video-status]:empty { display: none; }
.home-video[data-video-variant="landscape"] .home-video-frame { aspect-ratio: 16 / 9; }
.home-video[data-video-variant="portrait"] .home-video-frame { aspect-ratio: 4 / 5; max-width: 340px; justify-self: center; }

@media (max-width: 700px) {
    .home-video { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .home-video-copy .button { width: auto; }
}

@media (max-width: 650px) {
    .hero-video-frame,
    .home-video-frame { aspect-ratio: 4 / 5; }
    .home-video-frame { max-width: 340px; justify-self: center; }
    .home-video[data-video-variant="landscape"] .home-video-frame { max-width: none; }
}
