/* eslint-disable */
/* global React, ReactDOM, useLang, LangProvider, HeroNav, Footer, useJsonLd */
/* reportes-ad-hoc.jsx — landing "Producto" para /reportes-ad-hoc
   (redesign 2026-09, Sprint 3). Textos definitivos del handoff: no
   reescribir. Página en español únicamente (sin toggle EN) — mismo
   criterio que cierre-mensual.jsx/rentabilidad.jsx/presupuesto-forecast.jsx.
   Reusa product.css/hero-nav.css tal cual quedaron después del pase de
   consistencia con la home — no redeclarar nada de nav/botones/cards/
   animación acá. */

const CAPABILITY_CARDS = [
  { icon: 'ph-chat-circle-text', title: 'Consultas en español natural', body: 'Sin SQL, sin código. Como se lo pedirías a un analista.' },
  { icon: 'ph-function', title: 'Fórmula y fuente en cada respuesta', body: 'Bajás al ERP o a la planilla original en un click.' },
  { icon: 'ph-link-simple', title: 'Compartible con un link', body: 'El que lo abre ve la misma trazabilidad, con permisos.' },
  { icon: 'ph-floppy-disk', title: 'Guardable como reporte', body: 'Si sabés que la vas a repetir, se automatiza.' },
  { icon: 'ph-funnel', title: 'Filtros editables', body: 'Sin volver a preguntar desde cero.' },
  { icon: 'ph-lock-key', title: 'Permisos preservados', body: 'Cada usuario ve solo lo que puede ver, sin importar el canal.' },
];

const DIFERENCIA_CHECKLIST = [
  'Capa de datos mapeada sobre tu plan de cuentas',
  'Cada número con fórmula y fuente, no con una explicación',
  'Permisos por rol respetados en cualquier canal',
  'Sin respuestas que no puedan trazarse hasta el ERP',
  'Consultas guardables y auditables después',
];

const FAQ_ITEMS = [
  { q: '¿Cómo sé que la respuesta es correcta?', a: 'Porque cada número muestra su <b>fórmula y sus fuentes</b>. Abrís el detalle y bajás hasta la línea del ERP. Si algo no se puede trazar, Teramot no lo muestra.' },
  { q: '¿Necesito una IA aparte, o Teramot ya la incluye?', a: 'Teramot ya la incluye. La integración por MCP es <b>opcional</b>, para quienes prefieren preguntar desde Claude, ChatGPT o Gemini.' },
  { q: '¿Qué pasa con los permisos cuando pregunto desde Claude o ChatGPT?', a: 'Se respetan igual. La consulta viaja con tu usuario: <b>si no podés ver una entidad en Teramot</b>, tampoco aparece en la respuesta del asistente.' },
  { q: '¿En qué se diferencia de ChatGPT o Copilot conectados a mis datos directo?', a: 'Esos modelos leen archivos sin entender tu plan de cuentas ni tus reglas de consolidación. Teramot responde sobre la <b>capa de datos ya mapeada y auditable</b>, con fórmula y fuente en cada número.' },
  { q: '¿Se puede guardar como reporte recurrente?', a: 'Sí. Cualquier consulta se guarda con sus filtros y se programa para que llegue sola cuando la necesitás.' },
  { q: '¿Puedo compartir una respuesta con alguien fuera de mi equipo?', a: 'Sí, con un link que conserva la trazabilidad y respeta permisos. Quien lo abre ve el mismo número con su fórmula y su fuente.' },
];

const { useEffect: useEffectRAH, useRef: useRefRAH } = React;

/* Scroll reveal — mismo hook que cierre-mensual.jsx/rentabilidad.jsx/
   presupuesto-forecast.jsx/home.jsx. */
const useScrollReveal = (rootRef) => {
  useEffectRAH(() => {
    if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
    const root = rootRef.current;
    if (!root) return;
    const groups = [];
    root.querySelectorAll('section, footer').forEach((sec) => {
      const wrap = sec.firstElementChild && sec.children.length === 1 ? sec.firstElementChild : sec;
      const kids = Array.from(wrap.children).filter((el) => (
        el.nodeType === 1 && !el.classList.contains('tm-drawer') && !el.classList.contains('tm-drawer-overlay')
      ));
      if (kids.length) groups.push(kids);
    });
    const io = new IntersectionObserver((entries) => {
      entries.forEach((en) => {
        if (en.isIntersecting) {
          en.target.classList.add('rv-in');
          io.unobserve(en.target);
        }
      });
    }, { rootMargin: '0px 0px -8% 0px', threshold: 0.08 });
    groups.forEach((kids) => kids.forEach((el, i) => {
      el.classList.add('rv');
      el.style.transitionDelay = Math.min(i, 4) * 70 + 'ms';
      io.observe(el);
    }));
    return () => io.disconnect();
  }, []);
};

const ReportesHero = () => {
  const { c } = useLang();
  return (
    <section className="tm-hero-gradient">
      <HeroNav current="reportes-ad-hoc" />
      <div className="tm-prod-hero-grid">
        <div className="tm-prod-hero-copy">
          <p className="tm-prod-hero-eyebrow">Lenguaje natural · MCP · Trazabilidad completa</p>
          <h1>IA para análisis financiero: del reporte de dos días al <span>número en la reunión</span>.</h1>
          <p className="tm-prod-hero-sub">Consultá tu data financiera en lenguaje natural — desde Teramot o desde tu IA de confianza (Claude, ChatGPT, Gemini) vía MCP. Cada número, con fuente y fórmula.</p>
          <div className="tm-prod-hero-actions">
            <a href={c.links.call} target="_blank" rel="noopener noreferrer" className="tm-hero-btn tm-hero-btn-lg tm-hero-btn-white">Pedí tu demo <i className="ph ph-arrow-right" /></a>
            <a href={c.links.app} className="tm-hero-btn tm-hero-btn-lg tm-hero-btn-ghost-light"><i className="ph ph-play-circle" style={{ fontSize: 21 }} /> Comenzá Gratis</a>
          </div>
        </div>
        <div className="tm-prod-hero-art">
          <div className="tm-prod-hero-art-glow" />
          <div className="tm-prod-hero-mockup" style={{ position: 'relative', zIndex: 1, width: '100%', background: 'rgba(255,255,255,.96)', border: '1px solid rgba(255,255,255,.55)', borderRadius: 16, padding: 18, boxShadow: '0 2px 4px rgba(11,15,20,.05), 0 1px 2px rgba(11,15,20,.03)' }} role="img" aria-label="Consulta en lenguaje natural sobre data financiera en Teramot">
            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 }}>
              <span style={{ display: 'inline-flex', alignItems: 'center', gap: 7, padding: '6px 12px', borderRadius: 9999, background: '#253DE5', color: '#fff', fontSize: 11, fontWeight: 600, whiteSpace: 'nowrap' }}><i className="ph-bold ph-chat-circle-text" style={{ fontSize: 12 }} /> Reportes ad-hoc</span>
              <span style={{ fontSize: 10.5, fontWeight: 600, letterSpacing: '.12em', textTransform: 'uppercase', color: '#6B7280' }}>Marzo 2026</span>
            </div>
            <div style={{ marginTop: 16, borderRadius: 10, background: '#fff', border: '1px solid #EEF0F4', overflow: 'hidden' }}>
              {[
                { icon: 'ph-magnifying-glass', label: 'Consulta en lenguaje natural', status: 'Sin SQL', neutral: true },
                { icon: 'ph-function', label: 'Fórmula visible', status: 'En cada línea' },
                { icon: 'ph-git-commit', label: 'Fuente en el ERP', status: 'Trazable' },
                { icon: 'ph-lock-key', label: 'Permisos del usuario', status: 'Respetados' },
              ].map((row, i, arr) => (
                <div key={row.label} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 14, padding: '14px 16px', borderBottom: i < arr.length - 1 ? '1px solid rgba(11,15,20,.05)' : 'none' }}>
                  <div style={{ display: 'flex', alignItems: 'center', gap: 10, minWidth: 0 }}><i className={`ph ${row.icon}`} style={{ fontSize: 15, color: '#253DE5', flex: 'none' }} /><span style={{ fontSize: 13.5, fontWeight: 500, letterSpacing: '-.005em', color: '#0B0F14' }}>{row.label}</span></div>
                  {row.neutral ? (
                    <span style={{ flex: 'none', whiteSpace: 'nowrap', padding: '4px 10px', borderRadius: 9999, border: '1px solid #E5E7EB', background: '#fff', fontSize: 10.5, fontWeight: 600, color: '#4B5563' }}>{row.status}</span>
                  ) : (
                    <span style={{ flex: 'none', whiteSpace: 'nowrap', display: 'inline-flex', alignItems: 'center', gap: 5, padding: '4px 10px', borderRadius: 9999, background: 'rgba(123,193,173,.22)', fontSize: 10.5, fontWeight: 600, color: '#2F6B58' }}><i className="ph-bold ph-check" style={{ fontSize: 11 }} /> {row.status}</span>
                  )}
                </div>
              ))}
            </div>
            <div style={{ display: 'flex', alignItems: 'flex-end', minHeight: 80, padding: '18px 176px 0 4px' }}>
              <p style={{ fontSize: 11.5, fontWeight: 500, lineHeight: 1.45, color: '#4B5563' }}>Si no puede trazarse, no se muestra</p>
            </div>
          </div>
          <div style={{ position: 'absolute', right: -16, bottom: -24, zIndex: 2, width: 172, background: '#fff', border: '1px solid #E5E7EB', borderRadius: 11, boxShadow: '0 2px 4px rgba(11,15,20,.06), 0 1px 2px rgba(11,15,20,.04)', padding: '12px 13px' }}>
            <p style={{ fontSize: 8.5, fontWeight: 600, letterSpacing: '.14em', textTransform: 'uppercase', color: '#9CA3AF' }}>Consulta · Marzo</p>
            <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 9 }}>
              <span style={{ flex: 'none', width: 22, height: 22, borderRadius: 9999, background: '#263185', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><i className="ph-bold ph-check" style={{ color: '#91DFC8', fontSize: 11 }} /></span>
              <span style={{ fontSize: 12.5, fontWeight: 600, letterSpacing: '-.01em', color: '#0B0F14' }}>Respuesta con fuente</span>
            </div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 6, marginTop: 9, paddingTop: 9, borderTop: '1px solid #EEF0F4' }}>
              <i className="ph ph-git-commit" style={{ color: '#253DE5', fontSize: 12, flex: 'none' }} />
              <span style={{ fontSize: 10, fontWeight: 500, lineHeight: 1.35, color: '#4B5563' }}>Bajás al ERP en un click</span>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

const ProblemaSection = () => (
  <section className="tm-prod-section tm-prod-section-paper">
    <div className="tm-container">
      <div className="tm-prod-head" style={{ maxWidth: 900 }}>
        <h2>El CEO pregunta a las 10 y quiere el número a las 11</h2>
        <p>El pipeline típico: el CEO pregunta, el CFO le pide al Head of P&amp;C, el Head le pide al analista, el analista abre 4 planillas, cruza data del ERP, arma un reporte, lo manda de vuelta, alguien revisa, alguien corrige, dos días después el número está. Y para entonces la pregunta original ya cambió.</p>
      </div>
    </div>
  </section>
);

const DondePreguntasSection = () => (
  <section className="tm-prod-section tm-prod-section-white">
    <div className="tm-container">
      <h2 style={{ maxWidth: 820, margin: '0 auto 44px', textAlign: 'center', fontSize: 'clamp(26px,2.6vw,34px)', lineHeight: 1.18, fontWeight: 600, letterSpacing: '-.035em', color: '#1C2536', textWrap: 'pretty' }}>Preguntá donde ya trabajás</h2>
      <div className="tm-prod-cards">
        <article className="tm-prod-card" style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
          <div>
            <h3>Desde Teramot</h3>
            <p>Interfaz nativa con filtros, agrupaciones y drill-down. La pregunta va en lenguaje natural, la respuesta viene con fórmula visible y fuentes clickeables.</p>
          </div>
          <div style={{ border: '1px solid #EEF0F4', borderRadius: 10, overflow: 'hidden', background: '#FCFCFE' }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '11px 13px', borderBottom: '1px solid #EEF0F4' }}>
              <i className="ph ph-magnifying-glass" style={{ fontSize: 13, color: '#9CA3AF' }} />
              <span style={{ fontSize: 11.5, fontWeight: 500, color: '#374151' }}>¿Cuál fue el margen por canal en marzo?</span>
            </div>
            <div style={{ display: 'grid', gap: 1, background: '#E5E7EB' }}>
              {[['Retail propio', false], ['Mayorista', false], ['e-commerce', true]].map(([label, bold]) => (
                <div key={label} style={{ display: 'grid', gridTemplateColumns: '1fr auto auto', gap: 14, padding: '8px 13px', background: '#fff' }}>
                  <span style={{ fontSize: 11, fontWeight: bold ? 600 : 500, color: bold ? '#0B0F14' : '#4B5563' }}>{label}</span>
                  <span style={{ fontSize: 11, fontWeight: bold ? 600 : 400, color: '#0B0F14' }}>—</span>
                  <i className="ph ph-git-commit" style={{ fontSize: 12, color: '#253DE5' }} />
                </div>
              ))}
            </div>
            <p style={{ padding: '10px 13px', fontSize: 10.5, fontWeight: 500, color: '#6B7280' }}>Cada línea abre su fórmula y su fuente</p>
          </div>
        </article>

        <article className="tm-prod-card" style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
          <div>
            <h3>Desde tu IA (Claude, ChatGPT, Gemini)</h3>
            <p>Teramot expone tu data vía MCP. Preguntás desde tu asistente de IA de siempre, la respuesta viene con la fuente auditable de Teramot — no las alucinaciones del LLM.</p>
          </div>
          <div style={{ border: '1px solid #EEF0F4', borderRadius: 10, overflow: 'hidden', background: '#FCFCFE' }}>
            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 10, padding: '11px 13px', borderBottom: '1px solid #EEF0F4' }}>
              <span style={{ fontSize: 10, fontWeight: 600, letterSpacing: '.14em', textTransform: 'uppercase', color: '#9CA3AF' }}>Asistente · MCP</span>
              <span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: '4px 10px', borderRadius: 9999, background: 'rgba(123,193,173,.18)', fontSize: 10.5, fontWeight: 600, color: '#2F6B58' }}><i className="ph-bold ph-check-circle" style={{ fontSize: 12 }} /> Fuente Teramot</span>
            </div>
            <div style={{ display: 'grid', gap: 8, padding: 13 }}>
              <div style={{ padding: '8px 11px', borderRadius: 7, background: '#F7F8FD', fontSize: 11, fontWeight: 500, color: '#374151' }}>Comparame el margen de marzo contra febrero</div>
              <div style={{ padding: '8px 11px', borderRadius: 7, border: '1px solid #EEF0F4', background: '#fff', fontSize: 11, fontWeight: 500, color: '#374151' }}>Respuesta con tabla, fórmula y link al ERP</div>
            </div>
            <p style={{ padding: '0 13px 12px', fontSize: 10.5, fontWeight: 500, color: '#6B7280' }}>Los permisos de tu usuario se respetan igual</p>
          </div>
          <a href="/mcp.html" className="tm-btn tm-btn-md" style={{ alignSelf: 'start', background: 'transparent', color: '#253DE5', border: '1px solid rgba(37,61,229,.28)', borderRadius: 9999, fontWeight: 600 }}>Ver Teramot MCP <i className="ph ph-arrow-right" /></a>
        </article>
      </div>
    </div>
  </section>
);

const CapacidadesSection = () => (
  <section className="tm-prod-section tm-prod-section-paper">
    <div className="tm-container">
      <div className="tm-prod-head">
        <span className="tm-prod-faq-eyebrow"><span className="tm-prod-faq-eyebrow-dot" /> Capacidades</span>
        <h2 style={{ marginTop: 16 }}>Qué obtenés, no importa desde dónde preguntes</h2>
        <p>Foco LATAM: multi-entidad, multi-moneda, y conexión directa a la base de tu ERP con un usuario de solo lectura. Alternativa moderna para mid-market que no quiere pagar enterprise.</p>
      </div>
      <div className="tm-prod-cards">
        {CAPABILITY_CARDS.map((card) => (
          <article className="tm-prod-card" key={card.title}>
            <div className="tm-prod-card-icon"><i className={`ph ${card.icon}`} /></div>
            <h3>{card.title}</h3>
            <p>{card.body}</p>
          </article>
        ))}
      </div>
    </div>
  </section>
);

const DiferenciaSection = () => (
  <section className="tm-prod-section tm-prod-section-wash">
    <div className="tm-container">
      <h2 style={{ maxWidth: 820, margin: '0 auto 48px', textAlign: 'center', fontSize: 'clamp(26px,2.6vw,34px)', lineHeight: 1.18, fontWeight: 600, letterSpacing: '-.035em', color: '#1C2536', textWrap: 'pretty' }}>Un chatbot sobre finanzas es peligroso. Teramot no es eso.</h2>
      <div className="tm-prod-split">
        <div style={{ borderRadius: 12, overflow: 'hidden', background: '#fff', border: '1px solid rgba(11,15,20,.06)', boxShadow: '0 2px 4px rgba(11,15,20,.05), 0 1px 2px rgba(11,15,20,.03)' }}>
          <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, padding: '13px 18px', borderBottom: '1px solid #EEF0F4', background: '#FCFCFE' }}>
            <p style={{ fontSize: 10, fontWeight: 600, letterSpacing: '.14em', textTransform: 'uppercase', color: '#9CA3AF' }}>Consulta · Marzo</p>
            <span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: '4px 10px', borderRadius: 9999, background: 'rgba(123,193,173,.18)', fontSize: 10.5, fontWeight: 600, color: '#2F6B58' }}><i className="ph-bold ph-check-circle" style={{ fontSize: 12 }} /> Con fuente</span>
          </div>
          <div style={{ display: 'grid', gap: 6, padding: '16px 18px' }}>
            <div style={{ border: '1px solid #EEF0F4', borderRadius: 10, padding: '13px 14px' }}>
              <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
                <i className="ph ph-chat-circle-text" style={{ fontSize: 14, color: '#253DE5' }} />
                <span style={{ fontSize: 12, fontWeight: 600, letterSpacing: '-.01em', color: '#0B0F14' }}>Preguntás en lenguaje natural</span>
              </div>
              <div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, marginTop: 11 }}>
                {['Sin SQL', 'Con filtros', 'Con permisos'].map((t) => (
                  <span key={t} style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: '5px 10px', borderRadius: 9999, border: '1px solid #E5E7EB', fontSize: 11, fontWeight: 500, color: '#374151' }}><span style={{ width: 6, height: 6, borderRadius: 9999, background: '#7BC1AD' }} /> {t}</span>
                ))}
              </div>
            </div>
            <div style={{ display: 'flex', justifyContent: 'center', color: '#9CA3AF' }}><i className="ph ph-arrow-down" style={{ fontSize: 14 }} /></div>
            <div style={{ border: '1px solid #EEF0F4', borderRadius: 10, padding: '13px 14px' }}>
              <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 10 }}>
                <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
                  <i className="ph ph-floppy-disk" style={{ fontSize: 14, color: '#253DE5' }} />
                  <span style={{ fontSize: 12, fontWeight: 600, letterSpacing: '-.01em', color: '#0B0F14' }}>Consultas guardadas</span>
                </div>
                <span style={{ fontSize: 9.5, fontWeight: 600, letterSpacing: '.1em', textTransform: 'uppercase', color: '#253DE5' }}>Recurrentes</span>
              </div>
              <div style={{ display: 'grid', gap: 7, marginTop: 11 }}>
                {['Margen por canal', 'Gasto por centro de costo', 'Desvío vs presupuesto'].map((t) => (
                  <div key={t} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 10, padding: '7px 10px', borderRadius: 7, background: '#F7F8FD' }}>
                    <span style={{ fontSize: 11, fontWeight: 500, color: '#374151' }}>{t}</span>
                    <span style={{ fontSize: 10, color: '#6B7280' }}>guardada</span>
                  </div>
                ))}
              </div>
            </div>
            <div style={{ display: 'flex', justifyContent: 'center', color: '#9CA3AF' }}><i className="ph ph-arrow-down" style={{ fontSize: 14 }} /></div>
            <div style={{ border: '1px solid rgba(37,61,229,.18)', borderRadius: 10, padding: '13px 14px', background: '#F7F8FD' }}>
              <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
                <i className="ph ph-table" style={{ fontSize: 14, color: '#253DE5' }} />
                <span style={{ fontSize: 12, fontWeight: 600, letterSpacing: '-.01em', color: '#0B0F14' }}>Respuesta trazable</span>
              </div>
              <div style={{ display: 'grid', gap: 1, marginTop: 11, borderRadius: 7, overflow: 'hidden', border: '1px solid #E5E7EB', background: '#E5E7EB' }}>
                {[['Resultado', false], ['Componentes', false], ['Fuente en el ERP', true]].map(([label, bold]) => (
                  <div key={label} style={{ display: 'grid', gridTemplateColumns: '1fr auto auto', gap: 14, padding: '8px 11px', background: '#fff' }}>
                    <span style={{ fontSize: 11, fontWeight: bold ? 600 : 500, color: bold ? '#0B0F14' : '#4B5563' }}>{label}</span>
                    <span style={{ fontSize: 11, fontWeight: bold ? 600 : 400, color: '#0B0F14' }}>—</span>
                    <i className="ph ph-git-commit" style={{ fontSize: 12, color: '#253DE5' }} />
                  </div>
                ))}
              </div>
              <p style={{ marginTop: 10, fontSize: 10.5, fontWeight: 500, color: '#6B7280' }}>Si no puede trazarse, no se muestra</p>
            </div>
          </div>
        </div>
        <div className="tm-prod-split-copy">
          <p>La mayoría de las "IA financieras" son wrappers sobre un LLM genérico con acceso a tus datos. Suenan bien y responden mal: inventan números, confunden entidades, no saben qué son "costos indirectos" en tu plan de cuentas. Teramot está diseñado como capa de datos auditable: sea que preguntes desde la app de Teramot o desde Claude vía MCP, cada número viene con su cadena de origen. Si no puede trazarse, no se muestra.</p>
          <div className="tm-prod-checklist">
            {DIFERENCIA_CHECKLIST.map((t) => (
              <div className="tm-prod-checklist-item" key={t}><i className="ph-bold ph-check" />{t}</div>
            ))}
          </div>
        </div>
      </div>
    </div>
  </section>
);

const FaqSection = () => {
  useJsonLd({
    '@context': 'https://schema.org',
    '@type': 'FAQPage',
    mainEntity: FAQ_ITEMS.map((item) => ({
      '@type': 'Question',
      name: item.q,
      acceptedAnswer: { '@type': 'Answer', text: item.a.replace(/<\/?b>/g, '') },
    })),
  });
  return (
    <section className="tm-prod-section tm-prod-section-white">
      <div className="tm-container">
        <div className="tm-prod-faq-grid">
          <aside className="tm-prod-faq-aside">
            <span className="tm-prod-faq-eyebrow"><span className="tm-prod-faq-eyebrow-dot" /> Preguntas frecuentes</span>
            <h2>Preguntas frecuentes sobre <span>reportes ad-hoc</span> con Teramot</h2>
          </aside>
          <div className="tm-prod-faq-list">
            {FAQ_ITEMS.map((item, i) => (
              <details className="tm-prod-faq-item" key={item.q} open={i === 0 ? true : undefined}>
                <summary>
                  <span className="tm-prod-faq-q">{item.q}</span>
                  <span className="tm-prod-faq-icon"><i className="ph-bold ph-plus" /></span>
                </summary>
                <p className="tm-prod-faq-a" dangerouslySetInnerHTML={{ __html: item.a }} />
              </details>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

const CtaFinalSection = () => {
  const { c } = useLang();
  return (
    <section id="demo" className="tm-prod-cta">
      <div className="tm-prod-cta-inner">
        <p className="tm-prod-cta-kicker">Empezá ahora</p>
        <h2>Que el número esté cuando lo necesitás</h2>
        <p className="tm-prod-cta-sub">30 minutos y te mostramos consultas reales sobre tu data — desde Teramot y desde Claude.</p>
        <div className="tm-prod-cta-actions">
          <a href={c.links.call} target="_blank" rel="noopener noreferrer" className="tm-btn tm-btn-lg" style={{ background: '#fff', color: '#253DE5', borderColor: 'transparent', borderRadius: 9999, fontWeight: 600 }}>Pedí tu demo</a>
          <a href={c.links.app} className="tm-btn tm-btn-lg" style={{ background: 'transparent', color: '#fff', border: '1px solid rgba(255,255,255,.5)', borderRadius: 9999, fontWeight: 600 }}>Comenzá Gratis</a>
        </div>
        <p className="tm-prod-cta-fine">Sin proyecto de IT · Setup en semanas, no meses · Tus planillas siguen funcionando</p>
      </div>
    </section>
  );
};

const ReportesAdHocApp = () => {
  const rootRef = useRefRAH(null);
  useScrollReveal(rootRef);
  return (
    <main ref={rootRef} className="tm-prod">
      <ReportesHero />
      <ProblemaSection />
      <DondePreguntasSection />
      <CapacidadesSection />
      <DiferenciaSection />
      <FaqSection />
      <CtaFinalSection />
      <Footer />
    </main>
  );
};

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <LangProvider defaultLang="es">
    <ReportesAdHocApp />
  </LangProvider>
);
