{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"team-grid","type":"registry:block","title":"Team grid","description":"Team members grid with gradient initials avatars, bio reveal on hover, social links and a hiring card.","dependencies":["lucide-react","motion"],"registryDependencies":["utils"],"files":[{"path":"registry/items/team-grid/team-grid.tsx","type":"registry:block","target":"components/facade/team-grid.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { ArrowRight, Mail, Plus } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface TeamSocials {\n  linkedin?: string;\n  x?: string;\n  instagram?: string;\n  email?: string;\n}\n\nexport interface TeamMember {\n  name: string;\n  role: string;\n  bio: string;\n  location?: string;\n  socials?: TeamSocials;\n  /** Optional photo URL. Falls back to a gradient initials avatar. */\n  imageSrc?: string;\n}\n\nexport interface TeamGridProps {\n  eyebrow?: string;\n  heading?: string;\n  description?: string;\n  members?: TeamMember[];\n  showHiringCard?: boolean;\n  hiringHeading?: string;\n  hiringText?: string;\n  hiringCtaLabel?: string;\n  hiringHref?: string;\n  openRoles?: number;\n  className?: string;\n}\n\nconst DEFAULT_MEMBERS: TeamMember[] = [\n  {\n    name: \"Jessica Moreno\",\n    role: \"Founder and Managing Broker\",\n    location: \"Miami, FL\",\n    bio: \"Fifteen years selling waterfront homes in Coconut Grove and Coral Gables. Over $480M in closed sales and still answers her own phone.\",\n    socials: { linkedin: \"#\", instagram: \"#\", email: \"jessica@baysiderealty.com\" },\n  },\n  {\n    name: \"Andre Thompson\",\n    role: \"Senior Listing Agent\",\n    location: \"Coral Gables, FL\",\n    bio: \"Former architect who reads floor plans like novels. Andre leads our luxury listings and staging strategy.\",\n    socials: { linkedin: \"#\", x: \"#\", email: \"andre@baysiderealty.com\" },\n  },\n  {\n    name: \"Mei Chen\",\n    role: \"Buyer Specialist\",\n    location: \"Brickell, FL\",\n    bio: \"Helps first-time buyers and relocating families find the right condo, from pre-approval to the keys. Fluent in Mandarin.\",\n    socials: { linkedin: \"#\", instagram: \"#\" },\n  },\n  {\n    name: \"Carlos Ruiz\",\n    role: \"Investment Advisor\",\n    location: \"Wynwood, FL\",\n    bio: \"Runs the numbers on multifamily and short-term rentals. Carlos has helped 60+ clients build Miami rental portfolios.\",\n    socials: { linkedin: \"#\", x: \"#\", email: \"carlos@baysiderealty.com\" },\n  },\n  {\n    name: \"Hannah Brooks\",\n    role: \"Marketing Director\",\n    location: \"Miami Beach, FL\",\n    bio: \"Produces the photography, video and campaigns that sell our listings 19 days faster than the county average.\",\n    socials: { instagram: \"#\", linkedin: \"#\" },\n  },\n  {\n    name: \"Samuel Okoye\",\n    role: \"Transaction Coordinator\",\n    location: \"Miami, FL\",\n    bio: \"Keeps every deadline, inspection and closing on track so our clients never have to chase paperwork.\",\n    socials: { linkedin: \"#\", email: \"samuel@baysiderealty.com\" },\n  },\n  {\n    name: \"Olivia Park\",\n    role: \"Leasing Agent\",\n    location: \"Edgewater, FL\",\n    bio: \"Matches renters with the right building in under a week on average. Knows every concierge on Biscayne by name.\",\n    socials: { instagram: \"#\", email: \"olivia@baysiderealty.com\" },\n  },\n];\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .slice(0, 2)\n    .map((p) => p[0]?.toUpperCase() ?? \"\")\n    .join(\"\");\n}\n\nfunction hue(name: string) {\n  let h = 11;\n  for (let i = 0; i < name.length; i++) h = (h * 29 + name.charCodeAt(i)) % 360;\n  return h;\n}\n\nfunction LinkedinIcon() {\n  return (\n    <svg viewBox=\"0 0 24 24\" className=\"size-4\" fill=\"currentColor\" aria-hidden>\n      <path d=\"M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.56V9h3.56v11.45z\" />\n    </svg>\n  );\n}\nfunction XIcon() {\n  return (\n    <svg viewBox=\"0 0 24 24\" className=\"size-3.5\" fill=\"currentColor\" aria-hidden>\n      <path d=\"M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.66l-5.21-6.82-5.97 6.82H1.67l7.73-8.84L1.25 2.25h6.83l4.71 6.23 5.45-6.23zm-1.16 17.52h1.83L7.08 4.13H5.12l11.96 15.64z\" />\n    </svg>\n  );\n}\nfunction InstagramIcon() {\n  return (\n    <svg viewBox=\"0 0 24 24\" className=\"size-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" aria-hidden>\n      <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"5\" />\n      <circle cx=\"12\" cy=\"12\" r=\"4\" />\n      <circle cx=\"17.5\" cy=\"6.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n    </svg>\n  );\n}\n\nfunction SocialLinks({ member }: { member: TeamMember }) {\n  const s = member.socials;\n  if (!s) return null;\n  const items: { key: string; href: string; label: string; icon: React.ReactNode }[] = [];\n  if (s.linkedin) items.push({ key: \"li\", href: s.linkedin, label: `${member.name} on LinkedIn`, icon: <LinkedinIcon /> });\n  if (s.x) items.push({ key: \"x\", href: s.x, label: `${member.name} on X`, icon: <XIcon /> });\n  if (s.instagram) items.push({ key: \"ig\", href: s.instagram, label: `${member.name} on Instagram`, icon: <InstagramIcon /> });\n  if (s.email) items.push({ key: \"em\", href: `mailto:${s.email}`, label: `Email ${member.name}`, icon: <Mail className=\"size-4\" aria-hidden /> });\n  return (\n    <div className=\"flex gap-1\">\n      {items.map((it) => (\n        <a\n          key={it.key}\n          href={it.href}\n          aria-label={it.label}\n          className=\"flex size-7 items-center justify-center rounded-full bg-background text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-foreground/[0.08]\"\n        >\n          {it.icon}\n        </a>\n      ))}\n    </div>\n  );\n}\n\nfunction MemberCard({ member, index, reduce }: { member: TeamMember; index: number; reduce: boolean }) {\n  const h = hue(member.name);\n  const [open, setOpen] = React.useState(false);\n  return (\n    <motion.li\n      initial={reduce ? false : { opacity: 0, y: 20 }}\n      whileInView={{ opacity: 1, y: 0 }}\n      viewport={{ once: true, margin: \"-40px 0px\" }}\n      transition={{ duration: 0.7, delay: (index % 4) * 0.06, ease: [0.16, 1, 0.3, 1] }}\n      className=\"group relative flex flex-col overflow-hidden rounded-[28px] bg-muted\"\n      onMouseEnter={() => setOpen(true)}\n      onMouseLeave={() => setOpen(false)}\n      onFocus={() => setOpen(true)}\n      onBlur={(e) => {\n        if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOpen(false);\n      }}\n    >\n      <div className=\"relative aspect-[4/4] overflow-hidden\">\n        {member.imageSrc ? (\n          <img src={member.imageSrc} alt=\"\" className=\"size-full object-cover\" loading=\"lazy\" />\n        ) : (\n          <div\n            className=\"relative flex size-full items-center justify-center\"\n            style={{\n              backgroundImage: `radial-gradient(120% 90% at 20% 0%, oklch(0.93 0.02 ${h}), transparent 60%), radial-gradient(100% 90% at 100% 100%, oklch(0.78 0.035 ${(h + 50) % 360}), transparent 65%), linear-gradient(160deg, oklch(0.88 0.025 ${(h + 20) % 360}), oklch(0.74 0.035 ${(h + 70) % 360}))`,\n            }}\n          >\n            <svg viewBox=\"0 0 200 210\" className=\"absolute inset-x-0 bottom-0 h-[78%] w-full\" aria-hidden>\n              <circle cx=\"100\" cy=\"78\" r=\"38\" fill=\"oklch(1 0 0 / 0.45)\" />\n              <path d=\"M28 210 C 32 150, 66 126, 100 126 C 134 126, 168 150, 172 210 Z\" fill=\"oklch(1 0 0 / 0.45)\" />\n            </svg>\n            <span className=\"relative text-[44px] font-semibold tracking-[-0.03em]\" style={{ color: \"oklch(0.3 0.02 260)\" }}>\n              {initials(member.name)}\n            </span>\n          </div>\n        )}\n\n        <motion.div\n          initial={false}\n          animate={open ? { y: 0, opacity: 1 } : { y: \"100%\", opacity: 0 }}\n          transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 360, damping: 36 }}\n          className=\"absolute inset-x-0 bottom-0 hidden bg-background/90 p-4 backdrop-blur-md sm:block dark:bg-muted/90\"\n        >\n          <p className=\"text-[13px] leading-relaxed text-foreground\">{member.bio}</p>\n        </motion.div>\n      </div>\n\n      <div className=\"flex flex-1 flex-col p-5\">\n        <div className=\"min-w-0\">\n          <h3 className=\"truncate text-[16px] font-semibold text-foreground\">{member.name}</h3>\n          <p className=\"truncate text-[14px] text-muted-foreground\">{member.role}</p>\n        </div>\n        {/* Bio is always visible on touch screens */}\n        <p className=\"mt-3 text-[14px] leading-relaxed text-muted-foreground sm:hidden\">{member.bio}</p>\n        <div className=\"mt-auto flex items-center justify-between gap-3 pt-5\">\n          {member.location ? <span className=\"truncate text-[13px] text-muted-foreground\">{member.location}</span> : <span />}\n          <SocialLinks member={member} />\n        </div>\n      </div>\n    </motion.li>\n  );\n}\n\nexport function TeamGrid({\n  eyebrow = \"Our team\",\n  heading = \"Local experts who know every street\",\n  description = \"Bayside Realty is a boutique brokerage of agents who live in the neighborhoods they sell.\",\n  members = DEFAULT_MEMBERS,\n  showHiringCard = true,\n  hiringHeading = \"We're hiring\",\n  hiringText = \"Licensed in Florida and hungry to build something? We offer mentorship, real leads and an 80/20 split.\",\n  hiringCtaLabel = \"See open roles\",\n  hiringHref = \"#\",\n  openRoles = 3,\n  className,\n}: TeamGridProps) {\n  const reduce = useReducedMotion() ?? false;\n  return (\n    <section className={cn(\"relative bg-background py-20 sm:py-28\", className)}>\n      <div className=\"mx-auto max-w-[1120px] px-6\">\n        <div className=\"mx-auto max-w-[640px] text-center\">\n          <p className=\"text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground\">{eyebrow}</p>\n          <h2 className=\"mt-4 text-balance text-[34px] font-semibold leading-[1.05] tracking-[-0.03em] text-foreground sm:text-[48px] lg:text-[56px]\">{heading}</h2>\n          <p className=\"mt-5 text-[17px] leading-relaxed text-muted-foreground sm:text-xl sm:leading-[1.4]\">{description}</p>\n        </div>\n\n        <ul className=\"mt-14 grid gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n          {members.map((m, i) => (\n            <MemberCard key={m.name} member={m} index={i} reduce={reduce} />\n          ))}\n\n          {showHiringCard && (\n            <motion.li\n              initial={reduce ? false : { opacity: 0, y: 20 }}\n              whileInView={{ opacity: 1, y: 0 }}\n              viewport={{ once: true, margin: \"-40px 0px\" }}\n              transition={{ duration: 0.7, delay: (members.length % 4) * 0.06, ease: [0.16, 1, 0.3, 1] }}\n              className=\"group relative min-h-[320px] overflow-hidden rounded-[28px] bg-foreground text-background\"\n            >\n              <a\n                href={hiringHref}\n                className=\"relative flex h-full flex-col p-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring\"\n              >\n                <span className=\"flex size-11 items-center justify-center rounded-full bg-background/15 text-background transition-transform duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:rotate-90\">\n                  <Plus className=\"size-5\" aria-hidden />\n                </span>\n                <span className=\"mt-8 text-xs font-medium uppercase tracking-[0.08em] text-background/60\">\n                  {openRoles} open {openRoles === 1 ? \"role\" : \"roles\"}\n                </span>\n                <span className=\"mt-2 text-[24px] font-semibold tracking-[-0.02em]\">{hiringHeading}</span>\n                <span className=\"mt-2 text-[14px] leading-relaxed text-background/70\">{hiringText}</span>\n                <span className=\"mt-auto inline-flex items-center gap-1.5 pt-6 text-[15px] font-medium\">\n                  {hiringCtaLabel}\n                  <ArrowRight className=\"size-4 transition-transform group-hover:translate-x-1\" aria-hidden />\n                </span>\n              </a>\n            </motion.li>\n          )}\n        </ul>\n      </div>\n    </section>\n  );\n}\n\nexport default TeamGrid;\n"}],"categories":["sections"],"meta":{"tier":"free","demo":"import { TeamGrid } from \"./team-grid\";\n\nexport default function Demo() {\n  return <TeamGrid />;\n}\n"}}