/*
 * BentoSort: the tutorial video on the support page (support.html in every language), loaded
 * after base.css and prose.css. The poster is a link (no JavaScript) or a button (video.js);
 * the YouTube player replaces it only after a click.
 */

/* The video sits in its own lacquered compartment and keeps 16:9 at any width. */
.video-embed {
    aspect-ratio: 16 / 9; margin: 1rem 0 0.75rem; border-radius: var(--radius); overflow: hidden;
    background: var(--lacquer); box-shadow: var(--card-shadow);
}
.video-embed:has(:focus-visible) { outline: 3px solid var(--indigo); outline-offset: 3px; }

.video-play {
    position: relative; display: block; width: 100%; height: 100%;
    margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.video-play:focus-visible { outline: none; } /* the compartment draws the ring, so the radius matches */
.video-play picture, .video-play img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Play: a vermilion lacquer disc with a rice-white triangle, centered (the same in right-to-left). */
.video-play-icon {
    position: absolute; inset: 0; margin: auto; width: clamp(3.5rem, 12%, 5rem); height: auto; aspect-ratio: 1;
    filter: drop-shadow(0 4px 10px rgb(30 25 22 / 0.45));
}
.video-play-icon circle { fill: var(--rim); }
.video-play-icon path { fill: var(--rice); }
.video-play:hover .video-play-icon circle, .video-play:focus-visible .video-play-icon circle { fill: var(--vermilion-ink); }

.video-frame { display: block; width: 100%; height: 100%; border: 0; }

.video-note { color: var(--ink-soft); font-size: 0.92rem; }

@media (prefers-reduced-motion: no-preference) {
    .video-play-icon { transition: scale 160ms ease-out; }
    .video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon { scale: 1.08; }
}
