/* Lynkio public site: motion + mobile menu + copy feedback + blog/tools refinements.
   Loaded after marketing.css and marketing.polish.css. Tokens only (DESIGN.md): no hex values, no new hues.
   Motion is opt-in per element and fully off under prefers-reduced-motion. JS partner: /mk-motion.js */

@keyframes mk-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes mk-sheet{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes mk-draw{to{stroke-dashoffset:0}}
@keyframes mk-flash{0%{background-color:var(--lk-accent-soft);box-shadow:0 0 0 1px var(--lk-accent-line)}100%{background-color:transparent;box-shadow:0 0 0 1px transparent}}
@keyframes mk-pop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
@property --p{syntax:"<number>";inherits:false;initial-value:0}
@keyframes mk-ring{from{--p:0}}

/* ---------- copy feedback (one pattern for blog, tools and landing code panels) ---------- */
.is-copied{color:var(--lk-accent-text)!important;border-color:var(--lk-accent-line)!important;background:var(--lk-accent-soft)!important;pointer-events:none;gap:6px}
.is-copied span,.is-copied b{font-weight:600}
.mk-ck{display:block;flex:none;width:16px;height:16px}
.mk-ck path{stroke-dasharray:1;stroke-dashoffset:1;animation:mk-draw .32s .04s ease-out forwards}
.mk-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- blog motion (layout lives in BLOG_CSS, backend/m19_public_seo.py) ---------- */
.bx-chip{transition:color .15s,border-color .15s}
.bx-chip[aria-pressed=true]{animation:mk-pop .18s ease-out}
.bx-prose h2 a{transition:opacity .15s,color .15s}
.bx-prose h2 a:hover{color:var(--lk-accent-text)}
.bx-prose h2 a.is-copied{opacity:1}
.bx-faq details>div{animation:mk-rise .22s ease-out}
.bx-toc a{transition:color .15s,border-color .15s}
.bx-share a,.bx-share button{transition:color .15s,border-color .15s,background-color .15s}
.bx-share button:active,.bx-top:active{transform:translateY(1px)}

/* ---------- tools refinements ---------- */
.tl .tl-tool:hover{transform:none!important;box-shadow:none!important}
.tl .tl-tool .ico{transition:background .18s,color .18s}
.tl .tl-tool:hover .ico{background:var(--lk-accent-soft)}
.tl .tl-tool .go svg,.tl .tl-tool .go .ic{transition:transform .18s}
.tl .tl-tool:hover .go svg,.tl .tl-tool:hover .go .ic{transform:translateX(4px)}
.tl .tl-btn:active{transform:translateY(1px)!important}
.tl .tl-ring{animation:mk-ring .9s cubic-bezier(.2,.8,.2,1) both}
.mk-flash{animation:mk-flash .7s ease-out}
.tl [data-stage] svg,.tl [data-stage] img,.tl [data-stage] canvas{animation:mk-pop .22s ease-out}
.tl .tl-checks li{animation:mk-rise .3s ease-out both}
.tl .tl-checks li:nth-child(2){animation-delay:.04s}.tl .tl-checks li:nth-child(3){animation-delay:.08s}.tl .tl-checks li:nth-child(4){animation-delay:.12s}.tl .tl-checks li:nth-child(n+5){animation-delay:.16s}

/* ---------- mobile menu: full-height sheet ---------- */
html.mk-lock{overflow:hidden}
.mk-nv-ic{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:8px;background:var(--lk-accent-soft);color:var(--lk-accent-text)}
.mk-nv-ic svg{width:16px;height:16px;fill:currentColor}
.mk-nv-go{flex:none;width:16px;height:16px;margin-inline-start:auto;color:var(--lk-muted);fill:currentColor;transition:transform .16s,color .16s}
@media(max-width:980px){
  .nv-panel{position:absolute;z-index:99;inset-inline:0;top:100%;height:calc(100vh - 64px);height:calc(100dvh - 64px);max-height:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-top:1px solid var(--lk-border);background:var(--lk-bg);box-shadow:none}
  .nv-panel .mk-wrap{display:flex;flex-direction:column;gap:0;min-height:100%;padding-block:6px calc(20px + env(safe-area-inset-bottom))}
  .nv-panel .mk-wrap:after{content:"";order:97;flex:0 0 20px}
  .nv-panel a:not(.btn){display:flex;align-items:center;gap:14px;min-height:56px;padding:0 4px;border-radius:0;border-bottom:1px solid var(--lk-border);color:var(--lk-text);font:600 16px var(--lk-sans);text-decoration:none;transition:background-color .15s}
  .nv-panel a:not(.btn):active{background:var(--lk-hover)}
  .nv-panel a:not(.btn):hover{background:var(--lk-hover)}
  .nv-panel a:hover .mk-nv-go{transform:translateX(3px);color:var(--lk-accent-text)}
  .nv-panel p{margin:22px 4px 4px;font:500 11px/1 var(--lk-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--lk-muted)}
  .nv-panel .btn{order:98;margin-top:auto;width:100%;min-height:48px}
  .nv-panel a[href="/login"]{order:99;justify-content:center;margin-top:8px;min-height:48px;border:1px solid var(--lk-border-strong);border-radius:8px}
  .nv-burger{transition:border-color .15s,background-color .15s}
  .nv-burger[aria-expanded=true]{border-color:var(--lk-accent-line);background:var(--lk-accent-soft);color:var(--lk-accent-text)}
}
@media(max-width:980px) and (prefers-reduced-motion:no-preference){
  .nv-panel:not([hidden]){animation:mk-sheet .24s cubic-bezier(.2,.8,.2,1) both}
  .nv-panel:not([hidden]) .mk-wrap>*{animation:mk-rise .34s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0)*28ms + 50ms)}
}

/* ---------- motion (reveal, hero entrance, bars) ---------- */
@media(prefers-reduced-motion:no-preference){
  html{scroll-behavior:smooth}
  .mk-js .mk-rv{opacity:0;transform:translateY(14px);transition:opacity .4s cubic-bezier(.2,.8,.2,1),transform .4s cubic-bezier(.2,.8,.2,1);transition-delay:var(--d,0ms);will-change:opacity,transform}
  .mk-js .mk-rv.in{opacity:1;transform:none;will-change:auto}
  .mk-js .hero :is(.eyebrow,h1,.lede){animation:mk-rise .6s cubic-bezier(.2,.8,.2,1) both}
  .mk-js .hero h1{animation-delay:.06s}.mk-js .hero .lede{animation-delay:.12s}
  .mk-js .hero .btn{animation:mk-rise .6s .2s cubic-bezier(.2,.8,.2,1) both}
  .mk-js .bx-top0>*,.mk-js .bx-head>*,.mk-js .tl-hd>div>*{animation:mk-rise .55s cubic-bezier(.2,.8,.2,1) both}
  .mk-js .bx-top0>*:nth-child(2),.mk-js .bx-head>*:nth-child(2),.mk-js .tl-hd>div>*:nth-child(2){animation-delay:.05s}
  .mk-js .bx-top0>*:nth-child(3),.mk-js .bx-head>*:nth-child(3),.mk-js .tl-hd>div>*:nth-child(3){animation-delay:.1s}
  .mk-js .bx-top0>*:nth-child(4),.mk-js .bx-head>*:nth-child(4){animation-delay:.15s}
  .mk-js .bx-top0>*:nth-child(5),.mk-js .bx-head>*:nth-child(5){animation-delay:.2s}
  .mk-js .mbar i,.mk-js .vbar .vt i{transition:width .9s cubic-bezier(.2,.8,.2,1)}
  .mk-js .mbar:not(.in) i,.mk-js .vbar:not(.in) .vt i{width:0}
  .nv-cta .ic{transition:transform .16s}.nv-cta:hover .ic{transform:translateX(3px)}
}
