/* KORAX Analytics · motion.css
   Ambient motion layers (hero line streaks, radar sweep with pings, chain pulse,
   scroll-linked hero exit). Layers are injected by motion.js; without JS the page
   keeps its static look. Rules:
   - compositor-friendly where possible (transform / opacity), SVG dash flow only in
     a layer that is on screen
   - every animation pauses when its layer is off screen or the tab is hidden
   - prefers-reduced-motion: static drawing, no movement
   - layers are absolutely positioned, so no layout shift */

.mk-host{position:relative;}
.mk-host > .mk-layer{position:absolute;pointer-events:none;z-index:0;}
.mk-host > .wrap,.mk-host > .hero-grid{position:relative;z-index:2;}

@keyframes mkFlow{to{stroke-dashoffset:-700;}}
@keyframes mkFade{from{opacity:0;}to{opacity:1;}}
@keyframes mkFadeS{from{opacity:0;}to{opacity:.65;}}
@keyframes mkFadeM{from{opacity:0;}to{opacity:.28;}}
@keyframes mkPing{0%{transform:scale(.6);opacity:.9;}100%{transform:scale(2.6);opacity:0;}}
@keyframes mkSweep{to{transform:rotate(360deg);}}
@keyframes mkBlip{0%{opacity:1;}35%{opacity:.4;}100%{opacity:.4;}}
@keyframes mkRing{0%{transform:scale(.7);opacity:.85;}18%{transform:scale(3.4);opacity:0;}100%{transform:scale(3.4);opacity:0;}}
@keyframes mkChain{0%{transform:scale(1);opacity:.9;}100%{transform:scale(1.9);opacity:0;}}

/* ---- Line streaks: thin curves fan out from one point, glowing segments travel along them ---- */
.mk-streaks{inset:0;width:100%;height:100%;max-width:none;display:block;
  contain:strict;animation:mkFade 1.8s ease both;}
.mk-streaks g{fill:none;stroke-linecap:round;stroke-dasharray:420 280;}
.mk-streaks path{stroke:url(#mkGrey);animation:mkFlow 11s linear infinite;}
.mk-streaks .s1{stroke-opacity:.2;animation-duration:11s;}
.mk-streaks .s2{stroke-opacity:.22;animation-duration:9s;}
.mk-streaks .s3{stroke-opacity:.26;animation-duration:13s;}
.mk-streaks .s5{stroke-opacity:.28;animation-duration:10s;}
.mk-streaks .s6{stroke-opacity:.25;animation-duration:12s;}
.mk-streaks .s7{stroke-opacity:.2;animation-duration:8s;}
.mk-streaks .s8{stroke-opacity:.15;animation-duration:14s;}
.mk-streaks .s9{stroke-opacity:.1;animation-duration:9s;}
.mk-streaks .sg{stroke:url(#mkGreen);stroke-opacity:.9;stroke-width:1.6;animation-duration:7s;}
.mk-streaks .sh{stroke:url(#mkGreen);stroke-opacity:.14;stroke-width:7;animation-duration:7s;}
.mk-streaks .base{stroke:#c8d0ce;stroke-opacity:.1;stroke-dasharray:2 8;}
.mk-streaks .org{fill:#00FFA6;}
.mk-streaks .ring{fill:none;stroke:#00FFA6;transform-box:fill-box;transform-origin:center;animation:mkPing 2.6s ease-out infinite;}
.mk-streaks .ring + .ring{animation-delay:1.3s;}
/* calmer variant for the closing band: four lines, no origin */
.mk-streaks--soft{opacity:.8;}

/* ---- Radar: rings, crosshair, rotating sweep, blips that ping when the sweep passes ---- */
.mk-radar{--T:9s;right:-12%;top:50%;width:min(90vw,980px);aspect-ratio:1;transform:translateY(-50%);border-radius:50%;
  border:1px solid rgba(200,208,206,.12);animation:mkFade 1.8s ease both;
  -webkit-mask-image:radial-gradient(circle,#000 55%,rgba(0,0,0,.35));mask-image:radial-gradient(circle,#000 55%,rgba(0,0,0,.35));}
.mk-radar i{position:absolute;border-radius:50%;}
.mk-radar .r2{inset:16%;border:1px solid rgba(200,208,206,.12);}
.mk-radar .r3{inset:33%;border:1px solid rgba(200,208,206,.12);}
.mk-radar .ax1,.mk-radar .ax2{inset:0;border-radius:0;}
.mk-radar .ax1{background:linear-gradient(rgba(200,208,206,.07),rgba(200,208,206,.07)) center/1px 100% no-repeat;}
.mk-radar .ax2{background:linear-gradient(rgba(200,208,206,.07),rgba(200,208,206,.07)) center/100% 1px no-repeat;}
.mk-radar .sw{inset:0;background:conic-gradient(from 0deg,transparent 0deg,transparent 285deg,rgba(0,255,166,.05) 330deg,rgba(0,255,166,.2) 360deg);
  animation:mkSweep var(--T) linear infinite;will-change:transform;}
.mk-radar b{position:absolute;width:7px;height:7px;margin:-3.5px 0 0 -3.5px;border-radius:50%;background:#00FFA6;opacity:.4;
  animation:mkBlip var(--T) linear infinite;animation-delay:calc(var(--a) / 360 * var(--T));}
.mk-radar b::after{content:"";position:absolute;inset:-1px;border-radius:50%;border:1px solid #00FFA6;opacity:0;
  animation:mkRing var(--T) ease-out infinite;animation-delay:calc(var(--a) / 360 * var(--T));}
@media (max-width:760px){.mk-radar{right:-48%;width:120vw;}}

/* ---- Pause when off screen or tab hidden ---- */
.mk-layer:not(.mk-live),.mk-layer:not(.mk-live) *,.mk-layer:not(.mk-live) *::after,
.mk-hidden .mk-layer,.mk-hidden .mk-layer *,.mk-hidden .mk-layer *::after,
.mk-paused .ticker-track{animation-play-state:paused;}

/* ---- Chain of impact: one ring after the other travels along the chain, once, when it scrolls in ---- */
.chain.mk-run .chain-ico::before{
  content:"";position:absolute;inset:-1px;border-radius:50%;border:1px solid var(--signal);pointer-events:none;
  opacity:0;animation:mkChain 1.3s cubic-bezier(.2,.7,.3,1) both;
}
.chain.mk-run li:nth-child(1) .chain-ico::before{animation-delay:.1s;}
.chain.mk-run li:nth-child(2) .chain-ico::before{animation-delay:.5s;}
.chain.mk-run li:nth-child(3) .chain-ico::before{animation-delay:.9s;}
.chain.mk-run li:nth-child(4) .chain-ico::before{animation-delay:1.3s;}
.chain.mk-run li:nth-child(5) .chain-ico::before{animation-delay:1.7s;}
.chain.mk-run li:nth-child(6) .chain-ico::before{animation-delay:2.1s;}

/* ---- Scroll-linked: the hero copy settles back a little while the page scrolls (progressive enhancement) ---- */
@keyframes mkHeroOut{to{opacity:.4;transform:translateY(-36px);}}
@supports (animation-timeline:scroll()){
  .js .hero-grid{animation:mkHeroOut 1s linear both;animation-timeline:scroll(root);animation-range:120px 720px;}
}

@media (prefers-reduced-motion:reduce){
  .mk-streaks,.mk-radar,.mk-streaks path,.mk-streaks .ring,.mk-radar .sw,.mk-radar b,.mk-radar b::after,
  .chain.mk-run .chain-ico::before{animation:none !important;}
  .mk-streaks g{stroke-dasharray:none;}
  .mk-streaks .sh,.mk-streaks .ring{display:none;}
  .mk-radar b{opacity:.55;}
  .mk-radar b::after{display:none;}
  .mk-radar .sw{background:conic-gradient(from 0deg,transparent 0deg,transparent 300deg,rgba(0,255,166,.1) 360deg);transform:rotate(40deg);}
  .js .hero-grid{animation:none;}
}
@media print{.mk-layer{display:none !important;}}
.page-head.mk-host{overflow:hidden;}
.mk-streaks--soft path{stroke:url(#mkGreyS);}
.page-head > .mk-radar{width:min(80vw,640px);right:-3%;}
@media (max-width:760px){.page-head > .mk-radar{right:-40%;width:110vw;}}

/* ==========================================================================
   Page scenes (one signature layer per page template)
   ========================================================================== */
.mk-scene{top:0;right:0;bottom:0;width:min(50%,620px);height:100%;max-width:none;display:block;opacity:.65;contain:strict;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 48%,#000 93%,transparent);mask-image:linear-gradient(90deg,transparent,#000 42%,#000 93%,transparent);
  animation:mkFadeS 1.6s ease both;}
@media (max-width:900px){.mk-scene{width:100%;animation-name:mkFadeM;-webkit-mask-image:none;mask-image:none;}}
.mk-scene .m-ring,.mk-routes .m-ring{fill:none;stroke-width:1;transform-box:fill-box;transform-origin:center;animation:mkPing 2.8s ease-out var(--l,0s) infinite;}
.m-spin{transform-box:fill-box;transform-origin:center;animation:mkSpin 60s linear infinite;}
.m-lit{opacity:.38;animation:mkLit var(--T,6s) ease-out var(--l,0s) infinite;}
.m-pop{transform-box:fill-box;transform-origin:center;animation:mkPop var(--T,10s) ease-out var(--l,0s) infinite backwards;}
.m-draw{stroke-dasharray:1;stroke-dashoffset:0;animation:mkDrawLoop var(--T,10s) ease-in-out var(--l,0s) infinite backwards;}
.m-arc{stroke-dasharray:var(--len) 100;animation:mkArc var(--T,10s) ease-in-out var(--l,0s) infinite backwards;}
.m-bar{transform-box:fill-box;transform-origin:left center;animation:mkBar var(--T,10s) ease-out var(--l,0s) infinite backwards;}
.m-band{fill-opacity:.12;animation:mkBand var(--T,10s) ease-in-out infinite;}
.m-wave{animation:mkWave var(--T,9s) linear infinite;}
.m-surf{transform-box:fill-box;transform-origin:center;opacity:0;animation:mkSurf var(--T,7s) ease-out var(--l,0s) infinite;}
.m-caret{animation:mkCaret 1.1s steps(1) infinite;}
.m-dt{animation:mkTravel var(--T,3s) linear var(--l,0s) infinite backwards;offset-rotate:0deg;}
.m-dt.m-seq{animation-name:mkTravelSeq;}
@supports not (offset-path:path('M0 0 L1 1')){.m-dt{display:none;}}

@keyframes mkSpin{to{transform:rotate(360deg);}}
@keyframes mkLit{0%{opacity:1;}28%{opacity:.38;}100%{opacity:.38;}}
@keyframes mkPop{0%{opacity:0;transform:scale(.6);}5%{opacity:1;transform:scale(1);}86%{opacity:1;}96%,100%{opacity:0;transform:scale(1);}}
@keyframes mkDrawLoop{0%{stroke-dashoffset:1;opacity:1;}32%{stroke-dashoffset:0;}86%{stroke-dashoffset:0;opacity:1;}96%,100%{stroke-dashoffset:0;opacity:0;}}
@keyframes mkArc{0%{stroke-dasharray:0 100;opacity:1;}22%{stroke-dasharray:var(--len) 100;}86%{stroke-dasharray:var(--len) 100;opacity:1;}96%,100%{stroke-dasharray:var(--len) 100;opacity:0;}}
@keyframes mkBar{0%{transform:scaleX(0);opacity:1;}16%{transform:scaleX(1.07);}24%{transform:scaleX(1);}86%{transform:scaleX(1);opacity:1;}96%,100%{transform:scaleX(1);opacity:0;}}
@keyframes mkBand{0%,100%{fill-opacity:.05;}50%{fill-opacity:.15;}}
@keyframes mkWave{to{transform:translateX(-600px);}}
@keyframes mkSurf{0%{opacity:0;transform:scale(.2);}25%{opacity:.95;transform:scale(1);}70%{opacity:.5;transform:scale(1.1);}100%{opacity:0;transform:scale(1.3);}}
@keyframes mkCaret{0%,49%{opacity:1;}50%,100%{opacity:0;}}
@keyframes mkTravel{0%{offset-distance:0%;opacity:0;}12%{opacity:1;}88%{opacity:1;}100%{offset-distance:100%;opacity:0;}}
@keyframes mkTravelSeq{0%{offset-distance:0%;opacity:0;}2%{opacity:1;}13%{offset-distance:100%;opacity:1;}15%,100%{offset-distance:100%;opacity:0;}}

/* radar page: route lines between hubs; 404: signal lost */
.mk-routes{position:absolute;inset:0;width:100%;height:100%;max-width:none;}
.mk-routes .m-dt{animation-name:mkTravel;}
.mk-radar--lost{right:auto;left:50%;top:50%;width:min(94vw,760px);transform:translate(-50%,-50%);}
.mk-radar--lost b{opacity:.15;}
.notfound.mk-host{overflow:hidden;}
.notfound.mk-host > .wrap{position:relative;z-index:2;}

/* in-section: list items light up one after the other when the list scrolls in */
.mk-run > li{border-radius:6px;animation:mkSeq 1.7s ease-out both;}
.mk-run > li:nth-child(1){animation-delay:.1s;} .mk-run > li:nth-child(2){animation-delay:.5s;} .mk-run > li:nth-child(3){animation-delay:.9s;}
.mk-run > li:nth-child(4){animation-delay:1.3s;} .mk-run > li:nth-child(5){animation-delay:1.7s;} .mk-run > li:nth-child(6){animation-delay:2.1s;}
.mk-run > li:nth-child(n+7){animation-delay:2.5s;}
@keyframes mkSeq{0%{background-color:transparent;}22%{background-color:rgba(0,255,166,.07);}100%{background-color:transparent;}}

@media (prefers-reduced-motion:reduce){
  .mk-scene,.mk-scene *,.mk-routes *,.mk-radar--lost,.mk-run > li{animation:none !important;}
  .m-dt,.m-surf{display:none;}
  .m-lit{opacity:.85;}
  .m-band{fill-opacity:.1;}
  .mk-scene{opacity:.65 !important;}
}
/* pages whose headline runs wide: anchor the scene lower right so it stays clear of the title */
[data-page="institutionen"] .mk-scene,[data-page="transparenz"] .mk-scene{top:auto;bottom:-6%;height:64%;}
@media (max-width:900px){[data-page="institutionen"] .mk-scene,[data-page="transparenz"] .mk-scene{top:0;bottom:0;height:100%;}}

/* Weak phones (html.mk-lite, set by motion.js): same static drawing as prefers-reduced-motion */
.mk-lite .mk-streaks,.mk-lite .mk-radar,.mk-lite .mk-streaks path,.mk-lite .mk-streaks .ring,.mk-lite .mk-radar .sw,
.mk-lite .mk-radar b,.mk-lite .mk-radar b::after,.mk-lite .mk-scene *,.mk-lite .mk-routes *,.mk-lite .chain.mk-run .chain-ico::before{animation:none !important;}
.mk-lite .mk-streaks g{stroke-dasharray:none;}
.mk-lite .mk-streaks .sh,.mk-lite .mk-streaks .ring{display:none;}
.mk-lite .mk-radar b{opacity:.55;}
.mk-lite .mk-radar b::after{display:none;}
.mk-lite .mk-radar .sw{background:conic-gradient(from 0deg,transparent 0deg,transparent 300deg,rgba(0,255,166,.1) 360deg);transform:rotate(40deg);}
.mk-lite .js .hero-grid,.mk-lite.js .hero-grid{animation:none;}
.mk-lite .mk-scene,.mk-lite .mk-radar--lost,.mk-lite .mk-run > li{animation:none !important;}
.mk-lite .m-dt,.mk-lite .m-surf{display:none;}
.mk-lite .m-lit{opacity:.85;}
.mk-lite .m-band{fill-opacity:.1;}
.mk-lite .mk-scene{opacity:.65 !important;}
