// jsx/Footer.jsx — quiet paper-on-paper footer below the closing CTA
function Footer() {
  // One-pager footer while the rebuild lands (pages return one by one)
  const cols = [
    { h: "Explore", items: [
      { t: "What we build", h: "index.html#what-we-do" },
      { t: "The console", h: "index.html#proof" },
      { t: "Live systems", h: "index.html#work" },
    ]},
    { h: "Contact", items: [
      { t: "Book a discovery call", h: "index.html#contact" },
      { t: "luke@zarco.uk", h: "mailto:luke@zarco.uk" },
      { t: "LinkedIn", h: "https://www.linkedin.com/company/zarco-ai" },
    ]},
  ];
  return (
    <footer className="footer">
      <div className="shell">
        <div className="footer-top">
          <div className="footer-brand-col">
            <a href="index.html" className="footer-brand">Zarco<span style={{ color: "var(--magenta)" }}>.</span></a>
            <p className="footer-tag">AI implementation studio for UK businesses. We turn AI from buzzword into business infrastructure.</p>
            <p className="footer-addr">UK-based · Built for UK businesses</p>
          </div>
          <div className="footer-grid">
            {cols.map((c) => (
              <div key={c.h}>
                <div className="footer-col-head">{c.h}</div>
                <ul className="footer-col-list">
                  {c.items.map((i) => (
                    <li key={i.t}><a href={i.h} className="footer-link">{i.t}</a></li>
                  ))}
                </ul>
              </div>
            ))}
          </div>
        </div>
        <div className="footer-legal">
          <a href="privacy.html" className="footer-legal-link">Privacy</a>
          <a href="cookies.html" className="footer-legal-link">Cookies</a>
          <a href="terms.html" className="footer-legal-link">Terms</a>
          <a href="accessibility.html" className="footer-legal-link">Accessibility</a>
          <a href="compliance.html" className="footer-legal-link">Security</a>
        </div>
        <div className="footer-bottom">
          <span>© 2026 Zarco Systems Ltd · Registered in England &amp; Wales</span>
          <a href="#top" className="footer-top-link" onClick={(e) => { e.preventDefault(); window.scrollTo({ top: 0, behavior: "smooth" }); }}>↑ Back to top</a>
        </div>
      </div>
      <span className="footer-watermark" aria-hidden="true">Zarco</span>
    </footer>
  );
}

const footerCss = `
.footer {
  padding: var(--space-16) 0 var(--space-8);
  background: var(--paper);
  border-top: 1px solid var(--ink-10);
  position: relative;
  overflow: hidden;
}
.footer-watermark {
  position: absolute; left: 50%; bottom: -0.42em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(120px, 24vw, 340px);
  letter-spacing: -0.04em; line-height: 1; color: var(--ink); opacity: 0.04;
  pointer-events: none; user-select: none; white-space: nowrap;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 3fr;
  gap: 80px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--ink-20);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-block; margin-bottom: 20px;
}
.footer-brand:hover { color: var(--ink); text-decoration: none; }
.footer-tag {
  font-size: 15px; color: var(--ink-60); max-width: 320px;
  line-height: 1.55; margin: 0 0 28px;
}
.footer-addr {
  font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--ink-40); margin: 0;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.footer-col-head {
  font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--ink-40); font-weight: 500; margin-bottom: 18px;
}
.footer-col-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.footer-link { font-size: 14px; color: var(--ink); text-decoration: none; }
.footer-link:hover { color: var(--magenta); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  padding-top: 28px;
}
.footer-legal-link {
  font-size: 13px; color: var(--ink-60); text-decoration: none;
}
.footer-legal-link:hover { color: var(--magenta); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--ink-10);
  font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-40);
  flex-wrap: wrap;
  position: relative; z-index: 1;
}
.footer-top-link { color: var(--ink-40); text-decoration: none; }
.footer-top-link:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
`;

window.Footer = Footer;
window.footerCss = footerCss;
