import Link from "next/link";
import { ArrowRight, MessageCircle } from "lucide-react";
import { MotionReveal, MotionStagger, MotionItem } from "@/components/Motion";
import { getWhatsAppUrl } from "@/lib/contact";
import { routePath } from "@/lib/route-url";

export function CTASection() {
  return (
    <section className="border-y border-border bg-foreground font-['Space_Grotesk'] text-background">
      <div className="mx-auto grid max-w-7xl gap-6 px-6 py-12 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center lg:px-8 2xl:py-14">
        <MotionReveal className="min-w-0">
          <div className="min-w-0">
            <p className="text-xs font-black uppercase tracking-[0.16em] text-primary">
              Doorstep vehicle care
            </p>
            <h2 className="mt-2 text-3xl font-black leading-tight sm:text-4xl">
              Book service without visiting a workshop.
            </h2>
            <p className="mt-3 max-w-2xl text-base font-medium leading-7 text-background/75">
              Share your car or bike details on WhatsApp and get clear support for service,
              inspection, battery, tyre, AC, and repair needs.
            </p>
          </div>
        </MotionReveal>
        <MotionStagger className="flex flex-col gap-3 sm:flex-row lg:justify-end">
          <MotionItem>
            <Link
              href={getWhatsAppUrl()}
              target="_blank"
              rel="noreferrer"
              className="inline-flex h-12 items-center justify-center gap-2 rounded-md bg-primary px-6 text-sm font-black text-primary-foreground shadow-sm transition hover:bg-primary/90"
            >
              <MessageCircle className="h-4 w-4" />
              Book service
            </Link>
          </MotionItem>
          <MotionItem>
            <Link
              href={routePath("/services")}
              className="inline-flex h-12 items-center justify-center gap-2 rounded-md border border-background/20 px-6 text-sm font-black text-background transition hover:border-primary/50 hover:text-primary"
            >
              Services
              <ArrowRight className="h-4 w-4" />
            </Link>
          </MotionItem>
        </MotionStagger>
      </div>
    </section>
  );
}
