/* app.jsx — D'SHINE main composition - Mounts all sections - Sparkle cursor trail - Scroll reveal observer - Tweaks panel (light/dark hero, accent gold, sparkles) */ const { useState: appUseState, useEffect: appUseEffect, useRef: appUseRef } = React; /* Sparkle cursor — emits small star particles on mouse move */ function SparkleCursor({ enabled }) { const layerRef = appUseRef(null); const lastRef = appUseRef({ x: 0, y: 0, t: 0 }); appUseEffect(() => { if (!enabled) return; const layer = layerRef.current; if (!layer) return; const onMove = (e) => { const now = performance.now(); const last = lastRef.current; const dx = e.clientX - last.x; const dy = e.clientY - last.y; const dist = Math.hypot(dx, dy); // Throttle: only spawn when moved enough & enough time passed if (dist < 26 || now - last.t < 55) return; lastRef.current = { x: e.clientX, y: e.clientY, t: now }; // Two sparkles per emit with small offset for fullness for (let i = 0; i < 2; i++) { const s = document.createElement("span"); s.className = "spark-cursor"; const offX = (Math.random() - 0.5) * 16; const offY = (Math.random() - 0.5) * 16; const sz = 8 + Math.random() * 10; s.style.left = `${e.clientX + offX}px`; s.style.top = `${e.clientY + offY}px`; s.style.width = `${sz}px`; s.style.height = `${sz}px`; layer.appendChild(s); setTimeout(() => s.remove(), 900); } }; window.addEventListener("mousemove", onMove); return () => window.removeEventListener("mousemove", onMove); }, [enabled]); return