| 1 | import { useState } from 'react'; |
| 2 | import { Link } from 'react-router-dom'; |
| 3 | import { Bot, Mail, ArrowRight, CheckCircle2, Sparkles, Reply, Globe, Code2, ShoppingCart, Megaphone, GraduationCap, MailOpen } from 'lucide-react'; |
| 4 | |
| 5 | // ── Pricing card ───────────────────────────────────────────────────────────── |
| 6 | function PricingCard({ name, price, features, cta, ctaTo, highlight }) { |
| 7 | return ( |
| 8 | <div className={`card flex flex-col gap-4 ${highlight ? 'border-violet/50 bg-violet/5 relative' : ''}`}> |
| 9 | {highlight && ( |
| 10 | <div className="absolute -top-3 left-1/2 -translate-x-1/2 inline-flex items-center gap-1 rounded-full bg-violet text-white text-[10px] font-semibold px-3 py-1"> |
| 11 | <Sparkles size={10} /> Most popular |
| 12 | </div> |
| 13 | )} |
| 14 | <div> |
| 15 | <div className="text-sm font-semibold text-slate-300 mb-1">{name}</div> |
| 16 | <div className="flex items-end gap-1"> |
| 17 | <span className="text-3xl font-bold text-slate-100">${price}</span> |
| 18 | {price > 0 && <span className="text-slate-500 text-sm mb-1">/month</span>} |
| 19 | </div> |
| 20 | </div> |
| 21 | <ul className="space-y-2 flex-1"> |
| 22 | {features.map(f => ( |
| 23 | <li key={f} className="flex items-center gap-2 text-sm text-slate-300"> |
| 24 | <CheckCircle2 size={13} className="text-emerald-400 flex-shrink-0" /> {f} |
| 25 | </li> |
| 26 | ))} |
| 27 | </ul> |
| 28 | <Link to={ctaTo} className={`btn-primary justify-center py-2 ${!highlight ? 'bg-surface-2 text-slate-200 hover:bg-surface-2/80' : ''}`}> |
| 29 | {cta} <ArrowRight size={14} /> |
| 30 | </Link> |
| 31 | </div> |
| 32 | ); |
| 33 | } |
| 34 | |
| 35 | // ── Story card — each use case ──────────────────────────────────────────────── |
| 36 | function StoryCard({ icon: Icon, color, persona, role, emails }) { |
| 37 | return ( |
| 38 | <div className="card flex flex-col gap-4"> |
| 39 | <div className="flex items-center gap-3"> |
| 40 | <div className={`w-9 h-9 rounded-xl flex items-center justify-center ${color}`}> |
| 41 | <Icon size={18} /> |
| 42 | </div> |
| 43 | <div> |
| 44 | <div className="font-semibold text-slate-100 text-sm">{persona}</div> |
| 45 | <div className="text-[11px] text-slate-500">{role}</div> |
| 46 | </div> |
| 47 | </div> |
| 48 | <div className="space-y-2"> |
| 49 | {emails.map((e, i) => ( |
| 50 | <div key={i} className={`rounded-lg p-3 text-xs font-mono ${e.out ? 'bg-violet/10 border border-violet/20' : 'bg-surface-2 border border-border-subtle'}`}> |
| 51 | <div className="text-[10px] uppercase tracking-wider mb-1 ${e.out ? 'text-violet-400' : 'text-slate-600'}"> |
| 52 | {e.out ? '← reply' : '→ sends'} |
| 53 | </div> |
| 54 | <div className={`font-semibold mb-0.5 ${e.out ? 'text-violet-200' : 'text-slate-200'}`}>{e.subject}</div> |
| 55 | <div className={e.out ? 'text-violet-300/80' : 'text-slate-400'}>{e.body}</div> |
| 56 | </div> |
| 57 | ))} |
| 58 | </div> |
| 59 | </div> |
| 60 | ); |
| 61 | } |
| 62 | |
| 63 | // ── Email capture form ──────────────────────────────────────────────────────── |
| 64 | function EmailCapture() { |
| 65 | const [email, setEmail] = useState(''); |
| 66 | const [state, setState] = useState('idle'); // idle | loading | sent | error |
| 67 | |
| 68 | async function submit(e) { |
| 69 | e.preventDefault(); |
| 70 | if (!email.includes('@')) return; |
| 71 | setState('loading'); |
| 72 | try { |
| 73 | const r = await fetch('/api/auth/magic/send', { |
| 74 | method: 'POST', |
| 75 | headers: { 'Content-Type': 'application/json' }, |
| 76 | body: JSON.stringify({ email }), |
| 77 | }); |
| 78 | if (!r.ok) throw new Error(); |
| 79 | setState('sent'); |
| 80 | } catch { |
| 81 | setState('error'); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | if (state === 'sent') return ( |
| 86 | <div className="flex flex-col items-center gap-2"> |
| 87 | <div className="w-12 h-12 rounded-full bg-emerald-500/15 border border-emerald-500/30 flex items-center justify-center"> |
| 88 | <MailOpen size={20} className="text-emerald-400" /> |
| 89 | </div> |
| 90 | <p className="text-slate-200 font-medium">Check your inbox</p> |
| 91 | <p className="text-sm text-slate-400">We sent a sign-in link to <span className="text-slate-200">{email}</span></p> |
| 92 | </div> |
| 93 | ); |
| 94 | |
| 95 | return ( |
| 96 | <form onSubmit={submit} className="flex flex-col sm:flex-row gap-2 max-w-md mx-auto"> |
| 97 | <input |
| 98 | type="email" required |
| 99 | value={email} |
| 100 | onChange={e => setEmail(e.target.value)} |
| 101 | placeholder="your@email.com" |
| 102 | className="input flex-1 text-base py-3" |
| 103 | /> |
| 104 | <button type="submit" disabled={state === 'loading'} className="btn-primary px-6 py-3 text-base whitespace-nowrap"> |
| 105 | {state === 'loading' ? '…' : <>Get started free <ArrowRight size={16} /></>} |
| 106 | </button> |
| 107 | {state === 'error' && <p className="text-xs text-rose-400 mt-1">Something went wrong. <Link to="/chat" className="underline">Try signing in</Link></p>} |
| 108 | </form> |
| 109 | ); |
| 110 | } |
| 111 | |
| 112 | // ── Main landing ────────────────────────────────────────────────────────────── |
| 113 | const STORIES = [ |
| 114 | { |
| 115 | icon: ShoppingCart, |
| 116 | color: 'bg-emerald-500/15 text-emerald-300', |
| 117 | persona: 'Laura', |
| 118 | role: 'Selling handmade jewellery online', |
| 119 | emails: [ |
| 120 | { subject: 'Add a "sold out" badge to my shop', body: 'When a product has 0 stock, show a red "Sold out" badge on the card.' }, |
| 121 | { out: true, subject: 'Re: Add a "sold out" badge ✓ Done', body: 'Badge added and deployed. Products with stock = 0 now show a red badge. Tested on Chrome and mobile.' }, |
| 122 | ], |
| 123 | }, |
| 124 | { |
| 125 | icon: Megaphone, |
| 126 | color: 'bg-blue-500/15 text-blue-300', |
| 127 | persona: 'Carlos', |
| 128 | role: 'Running a digital marketing agency', |
| 129 | emails: [ |
| 130 | { subject: 'Create a landing page for our new client', body: 'Need a landing for "Gym360" — fitness studio in Madrid. URL: gym360.utopiaia.com. Dark theme, modern, with a booking CTA.' }, |
| 131 | { out: true, subject: 'Re: Landing page for Gym360 ✓ Live', body: 'Landing published at gym360.utopiaia.com — dark theme, hero section, class schedule, and booking button. SSL active.' }, |
| 132 | ], |
| 133 | }, |
| 134 | { |
| 135 | icon: MailOpen, |
| 136 | color: 'bg-amber-500/15 text-amber-300', |
| 137 | persona: 'Sofía', |
| 138 | role: 'Customer support at an e-commerce', |
| 139 | emails: [ |
| 140 | { subject: 'Auto-reply to refund requests', body: 'When a customer emails about a refund, reply acknowledging receipt and saying we\'ll resolve in 24h. Log it in our DB.' }, |
| 141 | { out: true, subject: 'Re: Auto-reply to refund requests ✓ Active', body: 'Agent configured. Refund emails now get an instant ACK reply and are logged in the refunds table with timestamp and email.' }, |
| 142 | ], |
| 143 | }, |
| 144 | { |
| 145 | icon: GraduationCap, |
| 146 | color: 'bg-rose-500/15 text-rose-300', |
| 147 | persona: 'Marcos', |
| 148 | role: 'Online teacher with 3,000 students', |
| 149 | emails: [ |
| 150 | { subject: 'Build me a quiz for Module 4', body: '10 multiple-choice questions about JavaScript closures. Save results to the DB and show students their score.' }, |
| 151 | { out: true, subject: 'Re: Quiz for Module 4 ✓ Ready', body: 'Quiz live at learn.utopiaia.com/quiz/module4. 10 questions, results saved to quiz_results table, score shown on submit.' }, |
| 152 | ], |
| 153 | }, |
| 154 | { |
| 155 | icon: Code2, |
| 156 | color: 'bg-violet/30 text-violet-300', |
| 157 | persona: 'Andrés', |
| 158 | role: 'Indie developer, solo founder', |
| 159 | emails: [ |
| 160 | { subject: 'Users getting 500 errors on checkout', body: 'Getting reports since this morning. Stripe webhook might be broken after yesterday\'s deploy.' }, |
| 161 | { out: true, subject: 'Re: 500 errors on checkout ✓ Fixed', body: 'Found it: the webhook secret was missing from env after the deploy. Added it, restarted, tested 3 purchases — all working.' }, |
| 162 | ], |
| 163 | }, |
| 164 | { |
| 165 | icon: Globe, |
| 166 | color: 'bg-cyan-500/15 text-cyan-300', |
| 167 | persona: 'Elena', |
| 168 | role: 'Small business owner, no tech team', |
| 169 | emails: [ |
| 170 | { subject: 'I need a contact form on my website', body: 'Just a simple form: name, email, message. Send submissions to info@mybusiness.com.' }, |
| 171 | { out: true, subject: 'Re: Contact form ✓ Live', body: 'Form added to your website. Submissions go to info@mybusiness.com instantly. Spam protection included.' }, |
| 172 | ], |
| 173 | }, |
| 174 | ]; |
| 175 | |
| 176 | export default function Landing() { |
| 177 | return ( |
| 178 | <div className="min-h-full bg-bg text-slate-200"> |
| 179 | |
| 180 | {/* Nav */} |
| 181 | <header className="border-b border-border-subtle px-6 py-4 flex items-center justify-between max-w-6xl mx-auto"> |
| 182 | <div className="flex items-center gap-2"> |
| 183 | <Bot size={20} className="text-violet" /> |
| 184 | <span className="font-semibold text-slate-100 text-lg">ClonAgent</span> |
| 185 | </div> |
| 186 | <div className="flex items-center gap-4"> |
| 187 | <a href="#stories" className="text-sm text-slate-400 hover:text-slate-200 transition hidden sm:block">Examples</a> |
| 188 | <a href="#pricing" className="text-sm text-slate-400 hover:text-slate-200 transition hidden sm:block">Pricing</a> |
| 189 | <Link to="/chat" className="text-sm text-slate-400 hover:text-slate-200 transition">Sign in</Link> |
| 190 | </div> |
| 191 | </header> |
| 192 | |
| 193 | {/* Hero */} |
| 194 | <section className="max-w-6xl mx-auto px-6 pt-20 pb-10 text-center"> |
| 195 | <div className="inline-flex items-center gap-2 rounded-full border border-violet/30 bg-violet/10 px-3 py-1 text-xs text-violet-300 mb-6"> |
| 196 | <Mail size={11} /> Your inbox is the only interface you need |
| 197 | </div> |
| 198 | <h1 className="text-4xl sm:text-5xl font-bold text-slate-100 leading-tight mb-4"> |
| 199 | Tell it what you need.<br /> |
| 200 | <span className="text-violet">Get it done. By email.</span> |
| 201 | </h1> |
| 202 | <p className="text-slate-400 text-lg max-w-2xl mx-auto mb-10"> |
| 203 | ClonAgent gives you a personal AI that builds websites, fixes bugs, sets up automations, |
| 204 | creates databases and replies to customers — all triggered by a simple email. |
| 205 | No code. No dashboards. No complexity. |
| 206 | </p> |
| 207 | <EmailCapture /> |
| 208 | <p className="text-xs text-slate-600 mt-4">Free to start · No credit card required · Sign in with your email</p> |
| 209 | </section> |
| 210 | |
| 211 | {/* Email demo */} |
| 212 | <section className="max-w-4xl mx-auto px-6 pb-16"> |
| 213 | <div className="grid grid-cols-1 md:grid-cols-2 gap-4"> |
| 214 | <div className="card border-border-subtle"> |
| 215 | <div className="flex items-center gap-2 mb-3 text-xs text-slate-500 uppercase tracking-wider"> |
| 216 | <Mail size={12} /> You send |
| 217 | </div> |
| 218 | <div className="space-y-2 text-xs font-mono text-slate-400"> |
| 219 | <div><span className="text-slate-600">To: </span><span className="text-emerald-300">myagent@bot.utopiaia.com</span></div> |
| 220 | <div><span className="text-slate-600">Subject: </span><span className="text-slate-200">Add a newsletter signup to my homepage</span></div> |
| 221 | <div className="pt-2 border-t border-border-subtle text-slate-300 leading-relaxed"> |
| 222 | Put a simple signup form at the bottom of the homepage. |
| 223 | Save emails to the subscribers table and send a welcome email. |
| 224 | </div> |
| 225 | </div> |
| 226 | </div> |
| 227 | <div className="card border-violet/30 bg-violet/5"> |
| 228 | <div className="flex items-center gap-2 mb-3 text-xs text-violet-400 uppercase tracking-wider"> |
| 229 | <Reply size={12} /> Agent replies |
| 230 | </div> |
| 231 | <div className="space-y-2 text-xs font-mono text-slate-400"> |
| 232 | <div><span className="text-slate-600">Subject: </span><span className="text-slate-200">Re: Newsletter signup ✓ Done</span></div> |
| 233 | <div className="pt-2 border-t border-border-subtle text-slate-300 leading-relaxed space-y-1.5"> |
| 234 | <p>Added a signup form to the homepage footer.</p> |
| 235 | <p className="text-slate-500">+ pages/index.html (form)<br/>+ api/subscribe.js (saves to DB)<br/>+ welcome email template</p> |
| 236 | <p className="text-emerald-400">✓ Deployed · ✓ Tested with 2 signups</p> |
| 237 | </div> |
| 238 | </div> |
| 239 | </div> |
| 240 | </div> |
| 241 | </section> |
| 242 | |
| 243 | {/* Storytelling — real use cases */} |
| 244 | <section id="stories" className="max-w-6xl mx-auto px-6 py-16 border-t border-border-subtle"> |
| 245 | <h2 className="text-2xl font-semibold text-slate-100 mb-2">What people use it for</h2> |
| 246 | <p className="text-slate-400 mb-10"> |
| 247 | One email. Your agent reads it, builds it, deploys it, and replies. |
| 248 | No technical knowledge required — just describe what you need. |
| 249 | </p> |
| 250 | <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5"> |
| 251 | {STORIES.map(s => <StoryCard key={s.persona} {...s} />)} |
| 252 | </div> |
| 253 | </section> |
| 254 | |
| 255 | {/* Email as interface — key section */} |
| 256 | <section className="max-w-6xl mx-auto px-6 py-16 border-t border-border-subtle"> |
| 257 | <div className="grid grid-cols-1 md:grid-cols-2 gap-12 items-center"> |
| 258 | <div> |
| 259 | <div className="inline-flex items-center gap-2 rounded-full border border-violet/30 bg-violet/10 px-3 py-1 text-xs text-violet-300 mb-4"> |
| 260 | <Mail size={11} /> Email-first, always |
| 261 | </div> |
| 262 | <h2 className="text-2xl font-semibold text-slate-100 mb-4"> |
| 263 | Manage everything from your inbox — no dashboard needed |
| 264 | </h2> |
| 265 | <p className="text-slate-400 mb-6"> |
| 266 | Once your agent is running, your email is the control panel. |
| 267 | Send commands to your agent's address and it responds instantly. |
| 268 | </p> |
| 269 | <div className="card font-mono text-xs space-y-2"> |
| 270 | {[ |
| 271 | ['!status', 'Agent status and recent runs'], |
| 272 | ['!add team@mycompany.com', 'Give someone access'], |
| 273 | ['!remove old@mycompany.com', 'Revoke access'], |
| 274 | ['!pause', 'Pause the agent'], |
| 275 | ['!resume', 'Resume it'], |
| 276 | ['!help', 'See all commands'], |
| 277 | ].map(([cmd, desc]) => ( |
| 278 | <div key={cmd} className="flex items-center gap-3"> |
| 279 | <span className="text-violet-300 w-48 flex-shrink-0">{cmd}</span> |
| 280 | <span className="text-slate-500">{desc}</span> |
| 281 | </div> |
| 282 | ))} |
| 283 | </div> |
| 284 | </div> |
| 285 | <div className="space-y-3"> |
| 286 | <div className="card py-3"> |
| 287 | <div className="text-xs text-slate-500 mb-1">You email your agent:</div> |
| 288 | <div className="font-mono text-sm text-slate-200">!add maria@mycompany.com</div> |
| 289 | </div> |
| 290 | <div className="card py-3 border-emerald-500/30 bg-emerald-500/5"> |
| 291 | <div className="text-xs text-emerald-400 mb-1">Agent replies:</div> |
| 292 | <div className="font-mono text-sm text-emerald-200">✅ Added maria@mycompany.com as an authorized sender.</div> |
| 293 | </div> |
| 294 | <div className="card py-3 mt-4"> |
| 295 | <div className="text-xs text-slate-500 mb-1">Maria emails the agent:</div> |
| 296 | <div className="font-mono text-sm text-slate-200">The prices on the products page are wrong, they show without VAT</div> |
| 297 | </div> |
| 298 | <div className="card py-3 border-violet/30 bg-violet/5"> |
| 299 | <div className="text-xs text-violet-400 mb-1">Agent fixes it and replies to Maria:</div> |
| 300 | <div className="font-mono text-sm text-violet-200">✓ Fixed. All prices now include 21% VAT. Deployed.</div> |
| 301 | </div> |
| 302 | </div> |
| 303 | </div> |
| 304 | </section> |
| 305 | |
| 306 | {/* How it works */} |
| 307 | <section className="max-w-6xl mx-auto px-6 py-16 border-t border-border-subtle"> |
| 308 | <h2 className="text-2xl font-semibold text-slate-100 mb-2">Set up in 5 minutes</h2> |
| 309 | <p className="text-slate-400 mb-10">Describe what you want in the chat. ClonAgent creates the agent for you.</p> |
| 310 | <div className="grid grid-cols-1 md:grid-cols-4 gap-4"> |
| 311 | {[ |
| 312 | { n: '01', title: 'Enter your email', body: 'No passwords. We send you a link — click it and you\'re in.' }, |
| 313 | { n: '02', title: 'Describe your agent', body: 'Tell the chat what project it manages and who can email it.' }, |
| 314 | { n: '03', title: 'Connect your inbox', body: 'Link a Gmail account. Takes 2 minutes with our guided setup.' }, |
| 315 | { n: '04', title: 'Done — email away', body: 'Your agent watches the inbox and acts on every message.' }, |
| 316 | ].map(s => ( |
| 317 | <div key={s.n} className="card"> |
| 318 | <div className="text-2xl font-bold text-violet/25 mb-2">{s.n}</div> |
| 319 | <h3 className="font-semibold text-slate-100 mb-1">{s.title}</h3> |
| 320 | <p className="text-sm text-slate-400">{s.body}</p> |
| 321 | </div> |
| 322 | ))} |
| 323 | </div> |
| 324 | </section> |
| 325 | |
| 326 | {/* Pricing */} |
| 327 | <section id="pricing" className="max-w-6xl mx-auto px-6 py-16 border-t border-border-subtle"> |
| 328 | <h2 className="text-2xl font-semibold text-slate-100 mb-2">Simple pricing</h2> |
| 329 | <p className="text-slate-400 mb-10">Start free. Upgrade when you need more agents.</p> |
| 330 | <div className="grid grid-cols-1 md:grid-cols-3 gap-6"> |
| 331 | <PricingCard name="Free" price={0} |
| 332 | features={['1 agent', '20 requests / month', 'Own Anthropic API key', 'Community support']} |
| 333 | cta="Get started free" ctaTo="/chat" /> |
| 334 | <PricingCard name="Starter" price={29} highlight |
| 335 | features={['5 agents', '200 requests / month', 'Platform API key included', 'Email support']} |
| 336 | cta="Start Starter" ctaTo="/billing" /> |
| 337 | <PricingCard name="Pro" price={99} |
| 338 | features={['20 agents', 'Unlimited requests', 'Platform API key included', 'Priority support']} |
| 339 | cta="Start Pro" ctaTo="/billing" /> |
| 340 | </div> |
| 341 | </section> |
| 342 | |
| 343 | {/* CTA */} |
| 344 | <section className="border-t border-border-subtle"> |
| 345 | <div className="max-w-6xl mx-auto px-6 py-16 text-center"> |
| 346 | <h2 className="text-2xl font-semibold text-slate-100 mb-3"> |
| 347 | Your most powerful tool is your inbox |
| 348 | </h2> |
| 349 | <p className="text-slate-400 mb-8 max-w-lg mx-auto"> |
| 350 | Enter your email and be up and running in 5 minutes. No technical setup. No credit card. |
| 351 | </p> |
| 352 | <EmailCapture /> |
| 353 | </div> |
| 354 | </section> |
| 355 | |
| 356 | <footer className="border-t border-border-subtle px-6 py-6"> |
| 357 | <div className="max-w-6xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-slate-600"> |
| 358 | <span>ClonAgent — created by Kiko Cisneros for <a href="https://utopiaia.com" className="text-slate-500 hover:text-slate-400">Utopia IA</a></span> |
| 359 | <div className="flex gap-4"> |
| 360 | <Link to="/tos" className="hover:text-slate-400">Terms of Service</Link> |
| 361 | <Link to="/privacy" className="hover:text-slate-400">Privacy Policy</Link> |
| 362 | <Link to="/chat" className="hover:text-slate-400">Sign in</Link> |
| 363 | </div> |
| 364 | </div> |
| 365 | </footer> |
| 366 | </div> |
| 367 | ); |
| 368 | } |