// Scene4CTA.jsx — 33–45s
// Mesurez votre visibilité IA. Bouton "Demander une démo". Logo lockup.

function Scene4CTA() {
  const { localTime, duration } = useSprite();
  const t = localTime;

  const headlineOp = clamp(t / 0.7, 0, 1);
  const subOp = clamp((t - 1.0) / 0.6, 0, 1);
  const btnOp = clamp((t - 2.2) / 0.6, 0, 1);
  const btnScale = 0.8 + 0.2 * Easing.easeOutBack(clamp((t - 2.2) / 0.7, 0, 1));
  const logoOp = clamp((t - 3.4) / 0.7, 0, 1);
  const noteOp = clamp((t - 4.2) / 0.7, 0, 1);

  // Subtle button pulse during hold
  const pulse = 1 + 0.02 * Math.sin(Math.max(0, t - 3) * 2.5);

  return (
    <div style={{
      position: 'absolute', inset: 0,
      display: 'flex', flexDirection: 'column',
      alignItems: 'center', justifyContent: 'center',
      gap: 0, padding: 80, color: '#0a0a0a',
    }}>
      {/* Eye watermark */}
      <div style={{
        position: 'absolute', top: 50, right: 80,
        opacity: clamp(t / 0.4, 0, 1),
      }}>
        <div style={{
          fontFamily: 'JetBrains Mono, ui-monospace, monospace',
          fontSize: 17, letterSpacing: '0.18em', color: '#FF6329',
          textTransform: 'uppercase',
        }}>
          ▌ 04 — Action
        </div>
      </div>

      <div style={{
        opacity: headlineOp,
        transform: `translateY(${(1 - headlineOp) * 20}px)`,
        fontFamily: '"Anton", Impact, sans-serif',
        fontWeight: 400,
        fontSize: 104,
        lineHeight: 1.08,
        letterSpacing: '0em',
        textAlign: 'center',
        color: '#0a0a0a',
        textTransform: 'uppercase',
        marginBottom: 36,
        whiteSpace: 'nowrap',
      }}>
        <div>Mesurez votre</div>
        <div>visibilité <span style={{ color: '#FF6329' }}>IA</span>.</div>
      </div>

      <div style={{
        opacity: subOp,
        fontFamily: 'Inter, sans-serif', fontSize: 32, fontWeight: 400,
        color: 'rgba(0,0,0,0.72)', letterSpacing: '-0.005em',
        textAlign: 'center', maxWidth: 1000, marginBottom: 56,
      }}>
        Multi-LLMs. Prompt par prompt.
      </div>

    </div>
  );
}

window.Scene4CTA = Scene4CTA;
