import SectionHeading from "./SectionHeading";
import Reveal from "./Reveal";
import {
  LockIcon,
  PhoneIcon,
  MessageIcon,
  AlertIcon,
  HistoryIcon,
  BadgeCheckIcon,
} from "./icons";

const FEATURES = [
  {
    icon: LockIcon,
    title: "Private Communication",
    desc: "Communicate without revealing personal phone numbers.",
    tone: "text-brand",
  },
  {
    icon: PhoneIcon,
    title: "Instant Calling",
    desc: "Connect directly to vehicle owners in a single tap.",
    tone: "text-electric",
  },
  {
    icon: MessageIcon,
    title: "Quick Messaging",
    desc: "Send predefined or custom messages in seconds.",
    tone: "text-brand",
  },
  {
    icon: AlertIcon,
    title: "Emergency Alerts",
    desc: "Notify owners immediately during emergencies.",
    tone: "text-danger",
  },
  {
    icon: HistoryIcon,
    title: "Activity History",
    desc: "Track all interactions and communication logs.",
    tone: "text-warning",
  },
  {
    icon: BadgeCheckIcon,
    title: "Verified Vehicle Profiles",
    desc: "Authenticated vehicle ownership records.",
    tone: "text-success",
  },
];

export default function Features() {
  return (
    <section id="features" className="relative py-24 sm:py-28">
      <div className="pointer-events-none absolute left-1/2 top-0 h-80 w-[40rem] -translate-x-1/2 rounded-full bg-electric/10 blur-[140px]" />
      <div className="relative mx-auto max-w-7xl px-5 sm:px-8">
        <SectionHeading
          eyebrow="Key Features"
          title={
            <>
              Everything you need to reach an owner,{" "}
              <span className="text-gradient">safely</span>
            </>
          }
          subtitle="Purpose-built tools that keep every conversation private, fast, and verified."
        />

        <div className="mt-16 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
          {FEATURES.map((f, i) => (
            <Reveal key={f.title} delay={(i % 3) * 100}>
              <div className="glass card-hover group h-full rounded-3xl p-7">
                <span
                  className={`flex h-12 w-12 items-center justify-center rounded-2xl bg-white/5 ring-1 ring-white/10 transition-transform duration-300 group-hover:scale-110 ${f.tone}`}
                >
                  <f.icon width={24} height={24} />
                </span>
                <h3 className="mt-5 text-lg font-bold text-white">{f.title}</h3>
                <p className="mt-2 text-[15px] leading-relaxed text-white/60">
                  {f.desc}
                </p>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}
