/* © Rohan Kells · https://github.com/kellsrohan */
:root {
  --fh-motion-blue: var(--blue, #8faaff);
  --fh-motion-violet: var(--violet, #af88ff);
  --fh-motion-lime: var(--lime, #d3fb62);
}

/* The canvas stays behind the existing page and never intercepts a pointer. */
#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
  background: transparent;
  contain: strict;
}

/* Individual translate composes with the site's existing hover transforms. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-freehub-magnetic] {
    translate: var(--fh-magnetic-x, 0px) var(--fh-magnetic-y, 0px);
    will-change: translate;
  }

  [data-freehub-magnetic]:disabled,
  [data-freehub-magnetic][aria-disabled="true"],
  [data-freehub-magnetic]:focus-visible,
  [inert] [data-freehub-magnetic] {
    translate: 0 0;
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #constellation {
    display: none !important;
  }

  [data-freehub-magnetic] {
    translate: none !important;
    will-change: auto;
  }
}
