ArrowRight, Check, ChevronDown, ChevronLeft, ChevronRight, Gauge, Instagram, Menu, Play, Shield, Sparkles, Star, Wifi, X, Zap, } from "lucide-react"; import { FormEvent, useEffect, useState } from "react"; import { FormEvent, useEffect, useRef, useState } from "react"; export const Route = createFileRoute("/")({ head: () => ({ @@ -121,7 +121,7 @@ function Index() {
{[["3.2", "s", "0–100 km/h"], ["650", "cv", "Potência"], ["290", "km/h", "Velocidade máxima"], ["850", "Nm", "Torque"]].map((m) =>
{m[0]}{m[1]}

{m[2]}

)} {[[3.2, "s", "0–100 km/h", 1], [650, "cv", "Potência", 0], [290, "km/h", "Velocidade máxima", 0], [850, "Nm", "Torque", 0]].map((m) =>
{m[1]}

{m[2]}

)}
@@ -173,6 +173,42 @@ function Index() { ); } function AnimatedMetric({ value, decimals }: { value: number; decimals: number }) { const ref = useRef(null); const [display, setDisplay] = useState(0); const [started, setStarted] = useState(false); useEffect(() => { const node = ref.current; if (!node) return; const observer = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) { setStarted(true); observer.disconnect(); } }, { threshold: 0.5 }); observer.observe(node); return () => observer.disconnect(); }, []); useEffect(() => { if (!started) return; const duration = 1400; const start = performance.now(); let frame = 0; const animate = (now: number) => { const progress = Math.min((now - start) / duration, 1); const eased = 1 - Math.pow(1 - progress, 4); setDisplay(value * eased); if (progress < 1) frame = requestAnimationFrame(animate); }; frame = requestAnimationFrame(animate); return () => cancelAnimationFrame(frame); }, [started, value]); return {display.toFixed(decimals)}; } function SectionTitle({ eyebrow, title }: { eyebrow: string; title: string }) { return

{eyebrow}

{title}

; } function Feature({ image, title, text, className = "" }: { image: string; title: string; text: string; className?: string }) { return
{title}

{title}

{text}

; } function MiniFeature({ icon, title }: { icon: React.ReactNode; title: string }) { return
{icon}

{title}

; }