﻿/* Auto-generated from mockups/11-final-cta.html */
(function(){

const { useEffect, useRef } = React;

    const WA = ({ size = 22 }) => (
      <svg viewBox="0 0 24 24" width={size} height={size} fill="currentColor" style={{ flex:'none' }}>
        <path d="M17.5 14.4c-.3-.1-1.7-.9-2-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-1 1.2-.2.2-.4.2-.7.1-.3-.1-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.5-.5c.2-.2.2-.3.3-.5 0-.2 0-.4 0-.5 0-.1-.7-1.6-.9-2.2-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.4 0 1.4 1 2.8 1.2 3 .1.2 2 3 4.7 4.2 1.7.7 2.3.8 3.1.7.5-.1 1.7-.7 1.9-1.4.2-.7.2-1.3.2-1.4-.1-.1-.3-.2-.5-.2zM12 2C6.5 2 2 6.5 2 12c0 1.9.5 3.7 1.5 5.3L2 22l4.8-1.5c1.5.8 3.3 1.3 5.2 1.3 5.5 0 10-4.5 10-10S17.5 2 12 2z"/>
      </svg>
    );

    function useReveal(delayMs = 0) {
      const ref = useRef(null);
      useEffect(() => {
        if (!ref.current) return;
        const el = ref.current;
        const trigger = () => setTimeout(() => el.classList.add('in'), delayMs);
        const r = el.getBoundingClientRect();
        if (r.top < window.innerHeight * 0.95 && r.bottom > 0) { trigger(); return; }
        const io = new IntersectionObserver(([e]) => {
          if (e.isIntersecting) { trigger(); io.disconnect(); }
        }, { threshold: 0.15 });
        io.observe(el);
        return () => io.disconnect();
      }, [delayMs]);
      return ref;
    }

    function Eyebrow() {
      const ref = useReveal(0);
      const t = window.useCopy();
      return (
        <div ref={ref} className="reveal" style={{
          display: 'inline-flex', alignItems: 'center', gap: 10,
          fontFamily: 'var(--font-mono)', fontSize: 14,
          color: '#6b8eff',
          letterSpacing: '0.16em', textTransform: 'uppercase',
          marginBottom: 32,
        }}>
          <span style={{
            width: 6, height: 6, borderRadius: 9999,
            background: '#0047ff', boxShadow: '0 0 8px #0047ff',
          }}/>
          {t.final.badge}
        </div>
      );
    }

    function Headline() {
      const ref = useReveal(100);
      const t = window.useCopy();
      return (
        <h2 ref={ref} className="reveal section-h2" style={{
          margin: '0 0 24px',
          fontFamily: 'var(--font-display)', fontWeight: 600,
          fontSize: 80, lineHeight: 1.02, letterSpacing: '-0.04em',
          color: 'var(--text-primary)', textWrap: 'balance',
          maxWidth: 960,
        }}>
          {t.final.h1}
        </h2>
      );
    }

    function SubLine() {
      const ref = useReveal(200);
      const t = window.useCopy();
      return (
        <p ref={ref} className="reveal" style={{
          margin: '0 auto 56px',
          maxWidth: 640,
          fontFamily: 'var(--font-display)', fontWeight: 400,
          fontSize: 20, lineHeight: 1.55, color: 'var(--text-muted)',
          textWrap: 'pretty',
        }}>
          {t.final.sub}
        </p>
      );
    }

    function CTA() {
      const ref = useReveal(360);
      const glowRef = useReveal(440);
      const zoomRef = useReveal(460);
      const t = window.useCopy();
      return (
        <>
          <div ref={glowRef} className="ambient-glow"/>
          <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12 }}>
            <a ref={ref}
              className="reveal pop cta-primary"
              style={{ position: 'relative' }}
              href="https://wa.me/972534200984?text=Hi%20BoldBrandz%2C%20I%20saw%20your%20landing%20page%20and%20want%20to%20talk"
              target="_blank" rel="noopener noreferrer"
              data-gtm-event="Lead_WhatsApp_FinalCTA">
              <WA size={22}/>
              {t.final.cta}
            </a>
            <a ref={zoomRef}
              className="reveal"
              href="https://calendly.com/walid-d-boldbrandz"
              target="_blank" rel="noopener noreferrer"
              data-gtm-event="Lead_Zoom_FinalCTA"
              style={{
                display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 14,
                padding: '22px 44px',
                fontFamily: 'var(--font-display)', fontWeight: 600,
                fontSize: 20, letterSpacing: '-0.015em',
                color: '#0047ff',
                background: 'transparent',
                border: '1.5px solid #0047ff',
                borderRadius: 14,
                textDecoration: 'none',
                transition: 'background 220ms, color 220ms, transform 220ms',
              }}
              onMouseEnter={(e) => {
                e.currentTarget.style.background = '#0047ff';
                e.currentTarget.style.color = '#ffffff';
                e.currentTarget.style.transform = 'translateY(-1px)';
              }}
              onMouseLeave={(e) => {
                e.currentTarget.style.background = 'transparent';
                e.currentTarget.style.color = '#0047ff';
                e.currentTarget.style.transform = 'translateY(0)';
              }}
            >
              {t.final.zoom_cta}
            </a>
          </div>
        </>
      );
    }

    function Secondary() {
      const ref = useReveal(540);
      const t = window.useCopy();
      return (
        <div ref={ref} className="reveal" style={{
          marginTop: 28,
          fontFamily: 'var(--font-display)', fontSize: 18,
          color: 'var(--text-dim)', letterSpacing: '-0.005em',
        }}>
          {t.final.email_pre}{' '}
          <a href="mailto:info@boldbrandz.com" style={{
            color: 'var(--text-secondary)', textDecoration: 'none',
            borderBottom: '1px dotted var(--text-faint)',
            transition: 'color 180ms',
          }}
          onMouseEnter={(e) => e.currentTarget.style.color = '#0047ff'}
          onMouseLeave={(e) => e.currentTarget.style.color = 'var(--text-secondary)'}
          >info@boldbrandz.com</a>
        </div>
      );
    }

    function MetaStrip() {
      const ref = useReveal(720);
      const t = window.useCopy();
      return (
        <div ref={ref} className="reveal meta-strip" style={{
          position: 'absolute', left: 0, right: 0, bottom: 48,
          textAlign: 'center',
          fontFamily: 'var(--font-mono)',
          fontSize: 'clamp(18px, 2.2vw, 28px)',
          fontWeight: 600,
          color: 'var(--text-faint)',
          letterSpacing: '0.2em', textTransform: 'uppercase',
        }}>
          {t.footer.strip_tagline}
        </div>
      );
    }

    function Section() {
      return (
        <section className="final-cta-section" style={{
          position: 'relative',
          background: 'var(--bg-base)',
          minHeight: 900,
          padding: '120px 48px 0',
          overflow: 'hidden',
          display: 'flex',
          alignItems: 'center',
          justifyContent: 'center',
        }}>
          <div style={{
            position: 'relative',
            maxWidth: 1040,
            margin: '0 auto',
            textAlign: 'center',
          }}>
            <Eyebrow/>
            <Headline/>
            <SubLine/>
            <CTA/>
            <Secondary/>
          </div>
          <MetaStrip/>
        </section>
      );
    }

window.FinalCtaSection = Section;
})();
