/* =======================================================================
   FOOTER — composed editorial block
   -----------------------------------------------------------------------
   Stacked sections on a single #F2EDE3 surface, each with its own
   scroll-driven reveal so the footer assembles itself in beats as the
   user reaches it instead of all snapping in at once:

     1. Giant FOLLY PARTNERS wordmark — heavy mask-reveal (clipped from
        below by overflow-hidden, with translate 140px + blur 32px). The
        wordmark wipes up out of nothing, the most weighted entrance on
        the page.
     2. Giant "GET IN TOUCH →" pill button — bespoke spring entrance
        (line → pill bubble), retained.
     3. Two editorial nav columns — Navigate / Connect. (A Legal column
        was removed — it held only dead Privacy/Terms href="#" links.)
        Eyebrow + list of links per column. Magic-underline grow on hover.
     4. Slim © meta rail.
   ======================================================================= */

/* =======================================================================
   GET IN TOUCH — oversized pill button
   -----------------------------------------------------------------------
   Scroll-triggered entry animation: the button starts as a thin lavender
   horizontal line (scaleY ≈ 0.025) and springs open into the full pill on
   first in-view, with a touch of underdamping so the height settles with
   a small "bubble" overshoot. Width settles a beat after height; inner
   content fades in once the shape is mostly there. `useInView` with
   `once: true` so it never replays. Hover translateY preserved via state.
   ======================================================================= */
const { motion: m4, useInView: useInView4 } = window.Motion || {};
// Reveal helpers shared from sections.jsx (separate Babel script scope).
const useBlurFadeUp4         = window.useBlurFadeUp;
const REVEAL_INITIAL_STYLE_4 = window.REVEAL_INITIAL_STYLE;

// Heavy-reveal initial state for the wordmark — significantly more
// translate and blur than the page-default reveal so the entrance lands
// as the footer's anchor moment rather than a quiet fade-in.
const HEAVY_REVEAL_INITIAL_STYLE = {
  opacity: 0,
  transform: 'translate3d(0, 64px, 0)',
  filter: 'blur(14px)',
  willChange: 'opacity, transform, filter',
};

const FOOTER_EMAIL = 'contact@follypartners.com';

function GetInTouchButton() {
  const ref = React.useRef(null);
  const inView = useInView4 ? useInView4(ref, { once: true, amount: 0.35 }) : true;
  const [hovered, setHovered] = React.useState(false);
  const [pressed, setPressed] = React.useState(false);
  const [copied, setCopied] = React.useState(false);
  const resetTimerRef = React.useRef(null);

  // Click → copy email to clipboard. Modern clipboard API first; falls back
  // to the legacy textarea+execCommand path for non-secure-context browsers
  // (older iOS Safari, plain http previews). Last resort opens the user's
  // mail client so the address still lands somewhere usable.
  const handleCopy = async (e) => {
    e.preventDefault();
    let success = false;
    try {
      if (navigator.clipboard && navigator.clipboard.writeText) {
        await navigator.clipboard.writeText(FOOTER_EMAIL);
        success = true;
      } else {
        const ta = document.createElement('textarea');
        ta.value = FOOTER_EMAIL;
        ta.setAttribute('readonly', '');
        ta.style.position = 'fixed';
        ta.style.left = '-9999px';
        ta.style.opacity = '0';
        document.body.appendChild(ta);
        ta.select();
        try { success = document.execCommand('copy'); } catch (_) { /* no-op */ }
        document.body.removeChild(ta);
      }
    } catch (_) {
      success = false;
    }
    if (!success) {
      window.location.href = `mailto:${FOOTER_EMAIL}`;
      return;
    }
    setCopied(true);
    if (resetTimerRef.current) clearTimeout(resetTimerRef.current);
    resetTimerRef.current = setTimeout(() => setCopied(false), 2200);
  };

  React.useEffect(() => () => {
    if (resetTimerRef.current) clearTimeout(resetTimerRef.current);
  }, []);

  return (
    <m4.button
      ref={ref}
      type="button"
      onClick={handleCopy}
      onMouseEnter={() => setHovered(true)}
      onMouseLeave={() => { setHovered(false); setPressed(false); }}
      onPointerDown={() => setPressed(true)}
      onPointerUp={() => setPressed(false)}
      onPointerCancel={() => setPressed(false)}
      aria-live="polite"
      aria-label={copied ? 'Email copied to clipboard' : `Copy ${FOOTER_EMAIL} to clipboard`}
      className="group relative block select-none footer-contact-row"
      style={{
        background: 'transparent',
        border: 'none',
        borderTop: `1px solid ${hovered ? 'rgb(var(--c-text) / 0.34)' : 'rgb(var(--c-text) / 0.16)'}`,
        borderBottom: `1px solid ${hovered ? 'rgb(var(--c-text) / 0.34)' : 'rgb(var(--c-text) / 0.16)'}`,
        borderRadius: 0,
        font: 'inherit',
        cursor: 'pointer',
        textAlign: 'left',
        width: '100%',
        padding: 'clamp(20px, 2.2vw, 30px) 0',
        transformOrigin: 'center',
        transform: 'translateZ(0)',
        backfaceVisibility: 'hidden',
        transition: 'border-color 320ms cubic-bezier(0.23, 1, 0.32, 1)',
      }}
      initial={{ opacity: 0, y: 24, filter: 'blur(8px)' }}
      animate={
        inView
          ? {
              opacity: 1,
              y: pressed ? 1 : 0,
              filter: 'blur(0px)',
            }
          : { opacity: 0, y: 24, filter: 'blur(8px)' }
      }
      transition={{
        opacity: { duration: 0.5, ease: [0.32, 0.72, 0, 1] },
        y:       { duration: 0.5, ease: [0.32, 0.72, 0, 1] },
        filter:  { duration: 0.5, ease: [0.32, 0.72, 0, 1] },
      }}
    >
      <m4.div
        className="relative flex flex-col sm:flex-row sm:items-center justify-between gap-5 sm:gap-8"
        initial={{ opacity: 0 }}
        animate={{ opacity: inView ? 1 : 0 }}
        transition={{ duration: 0.45, delay: 0.18, ease: [0.32, 0.72, 0, 1] }}
      >
        <span className="min-w-0">
          <span
            className="block uppercase"
            style={{
              fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
              fontSize: 10,
              letterSpacing: '0.18em',
              color: 'rgb(var(--c-muted))',
              marginBottom: 10,
            }}
          >
            Contact
          </span>
          <span
            style={{
              display: 'inline-grid',
              gridTemplateColumns: '1fr',
              justifyItems: 'start',
              alignItems: 'center',
              color: 'rgb(var(--c-text))',
              fontFamily: '"Instrument Serif", serif',
              fontStyle: 'italic',
              fontWeight: 400,
              fontSize: 'clamp(2rem, 4.6vw, 4.6rem)',
              letterSpacing: '-0.025em',
              lineHeight: 0.95,
              maxWidth: '100%',
            }}
          >
            <span
              aria-hidden={copied}
              style={{
                gridArea: '1 / 1',
                opacity: copied ? 0 : 1,
                transform: copied ? 'translateY(-8px)' : 'translateY(0)',
                transition:
                  'opacity 220ms cubic-bezier(0.32, 0.72, 0, 1), transform 220ms cubic-bezier(0.32, 0.72, 0, 1)',
                willChange: 'opacity, transform',
              }}
            >
              {FOOTER_EMAIL}
            </span>
            <span
              aria-hidden={!copied}
              style={{
                gridArea: '1 / 1',
                opacity: copied ? 1 : 0,
                transform: copied ? 'translateY(0)' : 'translateY(8px)',
                transition:
                  'opacity 240ms cubic-bezier(0.32, 0.72, 0, 1) 60ms, transform 240ms cubic-bezier(0.32, 0.72, 0, 1) 60ms',
                willChange: 'opacity, transform',
              }}
            >
              Email copied
            </span>
          </span>
        </span>

        <span
          className="footer-contact-copy shrink-0 inline-flex items-center gap-3 uppercase"
          style={{
            alignSelf: 'flex-start',
            fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
            fontSize: 10,
            letterSpacing: '0.18em',
            color: 'rgb(var(--c-muted))',
            transform: hovered && !copied ? 'translateX(2px)' : 'translateX(0)',
            transition: 'transform 280ms cubic-bezier(0.23, 1, 0.32, 1), color 280ms cubic-bezier(0.23, 1, 0.32, 1)',
          }}
        >
          {copied ? 'Copied' : 'Copy email'}
          <span
            aria-hidden="true"
            className="footer-contact-arrow inline-flex items-center justify-center"
            style={{
              display: 'inline-grid',
              gridTemplateColumns: '1fr',
              placeItems: 'center',
              width: 42,
              height: 42,
              borderRadius: '50%',
              border: '1px solid rgb(var(--c-text) / 0.24)',
              color: 'rgb(var(--c-text))',
              background: hovered ? 'rgb(var(--c-text) / 0.055)' : 'transparent',
              transition: 'background-color 280ms cubic-bezier(0.23, 1, 0.32, 1), transform 280ms cubic-bezier(0.23, 1, 0.32, 1)',
              transform: hovered && !copied ? 'translate(3px, -3px)' : 'translate(0, 0)',
            }}
          >
            <svg
              width="18" height="18" viewBox="0 0 24 24" fill="none"
              stroke="currentColor" strokeWidth="1.9" strokeLinecap="round" strokeLinejoin="round"
              style={{
                gridArea: '1 / 1',
                opacity: copied ? 0 : 1,
                transform: copied ? 'scale(0.6) rotate(-45deg)' : 'scale(1) rotate(0)',
                transition:
                  'opacity 220ms cubic-bezier(0.32, 0.72, 0, 1), transform 220ms cubic-bezier(0.32, 0.72, 0, 1)',
              }}
            >
              <line x1="5" y1="12" x2="19" y2="12" />
              <polyline points="13 6 19 12 13 18" />
            </svg>
            <svg
              width="18" height="18" viewBox="0 0 24 24" fill="none"
              stroke="currentColor" strokeWidth="2.1" strokeLinecap="round" strokeLinejoin="round"
              style={{
                gridArea: '1 / 1',
                opacity: copied ? 1 : 0,
                transform: copied ? 'scale(1) rotate(0)' : 'scale(0.6) rotate(45deg)',
                transition:
                  'opacity 220ms cubic-bezier(0.32, 0.72, 0, 1) 60ms, transform 220ms cubic-bezier(0.32, 0.72, 0, 1) 60ms',
              }}
            >
              <polyline points="20 6 9 17 4 12" />
            </svg>
          </span>
        </span>
      </m4.div>
    </m4.button>
  );
}

/* =======================================================================
   FOOTER COLUMN — editorial nav block.
   Small uppercase eyebrow above a vertical list of links. Each link gets
   the magic-underline grow on hover via the .footer-col-link CSS class
   defined inline in the Footer below. Items without an `href` render as
   plain text (offices, addresses) so the same component handles both
   "links" and "facts".
   ======================================================================= */
function FooterColumn({ title, items }) {
  return (
    <div>
      <div
        className="uppercase mb-4 sm:mb-5"
        style={{
          color: 'rgb(var(--c-muted))',
          fontSize: '10.5px',
          letterSpacing: '0.18em',
          fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
        }}
      >
        {title}
      </div>
      <ul className="space-y-2.5 sm:space-y-3">
        {items.map((it, i) => (
          <li key={`${it.label}-${i}`} className="leading-tight">
            {it.href ? (
              <a
                href={it.href}
                {...(it.external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
                className="footer-col-link inline-block"
                style={{
                  color: 'rgb(var(--c-text))',
                  fontSize: 'clamp(14.5px, 0.95vw, 16px)',
                  letterSpacing: '-0.005em',
                  lineHeight: 1.4,
                }}
              >
                <span className="footer-col-link-text">{it.label}</span>
              </a>
            ) : (
              <span
                className="inline-block"
                style={{
                  color: 'rgb(var(--c-text) / 0.6)',
                  fontSize: 'clamp(14.5px, 0.95vw, 16px)',
                  letterSpacing: '-0.005em',
                  lineHeight: 1.4,
                }}
              >
                {it.label}
              </span>
            )}
          </li>
        ))}
      </ul>
    </div>
  );
}

/* =======================================================================
   CONTACT CTA — a lightweight top spacer before the footer.
   Kept for App.jsx compatibility; footer now holds everything.
   ======================================================================= */
function ContactCTA() {
  return (
    <section
      className="relative"
      style={{ background: 'rgb(var(--c-bg2))' }}
      data-screen-label="Contact"
      aria-hidden="true"
    >
      {/* pt-16 (mobile-only — sm:pt-20 overrides from 640px up) makes
          the Investments→Footer gap on mobile = Investments pb-16 (4rem)
          + this 4rem = 8rem, matching the BBO→Investments gap for
          consistent inter-section rhythm. Desktop pt values unchanged. */}
      <div className="pt-8 sm:pt-12" />
    </section>
  );
}

/* =======================================================================
   EDITORIAL GET IN TOUCH (MOBILE-ONLY)
   -----------------------------------------------------------------------
   Magazine-spread vocabulary inspired by editorial design references —
   thin hairlines, mono-uppercase tags, an oversized italic serif as the
   focal piece, numbered rows for the contact options. Replaces the
   lavender pill on phones (`<= md`); the desktop pill is rendered in
   parallel and hidden on mobile so neither version touches the other.
   The copy-email flow + clipboard fallback chain mirrors the pill
   button so the action behaves identically.
   ======================================================================= */
function EditorialGetInTouchMobile() {
  const [copied, setCopied] = React.useState(false);
  const resetRef = React.useRef(null);

  const handleCopy = async () => {
    let success = false;
    try {
      if (navigator.clipboard && navigator.clipboard.writeText) {
        await navigator.clipboard.writeText(FOOTER_EMAIL);
        success = true;
      } else {
        const ta = document.createElement('textarea');
        ta.value = FOOTER_EMAIL;
        ta.setAttribute('readonly', '');
        ta.style.position = 'fixed';
        ta.style.left = '-9999px';
        ta.style.opacity = '0';
        document.body.appendChild(ta);
        ta.select();
        try { success = document.execCommand('copy'); } catch (_) { /* no-op */ }
        document.body.removeChild(ta);
      }
    } catch (_) { success = false; }
    if (!success) { window.location.href = `mailto:${FOOTER_EMAIL}`; return; }
    setCopied(true);
    if (resetRef.current) clearTimeout(resetRef.current);
    resetRef.current = setTimeout(() => setCopied(false), 2200);
  };

  React.useEffect(() => () => {
    if (resetRef.current) clearTimeout(resetRef.current);
  }, []);

  const MONO  = 'ui-monospace, SFMono-Regular, Menlo, monospace';
  const TEXT  = 'rgb(var(--c-text))';
  const RULE  = 'rgb(var(--c-text) / 0.16)';
  const TAG   = 'rgb(var(--c-text) / 0.5)';

  // A row in the numbered list. `onClick` makes it behave as a tappable
  // surface (the email row); plain rows just render. Active state gives
  // a faint background flash for press feedback on touch.
  const Row = ({ idx, value, onClick, href, action }) => {
    const inner = (
      <div
        className="flex items-baseline justify-between"
        style={{ paddingTop: 18, paddingBottom: 18 }}
      >
        <div className="flex items-baseline gap-4 min-w-0">
          <span
            aria-hidden="true"
            style={{
              fontFamily: MONO,
              fontSize: 10,
              letterSpacing: '0.18em',
              textTransform: 'uppercase',
              color: TAG,
              flexShrink: 0,
              transform: 'translateY(-1px)',
            }}
          >{idx}</span>
          <span
            style={{
              fontFamily: '"Instrument Serif", serif',
              fontStyle: 'italic',
              fontWeight: 400,
              fontSize: 22,
              lineHeight: 1.15,
              letterSpacing: '-0.005em',
              color: TEXT,
              minWidth: 0,
              overflow: 'hidden',
              textOverflow: 'ellipsis',
              whiteSpace: 'nowrap',
            }}
          >{value}</span>
        </div>
        {action && (
          <span
            aria-hidden="true"
            style={{
              flexShrink: 0,
              marginLeft: 12,
              fontSize: 16,
              color: TEXT,
              transform: 'translateY(-2px)',
              opacity: 0.85,
            }}
          >↗</span>
        )}
      </div>
    );
    const cls = 'block w-full text-left press';
    if (onClick) {
      return (
        <button
          type="button"
          onClick={onClick}
          aria-live={action ? 'polite' : undefined}
          aria-label={action ? (copied ? 'Email copied' : `Copy ${FOOTER_EMAIL} to clipboard`) : undefined}
          className={cls}
          style={{ background: 'transparent', border: 'none', padding: 0, font: 'inherit', cursor: 'pointer' }}
        >
          {inner}
        </button>
      );
    }
    if (href) {
      return (
        <a
          href={href}
          target="_blank"
          rel="noopener noreferrer"
          className={cls}
          style={{ color: 'inherit', textDecoration: 'none' }}
        >
          {inner}
        </a>
      );
    }
    return inner;
  };

  const Hairline = () => (
    <div style={{ height: 1, background: RULE }} aria-hidden="true" />
  );

  return (
    <section
      aria-label="Get in touch"
      style={{ position: 'relative' }}
    >
      {/* Top mono tag rail — the "magazine masthead" beat. */}
      <div
        className="flex justify-between items-center"
        style={{
          fontFamily: MONO,
          fontSize: 10,
          letterSpacing: '0.18em',
          textTransform: 'uppercase',
          color: TAG,
        }}
      >
        <span>Get In Touch</span>
        <span>Est. 2021</span>
      </div>

      <div style={{ marginTop: 22 }}><Hairline /></div>

      {/* Headline — oversized italic serif, two-line stack. The period
          stays upright (fontStyle: normal) so it lands as a sharp visual
          stop after the lean of the italic. */}
      <h2
        className="select-none"
        style={{
          marginTop: 28,
          marginBottom: 0,
          fontFamily: '"Instrument Serif", serif',
          fontStyle: 'italic',
          fontWeight: 400,
          fontSize: 'clamp(3.5rem, 16vw, 5.25rem)',
          lineHeight: 0.92,
          letterSpacing: '-0.025em',
          color: TEXT,
        }}
      >
        Reach<br/>out<span style={{ fontStyle: 'normal' }}>.</span>
      </h2>

      <div style={{ marginTop: 36 }}><Hairline /></div>

      {/* Numbered rows. The email row toggles to "Email copied" on tap so
          the user gets a clear acknowledgement of the action, matching
          the pill's behaviour on desktop. */}
      <Row
        idx="01"
        value={copied ? 'Email copied to clipboard' : FOOTER_EMAIL}
        onClick={handleCopy}
        action
      />
      <Hairline />
      <Row
        idx="02"
        value="Victoria, British Columbia"
        href="https://www.google.com/maps/place/Victoria,+BC"
        action
      />
      <Hairline />
      <Row
        idx="03"
        value="A family office, since 2021"
      />
      <Hairline />

      {/* Coordinates line — small italic serif, the "Buzludzha spread"
          flourish from the inspiration. Reads as a quiet typographic
          period at the end of the section. */}
      <div
        style={{
          marginTop: 22,
          fontFamily: '"Instrument Serif", serif',
          fontStyle: 'italic',
          fontSize: 14,
          letterSpacing: '0.01em',
          color: TAG,
          textAlign: 'right',
        }}
      >
        48° 25′ 38″ N&nbsp;&nbsp;—&nbsp;&nbsp;123° 22′ 04″ W
      </div>
    </section>
  );
}

/* =======================================================================
   FOOTER — wordmark first, giant Get In Touch button below, meta rail.
   ======================================================================= */
function Footer() {
  // Scroll-driven reveals matching the rest of the page. Each block gets
  // its own ref so it can enter on its own beat as the user scrolls into
  // the footer — the wordmark lands first (heavy weight, biggest move),
  // then the link grid columns, then the meta rail. The Get In Touch
  // button has its own bespoke spring entrance below and is intentionally
  // left out of the reveal cascade — wrapping it would hide the spring
  // animation behind the parent's opacity ramp.
  const wordmarkRef = React.useRef(null);
  // Two link columns (Navigate / Connect) since the Legal column was
  // removed (it held only dead Privacy/Terms href="#" links).
  const linksColRefs = [React.useRef(null), React.useRef(null)];
  const metaRef     = React.useRef(null);
  React.useEffect(() => {
    const apply = window.applyBlurFadeUp;
    if (!apply) return;
    const cleanups = [
      // Reveal windows are tuned so that EVERY layer is fully resolved by
      // the time the page reaches its scroll-end resting position. The
      // previous build used endVh values (0.43 → 0.55) below the meta
      // rail's resting top (≈0.94vh in a full-fold footer), so the rail
      // could never finish its animation — it stayed half-blurred at
      // rest. The new endVh values are pushed up against each layer's
      // resting position, and the start→end windows are tightened so the
      // reveals feel snappier (less lingering blur on slow scroll).
      apply(wordmarkRef.current, { startVh: 1.00, endVh: 0.70, dyPx: 90, blurPx: 22 }),
      apply(linksColRefs[0].current, { startVh: 1.00, endVh: 0.82, dyPx: 36, blurPx: 10 }),
      apply(linksColRefs[1].current, { startVh: 0.96, endVh: 0.80, dyPx: 36, blurPx: 10 }),
      // Meta rail rests right at the bottom of the viewport; endVh:0.95
      // guarantees raw≥1 by scroll-end, so the rail lands sharp.
      apply(metaRef.current, { startVh: 1.05, endVh: 0.95, dyPx: 24, blurPx: 8 }),
    ];
    return () => cleanups.forEach((fn) => fn && fn());
  }, []);

  const navItems = [
    { label: 'Home',         href: '/' },
    { label: 'Portfolio',    href: '/investments.html' },
  ];
  const connectItems = [
    { label: 'contact@follypartners.com', href: 'mailto:contact@follypartners.com' },
    { label: 'Victoria, British Columbia' },
  ];
  // The "Legal" column was removed: its only entries were Privacy and
  // Terms linking to href="#" (no-op), and no legal.html exists. Per the
  // design review, ship nothing rather than dead links. The grid below
  // rebalanced from 3 columns to 2 (Navigate / Connect) so the colophon
  // still reads as intentional. Reinstate a Legal column here (and bump
  // the grid back to sm:grid-cols-3 + a third linksColRef) only once real
  // /privacy and /terms pages exist.
  return (
    <footer
      id="contact"
      className="relative"
      style={{
        background: 'rgb(var(--c-bg2))',
      }}
      data-screen-label="Footer"
    >
      {/* Footer-local link affordances: small visible type, generous invisible
          hit areas, and quiet underline growth on hover/focus. */}
      <style dangerouslySetInnerHTML={{ __html: `
        .footer-col-link .footer-col-link-text {
          position: relative;
          display: inline-block;
        }
        .footer-col-link {
          position: relative;
        }
        .footer-col-link::before {
          content: '';
          position: absolute;
          inset: -9px -10px;
        }
        .footer-col-link .footer-col-link-text::after {
          content: '';
          position: absolute;
          left: 0;
          right: 0;
          bottom: -3px;
          height: 1px;
          background-color: currentColor;
          transform: scaleX(0);
          transform-origin: center;
          transition: transform 320ms cubic-bezier(0.23, 1, 0.32, 1);
          will-change: transform;
        }
        .footer-col-link:hover .footer-col-link-text::after,
        .footer-col-link:focus-visible .footer-col-link-text::after {
          transform: scaleX(1);
        }
        .footer-col-link:focus-visible {
          outline: none;
        }
      ` }} />
      <div className="px-5 sm:px-8 md:px-10 py-20 sm:py-24 md:py-32">
        <div className="mx-auto max-w-7xl w-full">
          <div className="grid grid-cols-1 lg:grid-cols-[minmax(0,0.88fr)_minmax(520px,1.12fr)] gap-16 lg:gap-24 items-start">
            <div ref={wordmarkRef} style={HEAVY_REVEAL_INITIAL_STYLE}>
              <h2
                className="select-none"
                aria-label="Folly Partners"
                style={{
                  fontFamily: 'Almarai, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
                  fontWeight: 800,
                  fontSize: 'clamp(3.35rem, 7vw, 6.75rem)',
                  letterSpacing: '-0.055em',
                  lineHeight: 0.9,
                  color: 'rgb(var(--c-text))',
                  margin: 0,
                  maxWidth: 620,
                }}
              >
                <span style={{ display: 'block' }}>Folly</span>
                <span style={{ display: 'block', fontWeight: 300, letterSpacing: '-0.045em' }}>Partners</span>
              </h2>
              <p
                style={{
                  marginTop: 26,
                  maxWidth: 430,
                  color: 'rgb(var(--c-text) / 0.62)',
                  fontSize: 'clamp(1rem, 1.15vw, 1.18rem)',
                  lineHeight: 1.55,
                  letterSpacing: '-0.01em',
                }}
              >
                Friendly and creative capital for entrepreneurs.
              </p>
            </div>

            <div>
              <div
                className="uppercase"
                style={{
                  fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
                  fontSize: 10,
                  letterSpacing: '0.18em',
                  color: 'rgb(var(--c-muted))',
                  marginBottom: 18,
                }}
              >
                Get in touch
              </div>
              <p
                style={{
                  fontFamily: '"Instrument Serif", serif',
                  fontStyle: 'italic',
                  fontWeight: 400,
                  fontSize: 'clamp(2.5rem, 5.2vw, 6rem)',
                  lineHeight: 0.94,
                  letterSpacing: '-0.028em',
                  color: 'rgb(var(--c-text))',
                  margin: 0,
                  maxWidth: 780,
                }}
              >
                Founder introductions, partnership ideas, private opportunities.
              </p>

              <div className="mt-10 sm:mt-12">
                <GetInTouchButton />
              </div>

              <div className="mt-14 sm:mt-16 grid grid-cols-1 sm:grid-cols-2 gap-10 sm:gap-12">
                <div
                  ref={linksColRefs[0]}
                  style={REVEAL_INITIAL_STYLE_4}
                  className="text-left"
                >
                  <FooterColumn title="Navigate" items={navItems} />
                </div>
                <div
                  ref={linksColRefs[1]}
                  style={REVEAL_INITIAL_STYLE_4}
                  className="text-left"
                >
                  <FooterColumn title="Connect" items={connectItems} />
                </div>
              </div>
            </div>
          </div>

          <div ref={metaRef} style={REVEAL_INITIAL_STYLE_4}>
            <div
              className="mt-16 sm:mt-20 md:mt-24 pt-5 sm:pt-6 border-t border-[rgb(var(--c-ink) / 0.12)] flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between text-[10px] tracking-[0.18em] uppercase"
              style={{
                color: 'rgb(var(--c-text))',
                opacity: 0.58,
                fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
              }}
            >
              <span>© {new Date().getFullYear()} Folly Partners</span>
              <span>Victoria, Canada</span>
            </div>
          </div>
        </div>
      </div>
    </footer>
  );
}

Object.assign(window, { ContactCTA, Footer });
