{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"neo-brutalist-hero-with-sticker-headline-and-shifting-hard-shadows","type":"registry:block","title":"Neo-Brutalist Hero with Sticker Headline and Shifting Hard Shadows","description":"Neo-brutalist hero with sticker words that slap on, wobbling badges and hard shadows that follow the pointer. Free React and Tailwind code, or HTML.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/neo-brutalist-hero-with-sticker-headline-and-shifting-hard-shadows.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\n\nconst K = \"neo-brutalist-hero-with-sticker-headline-and-shifting-hard-shadows\";\n\n// Each headline word is its own sticker: a fill colour and a resting tilt in degrees.\nconst words = [\n  { text: \"Print\", fill: \"#ffffff\", tilt: -4 },\n  { text: \"loud.\", fill: \"#ff5fa2\", tilt: 3 },\n  { text: \"Stick\", fill: \"#38d6ff\", tilt: -2 },\n  { text: \"it\", fill: \"#ffffff\", tilt: 6 },\n  { text: \"anywhere.\", fill: \"#7df08f\", tilt: -3 },\n];\n\nconst facts = [\"Weatherproof vinyl\", \"From 25 pieces\", \"Ships in 48 hours\"];\n\n// A sixteen-point seal for the round offer badge.\nconst seal = Array.from({ length: 32 }, (_, i) => {\n  const r = i % 2 === 0 ? 50 : 42;\n  const a = (i / 32) * Math.PI * 2;\n  return `${(50 + Math.cos(a) * r).toFixed(1)},${(50 + Math.sin(a) * r).toFixed(1)}`;\n}).join(\" \");\n\nconst sheet = [\n  { id: \"smile\", fill: \"#ffe14d\" },\n  { id: \"bolt\", fill: \"#38d6ff\" },\n  { id: \"heart\", fill: \"#ff5fa2\" },\n  { id: \"eye\", fill: \"#ffffff\" },\n  { id: \"flower\", fill: \"#7df08f\" },\n  { id: \"ok\", fill: \"#ff8a3d\" },\n];\n\nfunction Art({ id }: { id: string }) {\n  const s = { stroke: \"#111\", strokeWidth: 3, strokeLinejoin: \"round\" as const, strokeLinecap: \"round\" as const };\n  if (id === \"smile\")\n    return (\n      <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n        <circle cx=\"24\" cy=\"24\" r=\"17\" fill=\"#fff\" {...s} />\n        <circle cx=\"18\" cy=\"20\" r=\"2.4\" fill=\"#111\" />\n        <circle cx=\"30\" cy=\"20\" r=\"2.4\" fill=\"#111\" />\n        <path d=\"M16 27c2 5 14 5 16 0\" fill=\"none\" {...s} />\n      </svg>\n    );\n  if (id === \"bolt\")\n    return (\n      <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n        <path d=\"M28 5 11 27h11l-3 16 18-23H25z\" fill=\"#ffe14d\" {...s} />\n      </svg>\n    );\n  if (id === \"heart\")\n    return (\n      <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n        <path d=\"M24 40C6 28 8 12 17 11c4 0 6 3 7 5 1-2 3-5 7-5 9 1 11 17-7 29z\" fill=\"#fff\" {...s} />\n      </svg>\n    );\n  if (id === \"eye\")\n    return (\n      <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n        <path d=\"M5 24c8-14 30-14 38 0-8 14-30 14-38 0z\" fill=\"#38d6ff\" {...s} />\n        <circle cx=\"24\" cy=\"24\" r=\"6\" fill=\"#111\" />\n      </svg>\n    );\n  if (id === \"flower\")\n    return (\n      <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n        {[0, 60, 120, 180, 240, 300].map((d) => (\n          <circle key={d} cx=\"24\" cy=\"11\" r=\"7\" fill=\"#fff\" {...s} transform={`rotate(${d} 24 24)`} />\n        ))}\n        <circle cx=\"24\" cy=\"24\" r=\"6\" fill=\"#ff5fa2\" {...s} />\n      </svg>\n    );\n  return (\n    <svg viewBox=\"0 0 48 48\" className=\"h-full w-full\" aria-hidden=\"true\">\n      <rect x=\"6\" y=\"13\" width=\"36\" height=\"22\" rx=\"11\" fill=\"#fff\" {...s} />\n      <text x=\"24\" y=\"29.5\" textAnchor=\"middle\" fontSize=\"13\" fontWeight=\"900\" fill=\"#111\" fontFamily=\"inherit\">\n        OK!\n      </text>\n    </svg>\n  );\n}\n\nexport default function NeoBrutalistHeroWithStickerHeadlineAndShiftingHardShadows() {\n  const reduce = useReducedMotion();\n  const ref = useRef<HTMLElement>(null);\n\n  // One loop moves every hard shadow. Idle, the light swings side to side; with a pointer over\n  // the hero the shadows fall away from it. SWING and REACH below set how far they travel.\n  useEffect(() => {\n    const el = ref.current;\n    if (!el || reduce) return;\n    const SWING = 10;\n    const REACH = 30;\n    let raf = 0;\n    let running = false;\n    let onScreen = true;\n    let px: number | null = null;\n    let py = 0;\n    let cx = 8;\n    let cy = 8;\n    const frame = (t: number) => {\n      const a = t / 900;\n      const tx = px === null ? Math.cos(a) * SWING : px;\n      const ty = px === null ? 8 + Math.sin(a * 2) * 2.5 : py;\n      cx += (tx - cx) * 0.12;\n      cy += (ty - cy) * 0.12;\n      el.style.setProperty(\"--sx\", cx.toFixed(2));\n      el.style.setProperty(\"--sy\", cy.toFixed(2));\n      raf = requestAnimationFrame(frame);\n    };\n    const sync = () => {\n      const want = onScreen && !document.hidden;\n      if (want && !running) {\n        running = true;\n        raf = requestAnimationFrame(frame);\n      } else if (!want && running) {\n        running = false;\n        cancelAnimationFrame(raf);\n      }\n    };\n    const move = (e: PointerEvent) => {\n      const r = el.getBoundingClientRect();\n      px = -((e.clientX - r.left) / r.width - 0.5) * REACH;\n      py = -((e.clientY - r.top) / r.height - 0.5) * REACH * 0.8;\n    };\n    const leave = () => {\n      px = null;\n    };\n    const io = new IntersectionObserver(([entry]) => {\n      onScreen = entry.isIntersecting;\n      sync();\n    });\n    io.observe(el);\n    el.addEventListener(\"pointermove\", move);\n    el.addEventListener(\"pointerleave\", leave);\n    el.addEventListener(\"pointercancel\", leave);\n    document.addEventListener(\"visibilitychange\", sync);\n    sync();\n    return () => {\n      cancelAnimationFrame(raf);\n      io.disconnect();\n      el.removeEventListener(\"pointermove\", move);\n      el.removeEventListener(\"pointerleave\", leave);\n      el.removeEventListener(\"pointercancel\", leave);\n      document.removeEventListener(\"visibilitychange\", sync);\n    };\n  }, [reduce]);\n\n  return (\n    <section ref={ref} className={`${K} relative overflow-hidden bg-[#ffe14d] px-5 py-16 text-[#111] sm:px-8 sm:py-24`}>\n      <style>{`\n        .${K} { --sx: 8; --sy: 8; background-image: radial-gradient(rgba(17,17,17,0.16) 1.5px, transparent 1.6px); background-size: 22px 22px; }\n        .${K}-sh { box-shadow: calc(var(--sx) * 1px) calc(var(--sy) * 1px) 0 0 #111; }\n        .${K}-sh-lg { box-shadow: calc(var(--sx) * 1.7px) calc(var(--sy) * 1.7px) 0 0 #111; }\n        .${K}-drop { filter: drop-shadow(calc(var(--sx) * 0.8px) calc(var(--sy) * 0.8px) 0 #111); }\n        .${K}-btn { transition: transform 0.12s ease, box-shadow 0.12s ease; }\n        .${K}-btn:hover { transform: translate(calc(var(--sx) * 0.5px), calc(var(--sy) * 0.5px)); box-shadow: calc(var(--sx) * 0.5px) calc(var(--sy) * 0.5px) 0 0 #111; }\n        .${K}-btn:active { transform: translate(calc(var(--sx) * 1px), calc(var(--sy) * 1px)); box-shadow: 0 0 0 0 #111; }\n        @keyframes ${K}-wobble { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(8deg); } }\n        @keyframes ${K}-nod { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-4px); } }\n        .${K}-wobble { animation: ${K}-wobble 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n        .${K}-nod { animation: ${K}-nod 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n        @media (prefers-reduced-motion: reduce) { .${K}-wobble, .${K}-nod { animation: none; } .${K}-btn { transition: none; } }\n      `}</style>\n\n      <div className=\"mx-auto grid max-w-6xl items-center gap-14 lg:grid-cols-[1.15fr_0.85fr] lg:gap-10\">\n        <div>\n          <motion.p\n            initial={reduce ? false : { opacity: 0, y: -16 }}\n            animate={{ opacity: 1, y: 0 }}\n            transition={{ type: \"spring\", stiffness: 300, damping: 20 }}\n            className={`${K}-sh inline-flex items-center gap-2 rounded-full border-[3px] border-[#111] bg-white px-4 py-1.5 text-xs font-black uppercase tracking-widest`}\n          >\n            <span className=\"h-2.5 w-2.5 rounded-full border-2 border-[#111] bg-[#ff5fa2]\" aria-hidden=\"true\" />\n            Gumdrop Sticker Co.\n          </motion.p>\n\n          <h1 className=\"mt-7 flex flex-wrap gap-x-3 gap-y-3 sm:gap-x-4 sm:gap-y-4\" aria-label={words.map((w) => w.text).join(\" \")}>\n            {words.map((w, i) => (\n              <motion.span\n                key={w.text}\n                aria-hidden=\"true\"\n                initial={reduce ? false : { opacity: 0, scale: 1.9, rotate: w.tilt * 5, y: -40 }}\n                animate={{ opacity: 1, scale: 1, rotate: w.tilt, y: 0 }}\n                whileHover={reduce ? undefined : { rotate: -w.tilt, scale: 1.06 }}\n                transition={{ type: \"spring\", stiffness: 420, damping: 17, delay: reduce ? 0 : 0.12 + i * 0.11 }}\n                className={`${K}-sh inline-block rounded-2xl border-[3px] border-[#111] bg-white p-1.5`}\n              >\n                <span\n                  className=\"block rounded-xl border-[3px] border-[#111] px-3 pb-1.5 pt-0.5 text-5xl font-black leading-none tracking-tight sm:px-4 sm:pb-2.5 sm:pt-1 sm:text-7xl xl:text-[5.25rem]\"\n                  style={{ backgroundColor: w.fill }}\n                >\n                  {w.text}\n                </span>\n              </motion.span>\n            ))}\n          </h1>\n\n          <motion.div\n            initial={reduce ? false : { opacity: 0, y: 20 }}\n            animate={{ opacity: 1, y: 0 }}\n            transition={{ type: \"spring\", stiffness: 200, damping: 22, delay: reduce ? 0 : 0.75 }}\n          >\n            <p className=\"mt-8 max-w-lg text-lg font-semibold leading-relaxed\">\n              Die-cut vinyl stickers printed from your artwork in two days. Upload a file, pick a size, and we send back a proof before anything touches the press.\n            </p>\n            <div className=\"mt-8 flex flex-wrap gap-4\">\n              <a\n                href=\"#\"\n                className={`${K}-sh ${K}-btn inline-flex h-14 items-center gap-2 rounded-xl border-[3px] border-[#111] bg-[#ff5fa2] px-6 text-base font-black uppercase tracking-wide focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-[#111] focus-visible:ring-offset-2 focus-visible:ring-offset-[#ffe14d]`}\n              >\n                Start an order\n                <svg viewBox=\"0 0 20 20\" className=\"h-5 w-5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M4 10h12M11 5l5 5-5 5\" />\n                </svg>\n              </a>\n              <a\n                href=\"#\"\n                className={`${K}-sh ${K}-btn inline-flex h-14 items-center rounded-xl border-[3px] border-[#111] bg-white px-6 text-base font-black uppercase tracking-wide focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-[#111] focus-visible:ring-offset-2 focus-visible:ring-offset-[#ffe14d]`}\n              >\n                Get free samples\n              </a>\n            </div>\n            <ul className=\"mt-8 flex flex-wrap gap-x-5 gap-y-2 text-sm font-bold\">\n              {facts.map((f) => (\n                <li key={f} className=\"flex items-center gap-2\">\n                  <span className=\"h-3 w-3 rotate-45 border-2 border-[#111] bg-[#38d6ff]\" aria-hidden=\"true\" />\n                  {f}\n                </li>\n              ))}\n            </ul>\n          </motion.div>\n        </div>\n\n        <div className=\"relative mx-auto w-full max-w-sm lg:max-w-none\">\n          <motion.div\n            initial={reduce ? false : { opacity: 0, y: 60, rotate: 14 }}\n            animate={{ opacity: 1, y: 0, rotate: 4 }}\n            transition={{ type: \"spring\", stiffness: 160, damping: 15, delay: reduce ? 0 : 0.35 }}\n            className={`${K}-sh-lg rounded-3xl border-[3px] border-[#111] bg-white p-4 sm:p-5`}\n          >\n            <p className=\"border-b-[3px] border-dashed border-[#111] pb-3 text-right text-[11px] font-black uppercase tracking-widest\">Sheet 014 / A5 matte vinyl</p>\n            <ul className=\"mt-4 grid grid-cols-3 gap-3 sm:gap-4\">\n              {sheet.map((s, i) => (\n                <motion.li\n                  key={s.id}\n                  initial={reduce ? false : { opacity: 0, scale: 0.3, rotate: -30 }}\n                  animate={{ opacity: 1, scale: 1, rotate: 0 }}\n                  transition={{ type: \"spring\", stiffness: 380, damping: 14, delay: reduce ? 0 : 0.6 + i * 0.07 }}\n                >\n                  <div\n                    className={`${K}-nod aspect-square rounded-2xl border-[3px] border-[#111] p-2.5 sm:p-3`}\n                    style={{ backgroundColor: s.fill, animationDelay: `${-i * 0.55}s` }}\n                  >\n                    <Art id={s.id} />\n                  </div>\n                </motion.li>\n              ))}\n            </ul>\n            <div className=\"mt-4 flex items-center justify-between rounded-xl border-[3px] border-[#111] bg-[#111] px-4 py-2.5 text-sm font-black text-white\">\n              <span>50 sheets</span>\n              <span className=\"text-[#ffe14d]\">$64.00</span>\n            </div>\n          </motion.div>\n\n          <motion.div\n            initial={reduce ? false : { opacity: 0, scale: 0 }}\n            animate={{ opacity: 1, scale: 1 }}\n            transition={{ type: \"spring\", stiffness: 320, damping: 11, delay: reduce ? 0 : 1 }}\n            className=\"absolute -left-4 -top-10 h-28 w-28 sm:-left-10 sm:-top-12 sm:h-32 sm:w-32\"\n          >\n            <div className={`${K}-wobble ${K}-drop relative h-full w-full`}>\n              <svg viewBox=\"-2 -2 104 104\" className=\"h-full w-full\" aria-hidden=\"true\">\n                <polygon points={seal} fill=\"#ff8a3d\" stroke=\"#111\" strokeWidth=\"3\" strokeLinejoin=\"round\" />\n              </svg>\n              <p className=\"absolute inset-0 flex flex-col items-center justify-center text-center font-black uppercase leading-none\">\n                <span className=\"text-2xl sm:text-[1.7rem]\">2 for 1</span>\n                <span className=\"mt-1 text-[10px] tracking-widest\">this week</span>\n              </p>\n            </div>\n          </motion.div>\n\n          <motion.div\n            initial={reduce ? false : { opacity: 0, scale: 0 }}\n            animate={{ opacity: 1, scale: 1 }}\n            transition={{ type: \"spring\", stiffness: 320, damping: 11, delay: reduce ? 0 : 1.12 }}\n            className=\"absolute -bottom-7 -right-2 sm:-right-6\"\n          >\n            <p\n              className={`${K}-wobble ${K}-sh rounded-full border-[3px] border-[#111] bg-[#38d6ff] px-4 py-2 text-sm font-black uppercase tracking-wide`}\n              style={{ animationDelay: \"-1.1s\", animationDuration: \"2.9s\" }}\n            >\n              Free proof first\n            </p>\n          </motion.div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
