// Shared primitives: Logo mark, FleurDot, Pill, Button, icons const { useState, useEffect, useRef, useMemo } = React; function Wordmark({ color = 'currentColor' }) { return (
CastorIA
); } function FleurDot({ size = 10, color = 'var(--accent-ink)' }) { return ( ); } function Pill({ children, tone = 'neutral', icon }) { const tones = { neutral: { bg: 'color-mix(in oklch, var(--ink) 4%, transparent)', fg: 'var(--ink-soft)', bd: 'var(--border)' }, brand: { bg: 'color-mix(in oklch, var(--brand) 10%, transparent)', fg: 'var(--brand)', bd: 'color-mix(in oklch, var(--brand) 25%, transparent)' }, accent: { bg: 'color-mix(in oklch, var(--accent) 12%, transparent)', fg: 'var(--accent-ink)', bd: 'color-mix(in oklch, var(--accent) 28%, transparent)' }, ok: { bg: 'color-mix(in oklch, #1f9d55 12%, transparent)', fg: '#2B8C52', bd: 'color-mix(in oklch, #1f9d55 28%, transparent)' }, }; const tt = tones[tone] || tones.neutral; return ( {icon} {children} ); } function Button({ children, variant = 'primary', icon, onClick, size = 'md', href }) { const sizes = { sm: { pad: '7px 13px', fs: 12.5 }, md: { pad: '11px 18px', fs: 13.5 }, lg: { pad: '14px 22px', fs: 14.5 }, }[size]; const [hover, setHover] = useState(false); const variants = { primary: { bg: hover ? 'color-mix(in oklch, var(--brand) 88%, black)' : 'var(--brand)', fg: 'white', bd: 'var(--brand)', shadow: hover ? '0 0 0 4px var(--glow), 0 8px 24px -8px var(--brand)' : '0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 14px -4px var(--glow)', }, secondary: { bg: hover ? 'color-mix(in oklch, var(--ink) 5%, var(--bg-elev))' : 'var(--bg-elev)', fg: 'var(--ink)', bd: 'var(--border-strong)', shadow: 'none', }, ghost: { bg: hover ? 'color-mix(in oklch, var(--ink) 5%, transparent)' : 'transparent', fg: 'var(--ink)', bd: 'transparent', shadow: 'none', }, }; const v = variants[variant]; const Tag = href ? 'a' : 'button'; return ( setHover(true)} onMouseLeave={() => setHover(false)} style={{ display: 'inline-flex', alignItems: 'center', gap: 7, padding: sizes.pad, fontSize: sizes.fs, fontFamily: 'var(--font-ui)', fontWeight: 500, background: v.bg, color: v.fg, border: `1px solid ${v.bd}`, borderRadius: 9, cursor: 'pointer', textDecoration: 'none', transition: 'all 140ms ease', transform: hover ? 'translateY(-1px)' : 'none', letterSpacing: '-0.005em', boxShadow: v.shadow, }} > {children} {icon} ); } function ArrowRight({ size = 14 }) { return ( ); } function Check({ size = 14, color = 'currentColor' }) { return ( ); } function XMark({ size = 14, color = 'currentColor' }) { return ( ); } function Spark({ size = 12, color = 'currentColor' }) { return ( ); } Object.assign(window, { Wordmark, FleurDot, Pill, Button, ArrowRight, Check, XMark, Spark });