/* ===== ATSN motion v1 — source of truth: MOTION.md ===== */
:root{
  --dur-fast:120ms; --dur-base:200ms; --dur-slow:320ms; --dur-enter:480ms;
  --ease-out:cubic-bezier(.2,.7,.2,1); --ease-in-out:cubic-bezier(.4,0,.2,1); --ease-back:cubic-bezier(.34,1.4,.64,1);
  --rise:16px; --stagger:50ms;
}
/* M1. Brand chamfer deepens on hover (animatable via @property) */
@property --c{syntax:'<length>';inherits:false;initial-value:22px}
.cat,.svc,.prod,.dep,.tile,.q,.addr-card{transition:--c var(--dur-base) var(--ease-out),background-color var(--dur-base) var(--ease-out),transform var(--dur-base) var(--ease-out)}
.btn,.copy,.tab,.s-btn{transition:--c var(--dur-fast) var(--ease-out),background-color var(--dur-fast) var(--ease-out),color var(--dur-fast),transform var(--dur-fast) var(--ease-out)}
.cat:hover{--c:34px}.svc:hover{--c:40px}.prod:hover{--c:30px}.dep:hover{--c:34px}.tile:hover{--c:48px}
.btn:hover{--c:15px}
.cat:hover,.prod:hover,.dep:hover{transform:translateY(-3px)}
.btn:active,.copy:active,.tab:active{transform:scale(.97)}
/* M2. Arrow nudges in link-cards */
.cat .arr,.svc .arr,.tile .go,.more{display:inline-block;transition:transform var(--dur-base) var(--ease-out)}
.cat:hover .arr,.svc:hover .arr,.tile:hover .go,.more:hover{transform:translateX(4px)}
/* M3. Hero entrance — one orchestrated moment, once per load */
@keyframes m-rise{from{opacity:0;transform:translateY(var(--rise))}to{opacity:1;transform:none}}
@keyframes m-slide{from{opacity:0;transform:translateX(24px) rotate(2deg)}to{opacity:1;transform:none}}
@keyframes m-pop{0%{opacity:0;transform:scale(.8) rotate(-8deg)}100%{opacity:1;transform:none}}
.banner > div:first-of-type > *{animation:m-rise var(--dur-enter) var(--ease-out) both}
.banner > div:first-of-type > :nth-child(2){animation-delay:60ms}
.banner > div:first-of-type > :nth-child(3){animation-delay:120ms}
.banner > div:first-of-type > :nth-child(4){animation-delay:180ms}
.banner .shot img{animation:m-slide 600ms 150ms var(--ease-out) both}
.banner .sticker{animation:m-pop 420ms 520ms var(--ease-back) both}
.side .tile{animation:m-rise var(--dur-enter) var(--ease-out) both}
.side .tile:nth-child(2){animation-delay:80ms}
.c-hero-l > *,.c-quick > *{animation:m-rise var(--dur-enter) var(--ease-out) both}
.c-quick > :nth-child(2){animation-delay:60ms}.c-quick > :nth-child(3){animation-delay:120ms}
/* M4. Scroll reveal — only for elements below the fold at load (JS adds .rv) */
.rv{opacity:0;transform:translateY(var(--rise))}
.rv.in{opacity:1;transform:none;transition:opacity var(--dur-slow) var(--ease-out) var(--d,0ms),transform var(--dur-slow) var(--ease-out) var(--d,0ms)}
/* M5. Dropdowns: mega menu + search suggestions */
@keyframes m-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.mega:not([hidden]) .mega-panel{animation:m-drop 180ms var(--ease-out) both}
.mega:not([hidden]) .mcol{animation:m-drop 220ms var(--ease-out) both}
.mega:not([hidden]) .mcol:nth-child(2){animation-delay:30ms}.mega:not([hidden]) .mcol:nth-child(3){animation-delay:60ms}.mega:not([hidden]) .mcol:nth-child(4){animation-delay:90ms}
.mega-bd:not([hidden]){animation:m-fade 180ms var(--ease-out) both}
.svcdd:not([hidden]) .svcdd-panel{animation:m-drop 180ms var(--ease-out) both}
.s-drop:not([hidden]){animation:m-drop 140ms var(--ease-out) both}
nav.menu li:first-child a svg{transition:transform var(--dur-base) var(--ease-out)}
@keyframes m-fade{from{opacity:0}to{opacity:1}}
/* M6. Sticky header compacts after scroll */
header.site .topbar{max-height:44px;overflow:hidden;transition:max-height var(--dur-base) var(--ease-in-out)}
header.site{transition:box-shadow var(--dur-base)}
header.site.compact .topbar{max-height:0;border-bottom-color:transparent}
header.site.compact{box-shadow:0 1px 0 var(--line),0 8px 24px rgba(14,38,43,.08)}
/* M7. Tabs and panels crossfade */
.way:not([hidden]),.prods > li:not([hidden]){animation:m-fade var(--dur-base) var(--ease-out) both}
/* M8. Contacts: live status pulse + map pin drop */
@keyframes m-pulse{0%{box-shadow:0 0 0 0 rgba(27,166,114,.45)}70%{box-shadow:0 0 0 9px rgba(27,166,114,0)}100%{box-shadow:0 0 0 0 rgba(27,166,114,0)}}
.c-status.open .dot{animation:m-pulse 2.2s var(--ease-out) infinite}
@keyframes m-pin{0%{opacity:0;transform:translateY(-18px)}70%{opacity:1;transform:translateY(2px)}100%{transform:none}}
.map .pin{transform-box:fill-box;transform-origin:50% 100%}
.map.in .pin{animation:m-pin 520ms var(--ease-out) both}
/* M9. Form feedback */
form.req input,form.req textarea{transition:border-color var(--dur-fast),background-color var(--dur-fast)}
.ok{animation:m-rise var(--dur-slow) var(--ease-out) both}
/* Reduced motion: everything off, content static and visible */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .rv{opacity:1!important;transform:none!important}
}
