/* edit-anim.css - the picture on the Waiting screen while a reel is edited (web/edit-anim.js; Grady, 2026-10-05: "if you could play
   some kind of animation untill its done editing"). Its own file, linked from index.html: the camera's upload wait can show the same
   picture, and style.css is near the repo's 500 lines. Every move is transform or opacity (selfcheck-screens.js): the scissors snip on
   the beat (120 a minute), the beat ticks in eighths, the frame being worked breathes, a finished frame pops in. A hidden tab pauses
   all of it (.ea-paused, edit-anim.js); reduced motion shows the strip standing still, the frames done and the one being worked. */
.ea { margin: 14px 0 10px; padding: 16px 12px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.ea-svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
/* the picture's own square box, centred, 320 px at most: the lead may put the mascot's loop in it; the line and the bar stay outside */
.wait-stage { position: relative; display: grid; place-items: center; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; }
.ea-line, .ea-was { margin: 8px 0 0; text-align: center; font-size: 1.35rem; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; color: var(--ink); }
/* the stage line crossfades (Grady, 2026-10-07): the old words fade out 150 ms, then the new ones in 150 ms; each change swaps the
   animation names (ea-swap), which restarts both */
.ea-say { display: grid; }
.ea-say > * { grid-area: 1 / 1; }
.ea-line { animation: ea-in1 var(--t-fade) var(--ease-out) var(--t-fade) backwards; }
.ea-line.ea-swap { animation-name: ea-in2; }
.ea-was { opacity: 0; animation: ea-out1 var(--t-fade) var(--ease-out); }
.ea-was.ea-swap { animation-name: ea-out2; }
@keyframes ea-in1 { from { opacity: 0; } }
@keyframes ea-in2 { from { opacity: 0; } }
@keyframes ea-out1 { from { opacity: 1; } }
@keyframes ea-out2 { from { opacity: 1; } }

.ea-strip { fill: #111; }
.ea-holes { fill: var(--cream); opacity: .85; }
.ea-slot { fill: none; stroke: #fbf4ea3d; stroke-width: 1.5; }
.ea-f { opacity: 0; transform: scale(.5); transform-box: fill-box; transform-origin: center;
  transition: opacity .35s, transform .5s var(--ease-out); }   /* no overshoot: nothing bouncy (Grady, 2026-10-07) */
.ea-f rect { fill: var(--yellow); }
.ea-f.done, .ea-f.now { opacity: 1; transform: none; }
.ea-f.now rect { fill: var(--cyan); }
.ea-f.now { animation: ea-breathe 1s ease-in-out infinite; }
.ea-who { fill: #111; opacity: .72; }

/* the scissors ride to the frame being worked (data-step, edit-anim.js), 48 a frame */
.ea-sc { transition: transform .8s cubic-bezier(.45, 0, .2, 1); }
.ea[data-step="2"] .ea-sc { transform: translateX(48px); }
.ea[data-step="3"] .ea-sc { transform: translateX(96px); }
.ea[data-step="4"] .ea-sc { transform: translateX(144px); }
.ea[data-step="5"] .ea-sc { transform: translateX(192px); }
.ea[data-step="6"] .ea-sc, .ea[data-step="7"] .ea-sc { transform: translateX(240px); }
.ea-ring { fill: none; stroke: var(--ink); stroke-width: 4; }
.ea-arm { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; }
.ea-blade { fill: var(--ink); stroke: var(--surface); stroke-width: 1.4; paint-order: stroke; stroke-linejoin: round; }
.ea-pin { fill: var(--yellow); stroke: var(--surface); stroke-width: 1; }
.ea-b1 { animation: ea-snip1 .5s ease-in infinite; }
.ea-b2 { animation: ea-snip2 .5s ease-in infinite; }
.ea-cut { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; opacity: 0; animation: ea-flash .5s infinite; }

/* the beat: eight bars, one an eighth of a beat after the other, the one and the five in yellow */
.ea-t { fill: var(--cyan); transform-box: fill-box; transform-origin: 50% 100%; animation: ea-tick 2s ease-out infinite; }
.ea-t1 { fill: var(--yellow); }
.ea-t:nth-child(2) { animation-delay: -1.75s; }
.ea-t:nth-child(3) { animation-delay: -1.5s; }
.ea-t:nth-child(4) { animation-delay: -1.25s; }
.ea-t:nth-child(5) { animation-delay: -1s; }
.ea-t:nth-child(6) { animation-delay: -.75s; }
.ea-t:nth-child(7) { animation-delay: -.5s; }
.ea-t:nth-child(8) { animation-delay: -.25s; }

@keyframes ea-snip1 { 0%, 15% { transform: rotate(0deg); } 60% { transform: rotate(-17deg); } 100% { transform: rotate(0deg); } }
@keyframes ea-snip2 { 0%, 15% { transform: rotate(0deg); } 60% { transform: rotate(17deg); } 100% { transform: rotate(0deg); } }
@keyframes ea-flash { 0%, 10% { opacity: 1; } 45%, 100% { opacity: 0; } }
@keyframes ea-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes ea-tick { 0% { transform: scaleY(1); opacity: 1; } 40%, 100% { transform: scaleY(.3); opacity: .45; } }

.ea.ea-paused * { animation-play-state: paused !important; }   /* beats any animation shorthand above (.ea-f.now's says running) */
@media (prefers-color-scheme: dark) { .ea-strip { fill: #000; stroke: var(--line-strong); } }
@media (prefers-reduced-motion: reduce) {
  .ea * { animation: none !important; transition: none !important; }
  .ea-f.now { opacity: .75; }
  .ea-t { opacity: .5; }
}

/* the mascot's loop (edit-anim.js; Grady, 2026-10-07): the video was rendered on the page's own cream or dark, so its box is a tile of
   that colour with the app's radius; the strip only when the loop cannot play */
.wait-stage.has-mascot { border-radius: var(--radius); background: var(--cream); overflow: hidden; }
@media (prefers-color-scheme: dark) { .wait-stage.has-mascot { background: var(--black); } }
.ea-mascot { display: block; width: 100%; height: 100%; object-fit: cover; }
.wait-stage.has-mascot > :not(.ea-mascot, .ea-poster) { display: none; }
