/* SoloTrack — motion (animations). SanduInc | Version 01
   Everything here is decoration only. It is switched off for people who asked their phone for reduced motion. */

/* Smoother screen slide (forward) and a mirrored slide when going back */
.screen{transition:opacity .34s cubic-bezier(.22,1,.36,1),transform .34s cubic-bezier(.22,1,.36,1);}
body[data-nav="back"] .screen:not(.active){transform:translateX(-20px);}

/* Tabs inside the main screen (Map / History / Settings…) rise in */
.st-enter{animation:stRise .38s cubic-bezier(.22,1,.36,1) both;}
@keyframes stRise{0%{opacity:0;transform:translateY(12px)}100%{opacity:1;transform:translateY(0)}}

/* Splash: soft radar rings around the logo */
.splash-logo{animation:pop .6s cubic-bezier(.34,1.56,.64,1) forwards,stRing 2.2s ease-out .7s infinite;}
@keyframes stRing{
  0%{box-shadow:0 8px 40px rgba(26,148,50,.55),0 0 0 0 rgba(26,148,50,.45)}
  100%{box-shadow:0 8px 40px rgba(26,148,50,.55),0 0 0 38px rgba(26,148,50,0)}}

/* Map pins: drop in once, then pulse a few times to show "fresh location" */
.st-drop{animation:stDrop .55s cubic-bezier(.34,1.56,.64,1) both;transform-origin:50% 100%;}
@keyframes stDrop{0%{opacity:0;transform:translateY(-26px) scale(.6)}100%{opacity:1;transform:translateY(0) scale(1)}}
.st-pulse{position:absolute;left:0;top:0;width:38px;height:38px;border-radius:50%;pointer-events:none;
  border:3px solid var(--st-c,#22C55E);opacity:0;animation:stPulse 1.8s ease-out .5s 3;}
@keyframes stPulse{0%{opacity:.75;transform:scale(1)}100%{opacity:0;transform:scale(2.6)}}

/* Locate: radar ripple on the person's card while we wait, small bounce when the location arrives */
.tcard.st-locating::after{content:'';position:absolute;inset:0;border-radius:18px;pointer-events:none;
  border:2px solid var(--primary);animation:stRipple 1.4s ease-out infinite;}
@keyframes stRipple{0%{opacity:.9;transform:scale(.97)}100%{opacity:0;transform:scale(1.04)}}
.tcard.st-located{animation:stBounce .5s cubic-bezier(.34,1.56,.64,1);}
@keyframes stBounce{0%{transform:scale(.97)}60%{transform:scale(1.02)}100%{transform:scale(1)}}

/* Pressed feel on buttons */
.btn:active{transform:scale(.97);}

@media (prefers-reduced-motion:reduce){
  .screen,.st-enter,.splash-logo,.st-drop,.st-pulse,.tcard.st-locating::after,.tcard.st-located{animation:none !important;transition:none !important;}
  .st-pulse{display:none;}
}
