import Link from 'next/link' import Image from 'next/image' import { ShieldCheck, Trophy, TreePine, Users, MapPin, Globe, Bike, ArrowRight } from 'lucide-react' import { Navigation } from '@/components/navigation' import { Footer } from '@/components/footer' import { HeroCarousel } from '@/components/hero-carousel' import { getPublicEvent, getPublicPrizes } from '@/lib/lukenya-api' import { countWord, displayPrice, editionLabel, findPrize, formatClock, formatEventDate, formatMoney, registrationIsOpen, registrationStatusText, venueLine, } from '@/lib/event-types' export const revalidate = 60 const galleryImages = [ 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2026/04/Artboard-1-copy-4-100_result.jpg', 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2026/04/Artboard-1-copy-5-100_result.jpg', 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2026/04/Artboard-1-copy-6-100_result.jpg', 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2026/04/Artboard-1-copy-7-100_result.jpg', 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2026/04/Artboard-1-copy-8-100_result.jpg', ] const sponsors = [ { name: 'Betika', url: 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2025/04/Betika.jpg' }, { name: 'Greenlife', url: 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2025/04/Greenlife.jpg' }, { name: 'Family Bank', url: 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2025/04/Family-bank.jpg' }, { name: 'Lukenya Schools', url: 'https://marathon.lukenyauniversity.ac.ke/wp-content/uploads/2025/04/Lukenya-schools-1.jpg' }, ] const testimonials = [ { quote: "The Lukenya Hills will humble you. The finish line will change you. I have run 11 marathons. This one meant something different.", name: "David M.", category: "42KM Full Marathon", edition: "4th Edition" }, { quote: "I came for the race. I stayed because of the trees. Knowing my entry funded real reforestation made this the most purposeful race I have ever entered.", name: "Amina K.", category: "21KM Half Marathon", edition: "3rd Edition" } ] export default async function HomePage() { const [event, prizes] = await Promise.all([getPublicEvent(), getPublicPrizes()]) const edition = event.edition const categories = event.categories const isOpen = registrationIsOpen(event) const label = editionLabel(edition) const date = formatEventDate(edition?.event_date) const venue = venueLine(edition) const featured = categories.find((c) => c.is_featured) || categories[0] const featuredStart = featured ? formatClock(featured.start_time) : null const heroStats = [ { value: '300+', label: 'Runners' }, { value: label || 'Next', label: isOpen ? 'Edition: entries open' : 'Edition' }, { value: categories.length ? String(categories.length) : '–', label: 'Categories' }, { value: '10M', label: 'Trees Mission' }, ] const trustSignals = [ { icon: ShieldCheck, label: 'Sporthive Certified Timing' }, { icon: Trophy, label: 'Competitive Prize Money' }, { icon: TreePine, label: '10M Trees Mission' }, { icon: Users, label: '300+ Annual Finishers' }, { icon: MapPin, label: venue || 'Venue to be announced' }, { icon: Globe, label: 'Open to International Runners' }, ] const featuredPrizeCategory = featured?.prize_eligible ? featured.name : undefined const prizeCards = [ { icon: Trophy, title: `Men, ${featured?.distance_label || 'Marathon'}, 1st place`, amount: findPrize(prizes, 'Men', 1, featuredPrizeCategory) }, { icon: Trophy, title: `Women, ${featured?.distance_label || 'Marathon'}, 1st place`, amount: findPrize(prizes, 'Women', 1, featuredPrizeCategory) }, { icon: Users, title: 'Top corporate relay team', amount: findPrize(prizes, 'Corporate Relay', 1) }, ] return (
Africa's only university-backed marathon with a verified reforestation mission.
{[categories.length ? `${categories.length} categories` : null, venue, date].filter(Boolean).join(' · ')}
{stat.value}
{stat.label}
{date ? date.toUpperCase() : 'DATE TO BE ANNOUNCED'}
{label ? `${label} · ` : ''}Annual event
{(edition?.venue || 'To be announced').toUpperCase()}
{[edition?.county ? `${edition.county}, Kenya` : 'Kenya', featured && featuredStart ? `${featured.distance_label} start: ${featuredStart}` : null].filter(Boolean).join(' · ')}
{featuredStart || 'TBA'}
{categories.filter((c) => c.start_time).slice(0, 4).map((c) => `${c.distance_label} ${formatClock(c.start_time)}`).join(' · ') || 'Start times are published with the race categories.'}
The 10 Million Trees Marathon exists because of a promise made to Kenya's dryland ecosystems. Every runner, every kilometre, every edition is a contribution to one of East Africa's most ambitious conservation programmes. By 2027, the programme will have planted 10 million trees across the ASAL region — a goal now in its 5th year of active delivery.
{/* Stat Pills */}10,000+
Trees planted and GPS-tagged to date
Goal: 10 Million by 2027 · 4 editions completed · On track
GPS-tagged planting zones in Lukenya Conservation Area. Documented, verified, reportable.
Verified Programme{categories.length ? `${countWord(categories.length)} ${categories.length === 1 ? 'category' : 'categories'}. ` : ''}Every level of runner and rider. One extraordinary finish line.
Race categories for the next edition will be published here soon.
)} {categories.map((category) => { const price = formatMoney(displayPrice(category, 'resident'), event.currency) const isCycling = category.discipline === 'Cycling' return ({category.distance_label}
{/* Name */}{category.short_description || category.eligibility || category.inclusions.join(' · ')}
{/* Featured race: inline stat */} {category.is_featured && category.prize_eligible && (🏆 Prize money available · Certified course · Chip timing
)} {/* Price */}{price}
{category.prices.early_bird_active ? 'Early-bird rate for Kenyan residents' : 'Kenyan resident rate'}
> ) : ( Pricing announced soon )}{card.title}
{formatMoney(card.amount, prizes?.currency || event.currency) || 'PRIZE MONEY AVAILABLE'}
{!card.amount && (Amounts published before entries open
)}Prize structure includes Men, Women, Wheelchair, and Corporate Relay categories. Full breakdown published on the Prize Money page.
{/* CTA */}{testimonial.quote}
— {testimonial.name}
{testimonial.category} · {testimonial.edition}
300+
runners have crossed this finish line
Including our Environmental Partner tier — the only ESG-verified sponsorship in Kenyan running.
{/* CTA */} Become a Partner{isOpen ? `Register for the ${label || 'next edition'}. Run for Kenya. Entries open now.` : `Entries for the ${label || 'next edition'} open soon. Join the waitlist to hear first.`}
Register Now{featured?.prices.early_bird_active ? 'Early-bird pricing available. Secure your place before rates increase.' : 'Pay by M-PESA or card.'}