import type { Metadata } from "next";
import Hero from "@/components/Hero";
import ServiceCards from "@/components/ServiceCards";
import Process from "@/components/Process";
import Pricing from "@/components/Pricing";
import Testimonials from "@/components/Testimonials";
import FAQ from "@/components/FAQ";
import CTA from "@/components/CTA";
import { services } from "@/lib/services";
import { plans } from "@/lib/pricing";
import { site } from "@/lib/site";
import JsonLd from "@/components/JsonLd";

export const metadata: Metadata = {
  title: "Productized IT for SMBs",
  description: site.description,
};

export default function HomePage() {
  const orgLd = {
    "@context": "https://schema.org",
    "@type": "Organization",
    name: site.name,
    url: site.url,
    logo: site.org.logo,
    sameAs: site.org.sameAs
  };

  const faqLd = {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    mainEntity: [
      {
        "@type": "Question",
        name: "How fast can you start?",
        acceptedAnswer: { "@type": "Answer", text: "Most sprints start within 2–3 business days after scope confirmation." }
      },
      {
        "@type": "Question",
        name: "Do you work under NDA?",
        acceptedAnswer: { "@type": "Answer", text: "Yes—mutual NDA available on request; we keep credentials least-privilege." }
      },
      {
        "@type": "Question",
        name: "Can we switch providers later?",
        acceptedAnswer: { "@type": "Answer", text: "Yes. Everything is documented; you own the accounts and artifacts." }
      }
    ]
  };

  return (
    <>
      <Hero />
      <ServiceCards services={services} />
      <Process />
      <Pricing plans={plans} />
      <Testimonials />
      <FAQ items={[
        { q: "How fast can you start?", a: "Most sprints start within 2–3 business days after scope confirmation." },
        { q: "Do you work under NDA?", a: "Yes—mutual NDA available on request; we keep credentials least-privilege." },
        { q: "What’s your guarantee?", a: "We show proof of outcomes. If scope isn’t met, we make it right or refund the sprint fee." }
      ]} />
      <CTA />
      <JsonLd data={orgLd} />
      <JsonLd data={faqLd} />
    </>
  );
}
