{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skyline-hero",
  "type": "registry:block",
  "title": "Skyline Hero",
  "description": "Hero Section built with Dot Rail (LED dot tab indicator) and Skyline (animated city skyline): a halftone city rises and lights up on load. A take on the tabs (tab bar), progress bar (loading bar), chart (graph) and animated background (backdrop). A printed hero for a release-train tool: an editorial serif headline over a halftone city whose towers rise and light up on load. A Dot Rail under the nav runs on its own until a link is hovered, then jumps under it, and \"Send a test train\" sends a train across the elevated line at the foot of the city.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "blocks",
    "hero-sections",
    "hero",
    "tabs",
    "progress-bar",
    "chart",
    "animated-background"
  ],
  "docs": "Live preview and the components it's built with: https://keyframeui.com/blocks/hero-sections/skyline-hero",
  "registryDependencies": [
    "https://keyframeui.com/r/dot-rail.json",
    "https://keyframeui.com/r/skyline.json"
  ],
  "files": [
    {
      "path": "components/skyline-hero.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { DotRail } from \"@/components/ui/dot-rail\";\nimport { Skyline } from \"@/components/ui/skyline\";\n\n/* ── Content ─────────────────────────────────────────────────\n * Everything you'd change to make the hero yours: the palette,\n * the nav, the copy and the city. The dotted rail under the nav\n * runs on its own until a link is hovered or focused, then\n * jumps under it. \"Send a test train\" sends a train across the\n * line at the foot of the city.\n * ─────────────────────────────────────────────────────────── */\n\n/**\n * Crisp paper and ink, an electric blue (the headline's italic and the far\n * city's halftone) and one hot signal color (the sun and the rail's run).\n * In the dark the city is at night: dark towers with their windows lit.\n */\nconst PALETTE = {\n  light: { paper: \"#fafaf9\", ink: \"#0b0b0d\", accent: \"#2747ff\", signal: \"#ff5a1f\", tint: \"#4562ff\" },\n  dark: { paper: \"#07080c\", ink: \"#f4f4f6\", accent: \"#8292ff\", signal: \"#ff6a2b\", tint: \"#3149f0\" },\n};\nconst NIGHT = { towers: \"#1b1f2e\", windows: \"#ffd27a\" };\n\nconst BRAND = { name: \"Milepost\", href: \"#\" };\nconst NAV_LINKS = [\n  { label: \"Timetable\", href: \"#timetable\" },\n  { label: \"Stations\", href: \"#stations\" },\n  { label: \"Pricing\", href: \"#pricing\" },\n  { label: \"Changelog\", href: \"#changelog\" },\n];\nconst SIGN_IN = { label: \"Sign in\", href: \"#sign-in\" };\n\nconst HEADLINE = { before: \"Ship on a\", accent: \"timetable\", after: \"not a hunch\" };\nconst SUBLINE =\n  \"Milepost cuts a release train every Tuesday at ten, runs your checks on the way and rolls it out one station at a time. Anything that misses it catches the next one.\";\nconst PRIMARY_CTA = { label: \"Start a timetable\", href: \"#start\" };\nconst TRAIN_CTA = \"Send a test train\";\nconst NEXT_TRAIN = [\"Train 214\", \"leaves Tue 10:00\", \"38 changes aboard\"];\n\n/** The city at the foot: change the seed for a different skyline. */\nconst CITY = { seed: 3, sun: 0.7, headway: 8 };\n\n/* ── Section ─────────────────────────────────────────────── */\n\nexport function SkylineHero() {\n  const navRef = React.useRef<HTMLElement>(null);\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          \"--signal-light\": PALETTE.light.signal,\n          \"--tint-light\": PALETTE.light.tint,\n          \"--paper-dark\": PALETTE.dark.paper,\n          \"--ink-dark\": PALETTE.dark.ink,\n          \"--accent-dark\": PALETTE.dark.accent,\n          \"--signal-dark\": PALETTE.dark.signal,\n          \"--tint-dark\": PALETTE.dark.tint,\n          \"--night-towers\": NIGHT.towers,\n          \"--night-windows\": NIGHT.windows,\n        } as React.CSSProperties\n      }\n      className=\"relative overflow-hidden bg-(--paper) text-(--ink) [--accent:var(--accent-light)] [--dot-rail-accent:var(--signal)] [--ink:var(--ink-light)] [--paper:var(--paper-light)] [--signal:var(--signal-light)] [--skyline-sun:var(--signal)] [--skyline-tint:var(--tint)] [--tint:var(--tint-light)] dark:[--accent:var(--accent-dark)] dark:[--ink:var(--ink-dark)] dark:[--paper:var(--paper-dark)] dark:[--signal:var(--signal-dark)] dark:[--tint:var(--tint-dark)]\"\n    >\n      <header className=\"mx-auto max-w-6xl px-6 pt-4\">\n        <div className=\"flex h-11 items-center justify-between gap-6\">\n          <a\n            href={BRAND.href}\n            className=\"flex items-center gap-2 rounded-md text-[15px] font-semibold tracking-tight focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-(--accent)\"\n          >\n            <MilepostMark className=\"h-5 w-auto\" />\n            {BRAND.name}\n          </a>\n          <nav ref={navRef} aria-label=\"Main\" className=\"hidden items-center gap-1 md:flex\">\n            {NAV_LINKS.map((link) => (\n              <a\n                key={link.label}\n                href={link.href}\n                className=\"rounded-full px-3 py-1.5 text-[13px] font-medium opacity-65 transition-opacity duration-150 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-(--accent)\"\n              >\n                {link.label}\n              </a>\n            ))}\n          </nav>\n          <a\n            href={SIGN_IN.href}\n            className=\"rounded-full px-4 py-1.5 text-[13px] font-medium ring-1 ring-current/25 transition-colors duration-150 hover:bg-current/5 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--accent)\"\n          >\n            {SIGN_IN.label}\n          </a>\n        </div>\n        <DotRail trackRef={navRef} follow=\"loop\" className=\"mt-2\" />\n      </header>\n\n      <div className=\"mx-auto flex max-w-3xl flex-col items-center px-6 pt-10 text-center sm:pt-14\">\n        <h1 className=\"font-serif text-[2.6rem] leading-[1.02] font-normal tracking-[-0.025em] text-balance sm:text-6xl lg:text-[4.25rem]\">\n          {HEADLINE.before} <em className=\"text-(--accent)\">{HEADLINE.accent}</em>, {HEADLINE.after}\n        </h1>\n        <p className=\"mt-4 max-w-xl text-[15px] leading-relaxed text-pretty opacity-70 sm:text-[17px]\">{SUBLINE}</p>\n        <div className=\"mt-7 flex flex-wrap items-center justify-center gap-3\">\n          <a\n            href={PRIMARY_CTA.href}\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.label}\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          </a>\n          <button\n            type=\"button\"\n            onClick={() => setTrains((n) => n + 1)}\n            className=\"inline-flex h-11 items-center gap-2 rounded-full px-6 text-sm font-medium ring-1 ring-current/25 transition-[background-color,scale] duration-150 hover:bg-current/5 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--accent) active:scale-[0.97]\"\n          >\n            <TrainGlyph className=\"h-3 w-auto\" />\n            {TRAIN_CTA}\n          </button>\n        </div>\n        <p className=\"mt-5 flex flex-wrap justify-center gap-x-2 font-mono text-[11px] tracking-[0.14em] uppercase tabular-nums opacity-55\">\n          {NEXT_TRAIN.map((part, i) => (\n            // On a phone the last fact drops, so the line never wraps on a dot.\n            <span key={part} className={i === NEXT_TRAIN.length - 1 ? \"hidden whitespace-nowrap sm:inline\" : \"whitespace-nowrap\"}>\n              {i > 0 && <span aria-hidden className=\"text-(--signal)\">· </span>}\n              {part}\n            </span>\n          ))}\n        </p>\n      </div>\n\n      <Skyline\n        seed={CITY.seed}\n        sun={CITY.sun}\n        train\n        headway={CITY.headway}\n        departures={trains}\n        className=\"mt-6 h-[clamp(13rem,38svh,21rem)] sm:mt-4 dark:text-(--night-towers) dark:[--skyline-light:var(--night-windows)]\"\n      />\n    </section>\n  );\n}\n\n/* ── Marks ───────────────────────────────────────────────── */\n\n/** A milepost: a plate on a short post. */\nfunction MilepostMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 18 22\" fill=\"none\" aria-hidden className={className}>\n      <rect x=\"1\" y=\"1\" width=\"16\" height=\"11\" rx=\"2\" stroke=\"currentColor\" strokeWidth=\"1.6\" />\n      <path d=\"M5 6.5h8\" stroke=\"var(--signal)\" strokeWidth=\"2.2\" strokeLinecap=\"round\" />\n      <path d=\"M9 12v9\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n    </svg>\n  );\n}\n\nfunction TrainGlyph({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 22 12\" fill=\"none\" aria-hidden className={className}>\n      <path\n        d=\"M1.5 2.5a1.5 1.5 0 0 1 1.5-1.5h12c3 0 5.5 2.6 5.5 5.5v1A1.5 1.5 0 0 1 19 9H3a1.5 1.5 0 0 1-1.5-1.5Z\"\n        stroke=\"currentColor\"\n        strokeWidth=\"1.4\"\n      />\n      <path d=\"M4 4.5h7\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" />\n      <path d=\"M5 11h3m6 0h3\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" />\n    </svg>\n  );\n}\n"
    }
  ]
}