// Inquiry / booking flow — multi-step form const { useState: useStateI, useEffect: useEffectI } = React; const FORMSPREE_ENDPOINT = 'https://formspree.io/f/xvkpldwo'; function Inquiry() { const [step, setStep] = useStateI(0); const [sending, setSending] = useStateI(false); const [sendError, setSendError] = useStateI(false); const [data, setData] = useStateI({ interests: [], when: 'flexible', month: 'september', year: '2026', days: 9, travelers: 2, kids: 0, style: 'mid', budget: 7000, name: '', email: '', country: '', phone: '', notes: '', pace: 'balanced', accommodation: ['tented'], inspirations: [] }); const set = (k, v) => setData(d => ({ ...d, [k]: v })); const toggle = (k, v) => setData(d => ({ ...d, [k]: d[k].includes(v) ? d[k].filter(x => x !== v) : [...d[k], v] })); const steps = ['Dream', 'When', 'Who', 'Style', 'You']; const titles = [ "What's calling you to Tanzania?", "When can you travel?", "Who's coming?", "How do you like to travel?", "Where should we send the draft?" ]; useEffectI(() => { window.scrollTo({ top: 0, behavior: 'smooth' }); }, [step]); return (
{step === 0 && } {step === 1 && } {step === 2 && } {step === 3 && } {step === 4 && } {step < 4 ? (
{step > 0 && }
) : (
)} {sendError &&

Something went wrong sending your inquiry — please try again.

} {step === 5 && }
); } function Step1({ data, toggle }) { const opts = [ { k: 'migration', t: 'The Great Migration', d: 'Two million wildebeest, river crossings, calving plains.', tone: 'sun', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/10/23.jpg' }, { k: 'big5', t: 'The Big Five', d: 'Lion, leopard, elephant, buffalo, rhino — all in one trip.', tone: 'clay', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/09/DSC_2974-Edit.jpg' }, { k: 'kilimanjaro', t: 'Kilimanjaro', d: '5,895m. Eight days from rainforest to glacier.', tone: 'ink', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/10/yoad-shejtman-S8IflvEHBFk-unsplash-scaled.jpg' }, { k: 'beach', t: 'Beach time', d: 'Zanzibar, Pemba, Mafia. Decompress after the bush.', tone: 'ocean', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/09/humphrey-m-e6dRLBx6Kg8-unsplash-scaled.jpg' }, { k: 'culture', t: 'Cultural depth', d: 'Maasai, Hadzabe, Datoga. Real visits, not performances.', tone: 'moss', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/09/matthew-stephenson-ztJxQYP2bKs-unsplash-scaled.jpg' }, { k: 'photo', t: 'Photography', d: 'Specialist vehicles, hides, and bean bags. Pro guides.', tone: 'sand', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/09/janel-scaled.jpg' }, { k: 'family', t: 'Family-friendly', d: 'Trip designed around kids without dumbing down.', tone: 'sun', img: 'https://safari.janelsafaris.com/wp-content/uploads/2026/03/Rhino-Lodge-15-700px.jpg' }, { k: 'honeymoon', t: 'Honeymoon', d: 'Privacy, romance, and sunsets you remember.', tone: 'clay', img: 'https://safari.janelsafaris.com/wp-content/uploads/2025/09/ultimate-safaris-namibia-fxx-SJSsiqk-unsplash-scaled.jpg' }, ]; return (
Multi-select · Pick anything that resonates
{opts.map(o => { const sel = data.interests.includes(o.k); return ( ); })}
); } function Step2({ data, set }) { const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; const years = ['2026','2027']; const monthGuide = { 'Jan': 'Calving season · Ndutu', 'Feb': 'Calving peak · Ndutu', 'Mar': 'Green & quiet', 'Apr': 'Long rains · low season', 'May': 'Green season finishes', 'Jun': 'Dry begins · excellent', 'Jul': 'Migration in central/north', 'Aug': 'River crossings begin', 'Sep': 'Crossings peak ★', 'Oct': 'Crossings continue', 'Nov': 'Short rains · transition', 'Dec': 'Migration south · festive' }; return (
{[['flexible','I have flexibility'],['set','My dates are set']].map(([k,l]) => ( ))}
Target month
{months.map((m, i) => ( ))}
{months.find(m => m.toLowerCase() === data.month)} {monthGuide[months.find(m => m.toLowerCase() === data.month)]}
Year
{years.map(y => ( ))}
Trip length {data.days} days
set('days', +e.target.value)} style={{ width: '100%', marginTop: 8, accentColor: 'var(--moss)' }}/>
31221
); } function Step3({ data, set }) { return (
Adults (16+)
{data.travelers}
Children (under 16)
{data.kids}
🛻 Vehicle suggestion

{data.travelers + data.kids <= 4 ? 'One Toyota Land Cruiser fits comfortably. Each guest gets a window — guaranteed.' : data.travelers + data.kids <= 7 ? 'One Land Cruiser, but we recommend two for guaranteed window seats.' : 'Two Land Cruisers travelling in convoy with two guides.'}

); } function Step4({ data, set, toggle }) { return (
Pace
{[ ['relaxed','Relaxed','Long mornings, slow drives'], ['balanced','Balanced','Mix of activity and rest'], ['intense','Intense','Maximum game-driving'], ].map(([k,t,d]) => ( ))}
Accommodation style (multi)
{['Tented','Lodge','Mobile camp','Treehouse','Boutique hotel'].map(a => { const sel = data.accommodation.includes(a.toLowerCase().replace(' ','-')); const k = a.toLowerCase().replace(' ','-'); return ( ); })}
Style of trip
{[ ['mid','Mid-luxury','$3–6k pp'], ['lux','Luxury','$6–12k pp'], ['ultra','Ultra-luxury','$12k+ pp'], ].map(([k,t,p]) => ( ))}
Approximate budget per person ${data.budget.toLocaleString()}
set('budget', +e.target.value)} style={{ width: '100%', marginTop: 8, accentColor: 'var(--moss)' }}/>
$2k$10k$20k+
); } function Step5({ data, set }) { return (
set('name', e.target.value)} placeholder="Hannah Reiss"/>
set('email', e.target.value)} placeholder="hannah@example.com" type="email"/>
set('phone', e.target.value)} placeholder="+44 …"/>