/* svc-fx core, shared by every Services motion kind (Beau 2026-10-23: "lets work on the services page and get some
   animations and effects built out"). Motion only: no animation here keeps its end state (none uses fill forwards),
   so once it ends every pixel is live's, and svc_fx.py proves it. A panel replays its CSS animations each time it is
   shown, because a display: none element restarts them; that is the whole switch mechanism for the CSS parts.
   Reduced motion: none of this applies, and the script never starts. */
body.nh.pal-b { --svfx-out: cubic-bezier(0.23, 1, 0.32, 1); --svfx-io: cubic-bezier(0.77, 0, 0.175, 1); --svfx-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes svfx-fade { from { opacity: 0; } }
  @keyframes svfx-rise { from { opacity: 0; transform: translate(var(--svfx-dx, 0px), var(--svfx-dy, 12px)); } }
  /* a switch made with the arrow keys only fades, quickly: a key held through the steps must never wait on motion */
  body.nh.pal-b .svx-console.fx-key .svx-panel *, body.nh.pal-b .svx-console.fx-key .svx-panel *::before,
  body.nh.pal-b .svx-console.fx-key .svx-panel *::after { animation: none !important; }
  body.nh.pal-b .svx-console.fx-key .svx-panel > * { animation: svfx-fade 0.14s var(--svfx-out) !important; }
  /* parts below the fold wait to be seen. Only the script adds this class, and only to parts out of view when it
     runs, so without the script nothing ever hides */
  html.svfx .svfx-wait { opacity: 0; }
  /* touch: Previous and Next push their arrows the way they go, on a mouse */
  body.nh.pal-b .svx-step-prev span, body.nh.pal-b .svx-step-next span { display: inline-block; transition: transform 0.2s var(--svfx-out); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  body.nh.pal-b .svx-step-next:hover span { transform: translateX(3px); }
  body.nh.pal-b .svx-step-prev:hover span { transform: translateX(-3px); }
}

/* F2 signal: travel and light, from the home page's journey (its gold ring and ping). A gold dot runs along the step
   rail from the step you were on to the one you picked and the step rings once; on a computer the gold fills down the
   rail behind it (and drains back up when you go back). The service slides in from the way you travelled, and its
   "+" marks light up one after another, like the signal arriving. "Book a call" at the bottom rings once when it
   scrolls into view. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes svfx-fill { from { background-size: 2px 0; } }
  @keyframes svfx-drain { from { background-size: 2px 100%; } }
  @keyframes svfx-light { 0% { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; transform: scale(1.14); } }
  @keyframes svfx-ring { from { opacity: 0.85; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
  /* hero */
  body.nh.pal-b .sv-hero .nh-eyebrow { --svfx-dy: 8px; animation: svfx-rise 0.6s var(--svfx-out) backwards; }
  body.nh.pal-b .sv-hero-h { --svfx-dy: 20px; animation: svfx-rise 0.7s var(--svfx-out) 0.06s backwards; }
  body.nh.pal-b .sv-hero-sub { --svfx-dy: 20px; animation: svfx-rise 0.7s var(--svfx-out) 0.14s backwards; }
  /* the dot and the ring (the script moves them; at rest they are invisible) */
  @media (max-width: 900px) { body.nh.pal-b .svx-con-navin { position: relative; } }   /* the dot's frame on a phone; on a computer it is sticky, which already is one */
  body.nh.pal-b .svfx-dot, body.nh.pal-b .svfx-ring { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; z-index: 2; }
  /* the paper halo keeps the dot visible over the gold it lights (without it, gold ran over gold and barely showed) */
  body.nh.pal-b .svfx-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--nh-gold); box-shadow: 0 0 0 2px var(--paper); }
  body.nh.pal-b .svfx-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid var(--nh-gold); box-sizing: border-box; }
  /* the rail fills gold behind the dot, and drains when you go back (the line is the rail's own ::after) */
  @media (min-width: 901px) {
    body.nh.pal-b .svx-con-steps .svx-con-list li.svfx-fill:has(.is-done)::after { background: linear-gradient(var(--nh-gold), var(--nh-gold)) top / 2px 100% no-repeat, var(--nh-rule);
      animation: svfx-fill var(--svfx-t, 0.3s) linear var(--svfx-d, 0s) backwards; }
    body.nh.pal-b .svx-con-steps .svx-con-list li.svfx-drain:not(:has(.is-done))::after { background: linear-gradient(var(--nh-gold), var(--nh-gold)) top / 2px 0 no-repeat, var(--nh-rule);
      animation: svfx-drain var(--svfx-t, 0.3s) linear var(--svfx-d, 0s) backwards; }
  }
  /* the service slides in from the way you went: down the rail it rises, back up it drops; on a phone, sideways */
  body.nh.pal-b .svx-panel > * { --svfx-dy: 16px; animation: svfx-rise 0.34s var(--svfx-out) backwards; }
  body.nh.pal-b .svx-console.fx-up .svx-panel > * { --svfx-dy: -16px; }
  @media (max-width: 900px) {
    body.nh.pal-b .svx-panel > * { --svfx-dy: 0px; --svfx-dx: 24px; }
    body.nh.pal-b .svx-console.fx-up .svx-panel > * { --svfx-dy: 0px; --svfx-dx: -24px; }
  }
  /* the "+" marks light up in turn */
  body.nh.pal-b .svx-panel .sv-list li::before { animation: svfx-light 0.42s var(--svfx-out) 0.14s backwards; }
  body.nh.pal-b .svx-panel .sv-list li:nth-child(2)::before { animation-delay: 0.2s; }
  body.nh.pal-b .svx-panel .sv-list li:nth-child(3)::before { animation-delay: 0.26s; }
  body.nh.pal-b .svx-panel .sv-list li:nth-child(4)::before { animation-delay: 0.32s; }
  body.nh.pal-b .svx-panel .sv-list li:nth-child(5)::before { animation-delay: 0.38s; }
  body.nh.pal-b .svx-panel .sv-list li:nth-child(n+6)::before { animation-delay: 0.44s; }
  /* "Not sure where to start?": rises in, and "Book a call" rings once */
  body.nh.pal-b .sv-cta .nh-cta-head > .svfx-in { --svfx-dy: 20px; animation: svfx-rise 0.7s var(--svfx-out) backwards; animation-delay: calc(var(--svfx-i, 0) * 70ms); }
  body.nh.pal-b .sv-cta .nh-cta-btn { position: relative; }
  body.nh.pal-b .sv-cta .nh-cta-btn.svfx-in::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--nh-gold); opacity: 0; pointer-events: none;
    animation: svfx-ring 0.8s var(--svfx-out) calc(var(--svfx-i, 0) * 70ms + 0.45s) backwards; }
}
