/* ===================================================
   TOLZ List intro reel
   Side-by-side hero layout: title block on the left,
   video reel on the right. Reel auto-plays a 5-sec
   film-leader countdown muted, then swaps to the TOLZ
   intro (also muted, looping). Click to unmute.
   Controller: v3/src/js/tolz-reel.js
   =================================================== */

/* When the reel is mounted, the hero sheet becomes a 2-column grid
   so the title block sits left and the video sits right. */
.archive-hero__sheet--with-reel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
}

.tolz-reel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0c0a07;
    border: 1px solid var(--border-light, rgba(43, 34, 24, 0.2));
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    /* Subtle film-reel framing: dual shadow + paper-tone outer ring */
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 18px 32px -22px rgba(43, 34, 24, 0.5),
        0 4px 0 -2px var(--bg-card, #F0E6D2);
    user-select: none;
}

.tolz-reel:focus-visible {
    outline: 2px solid var(--accent-primary, #C04400);
    outline-offset: 3px;
}

.tolz-reel__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    display: block;
}

.tolz-reel__video[hidden] {
    display: none;
}

/* The countdown is a 4:3 archival leader. object-fit: contain keeps the
   cross-circle motif un-cropped; the 16:9 frame fills with pure black
   pillarbox bars that read as part of the film projector aesthetic. */
.tolz-reel__video--countdown {
    object-fit: contain;
    background: #000;
}

/* Hint pill bottom-right: "click for sound" with a muted-speaker icon.
   Auto-hides once the user has unmuted. Pointer-events:none so the
   underlying tolz-reel button stays the click target. */
.tolz-reel__hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(13, 10, 6, 0.78);
    color: var(--paper, #f3ead7);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

/* Hint only appears once the TOLZ intro has started (post-countdown). The
   data-state attribute is set by tolz-reel.js. */
.tolz-reel[data-state="intro-muted"] .tolz-reel__hint {
    opacity: 0.95;
    transform: translateY(0);
}

.tolz-reel__icon {
    flex-shrink: 0;
}

/* Below ~860px the side-by-side layout cramps. Stack instead. */
@media (max-width: 860px) {
    .archive-hero__sheet--with-reel {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .tolz-reel {
        max-width: 640px;
        margin: 0 auto;
    }
}

/* Reduced-motion: the reel still appears (it's content, not chrome) but
   we don't autoplay the countdown — the user can opt-in by clicking. */
@media (prefers-reduced-motion: reduce) {
    .tolz-reel[data-state="paused"] .tolz-reel__hint {
        opacity: 0.95;
        transform: translateY(0);
    }
}
