/* Resgars — shared motion layer (public site + admin).
   Entrance animation on every page block, scroll reveals for what starts
   below the fold (static/motion.js tags those), and button micro-motion.
   Everything here is inert until JS adds .js to <html>. */
@keyframes rg-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes rg-slide{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}

/* ---------- entrance: every top-level block, staggered ---------- */
html.js main.wrap>*{animation:rg-rise .5s cubic-bezier(.2,.7,.3,1) both}
html.js main.wrap>*:nth-child(2){animation-delay:.07s}
html.js main.wrap>*:nth-child(3){animation-delay:.14s}
html.js main.wrap>*:nth-child(4){animation-delay:.21s}
html.js main.wrap>*:nth-child(n+5){animation-delay:.28s}
html.js .admin-main>*{animation:rg-rise .5s cubic-bezier(.2,.7,.3,1) both}
html.js .admin-main>*:nth-child(2){animation-delay:.08s}
html.js .admin-main>*:nth-child(n+3){animation-delay:.16s}
html.js .admin-nav{animation:rg-slide .45s cubic-bezier(.2,.7,.3,1) both}
html.js .toasts .toast{animation:rg-rise .4s cubic-bezier(.2,.7,.3,1) both}
html.js .toasts .toast:nth-child(2){animation-delay:.08s}
html.js .toasts .toast:nth-child(n+3){animation-delay:.16s}

/* ---------- scroll reveal (.rg-reveal is added only below the fold) ---------- */
html.js .rg-reveal{opacity:0;transform:translateY(16px)}
html.js .rg-reveal.rg-pop{transform:scale(.975) translateY(10px)}
html.js .rg-reveal.rg-in{opacity:1;transform:none;
  transition:opacity .55s ease,transform .6s cubic-bezier(.2,.7,.3,1);
  transition-delay:var(--rg-d,0s)}

/* ---------- interaction: lift on hover, press on click ---------- */
html.js .btn,html.js .likebtn,html.js .nav-toggle{
  transition:background var(--t-fast),border-color var(--t-fast),color var(--t-fast),
    box-shadow .2s ease,transform .18s cubic-bezier(.2,.7,.3,1)}
html.js .btn:hover,html.js .likebtn:hover{transform:translateY(-1px)}
html.js .btn:active,html.js .likebtn:active{transform:translateY(1px)}

@media(prefers-reduced-motion:reduce){
  html.js main.wrap>*,html.js .admin-main>*,html.js .admin-nav,html.js .toasts .toast{animation:none}
  html.js .rg-reveal{opacity:1;transform:none;transition:none}
  html.js .btn:hover,html.js .likebtn:hover,html.js .btn:active,html.js .likebtn:active{transform:none}
}
