/* Sartor Flow — interface motion.
   Loader styles live inline in index.html so they paint before any stylesheet;
   this file covers what happens after the workspace is on screen. */

/* Re-renders (saving a lead, filtering) no longer replay the page entrance.
   Entrance is now owned by ui-motion.js and runs only on boot and navigation. */
.page-enter{animation:none!important}

/* ---------- Heading word reveal ---------- */
.mx-word{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em;margin-bottom:-.08em}
.mx-word>span{display:inline-block;will-change:transform}

/* ---------- Buttons: press + ripple ---------- */
.btn{position:relative;overflow:hidden;isolation:isolate;transition:background .2s,border-color .2s,transform .18s cubic-bezier(.34,1.56,.64,1),box-shadow .25s}
.btn:active:not(:disabled){transform:scale(.965)}
.icon-btn{transition:transform .18s cubic-bezier(.34,1.56,.64,1),background .2s,color .2s}
.icon-btn:active:not(:disabled){transform:scale(.88)}
.btn.primary:hover{box-shadow:0 10px 28px -10px #c9a45c99}
.mx-ripple{position:absolute;z-index:-1;border-radius:50%;pointer-events:none;background:radial-gradient(circle,#ffffff3d 0,#ffffff14 45%,transparent 70%);transform:translate(-50%,-50%) scale(0)}
.btn.primary .mx-ripple{background:radial-gradient(circle,#fff6dd80 0,#fff3d42a 45%,transparent 70%)}

/* ---------- Sidebar ---------- */
.nav-link .icon{transition:transform .28s cubic-bezier(.34,1.56,.64,1)}
.nav-link:hover .icon{transform:translateX(2px) scale(1.06)}
.nav-link.active .icon{transform:scale(1.04)}

/* ---------- Counters that changed ---------- */
.mx-bump{animation:mx-bump .62s cubic-bezier(.34,1.56,.64,1)}
@keyframes mx-bump{0%{transform:scale(1)}30%{transform:scale(1.38);color:var(--gold-light);background-color:#c9a45c3a}100%{transform:scale(1)}}

/* ---------- Lead that just arrived on the board ---------- */
.mx-arrive{animation:mx-arrive 1.25s cubic-bezier(.16,1,.3,1)}
@keyframes mx-arrive{
  0%{box-shadow:0 0 0 0 #c9a45c00,0 4px 12px #020c1b16;border-color:#c9a45cff}
  25%{box-shadow:0 0 0 4px #c9a45c40,0 14px 30px -8px #c9a45c66}
  100%{box-shadow:0 0 0 10px #c9a45c00,0 4px 12px #020c1b16}
}

/* ---------- Toast: spring in + time remaining ---------- */
#toast{transition:opacity .25s,transform .5s cubic-bezier(.34,1.56,.64,1);overflow:hidden}
#toast:not(.show){transform:translate(-50%,24px) scale(.96)}
#toast::after{content:'';position:absolute;left:0;bottom:0;height:2px;width:100%;background:linear-gradient(90deg,#c9a45c,#e6ce98);transform-origin:left;transform:scaleX(0);opacity:.75}
#toast.mx-timer::after{animation:mx-toast-timer 4.2s linear forwards}
@keyframes mx-toast-timer{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* ---------- Sparkline draw ---------- */
.sparkline path:first-child{stroke-dasharray:1;stroke-dashoffset:0}

/* ---------- Respect the in-app "reduce motion" setting as well as the OS ---------- */
.reduce-motion .mx-ripple{display:none}
.reduce-motion .btn:active,.reduce-motion .icon-btn:active{transform:none}
@media(prefers-reduced-motion:reduce){.mx-ripple{display:none}.btn:active,.icon-btn:active{transform:none}}
