/* "Spark", EpicTech's scroll companion (assets/js/nx-spark.js), 2026-10-13.
 * A small brand-gradient star that flies down the page as the visitor scrolls, trailing a short tail. Purely
 * decorative: it never takes pointer events, is smaller on phones and hidden under reduced motion. */
.nx-spark { position: fixed; inset: 0; z-index: 30; pointer-events: none; display: none; overflow: hidden; }
.nx-spark.is-on { display: block; }
.nx-spark-b, .nx-spark-t { position: absolute; left: 0; top: 0; will-change: transform; }
.nx-spark-b { width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; transition: opacity .5s ease; }
.nx-spark.is-live .nx-spark-b { opacity: 1; }
.nx-spark.is-away .nx-spark-b, .nx-spark.is-away .nx-spark-t { opacity: 0 !important; }
.nx-spark-b svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 10px rgba(130,87,255,.8)) drop-shadow(0 0 24px rgba(86,224,255,.35)); animation: nx-spark-idle 3.2s ease-in-out infinite; }
.nx-spark-b i { position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(169,141,255,.85); opacity: 0; transform: scale(.4); }
.nx-spark.is-pulse .nx-spark-b i { animation: nx-spark-ring .7s ease-out; }
.nx-spark.is-settled .nx-spark-b svg { animation: nx-spark-bob 2.4s ease-in-out infinite; }
.nx-spark-t { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: radial-gradient(circle, rgba(169,141,255,.95), rgba(86,224,255,0) 72%); opacity: 0; transition: opacity .5s ease; }
.nx-spark.is-live .nx-spark-t:nth-child(1) { opacity: .7; }
.nx-spark.is-live .nx-spark-t:nth-child(2) { opacity: .5; width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.nx-spark.is-live .nx-spark-t:nth-child(3) { opacity: .32; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
.nx-spark.is-live .nx-spark-t:nth-child(4) { opacity: .18; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
@keyframes nx-spark-idle { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.12) rotate(12deg); } }
@keyframes nx-spark-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(14deg); } }
@keyframes nx-spark-ring { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .nx-spark { display: none !important; } }
/* Phones and tablets: smaller star, softer glow, shorter tail. */
.nx-spark.is-small .nx-spark-b { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.nx-spark.is-small .nx-spark-b svg { filter: drop-shadow(0 0 7px rgba(130,87,255,.7)) drop-shadow(0 0 16px rgba(86,224,255,.25)); }
.nx-spark.is-small .nx-spark-b i { inset: -10px; }
.nx-spark.is-small.is-live .nx-spark-t:nth-child(4) { opacity: 0; }
