"use client"; import { useEffect, useState } from "react"; import { ArrowRight, RefreshCcw, Sparkles } from "lucide-react"; import Link from "next/link"; import { StoryBackdrop } from "@/components/marketing/StoryBackdrop"; import { randomStory, type GoalStory } from "@/lib/stories"; const askAnswers: [string, string][] = [ ["Can I afford a $2,400 vacation in December?", "Yes — set aside $400/month starting now and your flex budget stays green the whole way."], ["When can I buy my first home?", "At your current savings pace, a 10% down payment on a $380k home is ~34 months out. Two changes could make it 26."], ["Which card should I use for groceries?", "Sapphire Preferred — 3x points beats your flat 2% card. Worth about $18 more this month."], ["When can I retire?", "Holding your 14% savings rate, a comfortable retirement at 63 is on track. Bump to 17% and it's 61."], ]; export function Hero() { const [story, setStory] = useState(null); const [askIndex, setAskIndex] = useState(0); const [asked, setAsked] = useState<[string, string] | null>(null); const [input, setInput] = useState(""); const [fadeOut, setFadeOut] = useState(false); useEffect(() => { setStory(randomStory()); const t = setInterval(() => setAskIndex((i) => (i + 1) % askAnswers.length), 3500); return () => clearInterval(t); }, []); useEffect(() => { const storyInterval = setInterval(() => { setFadeOut(true); setTimeout(() => { setStory((s) => randomStory(s?.id)); setFadeOut(false); }, 500); }, 5000); return () => clearInterval(storyInterval); }, []); const ask = () => { const typed = input.trim().toLowerCase(); const match = askAnswers.find(([q]) => typed && q.toLowerCase().includes(typed.slice(0, 12))) ?? askAnswers[askIndex]; setAsked(match); setInput(""); }; return (
{story &&
} {/* extra cinematic vignette */}

Subscription-only · Zero ads · Zero referral bias

Own your story.

Aartha is the personal finance app that works only for you — budgets, credit, rewards, and an AI coach pointed at the life you're building.

{/* Ask Aartha — interactive, right in the hero */}
setInput(e.target.value)} onKeyDown={(e) => e.key === "Enter" && ask()} placeholder={askAnswers[askIndex][0]} className="w-full bg-transparent text-sm text-paper placeholder:text-paper/45 focus:outline-none" />

Track everything · Ask anything · Trust the answer

{asked && (

{asked[0]}

{asked[1]}

Sample answer · Educational guidance only, not regulated financial advice.

)}
Get started See the product
{/* Story caption — the human moment behind this visit */} {story && (

{story.emoji} {story.tag} — a different story every visit

{story.headline}

)}
); }