'use client'; import { useEffect } from 'react'; import Link from 'next/link'; import { ArrowRight } from 'lucide-react'; import { useAuthStore } from '@/stores/auth'; import LandingNav from '@/components/landing/LandingNav'; import RayLights from '@/components/effects/RayLights'; import { GradientText } from '@/components/effects/GradientText'; import { BrandMark } from '@/components/brand/BrandMark'; import { LandingFeatures } from '@/components/landing/LandingFeatures'; import { LandingMetrics } from '@/components/landing/LandingMetrics'; import { MarketingFooter } from '@/components/landing/MarketingFooter'; import { LandingScrollStage } from '@/components/landing/LandingScrollStage'; import { buttonVariants } from '@/components/ui/Button'; import { cn } from '@/lib/cn'; export default function HomePage() { const hydrate = useAuthStore((s) => s.hydrate); const hydrated = useAuthStore((s) => s.hydrated); const isAuthenticated = useAuthStore((s) => s.isAuthenticated); useEffect(() => { hydrate(); }, [hydrate]); const signedIn = hydrated && isAuthenticated; // Hero content for the first panel; the stage owns the full-viewport frame // and vertical centering around it. const hero = (
{signedIn ? ( Go to Panel ) : ( <> Get started Sign In )}
); // Second panel: wide sections + footer, scrolling on their own once the stage // slides down to them. A flex spacer absorbs any extra height between the // features and the metrics, so the metrics strip stays anchored directly on // top of the footer at the bottom edge instead of floating mid-panel. const below = (
); return (
{/* Light rays pinned to the viewport (z-0, behind everything). Keeping the canvas viewport-sized preserves the beam proportions; because it is fixed, every panel that slides beneath it is lit from the top. */}
{/* Public top bar (z-20, fixed). */} {/* Hero -> below content, as two scroll-hijacked panels (z-10). */}
); } /** Large brand lockup: the Maestro monogram beside the wordmark. */ function Wordmark() { return (
Maestro
); } // Tagline split into plain / gradient-highlighted word runs so each word can // blur in on its own beat while the key phrase carries the brand sweep. const TAGLINE_PRE = ['Multi-layer'] as const; const TAGLINE_GRADIENT = ['AI', 'agent', 'orchestration'] as const; const TAGLINE_POST = ['—', 'enter', 'a', 'single', 'prompt,', 'automate', 'end', 'to', 'end.'] as const; const TAGLINE_START_S = 0.5; // lands just after the wordmark settles const TAGLINE_STEP_S = 0.04; /** Word-by-word blur-in tagline with a gradient-swept key phrase. */ function HeroTagline() { let wordIndex = 0; const wordProps = () => ({ className: 'inline-block animate-word-in motion-reduce:animate-none', style: { animationDelay: `${(TAGLINE_START_S + wordIndex++ * TAGLINE_STEP_S).toFixed(2)}s` }, }); return (

{TAGLINE_PRE.map((w) => ( {w}  ))} {TAGLINE_GRADIENT.map((w) => ( {w}  ))} {TAGLINE_POST.map((w) => ( {w}  ))}

); } /** Breathing periwinkle halo behind the primary CTA. */ function GlowingCta({ children }: { children: React.ReactNode }) { return ( {children} ); }