{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skyline-cta",
  "type": "registry:block",
  "title": "Skyline CTA",
  "description": "CTA Section built with Skyline (animated city skyline): a city at dusk switches its lights on. A take on the chart (graph) and animated background (backdrop). A closing call to action over a city at dusk with a few windows lit. Point at \"Get on board\" or tab to it and the whole city switches its lights on, one window at a time; press it and a train leaves across the line.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "blocks",
    "cta-sections",
    "cta",
    "chart",
    "animated-background"
  ],
  "docs": "Live preview and the components it's built with: https://keyframeui.com/blocks/cta-sections/skyline-cta",
  "registryDependencies": [
    "https://keyframeui.com/r/skyline.json"
  ],
  "files": [
    {
      "path": "components/skyline-cta.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Skyline } from \"@/components/ui/skyline\";\n\n/* ── Content ─────────────────────────────────────────────────\n * Everything you'd change to make the section yours: the\n * palette, the copy and the city. The city waits at dusk with a\n * few windows lit; point at \"Get on board\" (or tab to it) and\n * the whole city switches its lights on, and pressing it sends\n * a train across the line.\n * ─────────────────────────────────────────────────────────── */\n\n/** A night band in both schemes: the page's last section ends on a city with its lights coming on. */\nconst PALETTE = {\n  light: { paper: \"#0b0d19\", ink: \"#f4f4f6\", accent: \"#8f9dff\", tint: \"#2a39a6\", window: \"#ffd27a\" },\n  dark: { paper: \"#06070b\", ink: \"#f4f4f6\", accent: \"#8292ff\", tint: \"#212d82\", window: \"#ffd27a\" },\n};\n/** Dark towers, a shade off the sky, so the lit windows read as light. The sun is setting. */\nconst TOWERS = { light: \"#1d2134\", dark: \"#171a27\" };\nconst SUN = \"#ff6a2b\";\n\nconst HEADLINE = { before: \"The next train leaves\", accent: \"Tuesday\" };\nconst BODY =\n  \"Point Milepost at your repo today and your first release rides on the next timetable. Free for teams of up to ten.\";\nconst PRIMARY_CTA = \"Get on board\";\nconst SECONDARY_CTA = { label: \"Read the timetable docs\", href: \"#docs\" };\n\n/** Share of the windows lit while the city waits, and once someone's boarding. */\nconst LIGHTS = { waiting: 0.24, boarding: 0.96 };\nconst CITY = { seed: 17, sun: 0.22 };\n\n/* ── Section ─────────────────────────────────────────────── */\n\nexport function SkylineCta() {\n  const [boarding, setBoarding] = React.useState(false);\n  const [trains, setTrains] = React.useState(0);\n\n  return (\n    <section\n      style={\n        {\n          \"--paper-light\": PALETTE.light.paper,\n          \"--ink-light\": PALETTE.light.ink,\n          \"--accent-light\": PALETTE.light.accent,\n          \"--tint-light\": PALETTE.light.tint,\n          \"--window-light\": PALETTE.light.window,\n          \"--towers-light\": TOWERS.light,\n          \"--paper-dark\": PALETTE.dark.paper,\n          \"--ink-dark\": PALETTE.dark.ink,\n          \"--accent-dark\": PALETTE.dark.accent,\n          \"--tint-dark\": PALETTE.dark.tint,\n          \"--window-dark\": PALETTE.dark.window,\n          \"--towers-dark\": TOWERS.dark,\n        } as React.CSSProperties\n      }\n      className=\"relative overflow-hidden bg-(--paper) text-(--ink) [--accent:var(--accent-light)] [--ink:var(--ink-light)] [--paper:var(--paper-light)] [--tint:var(--tint-light)] [--towers:var(--towers-light)] [--window:var(--window-light)] dark:[--accent:var(--accent-dark)] dark:[--ink:var(--ink-dark)] dark:[--paper:var(--paper-dark)] dark:[--tint:var(--tint-dark)] dark:[--towers:var(--towers-dark)] dark:[--window:var(--window-dark)]\"\n    >\n      <div className=\"mx-auto flex max-w-2xl flex-col items-center px-6 pt-24 text-center sm:pt-28\">\n        <h2 className=\"font-serif text-4xl leading-[1.04] font-normal tracking-[-0.02em] text-balance sm:text-6xl\">\n          {HEADLINE.before} <em className=\"text-(--accent)\">{HEADLINE.accent}</em>\n        </h2>\n        <p className=\"mt-5 max-w-lg text-base leading-relaxed text-pretty opacity-70 sm:text-[17px]\">{BODY}</p>\n        <div className=\"mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-4\">\n          <button\n            type=\"button\"\n            onPointerEnter={(e) => e.pointerType === \"mouse\" && setBoarding(true)}\n            onPointerLeave={(e) => e.pointerType === \"mouse\" && setBoarding(false)}\n            onFocus={() => setBoarding(true)}\n            onBlur={() => setBoarding(false)}\n            onClick={() => {\n              setBoarding(true);\n              setTrains((n) => n + 1);\n            }}\n            className=\"inline-flex h-11 items-center gap-2 rounded-full bg-(--ink) px-6 text-sm font-medium text-(--paper) transition-[opacity,scale] duration-150 hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--accent) active:scale-[0.97]\"\n          >\n            {PRIMARY_CTA}\n            <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden className=\"size-3.5\">\n              <path d=\"M3 8h10m-4-4 4 4-4 4\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n            </svg>\n          </button>\n          <a\n            href={SECONDARY_CTA.href}\n            className=\"rounded-sm text-sm font-medium underline decoration-current/30 underline-offset-4 transition-[text-decoration-color] duration-150 hover:decoration-current focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-(--accent)\"\n          >\n            {SECONDARY_CTA.label}\n          </a>\n        </div>\n      </div>\n      <Skyline\n        seed={CITY.seed}\n        sun={CITY.sun}\n        train\n        headway={0}\n        departures={trains}\n        lights={boarding ? LIGHTS.boarding : LIGHTS.waiting}\n        style={{ \"--skyline-sun\": SUN } as React.CSSProperties}\n        className=\"mt-14 h-[clamp(12rem,32svh,19rem)] text-(--towers) [--skyline-light:var(--window)] [--skyline-tint:var(--tint)]\"\n      />\n    </section>\n  );\n}\n"
    }
  ]
}