{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-section-11",
  "type": "registry:block",
  "title": "Hero Section 11",
  "description": "Warm split hero with a rotating headline word, fanned photo cards that spread on hover, an animated stat counter and a logo marquee.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "app/preview/hero-section/eleven/page.tsx",
      "content": "'use client'\n\nimport { useEffect, useState } from 'react'\nimport Link from 'next/link'\nimport { Fraunces } from 'next/font/google'\nimport { AnimatePresence, animate, motion, useMotionValue, useReducedMotion, useTransform } from 'motion/react'\nimport { ArrowUpRight, Star } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst display = Fraunces({ subsets: ['latin'], weight: ['500', '600'], style: ['normal', 'italic'] })\n\nconst words = [\n    { text: 'founders', color: '#e8553d' },\n    { text: 'creators', color: '#d97706' },\n    { text: 'agencies', color: '#db2777' },\n    { text: 'dreamers', color: '#0f766e' },\n]\n\nconst photos = [\n    'https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=700&q=80',\n    'https://images.unsplash.com/photo-1600880292203-757bb62b4baf?auto=format&fit=crop&w=700&q=80',\n    'https://images.unsplash.com/photo-1531482615713-2afd69097998?auto=format&fit=crop&w=700&q=80',\n]\n\nconst avatars = [\n    'https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&w=96&h=96&q=80',\n    'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=96&h=96&q=80',\n    'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&w=96&h=96&q=80',\n]\n\nconst logos = ['Northwind', 'Lumen', 'Basecamp Co.', 'Orbit', 'Fieldnote', 'Kite & Key', 'Saltworks', 'Parallel']\n\nconst ease = [0.22, 1, 0.36, 1] as const\n\n// Fan of cards: resting pose and the spread pose on hover.\nconst fan = [\n    { rest: { rotate: -10, x: -40, y: 20 }, spread: { rotate: -16, x: -120, y: 30 } },\n    { rest: { rotate: 4, x: 30, y: -10 }, spread: { rotate: 0, x: 0, y: -24 } },\n    { rest: { rotate: 12, x: 90, y: 40 }, spread: { rotate: 18, x: 130, y: 50 } },\n]\n\nexport default function HeroSection() {\n    const reduce = useReducedMotion()\n    const [index, setIndex] = useState(0)\n    const [hover, setHover] = useState(false)\n\n    useEffect(() => {\n        if (reduce) return\n        const id = setInterval(() => setIndex((i) => (i + 1) % words.length), 2200)\n        return () => clearInterval(id)\n    }, [reduce])\n\n    const current = words[index]\n\n    return (\n        <section className=\"relative isolate overflow-hidden bg-[#fff6ec] text-[#2a1710]\">\n            <div\n                aria-hidden\n                className=\"absolute inset-0 -z-10\">\n                <div className=\"absolute -right-40 -top-40 size-[40rem] rounded-full bg-[radial-gradient(circle,#ffc9a8,transparent_65%)]\" />\n                <div className=\"absolute -bottom-60 -left-40 size-[36rem] rounded-full bg-[radial-gradient(circle,#ffd6e3,transparent_65%)]\" />\n                <div className=\"absolute inset-0 bg-[radial-gradient(#2a171012_1px,transparent_1px)] [background-size:22px_22px]\" />\n            </div>\n\n            <div className=\"mx-auto grid max-w-6xl items-center gap-16 px-6 pb-16 pt-24 md:pt-32 lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]\">\n                <div>\n                    <motion.p\n                        initial={{ opacity: 0, y: 12 }}\n                        animate={{ opacity: 1, y: 0 }}\n                        transition={{ duration: 0.6, ease }}\n                        className=\"inline-flex items-center gap-2 rounded-full border border-[#2a1710]/10 bg-white/70 px-3 py-1 text-sm backdrop-blur\">\n                        <span className=\"relative flex size-2\">\n                            <span className=\"absolute inline-flex size-full rounded-full bg-[#e8553d] opacity-60 motion-safe:animate-ping\" />\n                            <span className=\"relative inline-flex size-2 rounded-full bg-[#e8553d]\" />\n                        </span>\n                        Now booking spring projects\n                    </motion.p>\n\n                    <motion.h1\n                        initial={{ opacity: 0, y: 24 }}\n                        animate={{ opacity: 1, y: 0 }}\n                        transition={{ delay: 0.1, duration: 0.8, ease }}\n                        className={cn(display.className, 'mt-6 text-5xl font-medium leading-[1.02] tracking-[-0.02em] sm:text-6xl lg:text-7xl')}>\n                        Websites that win over{' '}\n                        <span className=\"relative inline-grid h-[1.1em] overflow-hidden align-bottom\">\n                            {/* Invisible longest word reserves the width so the line never jumps. */}\n                            <span\n                                aria-hidden\n                                className=\"invisible col-start-1 row-start-1 italic\">\n                                dreamers.\n                            </span>\n                            <AnimatePresence\n                                mode=\"popLayout\"\n                                initial={false}>\n                                <motion.span\n                                    key={current.text}\n                                    initial={{ y: '100%', opacity: 0 }}\n                                    animate={{ y: 0, opacity: 1 }}\n                                    exit={{ y: '-100%', opacity: 0 }}\n                                    transition={{ duration: 0.6, ease }}\n                                    style={{ color: current.color }}\n                                    className=\"col-start-1 row-start-1 italic\">\n                                    {current.text}.\n                                </motion.span>\n                            </AnimatePresence>\n                        </span>\n                    </motion.h1>\n\n                    <motion.p\n                        initial={{ opacity: 0, y: 16 }}\n                        animate={{ opacity: 1, y: 0 }}\n                        transition={{ delay: 0.25, duration: 0.8, ease }}\n                        className=\"mt-6 max-w-lg text-pretty text-lg text-[#2a1710]/70\">\n                        A small studio designing warm, fast, conversion-focused sites. Strategy, design and build, delivered in six weeks.\n                    </motion.p>\n\n                    <motion.div\n                        initial={{ opacity: 0, y: 16 }}\n                        animate={{ opacity: 1, y: 0 }}\n                        transition={{ delay: 0.4, duration: 0.8, ease }}\n                        className=\"mt-9 flex flex-wrap items-center gap-3\">\n                        <Link\n                            href=\"#\"\n                            className=\"group inline-flex h-12 items-center gap-2 rounded-full bg-[#e8553d] px-6 font-medium text-white shadow-[0_12px_30px_-10px_#e8553d] transition-all hover:-translate-y-0.5 hover:bg-[#d94a33]\">\n                            Book a discovery call\n                            <ArrowUpRight className=\"size-4 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5\" />\n                        </Link>\n                        <Link\n                            href=\"#\"\n                            className=\"inline-flex h-12 items-center rounded-full px-5 font-medium underline decoration-[#e8553d]/40 decoration-2 underline-offset-[6px] transition-colors hover:decoration-[#e8553d]\">\n                            See our work\n                        </Link>\n                    </motion.div>\n\n                    <motion.div\n                        initial={{ opacity: 0 }}\n                        animate={{ opacity: 1 }}\n                        transition={{ delay: 0.6, duration: 0.8 }}\n                        className=\"mt-10 flex items-center gap-4\">\n                        <div className=\"flex -space-x-3\">\n                            {avatars.map((src) => (\n                                <img\n                                    key={src}\n                                    src={src}\n                                    alt=\"\"\n                                    className=\"size-10 rounded-full border-2 border-[#fff6ec] object-cover\"\n                                />\n                            ))}\n                        </div>\n                        <div className=\"text-sm\">\n                            <div\n                                className=\"flex gap-0.5 text-[#f59e0b]\"\n                                aria-label=\"Rated 5 out of 5\">\n                                {Array.from({ length: 5 }).map((_, i) => (\n                                    <Star\n                                        key={i}\n                                        className=\"size-4 fill-current\"\n                                    />\n                                ))}\n                            </div>\n                            <p className=\"mt-0.5 text-[#2a1710]/70\">Loved by 120+ teams</p>\n                        </div>\n                    </motion.div>\n                </div>\n\n                {/* Fanned photo cards that spread on hover */}\n                <div\n                    className=\"relative mx-auto h-[26rem] w-full max-w-md sm:h-[30rem]\"\n                    onMouseEnter={() => setHover(true)}\n                    onMouseLeave={() => setHover(false)}>\n                    {photos.map((src, i) => (\n                        <motion.div\n                            key={src}\n                            initial={{ opacity: 0, y: 80, rotate: 0 }}\n                            animate={{ opacity: 1, ...(hover && !reduce ? fan[i].spread : fan[i].rest) }}\n                            transition={{ type: 'spring', stiffness: 120, damping: 16, delay: hover ? 0 : 0.3 + i * 0.12 }}\n                            className=\"absolute left-1/2 top-1/2 -ml-[7.5rem] -mt-[10rem] h-[20rem] w-[15rem] overflow-hidden rounded-3xl border-[6px] border-white bg-white shadow-[0_30px_60px_-20px_rgb(42_23_16/0.35)]\"\n                            style={{ zIndex: i === 1 ? 3 : i }}>\n                            <img\n                                src={src}\n                                alt=\"\"\n                                className=\"size-full rounded-[1.1rem] object-cover\"\n                            />\n                        </motion.div>\n                    ))}\n\n                    <motion.div\n                        initial={{ opacity: 0, scale: 0.8, y: 20 }}\n                        animate={{ opacity: 1, scale: 1, y: 0 }}\n                        transition={{ delay: 1, type: 'spring', stiffness: 180, damping: 16 }}\n                        className=\"absolute -bottom-2 left-0 z-10 rounded-2xl bg-[#2a1710] px-5 py-4 text-white shadow-2xl sm:left-2\">\n                        <p className=\"text-xs text-white/60\">Avg. conversion lift</p>\n                        <p className={cn(display.className, 'text-3xl font-semibold')}>\n                            +<Counter to={38} />%\n                        </p>\n                    </motion.div>\n\n                    <motion.div\n                        initial={{ opacity: 0, scale: 0.6 }}\n                        animate={{ opacity: 1, scale: 1 }}\n                        transition={{ delay: 1.2, type: 'spring', stiffness: 200, damping: 14 }}\n                        className=\"absolute -right-2 top-4 z-10 flex size-20 items-center justify-center rounded-full bg-[#ffcf4a] text-center text-xs font-semibold leading-tight shadow-xl sm:right-0\">\n                        6-week\n                        <br />\n                        launch\n                    </motion.div>\n                </div>\n            </div>\n\n            {/* Logo marquee */}\n            <div className=\"border-t border-[#2a1710]/10 py-6 [mask-image:linear-gradient(to_right,transparent,#000_15%,#000_85%,transparent)]\">\n                <div className=\"flex w-max gap-14 motion-safe:animate-[hero11-marquee_30s_linear_infinite]\">\n                    {[...logos, ...logos].map((name, i) => (\n                        <span\n                            key={i}\n                            aria-hidden={i >= logos.length}\n                            className={cn(display.className, 'whitespace-nowrap text-xl font-medium text-[#2a1710]/40')}>\n                            {name}\n                        </span>\n                    ))}\n                </div>\n            </div>\n            <style>{`@keyframes hero11-marquee { to { transform: translateX(-50%); } }`}</style>\n        </section>\n    )\n}\n\nfunction Counter({ to }: { to: number }) {\n    const value = useMotionValue(0)\n    const rounded = useTransform(value, (v) => Math.round(v))\n    const [n, setN] = useState(0)\n\n    useEffect(() => {\n        const controls = animate(value, to, { duration: 1.6, delay: 1.1, ease: 'easeOut' })\n        const unsub = rounded.on('change', setN)\n        return () => {\n            controls.stop()\n            unsub()\n        }\n    }, [to, value, rounded])\n\n    return <span className=\"tabular-nums\">{n}</span>\n}\n",
      "type": "registry:component",
      "target": "components/hero-section-11.tsx"
    }
  ]
}