{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"marketing-hero-sections-particles-background-hero","type":"registry:block","title":"Particles Background Hero","files":[{"path":"components/blocks/marketing/hero-sections/particles-background-hero.tsx","content":"import { useEffect, useRef } from 'react';\n\nimport { Button } from '@/components/ui/button';\nimport { ArrowRight, ExternalLink } from 'lucide-react';\n\nexport default function ParticlesBackgroundHero() {\n  const canvasRef = useRef<HTMLCanvasElement | null>(null);\n  const particlesRef = useRef<Particle[]>([]);\n  const mouseRef = useRef<{ x: number | null; y: number | null }>({\n    x: null,\n    y: null,\n  });\n  const animationFrameRef = useRef<number>(0);\n\n  interface Particle {\n    x: number;\n    y: number;\n    size: number;\n    speedX: number;\n    speedY: number;\n    color: string;\n    alpha: number;\n  }\n\n  useEffect(() => {\n    const canvas = canvasRef.current;\n    if (!canvas) return;\n\n    const ctx = canvas.getContext('2d');\n    if (!ctx) return;\n\n    const resizeCanvas = () => {\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n      initParticles();\n    };\n\n    const initParticles = () => {\n      particlesRef.current = [];\n      const particleCount = Math.min(Math.floor(window.innerWidth / 10), 150);\n      const colors = ['#3B82F6', '#8B5CF6', '#6366F1', '#EC4899'];\n\n      for (let i = 0; i < particleCount; i++) {\n        const size = Math.random() * 5 + 1;\n        const x = Math.random() * canvas.width;\n        const y = Math.random() * canvas.height;\n        const speedX = Math.random() * 1 - 0.5;\n        const speedY = Math.random() * 1 - 0.5;\n        const color = colors[Math.floor(Math.random() * colors.length)]!;\n        const alpha = Math.random() * 0.5 + 0.1;\n\n        particlesRef.current.push({\n          x,\n          y,\n          size,\n          speedX,\n          speedY,\n          color,\n          alpha,\n        });\n      }\n    };\n\n    const drawParticles = () => {\n      ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n      particlesRef.current.forEach((particle) => {\n        ctx.beginPath();\n        ctx.arc(particle.x, particle.y, particle.size, 0, Math.PI * 2);\n        ctx.fillStyle = `${particle.color}${Math.floor(particle.alpha * 255)\n          .toString(16)\n          .padStart(2, '0')}`;\n        ctx.fill();\n\n        // Update position\n        particle.x += particle.speedX;\n        particle.y += particle.speedY;\n\n        // Bounce off edges\n        if (particle.x < 0 || particle.x > canvas.width) {\n          particle.speedX *= -1;\n        }\n\n        if (particle.y < 0 || particle.y > canvas.height) {\n          particle.speedY *= -1;\n        }\n\n        // Connect particles\n        connectParticles(particle);\n\n        // Mouse interaction\n        if (mouseRef.current.x !== null && mouseRef.current.y !== null) {\n          const dx = mouseRef.current.x - particle.x;\n          const dy = mouseRef.current.y - particle.y;\n          const distance = Math.sqrt(dx * dx + dy * dy);\n          const maxDistance = 150;\n\n          if (distance < maxDistance) {\n            const force = (maxDistance - distance) / maxDistance;\n            const directionX = dx / distance || 0;\n            const directionY = dy / distance || 0;\n            particle.x -= directionX * force * 2;\n            particle.y -= directionY * force * 2;\n          }\n        }\n      });\n\n      animationFrameRef.current = requestAnimationFrame(drawParticles);\n    };\n\n    const connectParticles = (p1: Particle) => {\n      particlesRef.current.forEach((p2) => {\n        if (p1 === p2) return;\n\n        const dx = p1.x - p2.x;\n        const dy = p1.y - p2.y;\n        const distance = Math.sqrt(dx * dx + dy * dy);\n        const maxDistance = 150;\n\n        if (distance < maxDistance) {\n          const opacity = 1 - distance / maxDistance;\n          ctx.beginPath();\n          ctx.moveTo(p1.x, p1.y);\n          ctx.lineTo(p2.x, p2.y);\n          ctx.strokeStyle = `rgba(200, 200, 255, ${opacity * 0.15})`;\n          ctx.lineWidth = 1;\n          ctx.stroke();\n        }\n      });\n    };\n\n    const handleMouseMove = (e: MouseEvent) => {\n      mouseRef.current = { x: e.clientX, y: e.clientY };\n    };\n\n    const handleMouseLeave = () => {\n      mouseRef.current = { x: null, y: null };\n    };\n\n    // Initialize\n    resizeCanvas();\n    window.addEventListener('resize', resizeCanvas);\n    window.addEventListener('mousemove', handleMouseMove);\n    window.addEventListener('mouseleave', handleMouseLeave);\n\n    drawParticles();\n\n    return () => {\n      window.removeEventListener('resize', resizeCanvas);\n      window.removeEventListener('mousemove', handleMouseMove);\n      window.removeEventListener('mouseleave', handleMouseLeave);\n      cancelAnimationFrame(animationFrameRef.current);\n    };\n  }, []);\n\n  return (\n    <div className=\"relative flex min-h-[80vh] items-center justify-center overflow-hidden\">\n      {/* Particle background */}\n      <canvas\n        ref={canvasRef}\n        className=\"absolute inset-0 -z-10 h-full w-full\"\n      />\n\n      <div className=\"to-background absolute top-0 right-0 left-0 -z-10 h-[80vh] bg-gradient-to-b from-transparent via-transparent\"></div>\n\n      {/* Content */}\n      <div className=\"relative z-10 container mx-auto px-4 md:px-6 2xl:max-w-[1400px]\">\n        <div className=\"flex flex-col items-center space-y-10 py-20 text-center\">\n          <div>\n            <div className=\"border-primary/20 bg-primary/10 text-primary mb-6 inline-flex items-center rounded-full border px-3 py-1 text-sm font-semibold\">\n              Launching Soon — Join the Waitlist\n            </div>\n            <h1 className=\"mb-4 max-w-4xl text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl lg:text-7xl\">\n              The <span className=\"text-primary\">next generation</span> of web\n              development\n            </h1>\n            <p className=\"text-muted-foreground mx-auto max-w-[700px] md:text-xl\">\n              Build stunning websites and applications with our innovative\n              platform. Faster development, better performance, amazing results.\n            </p>\n          </div>\n\n          <div className=\"flex flex-col gap-4 sm:flex-row\">\n            <Button size=\"lg\" asChild>\n              <a href=\"#\">\n                Get Early Access\n                <ArrowRight className=\"ml-2 h-4 w-4\" />\n              </a>\n            </Button>\n            <Button size=\"lg\" variant=\"outline\" className=\"gap-2\" asChild>\n              <a href=\"#\">\n                Watch Demo\n                <ExternalLink className=\"h-4 w-4\" />\n              </a>\n            </Button>\n          </div>\n\n          <div className=\"mt-16 flex flex-col items-center\">\n            <div className=\"mb-6 text-base font-medium\">\n              Trusted by innovative teams\n            </div>\n            <div className=\"flex flex-wrap justify-center gap-x-12 gap-y-6\">\n              {/* Company logos */}\n              <div className=\"text-muted-foreground/50 h-8 w-auto\">\n                <svg\n                  className=\"h-full w-auto\"\n                  viewBox=\"0 0 124 34\"\n                  fill=\"currentColor\"\n                >\n                  <path d=\"M42.1 15.1c0 3.2-2.7 5.9-7.1 5.9h-4.3v5.8h-4.5V9.4h8.8c4.3 0 7.1 2.5 7.1 5.7zm-4.7 0c0-1.3-1.2-2.2-2.7-2.2h-4v4.4h4c1.5 0 2.7-.9 2.7-2.2zM43.1 26.8V9.4h15.6v3.7h-11v3.3h9.6v3.7h-9.6v3h11v3.7H43.1zM59.5 26.8l10-17.5H76l10 17.5h-5.2L79 23.4h-7.9l-1.9 3.4h-9.7zm11.7-6.9h4.2l-2.1-3.8-2.1 3.8zM111.6 26.8l-4.5-5.7-4.5 5.7h-5.5l7.2-8.8-6.7-8.7h5.5l4.1 5.3 4.1-5.3h5.4l-6.7 8.7 7.2 8.8h-5.6zM89.8 13.5c-3.4 0-5.8 2.7-5.8 5.9 0 3.3 2.4 5.9 5.8 5.9 3.5 0 5.9-2.6 5.9-5.9 0-3.2-2.4-5.9-5.9-5.9zm0-4.1c6 0 10.5 4.3 10.5 10s-4.4 10-10.5 10c-6 0-10.4-4.3-10.4-10s4.4-10 10.4-10zM6 9.4V7l18 7.8v2.8L6 25v-2.6l14.2-5.9-14.2-7.1z\" />\n                </svg>\n              </div>\n              <div className=\"text-muted-foreground/50 h-8 w-auto\">\n                <svg\n                  className=\"h-full w-auto\"\n                  viewBox=\"0 0 139 34\"\n                  fill=\"currentColor\"\n                >\n                  <path d=\"M52.1 18.4V16h5.5v8.4c-1.3.9-3.6 1.7-5.8 1.7-5.6 0-9.4-4-9.4-9.4 0-5.3 3.9-9.4 9.7-9.4 2.8 0 4.9.9 6.4 2.4l-1.9 2.8c-1.1-1.1-2.3-1.7-4.1-1.7-3.3 0-5.7 2.5-5.7 5.9 0 3.5 2.5 5.9 5.8 5.9 1 0 2.1-.2 3-1v-3.2h-3.5zM79.9 25.9h-3.9V16h-5.5v9.9h-3.9V7.6h3.9v5.1h5.5V7.6h3.9v18.3zM91.3 26c-3.2 0-5.2-1.4-5.2-4.3v-10h-2.2V9.2h2.2V6.1h3.7v3.1h3.5v2.6h-3.5v9.5c0 1.1.6 1.7 1.6 1.7.7 0 1.2-.2 1.6-.5l.9 2.9c-.9.3-1.7.6-3.6.6zM105.2 7.6h4.1L101.4 32h-4.1l7.9-24.4zM114.7 9.2h-4V5.7h4v3.5zm-.1 16.7h-3.7V11.8h3.7v14.1zM126.8 25.9V15.4c0-1.7-1-2.4-2.4-2.4-1.5 0-2.7.9-3.5 1.9v11h-3.7V11.8h3.7v1.9c1.1-1.3 2.9-2.2 5-2.2 3.1 0 4.7 1.8 4.7 4.4v10.1h-3.8z\" />\n                  <path d=\"M7.2 2.8H30l-7.4 12.8L30 28.3H7.2l3.7-12.8L7.2 2.8z\" />\n                </svg>\n              </div>\n              <div className=\"text-muted-foreground/50 h-8 w-auto\">\n                <svg\n                  className=\"h-full w-auto\"\n                  viewBox=\"0 0 180 34\"\n                  fill=\"currentColor\"\n                >\n                  <path d=\"M46.1 24c-2.6 0-4.6-.8-6-2.5-1.4-1.7-2.1-3.9-2.1-6.7 0-3 .8-5.3 2.4-7 1.6-1.7 3.8-2.6 6.6-2.6 2.6 0 4.5.8 5.9 2.3 1.4 1.5 2.1 3.6 2.1 6.1v2.2H42.3c.1 1.8.5 3.1 1.4 4 .9.9 2.2 1.3 3.8 1.3 1.1 0 2.1-.1 3-.3.9-.2 1.9-.5 3-.9V23c-1.1.5-2.1.8-3 1-1 .1-2.1.2-3.4.2zm-.7-15.6c-1.2 0-2.2.4-2.9 1.1-.7.8-1.1 1.9-1.2 3.4h8.1c0-1.5-.4-2.6-1.1-3.4-.8-.7-1.7-1.1-2.9-1.1zm20.5-4.6c.9 0 1.8.1 2.4.2l-.5 3.8c-.7-.1-1.3-.2-1.9-.2-1.4 0-2.5.4-3.4 1.3s-1.3 2.1-1.3 3.6V24h-4.1V4.1h3.1l.6 3.3h.2c.6-1.1 1.3-2 2.2-2.6.8-.7 1.8-1 2.7-1zm16.3 20.2c-2.7 0-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 13.7-13.7 13.7-3.7 0-7-1.6-9.4-4.1l-.1-.2-5.7 5.7-.1-.1C3.9 28.9 1 24.7 1 19.8c0-4.9 2.9-9.1 7.1-11l.2-.1 5.4 5.4z\" />\n                </svg>\n              </div>\n              <div className=\"text-muted-foreground/50 h-8 w-auto\">\n                <svg\n                  className=\"h-full w-auto\"\n                  viewBox=\"0 0 133 34\"\n                  fill=\"currentColor\"\n                >\n                  <path\n                    d=\"M26.3 1h80.4c7.1 0 12.9 5.8 12.9 12.9v5.1c0 7.1-5.8 12.9-12.9 12.9H26.3c-7.1 0-12.9-5.8-12.9-12.9v-5.1C13.4 6.8 19.2 1 26.3 1z\"\n                    fillOpacity=\".3\"\n                  />\n                  <path\n                    d=\"M26.3 1h80.4c7.1 0 12.9 5.8 12.9 12.9v5.1c0 7.1-5.8 12.9-12.9 12.9H26.3c-7.1 0-12.9-5.8-12.9-12.9v-5.1C13.4 6.8 19.2 1 26.3 1z\"\n                    fillOpacity=\".3\"\n                  />\n                  <path d=\"M35.1 24c-3.2 0-5.6-.8-7.1-2.4s-2.3-4-2.3-7.2V5.5h4.8v8.8c0 1.9.3 3.3 1 4.2.7.9 1.9 1.3 3.6 1.3 1.6 0 2.9-.4 3.6-1.3.7-.9 1.1-2.3 1.1-4.2V5.5h4.6v8.9c0 3.1-.8 5.5-2.3 7.1-1.5 1.6-3.8 2.5-7 2.5zM56.4 24c-2.5 0-4.5-.6-5.9-1.7-1.4-1.1-2.1-2.8-2.1-4.8 0-2.2.8-3.8 2.3-4.9 1.5-1.1 3.8-1.7 6.8-1.7 1.5 0 2.9.1 4.3.4v-.5c0-1.2-.3-2-.9-2.6-.6-.6-1.5-.9-2.6-.9-1 0-2 .1-3 .4-.9.3-1.9.6-3 1l-1.4-3.4c1.2-.6 2.5-1 3.8-1.3 1.3-.3 2.6-.5 4-.5 2.7 0 4.7.6 6.1 1.9s2.1 3.1 2.1 5.6V24h-3.6l-.3-1.8h-.1c-.9.7-1.9 1.3-2.9 1.6-1.1.2-2.3.4-3.6.2zm1.4-3.6c1 0 1.8-.2 2.5-.6.7-.4 1.4-.9 2-1.6v-2.4c-1.1-.2-2.2-.3-3.5-.3-1.5 0-2.6.3-3.2.8-.7.5-1 1.2-1 2 0 .7.3 1.3.8 1.7s1.3.5 2.4.4zM72.3 8.9h3.9L76.5 11h.2c.7-.7 1.5-1.3 2.4-1.8.9-.4 1.8-.7 2.9-.7 2.2 0 3.8.7 4.9 2.1 1.1 1.4 1.7 3.4 1.7 6.1V24h-4.6v-6.6c0-1.7-.3-2.9-.8-3.6-.5-.7-1.3-1.1-2.4-1.1-1.5 0-2.8.7-3.9 2V24h-4.6V8.9z\" />\n                  <path d=\"M103.1 8.5c.6 0 1.1.1 1.6.2l-.5 4.5c-.4-.1-.9-.2-1.3-.2-1.2 0-2.2.4-3 1.2-.8.8-1.2 1.9-1.2 3.3V24h-4.6V8.9h3.6l.5 2.8h.2c.5-1 1.1-1.7 1.9-2.3.7-.6 1.6-.9 2.8-.9zM113 24.3c-2.5 0-4.4-.8-5.9-2.5-1.4-1.7-2.2-3.9-2.2-6.8 0-3 .7-5.3 2.2-7 1.5-1.7 3.4-2.5 5.9-2.5s4.5.8 6.1 2.3c1.5 1.5 2.3 3.8 2.3 6.7v1.7h-11.4c.1 1.5.5 2.7 1.2 3.5.8.8 1.8 1.2 3.1 1.2.9 0 1.8-.1 2.6-.3.8-.2 1.7-.5 2.6-.9v3.7c-.8.4-1.7.6-2.6.8-.9.1-1.9.1-3.9.1zm-.1-15.1c-.9 0-1.6.3-2.2.9-.5.6-.9 1.5-1 2.7h6.3c0-1.1-.3-2-.8-2.6-.4-.7-1.3-1-2.3-1z\" />\n                </svg>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/blocks/marketing/hero-sections/particles-background-hero.tsx"},{"path":"components/ui/button.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n        outline:\n          \"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default:\n          \"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        xs: \"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n        sm: \"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5\",\n        lg: \"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        icon: \"size-9\",\n        \"icon-xs\":\n          \"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-sm\":\n          \"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md\",\n        \"icon-lg\": \"size-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n","type":"registry:ui","target":"components/ui/button.tsx"}],"description":"A hero with animated particles drifting behind a centered headline and CTA. A dynamic, tech forward opener for software and startup landing pages.","dependencies":["class-variance-authority","lucide-react","radix-ui"]}