/* ════════════════════════════════════════════════════════
   STARFOUNDRY — Butterfly Cursor + Fairy Dust Trail
   Include on every Starfoundry page.
   ════════════════════════════════════════════════════════ */

/* Hide default cursor on all pages using this system */
html, body {
  cursor: none !important;
}
a, button, [role="button"], label, select, input, textarea {
  cursor: none !important;
}

/* Butterfly element */
#sf-bf {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -60%);
  will-change: transform;
  transition: none;
}
#sf-bf svg {
  width: 34px;
  height: 30px;
  filter:
    drop-shadow(0 0 8px rgba(201,168,76,.9))
    drop-shadow(0 0 22px rgba(201,168,76,.4));
}

/* Wing flap animation — matches homepage exactly */
#sf-bf .wl {
  transform-origin: 32px 26px;
  animation: sf-wl 0.22s ease-in-out infinite alternate;
}
#sf-bf .wr {
  transform-origin: 32px 26px;
  animation: sf-wr 0.22s ease-in-out infinite alternate;
}
@keyframes sf-wl {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0.18); }
}
@keyframes sf-wr {
  from { transform: scaleX(-1); }
  to   { transform: scaleX(-0.18); }
}

/* Dust canvas */
#sf-dust-canvas {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Gracefully hide on touch/mobile */
@media (hover: none) and (pointer: coarse) {
  #sf-bf,
  #sf-dust-canvas {
    display: none !important;
  }
  html, body,
  a, button, [role="button"] {
    cursor: auto !important;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #sf-bf .wl,
  #sf-bf .wr {
    animation: none !important;
  }
}
