/* ByteReel animated posters. One block per poster, prefixed by its slug. */

/* ---------- I Swear (feature/poster-i-swear): castle doors, the hall, the tic, the Queen ---------- */
.isw-bg { fill: #CF3A1C; }
.isw-stone { fill: #3A2A2A; }
.isw-stone-line { stroke: #2A1E1E; stroke-width: 3; fill: none; }
.isw-frame { fill: #6B4A35; }
.isw-door { fill: #8B4A2B; }
.isw-door-line { stroke: #6A3720; stroke-width: 3; }
.isw-stud { fill: #F2B705; }
.isw-shadow { fill: #111116; }
.isw-wall { fill: #7A2416; }
.isw-banner { fill: #A92D14; }
.isw-floor { fill: #4A140C; }
.isw-carpet { fill: #B8321A; }
.isw-bench { fill: #3B1E12; }
.isw-dais { fill: #3B1E12; }
.isw-throne { fill: #F2B705; }
.isw-throne-in { fill: #2B2A6B; }
.isw-skin { fill: #F4D7C2; }
.isw-skin-dark { fill: #E3BFA6; }
.isw-eye { fill: #111116; }
.isw-c1 { fill: #3B3A55; }
.isw-c2 { fill: #2E4A3E; }
.isw-c3 { fill: #5B3A2C; }
.isw-c4 { fill: #4A4A4A; }
.isw-john-top { fill: #1F1F28; }
.isw-john-leg { fill: #111116; }
.isw-john-leg-back { fill: #2E2E3A; }
.isw-queen-dress { fill: #2B2A6B; }
.isw-queen-dress-back { fill: #22215A; }
.isw-gold { fill: #F2B705; }
.isw-white { fill: #FFFFFF; }
.isw-hair-john { fill: #2A1A12; }
.isw-hair-queen { fill: #E6E2DA; }
.isw-h1 { fill: #3A2418; }
.isw-h2 { fill: #111116; }
.isw-h3 { fill: #E3B455; }
.isw-h4 { fill: #9A9894; }
.isw-h5 { fill: #B5532A; }
.isw-dust { fill: #E9D9B5; }
.isw-q-mouth { fill: #5A1A1A; }
.isw-q-blush { fill: #E8806E; }
.isw-swear { fill: #111116; font: 700 32px/1 Georgia, serif; }
.isw-polite { fill: #111116; font: italic 400 15px/1.2 Georgia, serif; }
.isw-title { fill: #F7F4EF; font-family: var(--fabrement-font-heading); font-weight: var(--fabrement-font-weight-heading); font-size: 70px; letter-spacing: -1px; }
.isw-meta { fill: #F7F4EF; opacity: .75; font-family: var(--fabrement-font-body); font-weight: var(--fabrement-font-weight-body-500); font-size: 14px; letter-spacing: 3px; }
.isw-hint { fill: #F7F4EF; opacity: .9; font-family: var(--fabrement-font-body); font-weight: var(--fabrement-font-weight-body-600); font-size: 13px; letter-spacing: 2px; transition: opacity .2s; }

.isw-limb { transform-box: fill-box; transform-origin: 50% 6px; }
.isw-feet { transform-box: fill-box; transform-origin: 50% 100%; }
.isw-door-l { transform-box: fill-box; transform-origin: 0 50%; }
.isw-door-r { transform-box: fill-box; transform-origin: 100% 50%; }
.isw-hall { opacity: 0; }
.isw-camera { transform-box: view-box; transform-origin: 0 0; }
.isw-walker { opacity: 0; }
.isw-swear-b { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }
.isw-polite-b { opacity: 0; transform-box: fill-box; transform-origin: 70% 100%; }
.isw-dust { opacity: 0; transform-box: fill-box; transform-origin: center; }
.isw-q-mouth { transform-box: fill-box; transform-origin: center; transform: scaleY(.35); }
.isw-q-blush { opacity: 0; }

:is(.is-playing, a:hover, a:focus-visible) .isw-hint { opacity: 0; }

/* 1. Doors open, John walks in */
:is(.is-playing, a:hover, a:focus-visible) .isw-door-l { animation: isw-open 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-door-r { animation: isw-open 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-walker { animation: isw-approach 9s ease-in 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-walker-leg-l { animation: isw-tread .5s ease-in-out 1.2s 4; }
:is(.is-playing, a:hover, a:focus-visible) .isw-walker-leg-r { animation: isw-tread .5s ease-in-out 1.45s 4; }
:is(.is-playing, a:hover, a:focus-visible) .isw-dust-l { animation: isw-dust-l 9s ease-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-dust-r { animation: isw-dust-r 9s ease-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-doors { animation: isw-cut-out 9s steps(1, end) 1 both; }

/* 2. The hall */
:is(.is-playing, a:hover, a:focus-visible) .isw-hall { animation: isw-cut-in 9s steps(1, end) 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-move { animation: isw-walk-in 9s ease-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-bob { animation: isw-bob .3s ease-in-out 2.9s 6; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-leg-f { animation: isw-step .6s ease-in-out 2.9s 3; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-leg-b { animation: isw-step-b .6s ease-in-out 2.9s 3; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-arm-b { animation: isw-step .6s ease-in-out 2.9s 3; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-arm-f { animation: isw-step-b .6s ease-in-out 2.9s 3; }

/* 3. Close-up and the tic */
:is(.is-playing, a:hover, a:focus-visible) .isw-camera { animation: isw-zoom 9s steps(1, end) 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-john-jerk { animation: isw-jerk 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-swear-b { animation: isw-pop 9s cubic-bezier(.34, 1.56, .64, 1) 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-crown { animation: isw-hop 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-queen-lean { animation: isw-lean 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-look-r { animation: isw-look-r 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-look-l { animation: isw-look-l 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-q-mouth { animation: isw-mouth 9s ease-in-out 1 both; }
:is(.is-playing, a:hover, a:focus-visible) .isw-q-blush { animation: isw-blush 9s ease-in 1 both; }

/* 4. The Queen's reply */
:is(.is-playing, a:hover, a:focus-visible) .isw-polite-b { animation: isw-polite 9s ease-out 1 both; }

@keyframes isw-open {
    0%, 7% { transform: scaleX(1); }
    16%, 100% { transform: scaleX(.08); }
}

@keyframes isw-approach {
    0%, 12% { opacity: 0; transform: translateY(0) scale(.45); }
    14% { opacity: 1; transform: translateY(0) scale(.45); }
    31%, 100% { opacity: 1; transform: translateY(70px) scale(1.25); }
}

@keyframes isw-tread {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes isw-cut-out {
    0% { opacity: 1; }
    31%, 100% { opacity: 0; }
}

@keyframes isw-cut-in {
    0% { opacity: 0; }
    31%, 100% { opacity: 1; }
}

@keyframes isw-walk-in {
    0%, 32% { transform: translateX(-190px); }
    53%, 100% { transform: translateX(0); }
}

@keyframes isw-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes isw-step {
    0%, 100% { transform: rotate(24deg); }
    50% { transform: rotate(-24deg); }
}

@keyframes isw-step-b {
    0%, 100% { transform: rotate(-24deg); }
    50% { transform: rotate(24deg); }
}

@keyframes isw-zoom {
    0% { transform: none; }
    56%, 100% { transform: translate(-250px, -200px) scale(1.8); }
}

@keyframes isw-jerk {
    0%, 59% { transform: rotate(0); }
    61% { transform: rotate(-8deg) translateY(-8px); }
    63% { transform: rotate(5deg); }
    65% { transform: rotate(-3deg); }
    68%, 100% { transform: rotate(0); }
}

@keyframes isw-pop {
    0%, 59% { transform: scale(0); opacity: 0; }
    62% { transform: scale(1.12); opacity: 1; }
    64%, 74% { transform: scale(1); opacity: 1; }
    77%, 100% { transform: scale(0); opacity: 0; }
}

@keyframes isw-hop {
    0%, 60% { transform: translateY(0) rotate(0); }
    63% { transform: translateY(-30px) rotate(16deg); }
    66% { transform: translateY(-8px) rotate(-8deg); }
    69% { transform: translateY(0) rotate(3deg); }
    72%, 100% { transform: translateY(0) rotate(0); }
}

@keyframes isw-lean {
    0%, 60% { transform: rotate(0); }
    63% { transform: rotate(7deg); }
    70% { transform: rotate(-2deg); }
    74%, 100% { transform: rotate(0); }
}


@keyframes isw-dust-l {
    0%, 7% { opacity: 0; transform: translate(0, 0) scale(.6); }
    10% { opacity: .85; transform: translate(-4px, -4px) scale(1); }
    22%, 100% { opacity: 0; transform: translate(-26px, -22px) scale(2); }
}

@keyframes isw-dust-r {
    0%, 7% { opacity: 0; transform: translate(0, 0) scale(.6); }
    10% { opacity: .85; transform: translate(4px, -4px) scale(1); }
    22%, 100% { opacity: 0; transform: translate(26px, -22px) scale(2); }
}

@keyframes isw-look-r {
    0%, 32% { transform: translateX(-2.5px); }
    53%, 59% { transform: translateX(2.5px); }
    62%, 100% { transform: translateX(3px); }
}

@keyframes isw-look-l {
    0%, 32% { transform: translateX(-2.5px); }
    53%, 59% { transform: translateX(2.5px); }
    62%, 100% { transform: translateX(-3px); }
}

@keyframes isw-mouth {
    0%, 60% { transform: scaleY(.35); }
    62%, 74% { transform: scaleY(1.7); }
    78% { transform: scaleY(.4); }
    81% { transform: scaleY(1.3); }
    84% { transform: scaleY(.4); }
    87% { transform: scaleY(1.2); }
    90% { transform: scaleY(.4); }
    93% { transform: scaleY(1); }
    96%, 100% { transform: scaleY(.35); }
}

@keyframes isw-blush {
    0%, 63% { opacity: 0; }
    72%, 100% { opacity: .85; }
}

@keyframes isw-polite {
    0%, 78% { transform: scale(0); opacity: 0; }
    83%, 100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    :is(.is-playing, a:hover, a:focus-visible) [class*="isw-"] {
        animation: none !important;
    }

    :is(.is-playing, a:hover, a:focus-visible) .isw-doors {
        opacity: 0;
    }

    :is(.is-playing, a:hover, a:focus-visible) .isw-hall {
        opacity: 1;
    }

    :is(.is-playing, a:hover, a:focus-visible) .isw-camera {
        transform: translate(-250px, -200px) scale(1.8);
    }

    :is(.is-playing, a:hover, a:focus-visible) .isw-polite-b {
        opacity: 1;
    }

    :is(.is-playing, a:hover, a:focus-visible) .isw-q-blush {
        opacity: .85;
    }
}
