import Link from "next/link"

export default function ForVolunteersPage() {
  return (
    <div className="min-h-screen bg-white">
      <Nav />

      {/* ── Hero ── */}
      <section className="py-20 md:py-28 px-4 bg-gradient-to-b from-amber-50 to-white">
        <div className="max-w-3xl mx-auto text-center space-y-7">
          <div className="inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-warm-amber to-orange-500 text-4xl shadow-xl shadow-orange-500/20">
            🙋
          </div>
          <h1 className="text-4xl md:text-5xl font-black text-gray-900 leading-[1.08] tracking-tight">
            You collected 20 pledges.<br />
            <span className="text-warm-amber">See exactly how much came in.</span>
          </h1>
          <p className="text-lg text-muted-foreground max-w-xl mx-auto leading-relaxed">
            Every volunteer gets their own pledge link. Share it at your table, in your WhatsApp group, or one-on-one. See your live stats — how many pledged, how much collected, your conversion rate.
          </p>
          <div className="flex flex-col sm:flex-row gap-3 justify-center pt-2">
            <Link href="/signup" className="rounded-2xl bg-warm-amber px-8 py-4 text-base font-bold text-white hover:bg-amber-600 transition-all shadow-xl shadow-warm-amber/20 hover:-translate-y-0.5">
              Tell your charity about this →
            </Link>
            <Link href="/login?demo=1" className="rounded-2xl border-2 border-gray-200 px-8 py-4 text-base font-bold text-gray-700 hover:border-warm-amber hover:text-warm-amber transition-all hover:-translate-y-0.5">
              See how it works
            </Link>
          </div>
        </div>
      </section>

      {/* ── What you get ── */}
      <section className="py-16 px-4">
        <div className="max-w-4xl mx-auto space-y-10">
          <div className="text-center">
            <h2 className="text-3xl font-black text-gray-900">Your own pledge dashboard</h2>
            <p className="text-muted-foreground mt-2">No login needed. Just open your volunteer link to see your live stats.</p>
          </div>

          <div className="grid md:grid-cols-3 gap-5">
            {[
              { icon: "🔗", title: "Your personal link", desc: "A unique pledge link with your name on it. Share via QR code, WhatsApp, or hand it out at your table." },
              { icon: "📊", title: "Live stats", desc: "How many pledges you've collected, total amount, conversion rate. Updates in real time — no refresh needed." },
              { icon: "🏆", title: "Leaderboard", desc: "Friendly competition. See how you stack up against other volunteers. Top collectors get bragging rights." },
            ].map((f) => (
              <div key={f.title} className="rounded-2xl border-2 border-gray-100 p-6 space-y-3 hover:shadow-md hover:-translate-y-0.5 transition-all">
                <span className="text-3xl">{f.icon}</span>
                <h3 className="font-bold">{f.title}</h3>
                <p className="text-sm text-muted-foreground">{f.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* ── How it works ── */}
      <section className="py-16 bg-gray-50 px-4">
        <div className="max-w-3xl mx-auto space-y-10">
          <div className="text-center">
            <h2 className="text-3xl font-black text-gray-900">Event night, simplified</h2>
          </div>
          <div className="space-y-6">
            {[
              { n: "1", title: "Your charity creates your link", desc: "They set up a campaign and generate a pledge link with your name — \"Volunteer: Ahmed, Table 5\"." },
              { n: "2", title: "Share it at your table", desc: "Show the QR code, or tap to share via WhatsApp. Donors scan, pledge, and you see it instantly." },
              { n: "3", title: "Watch pledges roll in", desc: "Open your volunteer dashboard on your phone. Every new pledge pops up with a name and amount." },
              { n: "4", title: "WhatsApp handles the rest", desc: "You don't need to chase anyone. Automated reminders go out. Donors reply PAID when they've transferred." },
            ].map((s) => (
              <div key={s.n} className="flex gap-5 items-start">
                <span className="flex-shrink-0 w-8 h-8 rounded-full bg-warm-amber text-white text-sm font-black flex items-center justify-center">{s.n}</span>
                <div>
                  <h3 className="font-bold">{s.title}</h3>
                  <p className="text-sm text-muted-foreground mt-1">{s.desc}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* ── Share buttons ── */}
      <section className="py-16 px-4">
        <div className="max-w-3xl mx-auto text-center space-y-8">
          <h2 className="text-2xl font-black text-gray-900">Share your link anywhere</h2>
          <div className="grid grid-cols-3 md:grid-cols-6 gap-3">
            {[
              { icon: "💬", label: "WhatsApp" },
              { icon: "📱", label: "QR Code" },
              { icon: "📧", label: "Email" },
              { icon: "📸", label: "Instagram" },
              { icon: "🗣️", label: "In person" },
              { icon: "📋", label: "Copy link" },
            ].map((c) => (
              <div key={c.label} className="rounded-xl border bg-white p-3 text-center space-y-1">
                <span className="text-xl">{c.icon}</span>
                <p className="text-[11px] font-medium">{c.label}</p>
              </div>
            ))}
          </div>
          <p className="text-xs text-muted-foreground">Every link is unique to you. See exactly how many pledges came from your sharing.</p>
        </div>
      </section>

      {/* ── CTA ── */}
      <section className="py-20 bg-gradient-to-br from-gray-950 to-gray-900 px-4">
        <div className="max-w-2xl mx-auto text-center space-y-6">
          <h2 className="text-3xl font-black text-white">Ready to see your impact?</h2>
          <p className="text-gray-400 max-w-md mx-auto">
            Ask your charity manager to set up Pledge Now, Pay Later. They create your link in 30 seconds.
          </p>
          <div className="flex flex-col sm:flex-row gap-3 justify-center">
            <Link href="/for/charities" className="rounded-2xl bg-white px-8 py-4 text-base font-bold text-gray-900 hover:bg-gray-100 transition-all shadow-xl hover:-translate-y-0.5">
              Share with your charity →
            </Link>
            <Link href="/login?demo=1" className="rounded-2xl border-2 border-white/20 px-8 py-4 text-base font-bold text-white hover:bg-white/10 transition-all hover:-translate-y-0.5">
              See the volunteer view
            </Link>
          </div>
        </div>
      </section>

      <Footer active="volunteers" />
    </div>
  )
}

function Nav() {
  return (
    <header className="sticky top-0 z-40 border-b bg-white/80 backdrop-blur-xl">
      <div className="max-w-5xl mx-auto flex h-14 items-center justify-between px-4">
        <Link href="/" className="flex items-center gap-2.5">
          <div className="h-8 w-8 rounded-xl bg-gradient-to-br from-trust-blue to-blue-600 flex items-center justify-center"><span className="text-white text-base">🤲</span></div>
          <span className="font-black text-sm">Pledge Now, Pay Later</span>
        </Link>
        <div className="flex items-center gap-3">
          <Link href="/login" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Sign In</Link>
          <Link href="/signup" className="rounded-lg bg-trust-blue px-4 py-2 text-sm font-semibold text-white hover:bg-trust-blue/90 transition-colors">Get Started Free</Link>
        </div>
      </div>
    </header>
  )
}

function Footer({ active }: { active?: string }) {
  const links = [
    { href: "/for/charities", label: "For Charities" },
    { href: "/for/fundraisers", label: "For Fundraisers" },
    { href: "/for/volunteers", label: "For Volunteers" },
    { href: "/for/donors", label: "For Donors" },
  ]
  return (
    <footer className="py-8 px-4 border-t">
      <div className="max-w-5xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6 text-xs text-muted-foreground">
        <Link href="/" className="flex items-center gap-2">
          <div className="h-6 w-6 rounded-lg bg-trust-blue flex items-center justify-center"><span className="text-white text-[10px]">🤲</span></div>
          <span>Pledge Now, Pay Later</span>
        </Link>
        <div className="flex flex-wrap justify-center gap-x-5 gap-y-1">
          {links.map((l) => (
            <Link key={l.href} href={l.href} className={`hover:text-foreground ${active && l.href.includes(active) ? "font-medium text-foreground" : ""}`}>{l.label}</Link>
          ))}
        </div>
        <span>© {new Date().getFullYear()} QuikCue Ltd</span>
      </div>
    </footer>
  )
}
