{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"bakery-footer-serif-wordmark-letters-rise-into-view","type":"registry:block","title":"Bakery Footer With Rising Serif Wordmark","description":"","dependencies":[],"files":[{"path":"components/we-inc/bakery-footer-serif-wordmark-letters-rise-into-view.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\nimport type { CSSProperties } from \"react\";\n\nconst THRESHOLD = 0.15; // share of the wordmark that must be visible before the letters rise\n\n// Same markup, styles and script as the plain HTML version.\nconst STYLES = `\n/* Change these: background, text, muted text, rule colour, accent (links' focus ring and highlights). */\n  .w4ris { --w4ris-bg: #f3ece0; --w4ris-ink: #2b2119; --w4ris-muted: #5f5246; --w4ris-line: #d9cdbb; --w4ris-accent: #a5421d; }\n  .w4ris { position: relative; overflow: hidden; background: var(--w4ris-bg); color: var(--w4ris-ink); font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; padding: 72px clamp(20px, 4vw, 56px) 24px; }\n  .w4ris *, .w4ris *::before, .w4ris *::after { box-sizing: border-box; }\n  .w4ris-in { max-width: 1240px; margin: 0 auto; }\n  .w4ris-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }\n  .w4ris-brand { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }\n  .w4ris-blurb { margin: 12px 0 0; max-width: 32ch; font-size: 15px; line-height: 1.6; color: var(--w4ris-muted); }\n  .w4ris-addr { margin: 16px 0 0; font-style: normal; font-size: 14px; line-height: 1.65; color: var(--w4ris-muted); }\n  .w4ris-col h2 { margin: 0 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--w4ris-muted); }\n  .w4ris-col ul, .w4ris-legal ul { list-style: none; margin: 0; padding: 0; }\n  .w4ris-col a, .w4ris-legal a { display: inline-flex; align-items: center; min-height: 40px; color: inherit; text-decoration: none; font-size: 15px; border-radius: 3px; }\n  .w4ris-col a:hover, .w4ris-legal a:hover { text-decoration: underline; text-underline-offset: 4px; }\n  .w4ris a:focus-visible { outline: 2px solid var(--w4ris-accent); outline-offset: 3px; }\n  .w4ris-big { container-type: inline-size; margin: 56px 0 0; }\n  .w4ris-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 24px; margin-top: 24px; padding-top: 6px; border-top: 1px solid var(--w4ris-line); font-size: 13px; color: var(--w4ris-muted); }\n  .w4ris-legal p { margin: 10px 0; }\n  .w4ris-legal ul { display: flex; flex-wrap: wrap; gap: 0 20px; }\n  .w4ris-legal a { font-size: 13px; }\n  .w4ris-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n  @media (max-width: 760px) {\n    .w4ris { padding-top: 56px; }\n    .w4ris-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }\n    .w4ris-lead { grid-column: 1 / -1; }\n  }\n  /* Change these: wordmark size (cqi of the footer width), rise speed, delay between letters. */\n  .w4ris { --w4ris-size: 21.5cqi; --w4ris-speed: 1s; --w4ris-step: 70ms; }\n  .w4ris-word { margin: 0; overflow: hidden; white-space: nowrap; font-family: Georgia, \"Times New Roman\", serif; font-weight: 700; font-size: var(--w4ris-size); line-height: 1.02; letter-spacing: -.05em; text-align: center; padding-bottom: .02em; }\n  .w4ris-l { display: inline-block; transition: transform var(--w4ris-speed) cubic-bezier(.16, .84, .24, 1) calc(var(--i) * var(--w4ris-step)), opacity .6s ease calc(var(--i) * var(--w4ris-step)); }\n  .w4ris-dot { color: var(--w4ris-accent); }\n  .w4ris[data-arm]:not([data-in]) .w4ris-l { transform: translateY(104%) rotate(7deg); opacity: 0; }\n  .w4ris-note { display: flex; justify-content: space-between; gap: 16px; margin: 6px 0 0; font-size: 14px; color: var(--w4ris-muted); }\n  .w4ris-note span:last-child { text-align: right; }\n  @media (prefers-reduced-motion: reduce) { .w4ris-l { transition: none; transform: none !important; opacity: 1 !important; } }\n`;\n\nexport default function BakeryFooterSerifWordmarkLettersRise() {\n  const ref = useRef<HTMLElement>(null);\n  useEffect(() => {\n    const root: any = ref.current;\n    if (!root) return;\n    if (matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    var target = root.querySelector(\".w4ris-word\");\n    root.setAttribute(\"data-arm\", \"\");\n    var io = new IntersectionObserver(function (en) {\n      if (en[0].isIntersecting) root.setAttribute(\"data-in\", \"\");\n      else root.removeAttribute(\"data-in\");\n    }, { threshold: THRESHOLD });\n    io.observe(target);\n    return function () { io.disconnect(); };\n  }, []);\n\n  return (\n    <footer className=\"w4ris\" ref={ref}>\n      <style>{STYLES}</style>\n      <div className=\"w4ris-in\">\n        <div className=\"w4ris-top\">\n          <div className=\"w4ris-lead\">\n            <p className=\"w4ris-brand\">Ovenbird Bakery</p>\n            <p className=\"w4ris-blurb\">\n              Rye, spelt and long-proved white loaves from a wood-fired oven at the end of Tanner Lane.\n            </p>\n            <address className=\"w4ris-addr\">\n              14 Tanner Lane, Hebden Row\n              <br />\n              Tuesday to Sunday, 7am until sold out\n              <br />\n              01422 840 317\n            </address>\n          </div>\n          <div className=\"w4ris-col\">\n            <h2>Bread</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Daily loaves</a>\n              </li>\n              <li>\n                <a href=\"#\">Pastries</a>\n              </li>\n              <li>\n                <a href=\"#\">Weekend specials</a>\n              </li>\n              <li>\n                <a href=\"#\">Wholesale</a>\n              </li>\n            </ul>\n          </div>\n          <div className=\"w4ris-col\">\n            <h2>Visit</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Find the shop</a>\n              </li>\n              <li>\n                <a href=\"#\">Opening hours</a>\n              </li>\n              <li>\n                <a href=\"#\">Pre-order</a>\n              </li>\n            </ul>\n          </div>\n          <div className=\"w4ris-col\">\n            <h2>Bakery</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Our flour</a>\n              </li>\n              <li>\n                <a href=\"#\">Baking classes</a>\n              </li>\n              <li>\n                <a href=\"#\">Jobs</a>\n              </li>\n              <li>\n                <a href=\"#\">Contact</a>\n              </li>\n            </ul>\n          </div>\n        </div>\n        <div className=\"w4ris-big\">\n          <p className=\"w4ris-word\" aria-hidden=\"true\">\n            {\"ovenbird\".split(\"\").map((c, i) => (\n              <span key={i} className=\"w4ris-l\" style={{ \"--i\": i } as CSSProperties}>{c === \" \" ? \"\\u00a0\" : c}</span>\n            ))}\n            <span className=\"w4ris-l w4ris-dot\" style={{ \"--i\": \"8\" } as CSSProperties}>.</span>\n          </p>\n          <p className=\"w4ris-note\">\n            <span>First bake out at seven</span>\n            <span>Crumbs on the counter are free</span>\n          </p>\n        </div>\n        <div className=\"w4ris-legal\">\n          <p>© 2026 Ovenbird Bakery Ltd. Registered in England.</p>\n          <ul>\n            <li>\n              <a href=\"#\">Privacy</a>\n            </li>\n            <li>\n              <a href=\"#\">Allergens</a>\n            </li>\n            <li>\n              <a href=\"#\">Terms of sale</a>\n            </li>\n          </ul>\n        </div>\n      </div>\n    </footer>\n  );\n}\n"}]}
