/* Mandata logo motion (assets/logo-motion.js). Size with --h on .lm (mark height). */
.lm { --h: 120px; --lm-delay: 0s; display: inline-flex; align-items: center; line-height: 0; }
.lm-mark { width: var(--h); height: var(--h); overflow: visible; flex: none; }
.lm-word { position: relative; width: calc(var(--h) * 3.06); margin-left: calc(var(--h) * .21); height: var(--h); overflow: hidden; flex: none; }
.lm-word i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: auto 100%; background-position: calc(var(--h) * -1.195) 0; }

/* start state (only when animating) */
.lm:not(.lm--still) .lm-arc { stroke-dasharray: 324; stroke-dashoffset: 324; }
.lm:not(.lm--still) .lm-bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.lm:not(.lm--still) .lm-dot { transform-box: fill-box; transform-origin: center; opacity: 0; }
.lm:not(.lm--still) .lm-word { width: 0; margin-left: 0; }
.lm:not(.lm--still) .lm-word i { width: calc(var(--h) * 3.06); right: auto; clip-path: inset(0 100% 0 0); transform: translateX(calc(var(--h) * -.25)); }

/* play */
.lm--play .lm-arc { animation: lm-draw .95s cubic-bezier(.65,0,.25,1) var(--lm-delay) forwards; }
.lm--play .lm-bar { animation: lm-rise .75s cubic-bezier(.3,1.5,.5,1) calc(var(--lm-delay) + .35s + var(--i) * .07s) forwards; }
.lm--play .lm-dot { animation: lm-pop .4s ease-out calc(var(--lm-delay) + .55s + var(--d)) forwards; }
.lm--play .lm-word { animation: lm-open .8s cubic-bezier(.6,0,.2,1) calc(var(--lm-delay) + 1.3s) forwards; }
.lm--play .lm-word i { animation: lm-word .85s cubic-bezier(.2,.7,.2,1) calc(var(--lm-delay) + 1.45s) forwards; }
@keyframes lm-draw { to { stroke-dashoffset: 0; } }
@keyframes lm-rise { to { transform: scaleY(1); } }
@keyframes lm-pop { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; transform: scale(1.35); } 100% { opacity: 1; transform: scale(1); } }
@keyframes lm-open { to { width: calc(var(--h) * 3.06); margin-left: calc(var(--h) * .21); } }
@keyframes lm-word { to { clip-path: inset(0 0 0 0); transform: none; } }

/* idle loop after the build: bars breathe, dots twinkle */
.lm--idle.lm--play .lm-bar { animation: lm-rise .75s cubic-bezier(.3,1.5,.5,1) calc(var(--lm-delay) + .35s + var(--i) * .07s) forwards, lm-eq 2.6s ease-in-out calc(var(--lm-delay) + 2.4s + var(--i) * .23s) infinite; }
.lm--idle.lm--play .lm-dot { animation: lm-pop .4s ease-out calc(var(--lm-delay) + .55s + var(--d)) forwards, lm-tw 3.2s ease-in-out calc(var(--lm-delay) + 2.6s + var(--t)) infinite; }
@keyframes lm-eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.82); } }
@keyframes lm-tw { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
