{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"footer-big","type":"registry:block","title":"Footer, big","description":"Large local business footer with animated newsletter, link columns, NAP, hours, socials and a giant wordmark.","dependencies":["lucide-react","motion"],"registryDependencies":["utils"],"files":[{"path":"registry/items/footer-big/footer-big.tsx","type":"registry:block","target":"components/facade/footer-big.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useInView, useReducedMotion } from \"motion/react\";\nimport { ArrowRight, ArrowUpRight, Check, Clock, Mail, MapPin, Phone } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface FooterBigLink {\n  label: string;\n  href: string;\n  badge?: string;\n}\n\nexport interface FooterBigColumn {\n  title: string;\n  links: FooterBigLink[];\n}\n\nexport type FooterBigSocialNetwork = \"facebook\" | \"instagram\" | \"linkedin\" | \"youtube\" | \"x\" | \"yelp\";\n\nexport interface FooterBigSocial {\n  network: FooterBigSocialNetwork;\n  href: string;\n}\n\nexport interface FooterBigHours {\n  days: string;\n  hours: string;\n}\n\nexport interface FooterBigProps {\n  businessName?: string;\n  tagline?: string;\n  newsletterTitle?: string;\n  newsletterDescription?: string;\n  /** Called with the email on submit. Return a promise to show a loading state. Without a handler the form only simulates success, for previews. */\n  onSubscribe?: (email: string) => void | Promise<void>;\n  columns?: FooterBigColumn[];\n  address?: { street: string; city: string; mapHref?: string };\n  phone?: { label: string; href: string };\n  email?: string;\n  hours?: FooterBigHours[];\n  socials?: FooterBigSocial[];\n  /** Oversized faded wordmark. Defaults to businessName. */\n  wordmark?: string;\n  legal?: FooterBigLink[];\n  license?: string;\n  className?: string;\n}\n\nconst EASE = [0.16, 1, 0.3, 1] as const;\n\nfunction SocialIcon({ network }: { network: FooterBigSocialNetwork }) {\n  const common = { className: \"size-4\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": true } as const;\n  switch (network) {\n    case \"facebook\":\n      return (\n        <svg {...common}>\n          <path d=\"M13.5 21v-7.5h2.53l.38-2.94H13.5V8.69c0-.85.24-1.43 1.45-1.43h1.55V4.63A20.6 20.6 0 0 0 14.24 4.5c-2.24 0-3.77 1.37-3.77 3.88v2.18H7.94v2.94h2.53V21h3.03Z\" />\n        </svg>\n      );\n    case \"instagram\":\n      return (\n        <svg {...common} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\">\n          <rect x=\"3.5\" y=\"3.5\" width=\"17\" height=\"17\" rx=\"5\" />\n          <circle cx=\"12\" cy=\"12\" r=\"4\" />\n          <circle cx=\"17.3\" cy=\"6.7\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n        </svg>\n      );\n    case \"linkedin\":\n      return (\n        <svg {...common}>\n          <path d=\"M6.94 8.75H3.88V20h3.06V8.75ZM5.41 4a1.78 1.78 0 1 0 0 3.56 1.78 1.78 0 0 0 0-3.56ZM20.12 13.6c0-3.03-1.62-4.44-3.78-4.44a3.27 3.27 0 0 0-2.96 1.63V8.75h-3.06c.04.86 0 11.25 0 11.25h3.06v-6.28c0-.34.02-.67.12-.91.27-.67.88-1.37 1.92-1.37 1.35 0 1.89 1.03 1.89 2.54V20h3.06l-.25-6.4Z\" />\n        </svg>\n      );\n    case \"youtube\":\n      return (\n        <svg {...common}>\n          <path d=\"M21.58 7.19a2.5 2.5 0 0 0-1.77-1.77C18.25 5 12 5 12 5s-6.25 0-7.81.42a2.5 2.5 0 0 0-1.77 1.77C2 8.75 2 12 2 12s0 3.25.42 4.81a2.5 2.5 0 0 0 1.77 1.77C5.75 19 12 19 12 19s6.25 0 7.81-.42a2.5 2.5 0 0 0 1.77-1.77C22 15.25 22 12 22 12s0-3.25-.42-4.81ZM10 15V9l5.2 3L10 15Z\" />\n        </svg>\n      );\n    case \"x\":\n      return (\n        <svg {...common}>\n          <path d=\"M17.75 3h3.07l-6.7 7.66L22 21h-6.17l-4.83-6.32L5.47 21H2.4l7.17-8.2L2 3h6.33l4.37 5.77L17.75 3Zm-1.08 16.18h1.7L7.4 4.73H5.58l11.09 14.45Z\" />\n        </svg>\n      );\n    case \"yelp\":\n      return (\n        <svg {...common}>\n          <path d=\"M12.3 2.2c-.5-.3-3.9.6-4.6 1.3-.3.3-.4.6-.3.9l3.9 6.4c.6.9 1.9.6 1.9-.5L13 3c0-.4-.3-.7-.7-.8Zm-1.9 11.5-6 1.7c-.5.2-.8.6-.7 1.1.1 1 1.2 3.2 1.9 3.6.3.2.7.2 1 0l4.6-4.7c.7-.7.1-2-.8-1.7Zm3.2 1.6c-.6-.8-1.9-.4-1.8.6l.4 6.3c0 .5.4.8.9.8 1 0 3.3-.8 3.9-1.4.3-.3.3-.7.1-1l-3.5-5.3Zm6.5-4.5c-.4-.9-2.4-3.2-3.2-3.5-.4-.1-.7 0-1 .3l-3.4 5.4c-.5.9.4 1.9 1.3 1.5l5.8-2.4c.4-.2.6-.7.5-1.3Zm-.2 5.3-5.9-1.6c-1-.3-1.7.9-1 1.6l4.2 4.5c.3.3.8.4 1.1.1.8-.6 2.2-2.6 2.3-3.6.1-.5-.2-.9-.7-1Z\" />\n        </svg>\n      );\n  }\n}\n\nconst SOCIAL_LABELS: Record<FooterBigSocialNetwork, string> = {\n  facebook: \"Facebook\",\n  instagram: \"Instagram\",\n  linkedin: \"LinkedIn\",\n  youtube: \"YouTube\",\n  x: \"X\",\n  yelp: \"Yelp\",\n};\n\ntype Status = \"idle\" | \"loading\" | \"success\" | \"error\";\n\nfunction Newsletter({\n  title,\n  description,\n  onSubscribe,\n}: {\n  title: string;\n  description: string;\n  onSubscribe?: (email: string) => void | Promise<void>;\n}) {\n  const id = React.useId();\n  const [email, setEmail] = React.useState(\"\");\n  const [status, setStatus] = React.useState<Status>(\"idle\");\n  const [error, setError] = React.useState(\"\");\n\n  const submit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) {\n      setStatus(\"error\");\n      setError(\"Please enter a valid email address.\");\n      return;\n    }\n    setStatus(\"loading\");\n    setError(\"\");\n    try {\n      if (onSubscribe) {\n        await onSubscribe(email);\n      } else {\n        await new Promise((r) => setTimeout(r, 900));\n      }\n      setStatus(\"success\");\n    } catch {\n      setStatus(\"error\");\n      setError(\"Something went wrong. Please try again.\");\n    }\n  };\n\n  return (\n    <div className=\"max-w-md\">\n      <h3 className=\"font-display text-[26px] font-semibold tracking-[-0.03em] sm:text-[32px]\">{title}</h3>\n      <p className=\"mt-2 text-[15px] leading-relaxed text-muted-foreground\">{description}</p>\n\n      <div className=\"relative mt-6 h-14\">\n        <AnimatePresence mode=\"wait\" initial={false}>\n          {status === \"success\" ? (\n            <motion.div\n              key=\"success\"\n              role=\"status\"\n              initial={{ opacity: 0, y: 10, scale: 0.98 }}\n              animate={{ opacity: 1, y: 0, scale: 1 }}\n              exit={{ opacity: 0, y: -10 }}\n              transition={{ duration: 0.45, ease: EASE }}\n              className=\"absolute inset-0 flex items-center gap-3 rounded-full bg-background px-2 pr-5 dark:bg-foreground/[0.08]\"\n            >\n              <motion.span\n                initial={{ scale: 0.6, opacity: 0 }}\n                animate={{ scale: 1, opacity: 1 }}\n                transition={{ type: \"spring\", stiffness: 360, damping: 32, delay: 0.1 }}\n                className=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-success text-background\"\n              >\n                <Check className=\"size-5\" strokeWidth={2.5} />\n              </motion.span>\n              <span className=\"min-w-0 text-sm\">\n                <span className=\"font-semibold text-foreground\">You&apos;re on the list.</span>{\" \"}\n                <span className=\"text-muted-foreground\">Check {email} to confirm.</span>\n              </span>\n            </motion.div>\n          ) : (\n            <motion.form\n              key=\"form\"\n              onSubmit={submit}\n              noValidate\n              initial={{ opacity: 0, y: 10 }}\n              animate={{ opacity: 1, y: 0 }}\n              exit={{ opacity: 0, y: -10, scale: 0.98 }}\n              transition={{ duration: 0.35, ease: EASE }}\n              className={cn(\n                \"absolute inset-0 flex items-center rounded-full bg-background p-1.5 pl-5 transition-shadow focus-within:ring-2 focus-within:ring-ring dark:bg-foreground/[0.08]\",\n                status === \"error\" && \"ring-2 ring-destructive/60\",\n              )}\n            >\n              <label htmlFor={`${id}-email`} className=\"sr-only\">\n                Email address\n              </label>\n              <Mail className=\"mr-3 size-4 shrink-0 text-muted-foreground\" aria-hidden />\n              <input\n                id={`${id}-email`}\n                type=\"email\"\n                inputMode=\"email\"\n                autoComplete=\"email\"\n                placeholder=\"you@company.com\"\n                value={email}\n                onChange={(e) => {\n                  setEmail(e.target.value);\n                  if (status === \"error\") setStatus(\"idle\");\n                }}\n                aria-invalid={status === \"error\"}\n                aria-describedby={status === \"error\" ? `${id}-err` : undefined}\n                className=\"h-full min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground/70\"\n              />\n              <button\n                type=\"submit\"\n                disabled={status === \"loading\"}\n                className=\"group inline-flex h-full shrink-0 items-center gap-1.5 rounded-full bg-brand px-4 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand/90 disabled:opacity-70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:px-5\"\n              >\n                {status === \"loading\" ? (\n                  <span className=\"flex items-center gap-1\" aria-label=\"Subscribing\">\n                    {[0, 1, 2].map((i) => (\n                      <motion.span\n                        key={i}\n                        className=\"size-1.5 rounded-full bg-brand-foreground\"\n                        animate={{ opacity: [0.3, 1, 0.3] }}\n                        transition={{ duration: 0.9, repeat: Infinity, delay: i * 0.15 }}\n                      />\n                    ))}\n                  </span>\n                ) : (\n                  <>\n                    Subscribe\n                    <ArrowRight className=\"size-3.5 transition-transform group-hover:translate-x-0.5\" />\n                  </>\n                )}\n              </button>\n            </motion.form>\n          )}\n        </AnimatePresence>\n      </div>\n      <p\n        id={`${id}-err`}\n        role={status === \"error\" ? \"alert\" : undefined}\n        className={cn(\"mt-2 h-4 pl-5 text-xs text-destructive\", status !== \"error\" && \"invisible\")}\n      >\n        {error || \" \"}\n      </p>\n    </div>\n  );\n}\n\nexport function FooterBig({\n  businessName = \"Ridgeline Home Services\",\n  tagline = \"Plumbing, heating and electrical for Austin homeowners since 2009. Family owned, locally loved.\",\n  newsletterTitle = \"Seasonal tips, zero spam.\",\n  newsletterDescription = \"One email a month with maintenance checklists and members-only discounts. Unsubscribe anytime.\",\n  onSubscribe,\n  columns = [\n    {\n      title: \"Services\",\n      links: [\n        { label: \"Plumbing repair\", href: \"#\" },\n        { label: \"Water heaters\", href: \"#\" },\n        { label: \"AC & heating\", href: \"#\" },\n        { label: \"Electrical\", href: \"#\" },\n        { label: \"Drain cleaning\", href: \"#\" },\n      ],\n    },\n    {\n      title: \"Service areas\",\n      links: [\n        { label: \"Austin\", href: \"#\" },\n        { label: \"Round Rock\", href: \"#\" },\n        { label: \"Cedar Park\", href: \"#\" },\n        { label: \"Pflugerville\", href: \"#\" },\n        { label: \"Georgetown\", href: \"#\" },\n      ],\n    },\n    {\n      title: \"Company\",\n      links: [\n        { label: \"About us\", href: \"#\" },\n        { label: \"Reviews\", href: \"#\" },\n        { label: \"Careers\", href: \"#\", badge: \"Hiring\" },\n        { label: \"Financing\", href: \"#\" },\n        { label: \"Blog\", href: \"#\" },\n      ],\n    },\n    {\n      title: \"Support\",\n      links: [\n        { label: \"Book online\", href: \"#\" },\n        { label: \"Membership plan\", href: \"#\" },\n        { label: \"Warranty\", href: \"#\" },\n        { label: \"Pay an invoice\", href: \"#\" },\n        { label: \"Contact\", href: \"#\" },\n      ],\n    },\n  ],\n  address = {\n    street: \"4210 Burnet Rd, Suite 120\",\n    city: \"Austin, TX 78756\",\n    mapHref: \"https://maps.google.com/?q=4210+Burnet+Rd+Austin+TX\",\n  },\n  phone = { label: \"(512) 555-0142\", href: \"tel:+15125550142\" },\n  email = \"hello@ridgelinehome.com\",\n  hours = [\n    { days: \"Mon to Fri\", hours: \"7:00 AM to 7:00 PM\" },\n    { days: \"Saturday\", hours: \"8:00 AM to 4:00 PM\" },\n    { days: \"Emergency\", hours: \"24/7\" },\n  ],\n  socials = [\n    { network: \"facebook\", href: \"#\" },\n    { network: \"instagram\", href: \"#\" },\n    { network: \"yelp\", href: \"#\" },\n    { network: \"youtube\", href: \"#\" },\n    { network: \"linkedin\", href: \"#\" },\n  ],\n  wordmark,\n  legal = [\n    { label: \"Privacy\", href: \"#\" },\n    { label: \"Terms\", href: \"#\" },\n    { label: \"Accessibility\", href: \"#\" },\n  ],\n  license = \"TX License M-41872, TECL 33019\",\n  className,\n}: FooterBigProps) {\n  const reduce = useReducedMotion();\n  const markRef = React.useRef<HTMLDivElement>(null);\n  const markInView = useInView(markRef, { once: true, margin: \"-40px 0px\" });\n  const year = new Date().getFullYear();\n  const mark = wordmark ?? businessName.split(\" \")[0];\n\n  return (\n    <footer className={cn(\"relative overflow-hidden bg-muted text-foreground\", className)}>\n      <div className=\"mx-auto max-w-[1120px] px-6 pt-16 sm:pt-20\">\n        {/* Top: newsletter + NAP */}\n        <div className=\"grid gap-12 lg:grid-cols-[1.1fr_1fr] lg:gap-20\">\n          <Newsletter\n            title={newsletterTitle}\n            description={newsletterDescription}\n            onSubscribe={onSubscribe}\n          />\n\n          <div className=\"grid gap-8 sm:grid-cols-2\">\n            <address className=\"not-italic\" itemScope itemType=\"https://schema.org/LocalBusiness\">\n              <p className=\"text-[12px] font-medium uppercase tracking-[0.08em] text-muted-foreground\">Visit or call</p>\n              <p itemProp=\"name\" className=\"mt-3 font-semibold\">{businessName}</p>\n              <a\n                href={address.mapHref ?? \"#\"}\n                target={address.mapHref ? \"_blank\" : undefined}\n                rel={address.mapHref ? \"noreferrer\" : undefined}\n                className=\"group mt-2 flex items-start gap-2 rounded-md text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n              >\n                <MapPin className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n                <span itemProp=\"address\">\n                  {address.street}\n                  <br />\n                  {address.city}\n                </span>\n              </a>\n              <a\n                href={phone.href}\n                itemProp=\"telephone\"\n                className=\"mt-3 flex items-center gap-2 rounded-md text-lg font-semibold tabular-nums tracking-[-0.01em] transition-colors hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n              >\n                <Phone className=\"size-4 text-muted-foreground\" />\n                {phone.label}\n              </a>\n              <a\n                href={`mailto:${email}`}\n                itemProp=\"email\"\n                className=\"mt-1.5 flex items-center gap-2 rounded-md text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n              >\n                <Mail className=\"size-4 text-muted-foreground\" />\n                {email}\n              </a>\n            </address>\n\n            <div>\n              <p className=\"flex items-center gap-2 text-[12px] font-medium uppercase tracking-[0.08em] text-muted-foreground\">\n                <Clock className=\"size-3.5\" /> Hours\n              </p>\n              <dl className=\"mt-3 space-y-2 text-sm\">\n                {hours.map((h) => (\n                  <div key={h.days} className=\"flex items-baseline justify-between gap-4\">\n                    <dt className=\"text-muted-foreground\">{h.days}</dt>\n                    <dd className=\"font-medium tabular-nums\">{h.hours}</dd>\n                  </div>\n                ))}\n              </dl>\n              {socials.length > 0 && (\n                <ul className=\"mt-6 flex flex-wrap gap-2\">\n                  {socials.map((s) => (\n                    <li key={s.network}>\n                      <a\n                        href={s.href}\n                        aria-label={SOCIAL_LABELS[s.network]}\n                        className=\"flex size-10 items-center justify-center rounded-full bg-background text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-foreground/[0.08]\"\n                      >\n                        <SocialIcon network={s.network} />\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              )}\n            </div>\n          </div>\n        </div>\n\n        {/* Link columns */}\n        <div className=\"mt-16 grid gap-10 sm:grid-cols-2 lg:grid-cols-[1.2fr_repeat(4,1fr)]\">\n          <div className=\"max-w-xs\">\n            <p className=\"flex items-center gap-2 font-display text-lg font-semibold tracking-tight\">\n              <span className=\"flex size-7 items-center justify-center rounded-lg bg-foreground text-xs font-semibold text-background\">\n                {businessName.charAt(0)}\n              </span>\n              {businessName}\n            </p>\n            <p className=\"mt-3 text-sm leading-relaxed text-muted-foreground\">{tagline}</p>\n          </div>\n          {columns.map((col) => (\n            <nav key={col.title} aria-label={col.title}>\n              <p className=\"text-sm font-medium\">{col.title}</p>\n              <ul className=\"mt-4 space-y-3\">\n                {col.links.map((l) => (\n                  <li key={l.label}>\n                    <a\n                      href={l.href}\n                      className=\"group inline-flex items-center gap-1.5 rounded-sm text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n                    >\n                      <span className=\"relative\">\n                        {l.label}\n                        <span className=\"absolute -bottom-0.5 left-0 h-px w-full origin-left scale-x-0 bg-foreground/40 transition-transform duration-300 group-hover:scale-x-100\" />\n                      </span>\n                      {l.badge && (\n                        <span className=\"rounded-full bg-accent px-1.5 py-px text-[10px] font-semibold text-accent-foreground\">\n                          {l.badge}\n                        </span>\n                      )}\n                    </a>\n                  </li>\n                ))}\n              </ul>\n            </nav>\n          ))}\n        </div>\n\n        {/* Legal row */}\n        <div className=\"mt-14 flex flex-col gap-4 border-t border-foreground/[0.08] py-6 text-xs text-muted-foreground md:flex-row md:items-center md:justify-between\">\n          <p>\n            &copy; {year} {businessName}. All rights reserved.\n            {license && <span className=\"ml-1 hidden sm:inline\">{license}.</span>}\n          </p>\n          <ul className=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\n            {legal.map((l) => (\n              <li key={l.label}>\n                <a href={l.href} className=\"rounded-sm transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\">\n                  {l.label}\n                </a>\n              </li>\n            ))}\n            <li>\n              <a href=\"#top\" className=\"inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\">\n                Back to top <ArrowUpRight className=\"size-3\" />\n              </a>\n            </li>\n          </ul>\n        </div>\n      </div>\n\n      {/* Oversized faded wordmark */}\n      <div ref={markRef} aria-hidden className=\"pointer-events-none relative -mt-2 select-none overflow-hidden\">\n        <motion.p\n          initial={reduce ? { opacity: 1 } : { y: \"35%\", opacity: 0 }}\n          animate={markInView ? { y: \"18%\", opacity: 1 } : undefined}\n          transition={{ duration: 1.4, ease: EASE }}\n          className=\"whitespace-nowrap text-center font-display font-semibold leading-[0.8] tracking-[-0.05em] text-foreground/[0.06]\"\n          style={{\n            fontSize: `clamp(4rem, ${Math.max(8, 150 / Math.max(mark.length, 1))}vw, 22rem)`,\n          }}\n        >\n          {mark}\n        </motion.p>\n      </div>\n    </footer>\n  );\n}\n\nexport default FooterBig;\n"}],"categories":["sections"],"meta":{"tier":"free","demo":"import { FooterBig } from \"./footer-big\";\n\nexport default function Demo() {\n  return <FooterBig />;\n}\n"}}