import { Head, usePage } from '@inertiajs/react';
import { Eye, HandCoins, Scale, Users } from 'lucide-react';
import FinalCtaSection from '@/components/landing/final-cta-section';
import PublicPageHeader from '@/components/landing/public-page-header';
import Reveal from '@/components/landing/reveal';
import { home } from '@/routes';

const values = [
    {
        title: 'Clear, fair terms',
        description:
            'Every savings, financing and investment product has clear terms with no hidden charges.',
        icon: Scale,
    },
    {
        title: 'Full transparency',
        description:
            'Prices, profit ratios and fees are disclosed up front. What you see in your dashboard is what you pay or earn.',
        icon: Eye,
    },
    {
        title: 'Member-owned',
        description:
            'As a cooperative, we exist to serve our members — not outside shareholders. Surpluses are reinvested in the community.',
        icon: Users,
    },
    {
        title: 'Fair access',
        description:
            'Financing is structured around your real situation, so salary earners, traders and farmers can all access capital.',
        icon: HandCoins,
    },
] as const;

const offerings = [
    {
        title: 'Smart Savings',
        description:
            'Seven plans for goals like Hajj, school fees and farmland.',
        anchor: 'savings',
    },
    {
        title: 'Transparent Financing',
        description: 'Murabaha, Musharaka and Ijara — on clear, fair terms.',
        anchor: 'financing',
    },
    {
        title: 'Halal Investments',
        description: 'Board-vetted pools built on ethical instruments.',
        anchor: 'investments',
    },
] as const;

export default function About() {
    const { name } = usePage().props;

    return (
        <>
            <Head title="About Us" />

            <PublicPageHeader
                kicker="About Us"
                title="Ethical finance, built by and for our members."
                intro={`${name} is a transparent savings and loan cooperative society serving members across Nigeria. We help members save with purpose, access fair financing and grow their wealth — with clear, fair terms and no hidden charges.`}
            />

            <section className="px-5 py-16 sm:px-6 lg:px-10 lg:py-20">
                <div className="mx-auto grid w-full max-w-6xl gap-10 lg:grid-cols-2 lg:gap-20">
                    <Reveal>
                        <p className="mb-3.5 text-xs font-semibold tracking-[0.14em] text-highlight-dark uppercase">
                            Our Mission
                        </p>
                        <h2 className="font-display text-[clamp(28px,3.4vw,40px)] leading-[1.1] font-semibold tracking-[-0.015em] text-balance text-ink">
                            Make halal finance simple, modern and close to home.
                        </h2>
                    </Reveal>
                    <Reveal
                        delay={120}
                        className="flex flex-col gap-4 text-[15.5px] leading-[1.75] text-ink-500"
                    >
                        <p>
                            Too many Nigerians have had to choose between their
                            values and access to financial services.
                            {` ${name}`} was started to remove that choice — a
                            cooperative where every product is designed from the
                            ground up to be clear and fair.
                        </p>
                        <p>
                            We serve members in all 36 states and the FCT
                            through a simple online dashboard that needs no
                            branch visit.
                        </p>
                    </Reveal>
                </div>
            </section>

            <section className="bg-surface-50 px-5 py-16 sm:px-6 lg:px-10 lg:py-20">
                <div className="mx-auto w-full max-w-6xl">
                    <Reveal>
                        <p className="mb-3.5 text-xs font-semibold tracking-[0.14em] text-highlight-dark uppercase">
                            Our Values
                        </p>
                        <h2 className="mb-10 font-display text-[clamp(28px,3.4vw,40px)] leading-[1.1] font-semibold tracking-[-0.015em] text-ink lg:mb-12">
                            What we stand for.
                        </h2>
                    </Reveal>
                    <ul className="grid gap-5 sm:grid-cols-2 lg:grid-cols-4">
                        {values.map(
                            ({ title, description, icon: Icon }, index) => (
                                <li key={title}>
                                    <Reveal
                                        delay={index * 100}
                                        className="h-full rounded-landing-lg border border-surface-200 bg-white p-6 shadow-landing-sm"
                                    >
                                        <span className="mb-5 flex size-10 items-center justify-center rounded-landing bg-brand-faint text-brand">
                                            <Icon
                                                className="size-5"
                                                aria-hidden="true"
                                            />
                                        </span>
                                        <h3 className="mb-2 font-display text-lg font-semibold text-ink">
                                            {title}
                                        </h3>
                                        <p className="text-sm leading-[1.7] text-ink-500">
                                            {description}
                                        </p>
                                    </Reveal>
                                </li>
                            ),
                        )}
                    </ul>
                </div>
            </section>

            <section className="px-5 py-16 sm:px-6 lg:px-10 lg:py-20">
                <div className="mx-auto w-full max-w-6xl">
                    <Reveal>
                        <p className="mb-3.5 text-xs font-semibold tracking-[0.14em] text-highlight-dark uppercase">
                            What We Offer
                        </p>
                        <h2 className="mb-10 font-display text-[clamp(28px,3.4vw,40px)] leading-[1.1] font-semibold tracking-[-0.015em] text-ink lg:mb-12">
                            Everything in one dashboard.
                        </h2>
                    </Reveal>
                    <ul className="grid gap-5 md:grid-cols-3">
                        {offerings.map((offering, index) => (
                            <li key={offering.title}>
                                <Reveal delay={index * 100} className="h-full">
                                    <a
                                        href={`${home.url()}#${offering.anchor}`}
                                        className="group flex h-full flex-col rounded-landing-lg border border-surface-200 p-6 transition-[border-color,box-shadow,translate] hover:-translate-y-0.5 hover:border-brand-border hover:shadow-landing"
                                    >
                                        <h3 className="mb-2 font-display text-lg font-semibold text-ink group-hover:text-brand">
                                            {offering.title}
                                        </h3>
                                        <p className="text-sm leading-[1.7] text-ink-500">
                                            {offering.description}
                                        </p>
                                    </a>
                                </Reveal>
                            </li>
                        ))}
                    </ul>
                </div>
            </section>

            <FinalCtaSection />
        </>
    );
}
