/* Valtrivoz motion system: heartbeat line, springy micro-interactions, live dots, mockup toasts.
   Everything here is visible at rest; motion only adds to it. JS orchestration lives in assets/js/lib/motion.js. */

/* 1. Heartbeat line: a bright beat travels along the ECG path (paths use pathLength="1000") */
.pulse-line__beat{stroke-dasharray:150 1000;stroke-dashoffset:150;animation:pulse-beat 3.6s cubic-bezier(.45,.05,.4,1) infinite}
.pulse-line__base{animation:pulse-draw 1.6s var(--ease-out) both}
@keyframes pulse-beat{0%{stroke-dashoffset:1150}100%{stroke-dashoffset:0}}
@keyframes pulse-draw{from{stroke-dasharray:0 1000}to{stroke-dasharray:1000 0}}
.pulse-line__base{stroke-dasharray:1000 0}

/* live dot heartbeat */
.dot{animation:dot-beat 1.8s ease-out infinite}
@keyframes dot-beat{0%{box-shadow:0 0 0 0 rgba(29,185,122,.55)}70%{box-shadow:0 0 0 8px rgba(29,185,122,0)}100%{box-shadow:0 0 0 0 rgba(29,185,122,0)}}

/* logo mark beat on hover */
.logo__mark polyline{stroke-dasharray:60;stroke-dashoffset:0}
.logo:hover .logo__mark polyline{animation:logo-beat .9s var(--ease-out)}
@keyframes logo-beat{from{stroke-dashoffset:60}to{stroke-dashoffset:0}}

/* 2. Springy micro-interactions */
.btn,.store{transition:background-color .2s,color .2s,box-shadow .2s,transform .45s var(--spring)}
.btn:hover,.store:hover{transform:translateY(-2px)}
.btn:active,.store:active{transform:translateY(0) scale(.95);transition-duration:.12s}
.card--hover,.card--link,.step,.trust__item,.stat{transition:transform .5s var(--spring),box-shadow .3s}
.card--hover:hover,.card--link:hover,.step:hover,.trust__item:hover{transform:translateY(-6px) rotate(-.4deg);box-shadow:0 26px 50px -28px var(--glow)}
.icon-chip,.num-chip{transition:transform .5s var(--spring)}
.card--hover:hover .icon-chip,.card--hover:hover .num-chip,.step:hover .step__n,.trust__item:hover .icon-chip{transform:scale(1.12) rotate(-6deg)}
.step__n{transition:transform .5s var(--spring)}

/* 3. Phone screens + mockup toasts (states toggled by components/phone-cycle.js and mock-toasts.js) */
.mtoast{transition:opacity .35s var(--ease-out),transform .6s var(--spring)}
.mtoast.is-out{opacity:0;transform:translateY(-16px) scale(.98);transition-duration:.3s}

/* gentle float on hero notification cards */
.float--a{animation:bob 6s ease-in-out infinite}
.float--b{animation:bob 7s ease-in-out -2s infinite}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}

/* price flash on watchlist ticks */
.flash-up,.flash-down{transition:none}

/* 4. Reduced motion: no loops, no springs; content unchanged */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .pulse-line__beat{stroke-dasharray:none;stroke-dashoffset:0;opacity:.35}
  .btn:hover,.store:hover,.card--hover:hover,.card--link:hover,.step:hover,.trust__item:hover,.tile:hover,.strat:hover,.frow:hover{transform:none}
}
