// Bilingual content store for Fuse Studio landing.
// `useLang` reads/writes language from a single source of truth in window.

const FUSE_CONTENT = {
  nav: {
    items: {
      es: [
        ['Propuesta', '#propuesta'],
        ['Para quién', '#paraquien'],
        ['Ofertas', '#ofertas'],
        ['Diagnóstico', '#diagnostico'],
        ['Proceso', '#proceso'],
        ['Por qué', '#porque'],
      ],
      en: [
        ['Thesis', '#propuesta'],
        ['Who', '#paraquien'],
        ['Offerings', '#ofertas'],
        ['Diagnostic', '#diagnostico'],
        ['Process', '#proceso'],
        ['Why us', '#porque'],
      ],
    },
    cta: { es: 'Agendar llamada', en: 'Book a call' },
  },

  hero: {
    // Three variants. Each has kicker + h1 (with marked emphasis) + lead + meta.
    variants: {
      manifesto: {
        kicker: {
          es: '§ Fuse Studio · Córdoba, AR',
          en: '§ Fuse Studio · Córdoba, AR',
        },
        // Headline pieces — middle piece gets the underline mark + accent.
        h1: {
          es: ['La mayoría de las firmas crecen', 'a pesar', 'de sus sistemas. Las próximas, gracias a ellos.'],
          en: ['Most firms grow', 'in spite of', 'their systems. The next ones grow because of them.'],
        },
        lead: {
          es: 'Fuse Studio diseña e implementa el sistema operativo comercial y operacional de la firma — AI‑native por defecto. No entregamos una recomendación: construimos el sistema y lo dejamos funcionando.',
          en: 'Fuse Studio designs and ships the commercial and operational OS of your firm — AI‑native by default. We don\'t hand you a recommendation; we build the system and leave it running.',
        },
      },
      operativo: {
        kicker: {
          es: '§ Caso 01 — Estudio jurídico, 24 personas',
          en: '§ Case 01 — Law firm, 24 people',
        },
        h1: {
          es: ['Leads en WhatsApp.', 'Seguimiento', 'por memoria. Propuestas inconsistentes. Lo arreglamos en 8 semanas.'],
          en: ['Leads lost in WhatsApp.', 'Follow-up', 'from memory. Inconsistent proposals. We fix it in 8 weeks.'],
        },
        lead: {
          es: 'Diagnóstico de dos semanas. Implementación de seis. CRM configurado, intake automatizado, propuestas asistidas por IA, dashboard de revenue. El sistema queda funcionando antes de que nos vayamos.',
          en: 'Two-week diagnostic. Six-week implementation. CRM configured, intake automated, AI-assisted proposals, revenue dashboard. The system is running before we leave.',
        },
      },
      pregunta: {
        kicker: {
          es: '§ Pregunta para el partner',
          en: '§ A question for the partner',
        },
        h1: {
          es: ['¿Tu firma escala', 'porque', 'tiene un sistema, o porque alguien recuerda todo?'],
          en: ['Does your firm scale', 'because', 'it has a system, or because someone remembers everything?'],
        },
        lead: {
          es: 'Si la respuesta es la segunda, ya sabés cuál es el techo. Construimos sistemas comerciales y operacionales AI‑native para firmas de servicios profesionales que ya no quieren depender de la memoria de nadie.',
          en: 'If the answer is the second one, you already know where the ceiling is. We build AI-native commercial and operational systems for professional services firms that are done relying on anyone\'s memory.',
        },
      },
    },
    meta: {
      es: [
        ['04', 'ofertas'],
        ['5–50', 'personas / firma'],
        ['ES · EN', 'Latam + US'],
      ],
      en: [
        ['04', 'offerings'],
        ['5–50', 'people / firm'],
        ['ES · EN', 'Latam + US'],
      ],
    },
    cta_primary: { es: 'Agendar 30 minutos', en: 'Book 30 minutes' },
    cta_secondary: { es: 'Ver ofertas', en: 'See offerings' },
    note: {
      es: '↳ Scroll para ver cómo trabajamos',
      en: '↳ Scroll to see how we work',
    },
  },

  propuesta: {
    kicker: { es: '§ 01 — La propuesta', en: '§ 01 — The thesis' },
    h2: {
      es: ['Crecer ', 'a pesar', ' de los sistemas tiene un techo. Y ya estás cerca.'],
      en: ['Growing ', 'in spite of', ' your systems has a ceiling. And you\'re already close to it.'],
    },
    body: {
      es: 'Los leads se pierden en WhatsApp. El seguimiento depende de la memoria de alguien. Las propuestas son inconsistentes. La IA se usa en modo personal — sin captura institucional de valor. Cada uno de estos es un agujero. Juntos, son el techo.',
      en: 'Leads disappear into WhatsApp. Follow-up depends on someone\'s memory. Proposals are inconsistent. AI gets used personally — with no institutional capture of value. Each one is a leak. Together, they\'re the ceiling.',
    },
    leaks: {
      es: [
        { tag: '01', title: 'Leads en WhatsApp', body: 'Conversaciones reales en un thread que nadie ve. Cuando alguien renuncia, se va con la cuenta.' },
        { tag: '02', title: 'Seguimiento por memoria', body: 'El partner recuerda. Hasta que no recuerda. Y un deal de seis cifras se vence en silencio.' },
        { tag: '03', title: 'Propuestas inconsistentes', body: 'Tres asociados, tres versiones distintas del mismo scope. El cliente lo nota antes que vos.' },
        { tag: '04', title: 'IA en modo personal', body: 'Cada uno paga su ChatGPT. Nada queda. El conocimiento se va con la persona, no con la firma.' },
      ],
      en: [
        { tag: '01', title: 'Leads in WhatsApp', body: 'Real conversations in a thread nobody else sees. When someone quits, they leave with the account.' },
        { tag: '02', title: 'Follow-up from memory', body: 'The partner remembers. Until they don\'t. And a six-figure deal lapses in silence.' },
        { tag: '03', title: 'Inconsistent proposals', body: 'Three associates, three versions of the same scope. The client notices before you do.' },
        { tag: '04', title: 'AI used personally', body: 'Everyone pays for their own ChatGPT. Nothing accrues. Knowledge leaves with the person, not the firm.' },
      ],
    },
  },

  paraQuien: {
    kicker: { es: '§ 02 — Para quién', en: '§ 02 — Who this is for' },
    h2: {
      es: 'Construimos para una firma específica.',
      en: 'We build for a specific kind of firm.',
    },
    rows: {
      es: [
        ['Tipo', 'Estudios jurídicos, consultoras, contadoras, agencias de servicios profesionales.'],
        ['Tamaño', '5 a 50 personas. Hay decisor, hay presupuesto, hay urgencia real.'],
        ['Estado actual', 'Ya digitalizados básicamente — pero sin sistema comercial ni operacional coherente.'],
        ['Mercado', 'Argentina, Latam y US. Bilingüe inglés‑español.'],
      ],
      en: [
        ['Type', 'Law boutiques, consultancies, accounting practices, professional services agencies.'],
        ['Size', '5 to 50 people. There\'s a decider, a budget, and real urgency.'],
        ['Current state', 'Basic digital plumbing in place — but no coherent commercial or operational system.'],
        ['Market', 'Argentina, Latam and US. Bilingual English‑Spanish.'],
      ],
    },
  },

  ofertas: {
    kicker: { es: '§ 03 — Ofertas', en: '§ 03 — Offerings' },
    h2: {
      es: ['Cuatro maneras de empezar.', 'Una sola', ' manera de trabajar.'],
      en: ['Four ways to start.', 'One', ' way of working.'],
    },
    pricing_toggle_label: {
      es: ['Latam', 'US'],
      en: ['Latam', 'US'],
    },
    items: [
      {
        id: 'diagnostico',
        num: '01',
        type: { es: 'Entrada', en: 'Entry' },
        title: { es: 'Diagnóstico de sistema', en: 'System diagnostic' },
        duration: { es: '2 semanas · 4 sesiones + entregable escrito', en: '2 weeks · 4 sessions + written deliverable' },
        price: { latam: 'USD 1.800', us: 'USD 2.800' },
        summary: {
          es: 'Sprint de análisis para mapear el estado actual, identificar las pérdidas más costosas y diseñar el roadmap de implementación. Punto de entrada de baja fricción — en la mayoría de los casos conduce a una implementación.',
          en: 'Analysis sprint to map the current state, identify the costliest leaks, and design the implementation roadmap. Low-friction entry point — usually leads into an implementation.',
        },
        deliverables: {
          es: [
            'Mapa completo de flujos comerciales y operacionales actuales',
            'Diagnóstico de los 3 principales puntos de pérdida',
            'Roadmap de implementación priorizado por impacto',
            'Presentación final con recomendaciones ejecutables',
          ],
          en: [
            'Full map of current commercial and operational flows',
            'Diagnosis of the top 3 leak points',
            'Implementation roadmap prioritized by impact',
            'Final presentation with executable recommendations',
          ],
        },
      },
      {
        id: 'motor',
        num: '02',
        type: { es: 'Implementación', en: 'Implementation' },
        title: { es: 'Motor comercial', en: 'Commercial engine' },
        duration: { es: '6–8 semanas · diagnóstico incluido', en: '6–8 weeks · diagnostic included' },
        price: { latam: 'USD 5.000 — 8.000', us: 'USD 9.000 — 15.000' },
        summary: {
          es: 'Diseño e implementación del sistema de captación, calificación y conversión de clientes. De la consulta al cierre, sistematizado y funcionando sin depender de la memoria de nadie.',
          en: 'Design and implementation of the lead-capture, qualification and conversion system. From inquiry to close, systematized and running without depending on anyone\'s memory.',
        },
        deliverables: {
          es: [
            'CRM configurado, conectado y adoptado por el equipo',
            'Sistema de captación y calificación de leads',
            'Automatización de seguimiento y recordatorios',
            'Generación de propuestas asistida por IA',
            'Dashboard de revenue y métricas clave',
            'Capacitación y handoff completo al equipo',
          ],
          en: [
            'CRM configured, connected, and adopted by the team',
            'Lead capture and qualification system',
            'Automated follow-up and reminders',
            'AI-assisted proposal generation',
            'Revenue and key metrics dashboard',
            'Training and full handoff to the team',
          ],
        },
      },
      {
        id: 'infra',
        num: '03',
        type: { es: 'Implementación', en: 'Implementation' },
        title: { es: 'Infraestructura AI', en: 'AI infrastructure' },
        duration: { es: '6–8 semanas · diagnóstico incluido', en: '6–8 weeks · diagnostic included' },
        price: { latam: 'USD 6.000 — 10.000', us: 'USD 10.000 — 18.000' },
        summary: {
          es: 'Sistemas operacionales AI‑native: conocimiento interno estructurado, copilots para flujos específicos de la firma y automatización de procesos críticos. Opcionalmente, RAG privado para datos sensibles sin envío a terceros.',
          en: 'AI-native operational systems: structured internal knowledge, copilots for firm-specific flows, automation of critical processes. Optionally, private RAG for sensitive data that never leaves the building.',
        },
        deliverables: {
          es: [
            'Sistema de conocimiento interno estructurado y consultable',
            'Copilot de IA para flujos específicos de la firma',
            'Automatización de procesos operacionales críticos',
            'RAG privado opcional — datos sensibles sin salir del servidor del cliente',
            'Documentación y capacitación completa al equipo',
          ],
          en: [
            'Structured, queryable internal knowledge system',
            'AI copilot for firm-specific workflows',
            'Automation of critical operational processes',
            'Optional private RAG — sensitive data never leaves your servers',
            'Documentation and full team training',
          ],
        },
      },
      {
        id: 'retainer',
        num: '04',
        type: { es: 'Retainer', en: 'Retainer' },
        title: { es: 'Continuidad', en: 'Continuity' },
        duration: { es: 'Mensual · requiere implementación previa', en: 'Monthly · requires prior implementation' },
        price: { latam: 'USD 1.500 — 2.500 / mes', us: 'USD 2.800 — 4.000 / mo' },
        summary: {
          es: 'Advisory y mejoras continuas para firmas que ya tienen el sistema funcionando. Iteración, expansión y ajuste en curso.',
          en: 'Advisory and continuous improvement for firms that already have the system running. Ongoing iteration, expansion, adjustment.',
        },
        deliverables: {
          es: [
            'Revisión mensual de estado y ajuste del sistema',
            'Implementación de mejoras incrementales',
            'Acceso directo para consultas urgentes',
          ],
          en: [
            'Monthly system review and tuning',
            'Incremental improvements shipped',
            'Direct access for urgent questions',
          ],
        },
      },
    ],
  },

  diagnostico: {
    kicker: { es: '§ 04 — Diagnóstico de 60 segundos', en: '§ 04 — 60-second diagnostic' },
    h2: {
      es: ['Cuatro preguntas.', 'Una recomendación', ' concreta.'],
      en: ['Four questions.', 'One concrete', ' recommendation.'],
    },
    body: {
      es: 'Sin email, sin pitch. Te decimos por dónde empezar.',
      en: 'No email, no pitch. We tell you where to start.',
    },
    questions: {
      es: [
        {
          q: '¿Dónde viven hoy tus conversaciones comerciales?',
          options: [
            { label: 'WhatsApp, email, cabezas. Sin sistema.', weight: { motor: 3, diagnostico: 1 } },
            { label: 'Algo de CRM pero nadie lo usa.', weight: { motor: 3, diagnostico: 1 } },
            { label: 'CRM funcionando. Quiero el siguiente nivel.', weight: { infra: 2, retainer: 2 } },
          ],
        },
        {
          q: '¿Cómo se generan hoy las propuestas?',
          options: [
            { label: 'Copy‑paste de la última. Cada socio la suya.', weight: { motor: 2 } },
            { label: 'Plantilla, pero el armado lo hace una persona.', weight: { motor: 2, infra: 1 } },
            { label: 'Asistido, pero el conocimiento se queda afuera.', weight: { infra: 3 } },
          ],
        },
        {
          q: '¿Qué pasa con el conocimiento interno?',
          options: [
            { label: 'Vive en cabezas y en Drive sin orden.', weight: { infra: 3, diagnostico: 1 } },
            { label: 'Está indexado pero nadie lo consulta.', weight: { infra: 2 } },
            { label: 'Funciona. Quiero llevarlo a copilots.', weight: { infra: 2, retainer: 2 } },
          ],
        },
        {
          q: '¿Cuán urgente es resolver esto?',
          options: [
            { label: 'Quiero entender qué tengo antes de invertir.', weight: { diagnostico: 4 } },
            { label: 'Tenemos presupuesto y quiero implementar este trimestre.', weight: { motor: 2, infra: 2 } },
            { label: 'Ya implementamos. Necesito acompañamiento sostenido.', weight: { retainer: 4 } },
          ],
        },
      ],
      en: [
        {
          q: 'Where do your commercial conversations live today?',
          options: [
            { label: 'WhatsApp, email, people\'s heads. No system.', weight: { motor: 3, diagnostico: 1 } },
            { label: 'Some CRM exists but nobody uses it.', weight: { motor: 3, diagnostico: 1 } },
            { label: 'CRM works. I want the next level.', weight: { infra: 2, retainer: 2 } },
          ],
        },
        {
          q: 'How do proposals get generated today?',
          options: [
            { label: 'Copy‑paste of the last one. Each partner their own.', weight: { motor: 2 } },
            { label: 'Template, but assembly is manual.', weight: { motor: 2, infra: 1 } },
            { label: 'Assisted, but the knowledge stays outside.', weight: { infra: 3 } },
          ],
        },
        {
          q: 'What\'s happening with internal knowledge?',
          options: [
            { label: 'Lives in heads and an unsorted Drive.', weight: { infra: 3, diagnostico: 1 } },
            { label: 'Indexed but nobody queries it.', weight: { infra: 2 } },
            { label: 'It works. I want to push it into copilots.', weight: { infra: 2, retainer: 2 } },
          ],
        },
        {
          q: 'How urgent is solving this?',
          options: [
            { label: 'I want to understand what I have before I invest.', weight: { diagnostico: 4 } },
            { label: 'Budget exists. I want to implement this quarter.', weight: { motor: 2, infra: 2 } },
            { label: 'Already implemented. Need sustained support.', weight: { retainer: 4 } },
          ],
        },
      ],
    },
    result: {
      es: {
        intro: 'Recomendación · basada en tus respuestas',
        cta: 'Agendar 30 min para hablar de esto',
        reset: 'Empezar de nuevo',
      },
      en: {
        intro: 'Recommendation · based on your answers',
        cta: 'Book 30 min to talk about this',
        reset: 'Start over',
      },
    },
  },

  proceso: {
    kicker: { es: '§ 05 — El proceso', en: '§ 05 — The process' },
    h2: {
      es: ['Cinco pasos.', 'Cero pilots', ' eternos.'],
      en: ['Five steps.', 'Zero', ' endless pilots.'],
    },
    steps: {
      es: [
        { n: '01', label: 'Primera conversación', dur: '30 min', body: 'Sin costo. Entendemos el contexto y confirmamos si hay fit. Si no, te decimos quién sí.' },
        { n: '02', label: 'Propuesta', dur: '48 h', body: 'Scope, entregables, precio y timing. Sin letra chica. Un documento que tu socio puede firmar.' },
        { n: '03', label: 'Diagnóstico inicial', dur: 'Semana 1', body: 'Discovery profundo. Mapeo del sistema actual, identificación de prioridades, alineación de criterios.' },
        { n: '04', label: 'Implementación', dur: 'Sem. 2–8', body: 'Construcción por iteraciones con check‑ins semanales. Feedback incorporado en tiempo real, no al final.' },
        { n: '05', label: 'Handoff', dur: 'Última semana', body: 'Entrega del sistema funcionando, capacitación al equipo, documentación completa. El sistema queda tuyo.' },
      ],
      en: [
        { n: '01', label: 'First conversation', dur: '30 min', body: 'No cost. We understand the context and confirm fit. If not, we tell you who is.' },
        { n: '02', label: 'Proposal', dur: '48 h', body: 'Scope, deliverables, price and timing. No fine print. A document your partner can sign.' },
        { n: '03', label: 'Initial diagnostic', dur: 'Week 1', body: 'Deep discovery. Map the current system, identify priorities, align criteria.' },
        { n: '04', label: 'Implementation', dur: 'Wk 2–8', body: 'Iterative build with weekly check-ins. Feedback incorporated in real time, not at the end.' },
        { n: '05', label: 'Handoff', dur: 'Final week', body: 'Hand over a running system, training, and full documentation. The system is yours.' },
      ],
    },
  },

  porque: {
    kicker: { es: '§ 06 — Por qué Fuse', en: '§ 06 — Why Fuse' },
    h2: {
      es: ['Cinco razones.', 'Ninguna', ' es "AI‑powered ✨".'],
      en: ['Five reasons.', 'None', ' of them is "AI-powered ✨".'],
    },
    reasons: {
      es: [
        { title: 'Diseñamos e implementamos', body: 'No consultoría sin ejecución. No entregamos un plan y nos vamos. Construimos el sistema y lo dejamos andando.' },
        { title: 'Dominio del sector', body: 'Contexto real de servicios profesionales desde adentro: legal, consultoría, operaciones. Sabemos cómo se factura un matter.' },
        { title: 'Track comercial propio', body: '5+ años de ventas B2B. Los sistemas que diseñamos ya los vivimos como vendedores — no los inventamos en una pizarra.' },
        { title: 'Construcción técnica', body: 'React, Python, Supabase, APIs de IA, automatizaciones. Lo que proponemos, lo construimos. Nada subcontratado.' },
        { title: 'Bilingüe', body: 'Inglés y español, sin fricción. Mercado Latam y US. Tu cliente en Miami y tu equipo en Córdoba en el mismo sistema.' },
      ],
      en: [
        { title: 'We design and we ship', body: 'No consulting without execution. No plan-and-leave. We build the system and we keep it running.' },
        { title: 'Sector fluency', body: 'Real context of professional services from the inside: legal, consulting, ops. We know how a matter gets billed.' },
        { title: 'Our own commercial track', body: '5+ years of real B2B sales. The systems we design we\'ve lived as sellers — not invented on a whiteboard.' },
        { title: 'We build it ourselves', body: 'React, Python, Supabase, AI APIs, automation. What we propose, we build. Nothing subcontracted.' },
        { title: 'Bilingual', body: 'English and Spanish, no friction. Latam and US market. Your client in Miami and your team in Córdoba on the same system.' },
      ],
    },
  },

  cta: {
    kicker: { es: '§ 07 — Trabajemos', en: '§ 07 — Let\'s work' },
    h2: {
      es: ['Una llamada de 30 minutos.', 'Sin pitch.'],
      en: ['One 30-minute call.', 'No pitch.'],
    },
    body: {
      es: 'Contanos qué proceso querés rediseñar. Si es para nosotros, te lo decimos. Si no, te conectamos con alguien mejor.',
      en: 'Tell us which process you want to redesign. If it\'s for us, we say so. If not, we connect you with someone better.',
    },
    placeholder_name: { es: 'Tu nombre', en: 'Your name' },
    placeholder_email: { es: 'nombre@firma.com', en: 'name@firm.com' },
    placeholder_msg: { es: 'En una línea: qué te trajo acá.', en: 'In one line: what brought you here.' },
    submit: { es: 'Agendar conversación', en: 'Book conversation' },
    submitted: { es: '✓ Recibido — te escribimos en menos de 24h.', en: '✓ Got it — we\'ll reply within 24h.' },
    direct: {
      es: 'O escribinos directo a',
      en: 'Or write us directly at',
    },
  },

  footer: {
    tagline: {
      es: 'Sistemas comerciales y operacionales AI‑native para firmas de servicios profesionales.',
      en: 'AI-native commercial and operational systems for professional services firms.',
    },
    cols: {
      es: [
        { title: 'Estudio', links: ['Propuesta', 'Ofertas', 'Proceso', 'Por qué Fuse'] },
        { title: 'Contacto', links: ['hola@fuse.studio', 'Córdoba · Argentina', 'LinkedIn', 'X / Twitter'] },
        { title: 'Idiomas', links: ['Español (primary)', 'English'] },
      ],
      en: [
        { title: 'Studio', links: ['Thesis', 'Offerings', 'Process', 'Why Fuse'] },
        { title: 'Contact', links: ['hola@fuse.studio', 'Córdoba · Argentina', 'LinkedIn', 'X / Twitter'] },
        { title: 'Languages', links: ['Español (primary)', 'English'] },
      ],
    },
    legal: {
      es: '© 2026 Fuse Studio · Córdoba, AR · Hecho a mano.',
      en: '© 2026 Fuse Studio · Córdoba, AR · Handmade.',
    },
    version: {
      es: 'v1.0 · last shipped today',
      en: 'v1.0 · last shipped today',
    },
  },
};

// Tiny lang hook — single global state stored on window so any component reads it.
function useLang() {
  const [lang, setLangState] = React.useState(() => window.__fuseLang || 'es');
  React.useEffect(() => {
    const handler = (e) => setLangState(e.detail);
    window.addEventListener('fuse:lang', handler);
    return () => window.removeEventListener('fuse:lang', handler);
  }, []);
  const setLang = (next) => {
    window.__fuseLang = next;
    window.dispatchEvent(new CustomEvent('fuse:lang', { detail: next }));
  };
  return [lang, setLang];
}

window.FUSE_CONTENT = FUSE_CONTENT;
window.useLang = useLang;
