import type { ProposalContent } from "@/lib/proposal/schema";

type Props = { stages: ProposalContent["stagesRecap"]["stages"] };

export function StagesRecapSection({ stages }: Props) {
  return (
    <div className="h-full flex flex-col justify-center px-16 py-24 space-y-10">
      <div>
        <p className="text-xs font-mono tracking-widest text-muted-foreground uppercase">Recap del progresso</p>
        <h2 className="text-5xl font-light text-foreground mt-4">
          Tre tappe verso <span className="text-primary">la trasformazione.</span>
        </h2>
        <p className="text-base text-muted-foreground mt-4 max-w-3xl">
          Le tre opzioni non sono pacchetti scollegati: sono{" "}
          <strong>tre tappe progressive</strong> dello stesso percorso. Ognuna costruisce sopra la precedente.
          Insieme portano alla <strong>trasformazione totale</strong>.
        </p>
      </div>

      <div className="flex items-start gap-4">
        {stages.map((stage, i) => (
          <div key={i} className="flex-1">
            <div className="border border-primary/20 rounded-xl p-6 space-y-3">
              <p className="text-4xl font-light text-primary">{stage.number}</p>
              <p className="text-xs font-mono tracking-widest text-primary uppercase">{stage.label}</p>
              <h3 className="text-xl font-medium text-foreground">{stage.headline}</h3>
              <p className="text-sm text-muted-foreground leading-relaxed">{stage.body}</p>
              <div className="border border-border rounded-md px-3 py-2 bg-muted/30">
                <p className="text-xs font-mono text-muted-foreground">
                  › {stage.deliverable}
                </p>
              </div>
            </div>

            {i < stages.length - 1 && (
              <div className="hidden" /* arrow between stages — gestito dal grid */ />
            )}
          </div>
        ))}
      </div>
    </div>
  );
}
