/* craft-hover — entrance and activation choreography for the Craft list.
   Every hidden state hangs off classes that js/fx/craft-hover.js adds (root .fx-craft-hover on .craft,
   .fx-craft-hover-in on .rows / .craft-visual once they arrive), so no JS or reduced motion = the plain page. */
.fx-craft-hover{--fx-craft-hover-x:54vw;--fx-craft-hover-out:cubic-bezier(.215,.61,.355,1)}

/* ---- 1. rows slide in from the right behind their own clip edge: number leads, title, text, tag lands last ---- */
.fx-craft-hover .row{overflow:hidden}
.fx-craft-hover .row :is(.num,h3,.row-tag){
  transform:translate3d(var(--fx-craft-hover-x),0,0);
  transition:transform .8s var(--fx-craft-hover-out) calc(var(--fx-craft-hover-i,0)*130ms + var(--fx-craft-hover-d,0ms))}
.fx-craft-hover .row h3{--fx-craft-hover-d:50ms}
.fx-craft-hover .row .row-tag{--fx-craft-hover-d:170ms;transition-timing-function:cubic-bezier(.3,1.15,.4,1)} /* the caboose kisses past its stop */
.fx-craft-hover .fx-craft-hover-in .row :is(.num,h3,.desc,.row-tag){transform:none}
/* entrance over: drop the clip (focus ring, asterisk) and the stagger so later reactions are instant */
.fx-craft-hover .fx-craft-hover-done .row{overflow:visible}
.fx-craft-hover .fx-craft-hover-done .row :is(.num,h3,.desc,.row-tag){transition:none}

/* wide layout only: the description rides in too. At <=820px it is absolutely placed under the list
   (core) and outside the row clip, so it keeps the core's fade and is never transformed. */
@media (min-width:821px){
  .fx-craft-hover .row .desc{--fx-craft-hover-d:110ms;
    transform:translate3d(var(--fx-craft-hover-x),0,0);
    transition:transform .8s var(--fx-craft-hover-out) calc(var(--fx-craft-hover-i,0)*130ms + var(--fx-craft-hover-d))}
}
@media (max-width:820px){.fx-craft-hover{--fx-craft-hover-x:100vw}}

/* hover answers at the reference's speed: vermilion in 160 ms, out 260 ms (core default is 450) */
.fx-craft-hover .row [data-t]::after{transition-duration:.26s}
.fx-craft-hover .row.on [data-t]::after{transition-duration:.16s}

/* ---- 2. asterisk marker: a footnote mark that rolls out from behind the active title ---- */
.fx-craft-hover-ast{position:absolute;left:100%;top:.04em;width:max(.3em,12px);height:max(.3em,12px);margin-left:.14em;
  color:var(--verm);opacity:0;pointer-events:none;
  transform:translate3d(-.55em,0,0) rotate(-200deg) scale(.2);
  transition:transform .26s cubic-bezier(.55,0,.9,.4),opacity .2s linear}
.fx-craft-hover-in .row.on .fx-craft-hover-ast{opacity:1;transform:none;
  transition:transform .65s var(--spring) .12s,opacity .16s linear .12s}
/* first time: wait for row 01 to land, then punctuate it */
.fx-craft-hover-in:not(.fx-craft-hover-done) .row.on .fx-craft-hover-ast{transition-delay:1s}

/* ---- 3. chip: pops in after the rows; its number rolls like a counter wheel on every change ---- */
.fx-craft-hover .craft-idx{transform:scale(0);transform-origin:18% 50%;transition:transform .6s var(--spring) .55s}
.fx-craft-hover .fx-craft-hover-in .craft-idx{transform:none}
.fx-craft-hover-flip{position:relative;display:inline-flex;overflow:clip}
.fx-craft-hover-flip b{display:block}
.fx-craft-hover-flip .fx-craft-hover-ghost{position:absolute;left:0;top:0;transform:translate3d(0,-110%,0)}

/* ---- 4. sparkle: one vermilion full stop that hops around the blob. The two wrappers are the size of the
   visual and the sparkle sits on their bottom-right corner, so translate(%) = a point on the visual. They only ever
   move up/left (negative), which never adds scrollable overflow. X and Y use different curves: the path bends into an arc. */
.fx-craft-hover-hop,.fx-craft-hover-hop>span{position:absolute;inset:0;pointer-events:none}
.fx-craft-hover-hop{transition:transform .62s cubic-bezier(.5,0,.3,1)}
.fx-craft-hover-hop>span{transition:transform .62s var(--spring)}
.fx-craft-hover .craft-visual .sparkle{--fx-craft-hover-s:clamp(24px,2.6vw,38px);
  left:auto;top:auto;right:0;bottom:0;width:var(--fx-craft-hover-s);height:var(--fx-craft-hover-s);margin:calc(var(--fx-craft-hover-s)/-2);
  color:var(--verm);animation:none; /* it holds still between hops */
  transform:scale(0) rotate(-90deg);transition:transform .55s var(--spring) .95s}
.fx-craft-hover .fx-craft-hover-in .sparkle{transform:none}
