"use client"; import Link from "next/link"; import Image from "next/image"; import { useEffect, useRef, useState } from "react"; import { ArrowRight, Terminal, Rocket, ShieldCheck, Zap, GitBranch, Cpu, Clock, Sparkles, ChevronRight, MessageCircle, Check, X, Server, Bot, Coins, Laptop, Cloud, Moon, BookOpen, Target, } from "lucide-react"; import { motion, AnimatePresence } from "@/components/motion"; import { useDrag } from "@use-gesture/react"; import { Button } from "@/components/ui/button"; import { Jargon } from "@/components/jargon"; import { springs, fadeUp, staggerContainer, fadeScale } from "@/components/motion"; import { useScrollReveal, staggerDelay } from "@/lib/hooks/useScrollReveal"; import { useReducedMotion } from "@/lib/hooks/useReducedMotion"; // Animated terminal lines const TERMINAL_LINES = [ { type: "command", text: "curl -fsSL https://agent-flywheel.com/install | bash" }, { type: "output", text: "▸ Detecting Ubuntu 24.04... ✓" }, { type: "output", text: "▸ Installing zsh + oh-my-zsh + powerlevel10k..." }, { type: "output", text: "▸ Installing bun, uv, rust, go..." }, { type: "output", text: "▸ Installing Claude Code, Codex CLI, Antigravity CLI..." }, { type: "output", text: "▸ Configuring tmux, ripgrep, lazygit..." }, { type: "output", text: "▸ Setting up Dicklesworthstone stack..." }, { type: "success", text: "✓ Setup complete! Run 'onboard' to get started." }, ]; function AnimatedTerminal() { const [visibleLines, setVisibleLines] = useState(0); const [cursorVisible, setCursorVisible] = useState(true); const [isMobile, setIsMobile] = useState(false); const prefersReducedMotion = useReducedMotion(); // Detect mobile to simplify animations useEffect(() => { const checkMobile = () => { setIsMobile(window.matchMedia("(max-width: 768px)").matches); }; checkMobile(); window.addEventListener("resize", checkMobile); return () => window.removeEventListener("resize", checkMobile); }, []); useEffect(() => { const interval = setInterval(() => { setVisibleLines((prev) => { if (prev >= TERMINAL_LINES.length) { return 1; // Reset to loop } return prev + 1; }); }, 800); return () => clearInterval(interval); }, []); useEffect(() => { const cursorInterval = setInterval(() => { setCursorVisible((prev) => !prev); }, 530); return () => clearInterval(cursorInterval); }, []); // On mobile or reduced motion, skip animations entirely const skipAnimations = prefersReducedMotion || isMobile; return (
{/* Decorative window controls - hidden from screen readers since they're non-functional */}