/* Digital Studio - interaction effects (ported from React Bits patterns, MIT).
   NEW PATH REQUIRED FOR CHANGES: this zone's edge cache ignores query strings,
   so a future edit must ship as /fx2/ - never fx.css?v=2. */

/* Spotlight - cursor-tracked radial highlight (SpotlightCard port).
   Rendered as an overlay pseudo so it can never collide with the host's own
   background. Color set per surface via --fx-spot-c. */
.fx-spot { position: relative; }
.fx-spot::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(190px circle at var(--fxx, 50%) var(--fxy, 50%),
              var(--fx-spot-c, rgba(141, 169, 252, 0.14)), transparent 72%);
  opacity: var(--fxo, 0);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Sheen - periodic specular sweep on primary CTAs (ShinyText flavor).
   transform-only animation on a pseudo = compositor thread, no layout cost. */
.fx-sheen { position: relative; overflow: hidden; }
.fx-sheen::after {
  content: '';
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 36%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: fxSheen 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes fxSheen {
  0%, 74% { transform: translateX(-160%) skewX(-18deg); }
  100%    { transform: translateX(420%) skewX(-18deg); }
}

/* Click sparks (ClickSpark port) */
.fx-sparks { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.fx-sparks i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--fx-spark, #fff);
}

/* Magnet targets spring back through this transition; while the cursor is
   inside, JS drives the transform directly. */
.fx-magnet { transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .fx-sheen::after { animation: none; }
  .fx-spot::before { transition: none; }
}
