/* global React, FramerMotion */ /* eslint-disable */ // ============================================================ // Taide Collective — Primitives // LogoMark, SoundWave, AmbientBackground, Icons, helpers // ============================================================ const { useState, useEffect, useMemo, useRef } = React; const { motion, AnimatePresence, useScroll, useTransform, useMotionValue, useSpring } = FramerMotion; const PALETTE = { blackDeep: '#0A0A0A', blackCharcoal: '#111617', greenDeep: '#0D2B2A', aquaPrimary: '#14B8A6', aquaLight: '#6EE7D1', accentLight: '#C8FFF0', }; // ------------------------------------------------------------ // Detect reduced motion // ------------------------------------------------------------ function useReducedMotion() { const [reduced, setReduced] = useState(false); useEffect(() => { const mq = window.matchMedia('(prefers-reduced-motion: reduce)'); setReduced(mq.matches); const fn = () => setReduced(mq.matches); mq.addEventListener?.('change', fn); return () => mq.removeEventListener?.('change', fn); }, []); return reduced; } // ------------------------------------------------------------ // LogoMark — TC monogram, viewBox 0 0 256 256 // ------------------------------------------------------------ function LogoMark({ size = 40, className = '', glow = false }) { const gradId = useMemo(() => 'tc-grad-' + Math.random().toString(36).slice(2, 7), []); return ( ); } // ------------------------------------------------------------ // SoundWave — N animated equalizer bars // ------------------------------------------------------------ function SoundWave({ bars = 60, height = 60, intensity = 1, className = '', barWidth = 2, gap = 3 }) { const reduced = useReducedMotion(); const items = useMemo(() => { return Array.from({ length: bars }, (_, i) => { const s = (Math.sin(i * 1.7) + 1) / 2; const min = Math.max(4, height * 0.05); const peak1 = min + s * height * 0.6 * intensity; const peak2 = min + ((Math.sin(i * 2.3) + 1) / 2) * height * 0.9 * intensity; const peak3 = min + ((Math.sin(i * 3.1 + 0.7) + 1) / 2) * height * 0.45 * intensity; const dur = 1.8 + s * 1.2; const delay = i * 0.02; return { min, peak1, peak2, peak3, dur, delay }; }); }, [bars, height, intensity]); return ( ); } // ------------------------------------------------------------ // Animated ambient background — radial gradients + SVG waves + grain // ------------------------------------------------------------ function AmbientBackground() { const reduced = useReducedMotion(); const waves = [ { key: 'w1', d1: 'M -50 480 C 250 380, 500 600, 750 460 S 1250 360, 1500 500', d2: 'M -50 460 C 250 580, 500 380, 750 540 S 1250 600, 1500 440', d3: 'M -50 500 C 250 420, 500 540, 750 420 S 1250 460, 1500 520', d4: 'M -50 440 C 250 540, 500 420, 750 580 S 1250 500, 1500 460', dur: 18, stroke: 'url(#wv-g1)', opacity: 0.7, }, { key: 'w2', d1: 'M -50 620 C 300 540, 600 720, 900 580 S 1300 520, 1500 640', d2: 'M -50 600 C 300 700, 600 540, 900 700 S 1300 660, 1500 580', d3: 'M -50 640 C 300 580, 600 680, 900 560 S 1300 620, 1500 660', d4: 'M -50 580 C 300 660, 600 580, 900 720 S 1300 580, 1500 600', dur: 22, stroke: 'url(#wv-g2)', opacity: 0.55, }, { key: 'w3', d1: 'M -50 360 C 200 280, 480 460, 740 320 S 1200 240, 1500 380', d2: 'M -50 340 C 200 440, 480 280, 740 420 S 1200 460, 1500 320', d3: 'M -50 380 C 200 320, 480 420, 740 280 S 1200 320, 1500 400', d4: 'M -50 320 C 200 400, 480 320, 740 460 S 1200 380, 1500 340', dur: 26, stroke: 'url(#wv-g3)', opacity: 0.5, }, ]; return (