// ============================================================
// FINAL CTA + FOOTER
// ============================================================

const SOCIALS = [
  { label: 'YouTube', href: 'https://www.youtube.com/@BeymannCapital', path: 'M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z' },
  { label: 'TikTok', href: 'https://www.tiktok.com/@beymanncapital', path: 'M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z' },
  { label: 'Instagram', href: 'https://www.instagram.com/beymanncapital/', path: 'M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z' },
  { label: 'X', href: 'https://x.com/beymanncapital/', path: 'M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z' },
  { label: 'LinkedIn', href: 'https://www.linkedin.com/company/beymann-capital/', path: 'M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z' },
  { label: 'Discord', href: 'https://discord.gg/kDWnqjZV37', path: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9554 2.4189-2.1568 2.4189Z' },
  { label: 'Substack', href: 'https://substack.com/@beymanncapital', path: 'M22.539 8.242H1.46V5.406h21.08v2.836zM1.46 10.812V24L12 18.11 22.54 24V10.812H1.46zM22.54 0H1.46v2.836h21.08V0z' },
  { label: 'Medium', href: 'https://www.medium.com/beymann-capital/', path: 'M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z' },
];

const FinalCTA = ({ onJoin }) => {
  const { t } = useI18n();
  return (
  <section style={{
    padding: '160px 48px', position: 'relative', overflow: 'hidden',
    background: 'radial-gradient(ellipse at 50% 0%, rgba(196,172,120,.08), transparent 50%)',
  }}>
    <div style={{ maxWidth: 1000, margin: '0 auto', textAlign: 'center', position: 'relative' }}>
      <div style={{ display: 'inline-flex', marginBottom: 28 }}>
        <Eyebrow>{t('finalCta.eyebrow')}</Eyebrow>
      </div>
      <h2 data-reveal style={{
        fontFamily: 'RH Phonic', fontWeight: 700,
        fontSize: 'clamp(56px,7vw,104px)', lineHeight: .96,
        letterSpacing: '-.03em', textTransform: 'uppercase',
        margin: 0,
      }}>
        {t('finalCta.title.line1')}<br />
        <em style={{
          fontFamily: 'Martina Plantijn', fontStyle: 'italic',
          fontWeight: 400, color: 'var(--gold-400)', textTransform: 'none',
          letterSpacing: '-.015em',
        }}>{t('finalCta.title.accent')}</em>
      </h2>
      <div data-reveal style={{
        fontFamily: 'Martina Plantijn', fontStyle: 'italic',
        fontSize: 21, color: 'var(--fg-muted)', marginTop: 36,
        maxWidth: 760, marginLeft: 'auto', marginRight: 'auto', lineHeight: 1.5,
      }}>
        {t('finalCta.body')}
      </div>
      <div style={{
        display: 'flex', gap: 14, marginTop: 48,
        justifyContent: 'center', flexWrap: 'wrap',
      }}>
        <Btn size="lg" onClick={onJoin}>{t('finalCta.btn')}</Btn>
      </div>
    </div>
  </section>
  );
};

const Footer = () => {
  const { t } = useI18n();
  return (
  <footer style={{
    padding: '32px 48px 36px',
    background: 'var(--ink-2)',
  }}>
    <div className="footer-grid" style={{
      maxWidth: 1200, margin: '0 auto',
      display: 'grid', gridTemplateColumns: '1fr auto', gap: 48,
    }}>
      <div>
        <img src="assets3/logo-gold.png" style={{ height: 28 }} alt="Beymann" />
        <div style={{
          fontFamily: 'Martina Plantijn', fontStyle: 'italic',
          fontSize: 15, color: 'var(--fg-muted)', marginTop: 18,
          lineHeight: 1.55, maxWidth: 320,
        }}>
          {t('footer.tagline')}
        </div>
        <div style={{
          marginTop: 22, display: 'flex', alignItems: 'center', gap: 8,
          fontSize: 11, color: 'var(--fg-dim)', letterSpacing: '.12em',
          textTransform: 'uppercase',
        }}>
          <span style={{
            width: 6, height: 6, borderRadius: 999, background: 'var(--gold-400)',
            boxShadow: '0 0 12px rgba(196,172,120,.7)',
          }} />
          {t('footer.earlyAccess')}
        </div>
      </div>
      <div className="footer-social">
        <ul style={{
          listStyle: 'none', margin: 0, padding: 0,
          display: 'flex', flexWrap: 'wrap', gap: 14,
        }}>
          {SOCIALS.map((s) => (
            <li key={s.label}>
              <a href={s.href} target="_blank" rel="noopener noreferrer" aria-label={s.label}>
                <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                  <path d={s.path} />
                </svg>
              </a>
            </li>
          ))}
        </ul>
      </div>
    </div>
    <div style={{
      maxWidth: 1200, margin: '56px auto 0', paddingTop: 28,
      borderTop: '1px solid var(--border)',
      display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap', gap: 16,
      fontSize: 11, color: 'var(--fg-dim)', letterSpacing: '.04em',
    }}>
      <span style={{ display: 'inline-flex', alignItems: 'center', gap: 14 }}>
        {t('footer.copyright')}
        <button
          type="button"
          onClick={() => { if (window.openCookiePreferences) window.openCookiePreferences(); }}
          style={{
            background: 'none', border: 0, padding: 0, cursor: 'pointer',
            font: 'inherit', color: 'inherit', letterSpacing: 'inherit',
            textDecoration: 'underline', textUnderlineOffset: 3,
          }}
        >
          {t('footer.cookiePrefs')}
        </button>
      </span>
      <span style={{ fontStyle: 'italic', fontFamily: 'Martina Plantijn', fontSize: 12 }}>
        {t('footer.disclaimer')}
      </span>
      <span style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}>
        {t('footer.builtIn')}
        <span aria-hidden="true">🇺🇸</span>
      </span>
    </div>
  </footer>
  );
};

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