'use client' import { useState, FormEvent } from 'react' import ScrollReveal from '@/components/ui/ScrollReveal' const FLOWFI_LIST_UUID = 'fefebe2c-0966-4df5-81ec-1eae9b9dce3f' const SUBSCRIBE_URL = 'https://newsletter.jeffemmett.com/subscribe' export default function CTASection() { const [email, setEmail] = useState('') const [status, setStatus] = useState<'idle' | 'loading' | 'success' | 'error'>('idle') async function handleSubmit(e: FormEvent) { e.preventDefault() if (!email) return setStatus('loading') try { const res = await fetch(SUBSCRIBE_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email, list_uuid: FLOWFI_LIST_UUID }), }) if (res.ok) { setStatus('success') setEmail('') } else { setStatus('error') } } catch { setStatus('error') } } return (
{/* Soft glow behind CTA */}

Ready to flow?

Dive into the current.

{status === 'success' ? (

You're in the current now. Welcome.

) : (
setEmail(e.target.value)} placeholder="your@email.com" required className="w-full sm:flex-1 bg-ocean/40 border border-flow/15 rounded-full px-6 py-3 text-foam/70 placeholder:text-mist/25 text-sm font-light focus:outline-none focus:border-flow/40 focus:bg-ocean/60 transition-all duration-500" />
)} {status === 'error' && (

Something went wrong. Try again?

)}

NoFi → FlowFi → ???

{/* Footer — clean, minimal */}
) }