// Shared primitives + tiny icon helper
const { useEffect, useRef, useState, useMemo } = React;
// Lucide icon helper — renders an inline SVG by name from window.lucide
function Icon({ name, className = "w-5 h-5", strokeWidth = 1.8 }) {
const ref = useRef(null);
useEffect(() => {
if (!ref.current) return;
const lib = window.lucide;
if (!lib) return;
const icons = lib.icons || lib;
const def = icons[name] || icons[name?.replace(/-([a-z])/g, (_, c) => c.toUpperCase())] || icons[name?.replace(/(^|-)([a-z])/g, (_, __, c) => c.toUpperCase())];
if (!def) return;
const create = lib.createElement || ((d) => {
const [tag, attrs, children] = d;
const ns = "http://www.w3.org/2000/svg";
const el = document.createElementNS(ns, tag);
Object.entries(attrs || {}).forEach(([k, v]) => el.setAttribute(k, v));
(children || []).forEach((c) => el.appendChild(create(c)));
return el;
});
ref.current.innerHTML = "";
const svg = create(def);
svg.setAttribute("stroke-width", strokeWidth);
svg.setAttribute("class", className);
ref.current.appendChild(svg);
}, [name, className, strokeWidth]);
return ;
}
function CTAButton({ children, variant = "primary", size = "md", href = "#", className = "", icon }) {
const base = "inline-flex items-center justify-center gap-2 font-semibold rounded-full transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-orange whitespace-nowrap";
const sizes = {
sm: "px-4 py-2 text-sm",
md: "px-5 py-3 text-[15px]",
lg: "px-7 py-4 text-base",
};
const variants = {
primary: "bg-brand-orange text-white hover:bg-brand-orange2 shadow-[0_10px_24px_-10px_rgba(249,115,22,0.7)] hover:shadow-[0_14px_30px_-10px_rgba(249,115,22,0.8)] hover:-translate-y-0.5",
dark: "bg-brand-navy text-white hover:bg-brand-navy2 shadow-[0_10px_24px_-12px_rgba(11,26,51,0.6)]",
ghost: "bg-white/80 text-brand-navy ring-1 ring-ink-100 hover:ring-ink-200 hover:bg-white",
outline: "bg-transparent text-brand-navy ring-1 ring-ink-200 hover:ring-brand-navy hover:bg-white",
soft: "bg-orange-50 text-brand-orange2 ring-1 ring-orange-100 hover:bg-orange-100",
};
return (
{children}
{icon &&
{subtitle}
)}
);
}
// Floating stat chip used around the hero device
function StatChip({ icon, label, value, accent = "orange", className = "" }) {
const tones = {
orange: "bg-orange-50 text-brand-orange2 ring-orange-100",
blue: "bg-sky-50 text-sky-700 ring-sky-100",
green: "bg-emerald-50 text-emerald-700 ring-emerald-100",
violet: "bg-violet-50 text-violet-700 ring-violet-100",
};
return (