/* anim.html: marks drawn on top of the untouched art; they play when the slide opens. */
.fxs { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.fxs * { transform-box:fill-box; }

/* before a slide opens, its marks wait unseen */
.fx-ready .has-fx:not(.play) .fxs > *:not(.cover) { visibility:hidden; }

/* slide 3: blank tick boxes (same white as the box) and ticks drawn one by one */
.fxs .cover { fill:rgb(252 249 241); }
.fxs .check { fill:none; stroke:rgb(221 46 30); stroke-width:9; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:1; }
.play .fxs .check { animation:fx-pen .35s ease-out var(--d) both; }

/* slide 1: the whole frame jolts once */
.play#p1 .art { animation:fx-jolt .35s linear .3s; }
@keyframes fx-jolt { 0%,100% { translate:0 0; } 20% { translate:0 1.2%; } 45% { translate:0 -.6%; } 70% { translate:0 .3%; } }

.fxs .gloom path { stroke-dasharray:90; }
.play .fxs .gloom path { animation:fx-draw .5s ease-out var(--d) both; }
@keyframes fx-draw { from { stroke-dashoffset:90; } to { stroke-dashoffset:0; } }

.fxs .sweat path { fill:#cbe9ff; stroke:#24425f; stroke-width:4; }
.play .fxs .sweat { animation:fx-sweat 2.6s ease-in var(--d) infinite both; }
@keyframes fx-sweat { 0% { opacity:0; translate:0 -6px; } 12% { opacity:1; translate:0 0; } 70% { opacity:1; translate:0 14px; } 100% { opacity:0; translate:0 26px; } }

.fxs .second-hand line { stroke:#d1201d; stroke-width:3.5; stroke-linecap:round; }
.fxs .second-hand circle { fill:#d1201d; }
.fxs .second-hand { transform-box:view-box; transform-origin:899px 670px; }
.play .fxs .second-hand { animation:fx-tick 60s steps(60) infinite; }
@keyframes fx-tick { to { rotate:360deg; } }

/* highlighter: yellow behind the letters, drawn left to right */
.fxs .marker { fill:#ffe14d; opacity:.75; mix-blend-mode:multiply; transform-origin:0 50%; }
.play .fxs .marker { animation:fx-marker .4s cubic-bezier(.5,0,.3,1) var(--d) both; }
@keyframes fx-marker { from { scale:0 1; } to { scale:1 1; } }

/* a ring that spreads out and fades: draws the eye, leaves nothing behind */
.fxs .ping { fill:none; stroke:#e0261d; stroke-width:6; opacity:0; transform-origin:50% 50%; }
.play .fxs .ping { animation:fx-ping .9s ease-out var(--d) both; }
@keyframes fx-ping { 0% { opacity:0; scale:.85; } 25% { opacity:.9; } 100% { opacity:0; scale:1.35; } }

/* red pen circles and lines */
.fxs .circle, .fxs .pen { fill:none; stroke:#e0261d; stroke-width:6; stroke-linecap:round; stroke-dasharray:1; }
.fxs .pen { stroke-width:12; }
.play .fxs .circle, .play .fxs .pen { animation:fx-pen .5s ease-out var(--d) both; }
@keyframes fx-pen { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }

/* slide 4: the job ad side fades, the red box comes forward, a "?" appears */
.fxs .dim { fill:var(--color-paper,#f7f2e8); opacity:0; }
.play .fxs .dim { animation:fx-dim .6s ease-out var(--d) both; }
@keyframes fx-dim { to { opacity:.5; } }
.fxs .undim { fill:var(--color-paper,#f7f2e8); opacity:0; }
.play .fxs .undim { animation:fx-undim .5s ease-out var(--d) both; }
@keyframes fx-undim { from { opacity:.55; } to { opacity:0; } }
.fxs .qmark circle, .fxs .qmark path { fill:#fff; stroke:#1d1d1f; stroke-width:4; stroke-linejoin:round; }
.fxs .qmark text { font:900 52px/1 system-ui,sans-serif; fill:#1d1d1f; }
.fxs .qmark { transform-origin:30% 100%; }
.play .fxs .qmark { animation:fx-pop .5s linear var(--d) both, fx-bob 1.6s ease-in-out calc(var(--d) + .5s) infinite; }
@keyframes fx-bob { 0%,100% { translate:0 0; } 50% { translate:0 -6px; } }

/* stars beside a face that brightens */
.fxs .twinkle path { fill:#ffd84a; stroke:#c08a00; stroke-width:3; stroke-linejoin:round; }
.fxs .twinkle { transform-origin:50% 50%; }
.play .fxs .twinkle { animation:fx-pop .45s linear var(--d) both, fx-twinkle 1.4s ease-in-out calc(var(--d) + .45s) infinite; }
@keyframes fx-twinkle { 0%,100% { scale:1; opacity:1; } 50% { scale:.6; opacity:.7; } }

@keyframes fx-pop { 0% { opacity:0; scale:.4; } 55% { opacity:1; scale:1.12; } 75% { scale:.96; } 100% { opacity:1; scale:1; } }
