// Shared page shell for subpages: Header (from ui.jsx) + Footer + page helpers.

function Footer({ base = "/" }) {
  return <footer className="navy dk ftr"><div className="wrap" style={{ position: "relative" }}><SiteFooterBody base={base} /></div></footer>;
}

function Phero({ eyebrow, title, lead, children }) {
  return (
    <section className="phero">
      <div className="hero-lines flat"></div>
      <div className="glow"></div>
      <div className="wrap">
        {eyebrow && <span className="eb rv"><i></i>{eyebrow}</span>}
        <h1 className="rv" style={{ "--d": "60ms" }}>{title}</h1>
        {lead && <p className="lead rv" style={{ "--d": "140ms", margin: "20px auto 0" }}>{lead}</p>}
        {children}
      </div>
    </section>
  );
}

function EntityCard() {
  return (
    <div className="entity-card">
      <p className="nm">VSP Partners Ltd</p>
      <p>45 Albemarle Street, London W1S 4JL, United Kingdom</p>
      <p className="mono">Company No. 17485578</p>
    </div>
  );
}

function CTAStrip({ title = "Get early access to Capital Hunt", sub = "Join 2,000+ founders using Capital Hunt to find, reach and close the right investors." }) {
  return (
    <section className="block"><div className="wrap">
      <div className="cta-strip navy dk rv" onMouseMove={spot}>
        <div className="orb"></div>
        <div style={{ position: "relative" }}>
          <h2>{title}</h2>
          <p className="lead">{sub}</p>
        </div>
        <Button variant="primary" size="xl" arrow href={CH.APP} target="_blank" style={{ position: "relative", background: "#fff", color: "var(--accent-primary)" }}>Get Early Access</Button>
      </div>
    </div></section>
  );
}

function Page({ children, current }) {
  useRevealAll();
  return <><Header base="/" current={current} /><main className="subpage">{children}</main><Footer base="/" /></>;
}

function mountPage(node, opts = {}) { ReactDOM.createRoot(document.getElementById("root")).render(<Page current={opts.current}>{node}</Page>); }

Object.assign(window, { Footer, Phero, EntityCard, CTAStrip, Page, mountPage });
