// Variant C — continued: engine deep dive, spec table, testimonial, CTA, footer.

// ─── Deep dive into the engine with tabs
function DeepDiveC() {
  const tabs = [
    {
      key: 'L1', n: 'L1', name: 'Rules & anomaly', time: '3ms',
      headline: 'Deterministic. Unambiguous. Always first.',
      body: 'Forty-plus hand-tuned signals: velocity windows, baseline deviation, geo/ISP anomalies, sanctions and blocklists, known-bad fingerprints. Runs in-memory against a 90-day rolling window per client. Catches the obvious before a model is ever invoked — saves cost and latency on the 80% happy path.',
      bullets: ['40+ signals · velocity, baseline, geo, lists', 'Runs in 3ms p50 · pure memory, no network', 'Explainable by definition: which rule fired, why'],
      tone: '#63D4E6',
    },
    {
      key: 'L2', n: 'L2', name: 'Model α', time: '14ms',
      headline: 'Contextual risk. First independent opinion.',
      body: 'Gradient-boosted scorer trained per-tenant on your own historical labels. Features include client tenure, destination reputation, time-of-day, transaction shape, and behaviour graph proximity. Outputs a calibrated risk score with SHAP-like feature contributions attached to every verdict.',
      bullets: ['Tenant-specific model · retrained weekly', 'Calibrated score + feature attributions', 'Shadow-mode deploy before promotion'],
      tone: '#9387FF',
    },
    {
      key: 'L3', n: 'L3', name: 'Model β', time: '22ms',
      headline: 'Independent reasoning. Breaks ties, writes the reason.',
      body: 'A second scorer, different architecture, different training data. Invoked when L1 and L2 disagree, and on the high-stakes tail. Produces a short written narrative and a confidence. When α and β disagree, the transaction is held for human review — no silent coin flips.',
      bullets: ['Different family from Model α on purpose', 'Written rationale attached to every decision', 'Disagreement → review, never silent override'],
      tone: '#81A8FF',
    },
  ];

  const [active, setActive] = React.useState('L1');
  const cur = tabs.find(t => t.key === active);

  return (
    <section id="engine" className="c-dd">
      <div className="container-c">
        <Reveal>
          <div className="c-section-head">
            <span className="c-section-eyebrow mono">02 · UNDER THE HOOD</span>
            <h2 className="c-h2">Three models you can reason about.</h2>
            <p className="c-section-lede">
              Every layer is documented, inspectable, and replaceable. This is what runs on your transactions.
            </p>
          </div>
        </Reveal>

        <Reveal delay={80}>
          <div className="c-dd-tabs">
            {tabs.map(t => (
              <button key={t.key}
                onClick={() => setActive(t.key)}
                className={'c-dd-tab' + (active === t.key ? ' active' : '')}
                style={{ '--tone': t.tone }}
              >
                <span className="mono c-dd-tab-n">{t.n}</span>
                <span className="c-dd-tab-name">{t.name}</span>
                <span className="mono c-dd-tab-t">{t.time}</span>
              </button>
            ))}
          </div>
        </Reveal>

        <Reveal delay={160}>
          <div className="c-dd-body" key={cur.key} style={{ '--tone': cur.tone }}>
            <div className="c-dd-left">
              <h3 className="c-dd-headline">{cur.headline}</h3>
              <p className="c-dd-body-text">{cur.body}</p>
              <ul className="c-dd-bullets">
                {cur.bullets.map(b => (
                  <li key={b}>
                    <span className="c-dd-tick"><IconCheck size={11} /></span>
                    <span>{b}</span>
                  </li>
                ))}
              </ul>
            </div>
            <div className="c-dd-right">
              {cur.key === 'L1' && <L1Panel tone={cur.tone} />}
              {cur.key === 'L2' && <L2Panel tone={cur.tone} />}
              {cur.key === 'L3' && <L3Panel tone={cur.tone} />}
            </div>
          </div>
        </Reveal>
      </div>

      <style>{`
        .c-dd-tabs {
          display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
        }
        .c-dd-tab {
          flex: 1; min-width: 200px;
          display: flex; align-items: center; gap: 12px;
          padding: 16px 20px;
          border: 1px solid var(--border);
          border-radius: 12px;
          background: rgba(255,255,255,0.015);
          cursor: pointer; transition: all 200ms;
          font-family: inherit;
          color: var(--fg-muted);
          text-align: left;
        }
        .c-dd-tab:hover { border-color: var(--border-strong); color: var(--fg); }
        .c-dd-tab.active {
          border-color: var(--tone);
          background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent);
          color: var(--fg);
          box-shadow: 0 0 0 1px var(--tone) inset, 0 0 24px -8px var(--tone);
        }
        .c-dd-tab-n {
          padding: 4px 8px; border-radius: 5px;
          background: rgba(255,255,255,0.06); border: 1px solid var(--border);
          font-size: 11px; font-weight: 700;
        }
        .c-dd-tab.active .c-dd-tab-n { background: color-mix(in srgb, var(--tone) 20%, transparent); color: var(--tone); border-color: var(--tone); }
        .c-dd-tab-name { font-size: 15px; font-weight: 600; flex: 1; }
        .c-dd-tab-t { font-size: 11px; color: var(--fg-muted); }

        .c-dd-body {
          display: grid; grid-template-columns: 1fr 1fr;
          gap: 40px; align-items: start;
          padding: 32px;
          border: 1px solid var(--border);
          border-radius: 16px;
          background: rgba(255,255,255,0.015);
          position: relative; overflow: hidden;
          animation: c-dd-in 500ms cubic-bezier(.2,.9,.2,1);
        }
        .c-dd-body::before {
          content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
          background: var(--tone);
        }
        @keyframes c-dd-in {
          0% { opacity: 0; transform: translateY(8px); }
          100% { opacity: 1; transform: translateY(0); }
        }
        .c-dd-headline {
          font-size: 28px; line-height: 1.15; letter-spacing: -0.02em;
          font-weight: 600; margin: 0 0 14px;
          color: var(--fg);
        }
        .c-dd-body-text {
          font-size: 14.5px; line-height: 1.6; color: var(--fg-muted);
          text-wrap: pretty;
        }
        .c-dd-bullets {
          list-style: none; padding: 0; margin: 20px 0 0;
          display: flex; flex-direction: column; gap: 8px;
        }
        .c-dd-bullets li {
          display: flex; align-items: flex-start; gap: 10px;
          font-size: 13.5px; color: var(--fg);
        }
        .c-dd-tick {
          width: 18px; height: 18px; border-radius: 5px;
          background: color-mix(in srgb, var(--tone) 14%, transparent);
          color: var(--tone);
          display: inline-flex; align-items: center; justify-content: center;
          flex-shrink: 0; margin-top: 1px;
        }

        @media (max-width: 900px) {
          .c-dd-body { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
        }
      `}</style>
    </section>
  );
}

// ─── L1 panel: rule firing table
function L1Panel({ tone }) {
  const rules = [
    { name: 'ip_blocklist_global',   fired: true,  weight: '+∞',   note: 'hard block' },
    { name: 'velocity_1h > baseline', fired: true,  weight: '+0.31', note: '21% over' },
    { name: 'dest_age_days',          fired: true,  weight: '+0.18', note: 'first seen 14d' },
    { name: 'sanctioned_country',     fired: false, weight: '—',     note: 'n/a' },
    { name: 'amount_vs_client_baseline', fired: false, weight: '—',  note: 'within 1σ' },
    { name: 'geo_mismatch',           fired: false, weight: '—',     note: 'consistent' },
    { name: 'anonymizer_ip',          fired: false, weight: '—',     note: 'residential' },
  ];
  return (
    <div className="l1-panel">
      <div className="l1-head">
        <IconGitBranch size={12} />
        <span>Rule evaluation · pay_01K5Z0QXM3</span>
        <span className="mono l1-latency">3 ms</span>
      </div>
      <div className="l1-table">
        {rules.map(r => (
          <div key={r.name} className={'l1-row' + (r.fired ? ' fired' : '')}>
            <span className={'l1-dot' + (r.fired ? ' fired' : '')} />
            <span className="mono l1-name">{r.name}</span>
            <span className="mono l1-weight">{r.weight}</span>
            <span className="l1-note">{r.note}</span>
          </div>
        ))}
      </div>
      <div className="l1-foot">
        <span className="mono" style={{ color: 'var(--fg-muted)', fontSize: 11 }}>3 of 40+ rules fired</span>
        <span className="pill pill-block">BLOCK · L1 hard match</span>
      </div>

      <style>{`
        .l1-panel {
          background: #0A0812;
          border: 1px solid var(--border);
          border-radius: 12px;
          overflow: hidden;
        }
        .l1-head {
          display: flex; align-items: center; gap: 8px;
          padding: 12px 16px;
          border-bottom: 1px solid var(--border);
          font-size: 11px; color: var(--fg-muted);
          text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
        }
        .l1-latency {
          margin-left: auto;
          padding: 2px 7px; border-radius: 4px;
          background: color-mix(in srgb, ${tone} 14%, transparent);
          color: ${tone};
          font-size: 10.5px; text-transform: none; letter-spacing: 0;
        }
        .l1-table { padding: 6px 0; }
        .l1-row {
          display: grid; grid-template-columns: 14px 1fr 56px 1fr;
          gap: 10px; padding: 7px 16px; align-items: center;
          font-size: 11.5px; font-family: 'JetBrains Mono', monospace;
          border-bottom: 1px dashed var(--border);
        }
        .l1-row:last-child { border-bottom: 0; }
        .l1-row.fired { background: rgba(255,94,120,0.04); }
        .l1-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.14); }
        .l1-dot.fired { background: var(--block); box-shadow: 0 0 8px var(--block); }
        .l1-name { color: var(--fg); }
        .l1-row:not(.fired) .l1-name { color: var(--fg-muted); }
        .l1-weight { color: var(--block); font-weight: 600; text-align: right; }
        .l1-row:not(.fired) .l1-weight { color: var(--fg-dim); }
        .l1-note { color: var(--fg-muted); font-size: 11px; font-family: 'Inter', sans-serif; }
        .l1-foot {
          display: flex; justify-content: space-between; align-items: center;
          padding: 12px 16px;
          border-top: 1px solid var(--border);
          background: rgba(255,255,255,0.02);
        }
      `}</style>
    </div>
  );
}

// ─── L2 panel: feature contributions bars
function L2Panel({ tone }) {
  const features = [
    { f: 'dest_first_seen_14d',    w:  0.32, sign: 'pos' },
    { f: 'ip_rep_cluster_match',   w:  0.28, sign: 'pos' },
    { f: 'client_velocity_1h',     w:  0.18, sign: 'pos' },
    { f: 'time_of_day_normal',     w: -0.08, sign: 'neg' },
    { f: 'amount_within_baseline', w: -0.12, sign: 'neg' },
    { f: 'client_age_months',      w: -0.04, sign: 'neg' },
  ];
  return (
    <div className="l2-panel">
      <div className="l2-head">
        <IconCpu size={12} />
        <span>Model α · feature attributions</span>
        <span className="mono l2-score">score 88</span>
      </div>
      <div className="l2-body">
        {features.map((f, i) => (
          <div key={f.f} className="l2-row" style={{ animationDelay: (i * 50) + 'ms' }}>
            <span className="mono l2-name">{f.f}</span>
            <div className="l2-bar">
              <div className={'l2-fill l2-' + f.sign} style={{ width: Math.abs(f.w * 220) + 'px' }} />
            </div>
            <span className={'mono l2-w l2-' + f.sign}>{f.w > 0 ? '+' : ''}{f.w.toFixed(2)}</span>
          </div>
        ))}
      </div>
      <div className="l2-foot mono">
        <span style={{ color: 'var(--fg-muted)' }}>confidence 0.91 · version α-v42.1 · 14ms</span>
      </div>

      <style>{`
        .l2-panel {
          background: #0A0812;
          border: 1px solid var(--border);
          border-radius: 12px;
          overflow: hidden;
        }
        .l2-head {
          display: flex; align-items: center; gap: 8px;
          padding: 12px 16px;
          border-bottom: 1px solid var(--border);
          font-size: 11px; color: var(--fg-muted);
          text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
        }
        .l2-score {
          margin-left: auto;
          padding: 2px 8px; border-radius: 4px;
          background: color-mix(in srgb, ${tone} 16%, transparent);
          color: ${tone};
          font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 600;
        }
        .l2-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
        .l2-row {
          display: grid; grid-template-columns: 1fr auto 50px;
          gap: 12px; align-items: center;
          animation: l2-in 600ms cubic-bezier(.2,.9,.2,1) backwards;
        }
        @keyframes l2-in {
          0% { opacity: 0; transform: translateX(-6px); }
          100% { opacity: 1; transform: translateX(0); }
        }
        .l2-name { font-size: 11px; color: var(--fg-muted); }
        .l2-bar { width: 220px; height: 6px; background: rgba(255,255,255,0.04); border-radius: 999px; position: relative; }
        .l2-fill {
          position: absolute; top: 0; height: 100%; border-radius: 999px;
          transition: width 700ms cubic-bezier(.2,.9,.2,1);
        }
        .l2-fill.l2-pos { left: 50%; background: linear-gradient(90deg, rgba(255,94,120,0.4), var(--block)); }
        .l2-fill.l2-neg { right: 50%; background: linear-gradient(270deg, rgba(101,217,124,0.4), var(--approve)); }
        .l2-w { font-size: 11px; text-align: right; font-weight: 600; }
        .l2-w.l2-pos { color: var(--block); }
        .l2-w.l2-neg { color: var(--approve); }
        .l2-foot {
          padding: 10px 16px; border-top: 1px solid var(--border);
          background: rgba(255,255,255,0.02);
          font-size: 10.5px;
        }
      `}</style>
    </div>
  );
}

// ─── L3 panel: narrative + confidence
function L3Panel({ tone }) {
  const [typed, setTyped] = React.useState('');
  const full = 'Destination address was first seen 14 days ago on an unrelated tenant. Originating IP belongs to a cluster previously associated with laundering activity (confidence 0.84). Transaction shape and velocity fit known mixer-adjacent patterns. L1 already hard-blocked on IP list; I concur and recommend escalation to compliance for account-level review.';

  React.useEffect(() => {
    setTyped('');
    let i = 0;
    const iv = setInterval(() => {
      i += 3;
      if (i >= full.length) { setTyped(full); clearInterval(iv); return; }
      setTyped(full.slice(0, i));
    }, 16);
    return () => clearInterval(iv);
  }, []);

  return (
    <div className="l3-panel">
      <div className="l3-head">
        <IconLayers size={12} />
        <span>Model β · written rationale</span>
        <span className="mono l3-conf">conf 0.89</span>
      </div>
      <div className="l3-body">
        <div className="l3-meta mono">
          <span>subject</span><span style={{ color: 'var(--fg)' }}>pay_01K5Z0QXM3 · 4,820 USDT</span>
          <span>prior</span><span style={{ color: 'var(--fg)' }}>L1: BLOCK · L2: 88</span>
          <span>verdict</span><span style={{ color: 'var(--block)', fontWeight: 600 }}>CONCUR → escalate</span>
        </div>
        <div className="l3-narr">
          {typed}
          <span className="l3-cursor" />
        </div>
      </div>
      <div className="l3-foot mono">
        <span style={{ color: 'var(--fg-muted)' }}>β-v18 · 22ms · disagreement-triggered review queue</span>
      </div>

      <style>{`
        .l3-panel {
          background: #0A0812;
          border: 1px solid var(--border);
          border-radius: 12px;
          overflow: hidden;
        }
        .l3-head {
          display: flex; align-items: center; gap: 8px;
          padding: 12px 16px;
          border-bottom: 1px solid var(--border);
          font-size: 11px; color: var(--fg-muted);
          text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
        }
        .l3-conf {
          margin-left: auto;
          padding: 2px 8px; border-radius: 4px;
          background: color-mix(in srgb, ${tone} 16%, transparent);
          color: ${tone};
          font-size: 11px; text-transform: none; letter-spacing: 0;
        }
        .l3-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
        .l3-meta {
          display: grid; grid-template-columns: 70px 1fr;
          gap: 4px 12px;
          font-size: 11px; color: var(--fg-muted);
          padding: 10px; border-radius: 8px;
          background: rgba(255,255,255,0.02);
          border: 1px solid var(--border);
        }
        .l3-narr {
          font-size: 13px; line-height: 1.55; color: var(--fg);
          font-family: 'Inter', sans-serif;
          text-wrap: pretty;
        }
        .l3-cursor {
          display: inline-block; width: 7px; height: 13px;
          background: ${tone}; margin-left: 3px; vertical-align: text-bottom;
          animation: l3-blink 0.9s steps(2) infinite;
        }
        @keyframes l3-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
        .l3-foot {
          padding: 10px 16px; border-top: 1px solid var(--border);
          background: rgba(255,255,255,0.02);
          font-size: 10.5px;
        }
      `}</style>
    </div>
  );
}

// ─── Spec table
function SpecTableC() {
  const specs = [
    ['Latency · p50 end-to-end',    '39 ms',        'full 3-layer chain'],
    ['Latency · p99 end-to-end',    '82 ms',        'under inline-scoring budget'],
    ['Throughput',                  '28k tx/s',     'per region · horizontal scale'],
    ['Availability',                '99.997%',      'rolling 12 months'],
    ['Deployment',                  'REST · gRPC',  'SDKs: Node, Python, Go, Java'],
    ['Training',                    'weekly · tenant-specific', 'supervised + shadow-mode'],
    ['Explainability',              'feature attributions + narrative', 'every verdict · machine + human'],
    ['Replay',                      'full history · 18 months', 'replay new rules on old traffic'],
    ['Data residency',              'EU · US · APAC', 'per-tenant pinning'],
    ['Certifications',              'SOC 2 II · PCI-DSS 4.0 · ISO 27001 · GDPR', ''],
  ];

  return (
    <section id="specs" className="c-specs">
      <div className="container-c">
        <Reveal>
          <div className="c-section-head">
            <span className="c-section-eyebrow mono">03 · SPECS</span>
            <h2 className="c-h2">What you actually get.</h2>
          </div>
        </Reveal>

        <Reveal delay={80}>
          <div className="c-spec-table">
            {specs.map(([k, v, note], i) => (
              <div key={k} className="c-spec-row" style={{ animationDelay: (i * 40) + 'ms' }}>
                <span className="c-spec-k">{k}</span>
                <span className="c-spec-v mono">{v}</span>
                <span className="c-spec-n">{note}</span>
              </div>
            ))}
          </div>
        </Reveal>
      </div>

      <style>{`
        .c-spec-table {
          border: 1px solid var(--border);
          border-radius: 14px;
          overflow: hidden;
          background: rgba(255,255,255,0.015);
        }
        .c-spec-row {
          display: grid; grid-template-columns: 1.3fr 1fr 1.2fr;
          gap: 20px; padding: 16px 24px;
          align-items: baseline;
          border-bottom: 1px solid var(--border);
          animation: c-spec-in 500ms cubic-bezier(.2,.9,.2,1) backwards;
        }
        @keyframes c-spec-in {
          0% { opacity: 0; transform: translateX(-6px); }
          100% { opacity: 1; transform: translateX(0); }
        }
        .c-spec-row:last-child { border-bottom: 0; }
        .c-spec-row:hover { background: rgba(147,135,255,0.03); }
        .c-spec-k { font-size: 13.5px; color: var(--fg-muted); font-weight: 500; }
        .c-spec-v { font-size: 15px; color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
        .c-spec-n { font-size: 12.5px; color: var(--fg-muted); }

        @media (max-width: 760px) {
          .c-spec-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 18px; }
          .c-spec-n { font-size: 11.5px; }
        }
      `}</style>
    </section>
  );
}

// ─── Testimonial
function TestimonialC() {
  return (
    <section className="c-test">
      <div className="container-c">
        <Reveal>
          <div className="c-test-card">
            <div className="c-test-stars mono">★★★★★ · 4.9/5 · 240+ operators</div>
            <div className="c-test-quote">
              "We stopped arguing about false blocks the week Dipoli went live. Every verdict comes with a reason.
              When we disagree with the chain, we disagree with evidence, not vibes."
            </div>
            <div className="c-test-attr">
              <div className="c-test-avatar">MK</div>
              <div>
                <div className="c-test-name">Marta Kowalski</div>
                <div className="c-test-role">Head of Risk Ops · <span style={{ color: 'var(--primary)' }}>INXY Payments</span></div>
              </div>
              <div className="c-test-metric">
                <div className="mono c-test-metric-n">–67%</div>
                <div className="c-test-metric-l">false blocks, q/q</div>
              </div>
            </div>
          </div>
        </Reveal>
      </div>

      <style>{`
        .c-test-card {
          padding: 48px;
          border: 1px solid var(--border);
          border-radius: 16px;
          background:
            radial-gradient(600px 300px at 20% 0%, rgba(147,135,255,0.08), transparent 65%),
            rgba(255,255,255,0.015);
          max-width: 920px; margin: 0 auto;
        }
        .c-test-stars {
          font-size: 11.5px; color: var(--primary);
          letter-spacing: 0.1em; font-weight: 500;
          margin-bottom: 20px;
        }
        .c-test-quote {
          font-size: 24px; line-height: 1.35; letter-spacing: -0.015em;
          font-weight: 500; color: var(--fg);
          text-wrap: pretty;
          font-family: 'Fraunces', serif;
          font-variation-settings: 'opsz' 72;
        }
        .c-test-attr {
          display: flex; align-items: center; gap: 14px;
          margin-top: 32px;
          padding-top: 24px;
          border-top: 1px solid var(--border);
        }
        .c-test-avatar {
          width: 40px; height: 40px; border-radius: 50%;
          background: linear-gradient(135deg, #7C5CFC, #38C8F6);
          display: inline-flex; align-items: center; justify-content: center;
          font-weight: 700; color: #fff; font-size: 14px;
        }
        .c-test-name { font-size: 14px; font-weight: 600; color: var(--fg); }
        .c-test-role { font-size: 12.5px; color: var(--fg-muted); margin-top: 1px; }
        .c-test-metric { margin-left: auto; text-align: right; }
        .c-test-metric-n {
          font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--approve);
        }
        .c-test-metric-l { font-size: 11px; color: var(--fg-muted); margin-top: 2px; }

        @media (max-width: 720px) {
          .c-test-card { padding: 28px; }
          .c-test-quote { font-size: 19px; }
          .c-test-attr { flex-wrap: wrap; }
          .c-test-metric { margin-left: 0; margin-top: 8px; text-align: left; }
        }
      `}</style>
    </section>
  );
}

// ─── Final CTA
function FinalCtaC() {
  return (
    <section className="c-final">
      <div className="container-c">
        <Reveal>
          <div className="c-final-card">
            <div className="c-final-glow" aria-hidden />
            <DipoliMark size={56} gradientId="c-final-mark" animated />
            <h2 className="c-final-h">Stop guessing at fraud. Start deciding.</h2>
            <p className="c-final-sub">
              14-day trial on your own traffic. No card, no sales call. Drop in, see verdicts,
              ship if it works.
            </p>
            <div className="c-final-cta">
              <button className="c-btn c-btn-primary c-btn-lg">
                Start free trial <IconArrowRight size={15} />
              </button>
              <button className="c-btn c-btn-ghost c-btn-lg">
                Book a walkthrough
              </button>
            </div>
            <div className="c-final-micro mono">
              ONBOARDING IN 48 HRS · SANDBOX WITH REAL MODELS · CANCEL ANYTIME
            </div>
          </div>
        </Reveal>
      </div>

      <style>{`
        .c-final { padding-bottom: 96px !important; }
        .c-final-card {
          position: relative;
          padding: 64px 40px;
          border: 1px solid var(--border-strong);
          border-radius: 20px;
          text-align: center;
          background:
            radial-gradient(60% 100% at 50% 0%, rgba(124,92,252,0.16), transparent 70%),
            rgba(255,255,255,0.015);
          overflow: hidden;
        }
        .c-final-glow {
          position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
          width: 600px; height: 400px;
          background: radial-gradient(closest-side, rgba(124,92,252,0.4), transparent 70%);
          filter: blur(40px);
          pointer-events: none;
        }
        .c-final-h {
          font-size: 52px; line-height: 1.05; letter-spacing: -0.03em;
          font-weight: 600;
          margin: 24px auto 16px;
          max-width: 780px;
          text-wrap: balance;
        }
        .c-final-sub {
          font-size: 17px; color: var(--fg-muted); max-width: 560px;
          margin: 0 auto; text-wrap: pretty;
        }
        .c-final-cta {
          display: flex; justify-content: center; gap: 12px;
          margin-top: 32px; flex-wrap: wrap;
        }
        .c-final-micro {
          margin-top: 20px;
          font-size: 10.5px; letter-spacing: 0.12em;
          color: var(--fg-muted);
        }
        @media (max-width: 720px) {
          .c-final-h { font-size: 36px; }
          .c-final-card { padding: 40px 24px; }
        }
      `}</style>
    </section>
  );
}

// ─── Footer
function FooterC() {
  return (
    <footer className="c-footer">
      <div className="container-c c-footer-inner">
        <div className="c-footer-brand">
          <DipoliLogoLockup size={22} />
          <p className="c-footer-tag">Three-layer decision engine. Built for operators.</p>
        </div>
        <div className="c-footer-cols">
          <div>
            <div className="c-footer-h">Product</div>
            <a>Engine</a><a>Console</a><a>API</a><a>Changelog</a>
          </div>
          <div>
            <div className="c-footer-h">Developers</div>
            <a>Docs</a><a>SDKs</a><a>Playground</a><a>Status</a>
          </div>
          <div>
            <div className="c-footer-h">Company</div>
            <a>Security</a><a>Compliance</a><a>Careers</a><a>Contact</a>
          </div>
        </div>
      </div>
      <div className="container-c c-footer-bottom">
        <span className="mono">© 2026 Dipoli · All rights reserved</span>
        <span className="mono">ops@dipoli.io</span>
      </div>

      <style>{`
        .c-footer {
          border-top: 1px solid var(--border);
          padding: 48px 0 32px !important;
          background: rgba(0,0,0,0.2);
        }
        .c-footer-inner {
          display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px;
          padding-bottom: 40px;
          border-bottom: 1px solid var(--border);
        }
        .c-footer-tag { font-size: 13px; color: var(--fg-muted); margin-top: 14px; max-width: 260px; }
        .c-footer-cols {
          display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
        }
        .c-footer-h {
          font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
          color: var(--fg-muted); font-weight: 600; margin-bottom: 14px;
        }
        .c-footer-cols a {
          display: block; padding: 5px 0;
          font-size: 13.5px; color: var(--fg-muted);
          cursor: pointer; transition: color 160ms;
        }
        .c-footer-cols a:hover { color: var(--fg); }
        .c-footer-bottom {
          display: flex; justify-content: space-between;
          padding-top: 24px;
          font-size: 11px; color: var(--fg-dim);
        }
        @media (max-width: 720px) {
          .c-footer-inner { grid-template-columns: 1fr; }
          .c-footer-cols { grid-template-columns: repeat(2, 1fr); gap: 20px; }
        }
      `}</style>
    </footer>
  );
}

Object.assign(window, {
  NavC, HeroC, LogoStripC, BentoC, DeepDiveC,
  L1Panel, L2Panel, L3Panel,
  SpecTableC, TestimonialC, FinalCtaC, FooterC,
});
