{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-poster",
  "type": "registry:block",
  "title": "CTA Poster",
  "description": "A Swiss-poster call to action on a solid ink field.",
  "files": [
    {
      "path": "src/registry/blocks/cta/cta-poster.tsx",
      "type": "registry:block",
      "content": "import { useId, type ComponentProps, type CSSProperties } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ntype Action = { label: string; href: string };\n\nexport type CtaPosterProps = {\n  /** Small mono labels across the top of the poster: left and right. */\n  kicker?: [string, string];\n  title?: string;\n  description?: string;\n  primaryAction?: Action;\n  secondaryAction?: Action;\n  footnote?: string;\n  /** The poster field colour. Defaults to Devsloka blue; near-black (#0A0A0A) also works with the default text colour. */\n  accent?: string;\n  /** Text and button colour on the field. Must pass contrast against `accent`. */\n  accentForeground?: string;\n  /** The second ink, used only for the large circle in the composition. */\n  highlight?: string;\n} & ComponentProps<\"section\">;\n\nconst DEFAULTS = {\n  kicker: [\"Plinth · Portfolio sites for architects\", \"No. 04 / Winter intake\"] as [string, string],\n  title: \"Show the drawings, not the template.\",\n  description:\n    \"Plinth sets your plans, sections and site photos on a strict grid, at full resolution, with project data in the margin. Most studios publish their first twelve projects in an afternoon.\",\n  primaryAction: { label: \"Start a 30-day trial\", href: \"#\" },\n  secondaryAction: { label: \"See studios using Plinth\", href: \"#\" },\n  footnote: \"No card needed. From €14 a month after the trial, billed per studio, not per seat.\",\n  accent: \"#0A6EFF\",\n  accentForeground: \"#FFFFFF\",\n  highlight: \"#0A0A0A\",\n};\n\n// A fixed 5 x 5 grid of dots, computed once (no randomness, so markup is stable across renders).\nconst DOTS = Array.from({ length: 25 }, (_, i) => ({ x: 36 + (i % 5) * 22, y: 36 + Math.floor(i / 5) * 22 }));\n\nexport function CtaPoster({\n  kicker = DEFAULTS.kicker,\n  title = DEFAULTS.title,\n  description = DEFAULTS.description,\n  primaryAction = DEFAULTS.primaryAction,\n  secondaryAction = DEFAULTS.secondaryAction,\n  footnote = DEFAULTS.footnote,\n  accent = DEFAULTS.accent,\n  accentForeground = DEFAULTS.accentForeground,\n  highlight = DEFAULTS.highlight,\n  className,\n  style,\n  ...props\n}: CtaPosterProps) {\n  const headingId = useId();\n\n  return (\n    <section\n      data-slot=\"cta-poster\"\n      aria-labelledby={headingId}\n      style={\n        {\n          \"--block-accent\": accent,\n          \"--block-fg\": accentForeground,\n          \"--block-highlight\": highlight,\n          ...style,\n        } as CSSProperties\n      }\n      className={cn(\n        \"relative w-full overflow-hidden bg-[var(--block-accent)] text-[var(--block-fg)]\",\n        className\n      )}\n      {...props}\n    >\n      <div className=\"mx-auto max-w-6xl px-6 py-20 md:py-28\">\n        <div className=\"flex flex-wrap justify-between gap-x-6 gap-y-1 border-b border-[var(--block-fg)] pb-3 font-mono text-[11px] uppercase tracking-wider\">\n          <span>{kicker[0]}</span>\n          <span>{kicker[1]}</span>\n        </div>\n\n        <div className=\"grid gap-10 pt-10 md:grid-cols-12 md:gap-6 md:pt-14\">\n          {/* Composition: a disc cropped by the edge, a dot grid, three stepped bars and a punched hole. */}\n          <div aria-hidden className=\"order-first ml-auto w-3/5 max-w-xs md:order-last md:col-span-4 md:-mr-24 md:w-auto md:max-w-none lg:-mr-40\">\n            <svg viewBox=\"0 0 400 460\" className=\"block h-auto w-full\" fill=\"none\">\n              <circle cx=\"250\" cy=\"190\" r=\"160\" fill=\"var(--block-highlight)\" />\n              <circle cx=\"300\" cy=\"140\" r=\"26\" fill=\"var(--block-accent)\" />\n              {DOTS.map((d) => (\n                <circle key={`${d.x}-${d.y}`} cx={d.x} cy={d.y} r=\"3.5\" fill=\"var(--block-fg)\" />\n              ))}\n              <rect x=\"36\" y=\"330\" width=\"250\" height=\"20\" fill=\"var(--block-fg)\" />\n              <rect x=\"36\" y=\"370\" width=\"180\" height=\"20\" fill=\"var(--block-fg)\" />\n              <rect x=\"36\" y=\"410\" width=\"110\" height=\"20\" fill=\"var(--block-fg)\" />\n            </svg>\n          </div>\n\n          <div className=\"md:col-span-8\">\n            <h2\n              id={headingId}\n              className=\"text-5xl font-semibold leading-[0.9] tracking-[-0.04em] text-balance sm:text-7xl lg:text-[7.5rem]\"\n            >\n              {title}\n            </h2>\n          </div>\n        </div>\n\n        <div className=\"mt-14 grid gap-8 border-t border-[var(--block-fg)] pt-8 md:mt-20 md:grid-cols-12 md:gap-6\">\n          <p className=\"max-w-md text-base leading-relaxed md:col-span-6\">{description}</p>\n          <div className=\"md:col-span-6 md:justify-self-end\">\n            <div className=\"flex flex-wrap items-center gap-x-6 gap-y-4\">\n              <Button\n                asChild\n                size=\"lg\"\n                className=\"rounded-none bg-[var(--block-fg)] text-[var(--block-accent)] shadow-none hover:bg-[var(--block-fg)] hover:underline hover:underline-offset-4 focus-visible:ring-[var(--block-fg)]\"\n              >\n                <a href={primaryAction.href}>{primaryAction.label}</a>\n              </Button>\n              <a\n                href={secondaryAction.href}\n                className=\"rounded-none text-sm font-medium underline decoration-1 underline-offset-[6px] outline-none hover:decoration-2 focus-visible:ring-2 focus-visible:ring-[var(--block-fg)] focus-visible:ring-offset-4 focus-visible:ring-offset-[var(--block-accent)]\"\n              >\n                {secondaryAction.label}\n              </a>\n            </div>\n            {footnote && <p className=\"mt-5 max-w-sm font-mono text-[11px] leading-relaxed\">{footnote}</p>}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ],
  "registryDependencies": [
    "button"
  ]
}
