/* Circuit layer: electric hero logo draw-in, quiet background pulses, grid on every navy section.
   Author: Michigan AI Dev Team. Date: 2026-11-24. Loaded after hightech.css; in the build it is appended to site.css.
   Everything that moves sits inside prefers-reduced-motion:no-preference. Colours are existing tokens. */

/* 1. Hero logo: electricity runs along each circuit to its circle end. The real artwork is revealed by a mask that exists only while it draws. */
.el,.el-lines,.el-rings{fill:none}
.el-wglow{display:none}
.el{display:none;pointer-events:none}
.hero-lockup{overflow:visible}
@media(prefers-reduced-motion:no-preference){
  html[data-logo] .hero-lockup .el{display:inline}
  html[data-logo] .hero-lockup .el-art{mask:url(#el-mask);animation:el-power 420ms ease-out 1040ms both}
  html[data-logo] .el-lines use{stroke:#FFFFFF;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:100 200;animation:el-line calc(var(--t) * 1ms) linear calc(var(--s) * 1ms) both}
  html[data-logo] .el-rings circle{stroke:#FFFFFF;stroke-width:22;animation:el-on 120ms linear calc(var(--s) * 1ms) both}
  html[data-logo] .el-rest{fill:#FFFFFF;animation:el-on 180ms linear 1000ms both}
  html[data-logo] .el-halo use,html[data-logo] .el-core use{stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:var(--k) 300;
    animation:el-run calc(var(--t) * 1ms) linear calc(var(--s) * 1ms) both,el-live calc(var(--t) * 1ms + 160ms) linear calc(var(--s) * 1ms) both}
  html[data-logo] .el-halo use{stroke:var(--color-mark-ai);stroke-width:20;stroke-opacity:0.95}
  html[data-logo] .el-core use{stroke:#FFFFFF;stroke-width:7}
  html[data-logo] .el-fill{fill:#FFFFFF;transform-box:fill-box;transform-origin:center;animation:el-fill 560ms var(--ease-out) calc(var(--s) * 1ms) both,el-off 360ms ease-in 1500ms forwards}
  html[data-logo] .el-burst{transform-box:fill-box;transform-origin:center;animation:el-burst 620ms ease-out calc(var(--s) * 1ms) both,el-finale 560ms ease-out 1180ms both}
  /* the finale: every circle lights once more with the flash behind the logo */
  :is(html[data-logo],[data-drawin]) .lk-flash{animation:ht-flash 520ms ease-out var(--flash,1160ms) both}
  /* the current leaves the flash and runs through the wordmark: a soft front reveals it and a glow passes through the letters */
  html[data-logo] .el-wordg,html[data-logo] .el-wlight{mask:url(#el-wmask)}
  html[data-logo] .el-sweep{animation:el-sweep 520ms linear 1230ms both}
  html[data-logo] .el-wglow{display:inline;fill:var(--color-mark-ai);stroke:var(--color-mark-ai);stroke-width:14;stroke-linecap:round;stroke-dasharray:90 1400;
    animation:el-wrun 520ms linear 1240ms both,el-wlit 900ms ease-out 1240ms both}
  /* headline, h1 only: a charge runs round every letter with a bloom, and the letter glows as it fills, then settles to plain white */
  :is(html[data-logo],[data-drawin]) .hw-bloom use{fill:var(--bloom,var(--color-mark-ai));stroke:var(--run,#FFFFFF);stroke-width:52;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:0.26 2;
    animation:hw-run 560ms var(--lk-ease) calc(var(--c) * 12ms + var(--hw,1560ms)) both,hw-live 620ms linear calc(var(--c) * 12ms + var(--hw,1560ms)) both,hw-lit 700ms linear calc(var(--c) * 11ms + var(--hw,1560ms) + 280ms) both}
  @keyframes el-sweep{from{transform:translateX(-925px)}to{transform:translateX(0)}}
  @keyframes el-wrun{from{stroke-dashoffset:90}to{stroke-dashoffset:-700}}
  @keyframes el-wlit{0%{opacity:1;fill-opacity:0}38%{opacity:1;fill-opacity:1}100%{opacity:0;fill-opacity:1}}
  @keyframes hw-run{from{stroke-dashoffset:0.26}to{stroke-dashoffset:-1}}
  @keyframes hw-live{0%{stroke-opacity:0}4%,82%{stroke-opacity:1}100%{stroke-opacity:0}}
  @keyframes hw-lit{0%{fill-opacity:0}22%{fill-opacity:0.85}34%{fill-opacity:0.4}48%{fill-opacity:1}100%{fill-opacity:0}}
  @keyframes el-line{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
  @keyframes el-run{from{stroke-dashoffset:var(--k)}to{stroke-dashoffset:-100}}
  @keyframes el-live{0%{opacity:0}4%,80%{opacity:1}100%{opacity:0}}
  @keyframes el-on{from{opacity:0}to{opacity:1}}
  @keyframes el-off{to{opacity:0}}
  @keyframes el-fill{from{transform:scale(0)}to{transform:scale(1)}}
  @keyframes el-burst{0%{opacity:0;transform:scale(0.4)}22%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.15)}}
  @keyframes el-finale{0%{opacity:0;transform:scale(0.7)}30%{opacity:0.85;transform:scale(1.1)}100%{opacity:0;transform:scale(1.35)}}
  @keyframes el-power{from{fill-opacity:0.72}to{fill-opacity:1}}
}

/* 1b. The hand-off: charges leave the logo's circuit ends, run to the headline, then on into the button pads. theme/motion.js measures the
   routes, because they depend on how the headline wraps. The same pieces draw the service heroes ([data-drawin]). Decorative, above nothing but navy, gone when the hero is finished. */
.cd{display:none;position:absolute;inset:0;inline-size:100%;block-size:100%;overflow:hidden;pointer-events:none;fill:none;stroke-linejoin:round}
.cd-line,.cd-run{stroke-dasharray:100 200}
.cd-line{stroke:var(--run-line,var(--color-mark-ai));stroke-width:1.5}
.cd-run{stroke:var(--run,#FFFFFF);stroke-width:3;stroke-linecap:round;filter:drop-shadow(0 0 4px var(--run,#FFFFFF)) drop-shadow(0 0 10px var(--run-line,var(--color-mark-ai))) drop-shadow(0 0 18px var(--run-line,var(--color-mark-ai)))}
.cd-end{fill:var(--run-end,url(#cd-glow));stroke:none}
@media(prefers-reduced-motion:no-preference){
  :is(html[data-logo],[data-drawin]) .cd{display:block}
  :is(html[data-logo],[data-drawin]) .cd-line{animation:el-line calc(var(--t) * 1ms) linear calc(var(--s) * 1ms) both,cd-fade calc(var(--t) * 1ms + 620ms) linear calc(var(--s) * 1ms) both}
  :is(html[data-logo],[data-drawin]) .cd .cd-run{stroke-dasharray:var(--k) 300;animation:el-run calc(var(--t) * 1ms) linear calc(var(--s) * 1ms) both,el-live calc(var(--t) * 1ms + 60ms) linear calc(var(--s) * 1ms) both}
  :is(html[data-logo],[data-drawin]) .cd-end{transform-box:fill-box;transform-origin:center;animation:el-burst 520ms ease-out calc((var(--s) + var(--t)) * 1ms - 60ms) both}
  @keyframes cd-fade{0%{opacity:0}6%,50%{opacity:0.5}100%{opacity:0}}
}
/* On wide layouts (logo left, headline right) the circuit trails read too faint, so draw them thicker and brighter there. Phones and tablets are unchanged. */
@media(prefers-reduced-motion:no-preference) and (min-width:1024px){
  .home-hero .cd-line{stroke-width:2.5}
  html[data-logo] .home-hero .cd-line{animation-name:el-line,cd-fade-wide}
  @keyframes cd-fade-wide{0%{opacity:0}6%,60%{opacity:0.9}100%{opacity:0}}
}
@media(forced-colors:active){.cd{display:none!important}}

/* 2. Background pulse: now and then one trace fills along its line, its circle fills, glows softly and fades. theme/motion.js fires one trace at a
   time, only while it is on screen and the tab is visible. Without the script, or with reduced motion, the traces are still. */
.sec-trace,.trace{position:relative}
.pz{opacity:0}
.sec-trace .pz-run,.trace .pz-run{position:absolute;left:0;right:46px;top:1px;block-size:2px;background:linear-gradient(90deg,transparent,var(--pulse) 92%);transform-origin:0 50%;pointer-events:none}
.trace .pz-run{left:11px;right:71px;top:5px}
.sec-trace svg .pz,.trace svg .pz{stroke:var(--pulse);fill:none}
.sec-trace svg .pz-node,.trace svg .pz-node{fill:var(--pulse);stroke:none}
.sec-trace svg .pz-glow,.trace svg .pz-glow{fill:var(--pulse);stroke:none}
/* "Why us" hairlines: the charge runs back to the circle that starts the line */
.why-list dt::before{content:"";position:absolute;left:11px;right:0;top:-1px;block-size:2px;background:linear-gradient(270deg,transparent,var(--pulse) 92%);transform-origin:100% 50%;opacity:0;pointer-events:none}
.why-list>div::after{content:"";position:absolute;left:0;top:-6px;inline-size:11px;block-size:11px;border-radius:50%;background:var(--pulse);box-shadow:0 0 0 5px color-mix(in srgb,var(--pulse) 30%,transparent);opacity:0;pointer-events:none}
:root{--pulse:var(--color-link)}
.process-band,.contact-band{--pulse:var(--color-on-navy)}
@media(prefers-reduced-motion:no-preference){
  .is-pulsing .pz-run,.is-pulsing .pz-line{animation:pz-run 1000ms cubic-bezier(0.45,0.05,0.6,1) both,pz-fade 2300ms linear both}
  .is-pulsing svg .pz-jog{stroke-dasharray:1 2;animation:pz-jog 160ms linear 960ms both,pz-fade 2300ms linear both}
  .is-pulsing .pz-path{stroke-dasharray:1 2;animation:pz-jog 1000ms cubic-bezier(0.45,0.05,0.6,1) both,pz-fade 2300ms linear both}
  .is-pulsing .pz-node{animation:pz-node 1250ms ease-out calc(1080ms + var(--nd,0ms)) both}
  .is-pulsing .pz-dot,.is-pulsing .pz-ring{animation:pz-node 1250ms ease-out 1000ms both}
  .is-pulsing .pz-glow{transform-box:fill-box;transform-origin:center;animation:pz-glow 1150ms ease-out calc(1140ms + var(--nd,0ms)) both}
  .why-list>.is-pulsing dt::before{animation:pz-run 1000ms cubic-bezier(0.45,0.05,0.6,1) both,pz-fade 2300ms linear both}
  .why-list>.is-pulsing::after{animation:pz-node 1250ms ease-out 1000ms both}
  @keyframes pz-run{from{transform:var(--pulse-from,scale(0,1))}to{transform:scale(1,1)}}
  @keyframes pz-fade{0%,52%{opacity:0.5}78%,100%{opacity:0}}
  @keyframes pz-jog{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
  @keyframes pz-node{0%{opacity:0}16%,45%{opacity:0.75}100%{opacity:0}}
  @keyframes pz-glow{0%{opacity:0;transform:scale(0.5)}30%{opacity:0.28;transform:scale(1)}100%{opacity:0;transform:scale(1.25)}}
}

/* 2b. The same pulse on every other trace. theme/motion.js adds the moving pieces (.pz-line a run, .pz-dot or .pz-ring its circle, .pz-g a copy of a
   drawn trace), so nothing is added to the page without it. --pulse-from and --pulse-dir say which way a line runs: across by default. */
.kicker{position:relative}
.pz-line,.pz-dot,.pz-ring{position:absolute;z-index:1;box-sizing:border-box;pointer-events:none}
.pz-line{--pulse-dir:90deg;background:linear-gradient(var(--pulse-dir),transparent,var(--pulse) 92%);transform-origin:0 50%}
.pz-dot,.pz-ring{border-radius:50%;box-shadow:0 0 0 5px color-mix(in srgb,var(--pulse) 30%,transparent)}
.pz-dot{background:var(--pulse)}
.pz-ring{border:2px solid var(--pulse)}
.pz-g{fill:none;pointer-events:none}
.pz-g .pz-path{stroke:var(--pulse);stroke-width:3}
.pz-g .pz-glow,.pz-g .pz-node{fill:var(--pulse);stroke:none}
/* small label above a service page's headline, and the audit sheet's hairlines: the charge runs back to the circle, as in "Why us" */
.kicker .pz-line{left:10px;top:calc(0.44em + 4px);inline-size:calc(2.25rem - 10px);block-size:2px;--pulse-dir:270deg;transform-origin:100% 50%}
.kicker .pz-dot{left:0;top:0.44em;inline-size:10px;block-size:10px}
.price-sheet .pz-line{left:11px;right:0;top:-1px;block-size:2px;--pulse-dir:270deg;transform-origin:100% 50%}
.price-sheet .pz-dot{left:0;top:-6px;inline-size:11px;block-size:11px}
/* "How it works" and the contact list: the charge runs down to the next circle */
.process-grid .pz-line,.contact-prep .pz-line{--pulse-dir:180deg;--pulse-from:scale(1,0);transform-origin:50% 0;inline-size:2px}
.process-grid .pz-line{left:calc(var(--tap-min) / 2 - 1px);top:var(--tap-min);bottom:0}
.process-grid .pz-ring{left:0;top:100%;inline-size:var(--tap-min);block-size:var(--tap-min)}
.contact-prep .pz-line{left:5px;top:calc(0.8em + 6px);bottom:calc(6px - 0.8em)}
.contact-prep .pz-dot{left:0;top:calc(100% + 0.8em - 6px);inline-size:12px;block-size:12px}

/* 3. The hero's grid on the other navy sections: same cell, same colour, same strength. Both halves of the contact band and footer
   are anchored to the seam between them, so the grid runs through without a step. */
.process-band,.contact-band,.site-footer{position:relative;isolation:isolate}
.process-band::before,.contact-band::before,.site-footer::before{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;opacity:0.6;
  background-image:linear-gradient(var(--color-sketch-on-navy) 1px,transparent 1px),linear-gradient(90deg,var(--color-sketch-on-navy) 1px,transparent 1px);
  background-size:var(--grid-cell) var(--grid-cell);background-position:center top}
.contact-band::before{background-position:center bottom}
@media(forced-colors:active){.process-band::before,.contact-band::before,.site-footer::before,.pz,.el,.el-wlight{display:none!important}}

/* 4. Footer "Pause animation": looks like the other footer links. Paused = the finished page, nothing moves.
   After Play, pulses run again; a drawing already finished does not replay. theme/motion.js shows the button, so it never appears without it. */
.motion-toggle{display:inline-flex;align-items:center;min-height:var(--tap-min);margin:0;padding:0;border:0;border-radius:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;text-decoration:underline;cursor:pointer}
.motion-toggle[hidden]{display:none}
.site-footer .motion-toggle{color:var(--color-on-navy)}
.sign-in-footer .motion-toggle{padding-inline:var(--space-2);color:var(--color-ink);font-size:var(--step--1);letter-spacing:0.04em;text-decoration:none}
.sign-in-footer .motion-toggle:hover{text-decoration:underline}
.site-footer .motion-toggle:focus-visible{outline-color:var(--color-focus-on-navy)}
html[data-motion="off"]{scroll-behavior:auto}
html[data-motion="off"] *,html[data-motion="off"] *::before,html[data-motion="off"] *::after{animation:none!important;transition:none!important}
html[data-motion] .svc-icon *{animation:none!important}

/* 5. Page change. theme/page_transition.js decides when; here is how it moves. The header keeps still. The charge is the shared one (1b).
   Names exist only while a page change runs, so they never change how the page stacks. No browser support, reduced motion or Pause = a plain instant change. */
.pt,.svc-hero-copy,.section h2,.svc-page #job-sheet{--run:color-mix(in srgb,var(--color-link) 65%,#000);--run-line:color-mix(in srgb,var(--color-link) 55%,transparent);--run-end:url(#cd-glow-ink)} /* the charge on light surfaces */
.pt{position:fixed;z-index:50;inset:0;overflow:hidden;pointer-events:none}
.pt-navy{--run:#FFFFFF;--run-line:var(--color-link);--run-end:url(#cd-glow)} /* white core, dark edge: reads on the light header and on the navy hero */
html.pt-on{scroll-behavior:auto}
@media(prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  .pt-on:not(.pt-nohead) .site-header{view-transition-name:pt-header}
  .pt-on .pt{view-transition-name:pt-wire}
  html.pt-on::view-transition{pointer-events:none;background:var(--color-canvas)}
  html.pt-on::view-transition-old(*),html.pt-on::view-transition-new(*){animation:none;mix-blend-mode:normal}
  html.pt-on::view-transition-group(pt-header){animation:none;border-image:conic-gradient(var(--color-canvas) 0 0) fill 0/0/0 100vmax} /* a full-width plate, so the page moves behind the header */
  html.pt-on::view-transition-old(pt-header){display:none}
  html.pt-on.pt-nohead::view-transition-group(pt-header){border-image:none;animation:el-off 240ms ease-in both} /* landing on a section further down, where there is no header */
  html.pt-on.pt-nohead::view-transition-old(pt-header){display:block}
  html.pt-on::view-transition-group(pt-wire){animation:none}
  html.pt-on::view-transition-old(pt-wire){display:none}
  html.pt-hold[data-logo] .home-hero,html.pt-hold[data-logo] .home-hero :is(*,::before,::after){animation-play-state:paused!important}
  /* the old page dims, the charge carries the current across */
  html.pt-on::view-transition-old(root){animation:el-off 240ms ease-in both}
  html.pt-on::view-transition-new(root){animation:el-on 260ms ease-out 160ms both}
}
@media(forced-colors:active){.pt{display:none!important}}
