/* global React */
// elementa-content.jsx — i18n runtime + content dictionaries (es / en)

const ELEMENTA_LANG_KEY = "elementa-lang";
function getLang() {
  if (typeof window === "undefined") return "es";
  return window.localStorage?.getItem(ELEMENTA_LANG_KEY) || "es";
}
function setLang(l) {
  if (typeof window === "undefined") return;
  window.localStorage?.setItem(ELEMENTA_LANG_KEY, l);
  window.dispatchEvent(new CustomEvent("elementa-lang-change", { detail: l }));
}
function useLang() {
  const [lang, setLangState] = React.useState(getLang());
  React.useEffect(() => {
    const onChange = (e) => setLangState(e.detail || getLang());
    window.addEventListener("elementa-lang-change", onChange);
    return () => window.removeEventListener("elementa-lang-change", onChange);
  }, []);
  return [lang, setLang];
}

// ───────────────────────────────────────────────────────────────────
const CONTENT = {
  es: {
    brand: {
      tagline: "Automatización inteligente",
      descIntro: "Implementamos sistemas con IA para que tu empresa",
      descVerbs: ["responda", "venda", "organice"],
      descConnector: "y",
      descLast: "opere",
      descTail: "mejor.",
    },
    common: {
      esc: "ESC",
      online: "online",
      whatsapp: "WhatsApp",
      requestQuote: "Prueba 15 días gratis",
      requestDiagnostic: "Agendar diagnóstico",
      requestPlan: "Pedir este plan",
      writeUs: "Escribinos",
      back: "Atrás",
      cancel: "Cancelar",
      next: "Siguiente",
      sendRequest: "Enviar consulta",
      backToHome: "Volver al inicio",
      writeWhatsApp: "Escribir por WhatsApp",
      subscribe: "Suscribirme",
      menuConocer: "Conocer",
      menuTrabajar: "Trabajar",
      goHome: "Volver al inicio",
      close: "Cerrar",
      brandTag: "Estudio de automatización",
    },
    nav: {
      conocerLabel: "[ Conocer ]",
      trabajarLabel: "[ Trabajar con nosotros ]",
      left: [
        { id: "soluciones", label: "Soluciones",             num: "01" },
        { id: "proceso",    label: "Cómo trabajamos?",       num: "02" },
        { id: "beneficios", label: "Por qué Elementa?",      num: "03" },
        { id: "faq",        label: "Preguntas frecuentes",   num: "04" },
      ],
      right: [
        { id: "planes",   label: "Planes",   num: "05" },
        { id: "blog",     label: "Recursos", num: "06" },
        { id: "contacto", label: "Contacto", num: "07" },
      ],
    },
    soluciones: {
      title: "Soluciones",
      subtitle: "Un sistema para cada realidad",
      lead: "Elegís según tu caso. Implementación inmediata y 15 días de prueba gratis.",
      cur: "USD",
      perMonth: "/mes",
      soonLabel: "Próximamente",
      items: [
        { id: "beauty", name: "Elementa Beauty", rubro: "Belleza & Estética",
          pitch: "Agenda, clientes, cobros y formaciones en un solo lugar, pensado para el emprendedor de la belleza.",
          feats: ["Agenda y reservas online", "Ficha de clientes e historial", "Cobros y alertas de vencimiento", "Gestión de alumnos y formaciones"],
          price: "29" },
        { id: "civil", name: "Elementa Civil", rubro: "Construcción", featured: true, badge: "Destacada",
          pitch: "Gestioná a tu equipo y los recursos de cada obra: quién trabaja, dónde, con qué y cuánto se gasta.",
          feats: ["Registro de horas y asistencia", "Personal asignado por obra", "Control de uniformes y herramientas", "Caja chica y gastos de obra"],
          price: "50" },
        { id: "facility", name: "Elementa Facility", rubro: "Limpieza & Afines",
          pitch: "Coordiná servicios, equipos y clientes desde una sola plataforma, con app para tu personal.",
          feats: ["Asignación de servicios y rutas", "App móvil para empleados", "Control de asistencia y tareas", "Facturación y reportes por cliente"],
          price: "90" },
        { id: "retail", name: "Elementa Retail", rubro: "Comercio & Proximidad", soon: true, badge: "Próximamente",
          pitch: "Stock, proveedores, ventas y personal de tu comercio, ordenados en un solo sistema.",
          feats: ["Control de stock y reposición", "Gestión de proveedores", "Datos de ventas y caja", "Turnos y personal"] },
      ],
      askNote: "¿No es lo que estás buscando?",
      askButton: "Contactanos",
      trialTitle: "Probá Elementa, 15 días gratis",
      trialBody: "Implementación inmediata y sin compromiso.",
      trialButton: "Empezá tus 15 días gratis",
    },
    proceso: {
      title: "Cómo trabajamos?",
      subtitle: "De elegir la solución a operar con un sistema",
      lead: "En ELEMENTA creemos que la organización no debería ser un lujo ni un proyecto eterno. Por eso desarrollamos sistemas especializados para diferentes rubros, listos para implementar y utilizar desde el primer día.",
      steps: [
        { num: "01", title: "Elegís la solución adecuada para tu negocio",
          body: "Cada industria tiene necesidades diferentes. Por eso contamos con soluciones específicas para:",
          bullets: ["ELEMENTA Beauty", "ELEMENTA Civil", "ELEMENTA Facility", "ELEMENTA Retail"],
          note: "Cada una está diseñada para resolver los desafíos de gestión de su sector." },
        { num: "02", title: "Activamos tu espacio de trabajo",
          body: "Creamos tu cuenta y dejamos la estructura lista para comenzar a utilizarla. No necesitás conocimientos técnicos ni invertir meses configurando herramientas." },
        { num: "03", title: "Centralizás toda tu operación",
          body: "Tu información deja de estar repartida entre WhatsApp, planillas, cuadernos y diferentes aplicaciones. Todo queda organizado en un único lugar:",
          bullets: ["Clientes", "Personal", "Tareas", "Insumos", "Cobros", "Documentación", "Indicadores"] },
        { num: "04", title: "Tu equipo trabaja con procesos claros",
          body: "Cada persona sabe qué hacer, cuándo hacerlo y cómo registrarlo. Esto genera más orden, mejor comunicación y menos dependencia de una sola persona." },
        { num: "05", title: "Pagás una suscripción mensual",
          body: "El acceso funciona mediante una membresía mensual. Cada solución tiene un valor adaptado a las necesidades de su rubro. La suscripción incluye:",
          bullets: ["Acceso al sistema", "Actualizaciones continuas", "Soporte", "Mejoras y nuevas funcionalidades", "Acompañamiento durante el uso"],
          note: "Sin contratos complejos. Sin desarrollos personalizados costosos. Sin inversiones iniciales elevadas." },
      ],
      objetivoTitle: "Nuestro objetivo",
      objetivoBody: "Que puedas dedicar menos tiempo a organizar el negocio y más tiempo a hacerlo crecer. Porque cuando existe un sistema, las personas trabajan mejor, los procesos son más claros y las decisiones se toman con información real.",
      ctaNote: "Empezá hoy, sin compromiso.",
      ctaButton: "Prueba 15 días gratis",
    },
    beneficios: {
      title: "Por qué Elementa?",
      subtitle: "Lo que cambia cuando trabajás con nosotros",
      lead: "Lo importante no es la tecnología. Es lo que cambia en tu día a día cuando el sistema funciona.",
      sectionDifferentLabel: "Lo que nos hace distintos",
      ctaNote: "Conversemos.",
      ctaButton: "Prueba 15 días gratis",
      stats: [
        { k: "−70%", v: "Tareas manuales repetitivas", body: "Lo que el equipo hacía a mano, ahora corre solo en segundo plano." },
        { k: "24/7", v: "Atención sin pausa",          body: "Tu negocio responde de noche, fines de semana y feriados." },
        { k: "+3×",  v: "Velocidad de respuesta",      body: "Los leads no se enfrían: contacto inmediato y seguimiento automático." },
        { k: "1",    v: "Único panel de control",      body: "Una sola pantalla para ver lo que importa. Adiós a tres planillas y dos pestañas." },
      ],
      reasons: [
        { t: "Equipo técnico real",         p: "No somos una agencia que conecta plantillas. Tenemos un fundador que construyó software empresarial usado por +1.000 personas." },
        { t: "Negocio antes que tecnología", p: "Empezamos por entender qué problema te quita el sueño. La tecnología es solo el medio." },
        { t: "Sin lock-in",                 p: "Trabajamos sobre herramientas estándar (WhatsApp API, Airtable, Make, tu CRM). Si nos vas, todo sigue funcionando." },
        { t: "Cotización cerrada",          p: "Te decimos exactamente cuánto cuesta y cuánto demora antes de empezar. Sin sorpresas." },
      ],
    },
    faq: {
      title: "Preguntas frecuentes",
      subtitle: "Las dudas que más nos hacen",
      lead: "Si tu pregunta no está acá, escribinos. Respondemos en menos de 24 horas hábiles.",
      ctaNote: "¿Tu duda no figura?",
      ctaButton: "Escribinos",
      items: [
        { q: "¿Necesito conocimientos técnicos?", a: "No. Diseñamos todo para que personas no técnicas puedan operar el sistema. Capacitamos al equipo y dejamos manuales claros." },
        { q: "¿En cuánto tiempo veo resultados?", a: "Las primeras automatizaciones (bot de WhatsApp, recordatorios) entran en producción entre 7 y 14 días. Los flujos complejos toman entre 3 y 6 semanas." },
        { q: "¿Funciona con las herramientas que ya uso?", a: "Sí. Nos integramos con tu CRM, ERP, planillas, sistema contable o cualquier API. Si no tiene API, lo evaluamos caso por caso." },
        { q: "¿Qué pasa si quiero dejar el servicio?", a: "Te entregamos toda la documentación y los accesos. El sistema sigue funcionando porque corre sobre herramientas estándar, no sobre infraestructura propia bloqueada." },
        { q: "¿Cobran setup más mensualidad?", a: "Sí. Setup único por la implementación + mensualidad por mantenimiento, mejoras y soporte. La mensualidad es lo que sostiene el sistema vivo." },
        { q: "¿Trabajan con empresas del exterior?", a: "Sí, atendemos clientes en LATAM, Europa y EE.UU. Las reuniones son remotas y los sistemas se entregan en el idioma que necesite tu equipo." },
      ],
    },
    planes: {
      title: "Planes",
      subtitle: "Desde un piloto rápido hasta implementación corporativa",
      lead: "Cuatro escalones. Empezás donde tiene sentido para tu negocio y crecés cuando estás listo. Todos los planes incluyen setup único + mensualidad.",
      setupLabel: "setup",
      perMonth: "/mes",
      deliveryLabel: "Entrega",
      diagnosticBoxTitle: "Diagnóstico gratuito.",
      diagnosticBoxBody: "Antes de cotizar, hacemos una reunión de 90 minutos sin compromiso para mapear tus procesos y recomendarte el plan correcto. Si no encaja ninguno, lo decimos.",
      badges: { popular: "Más popular", custom: "A medida" },
      items: [
        { id: "basico",   tag: "Básico",   name: "Setup Esencial",       setup: "USD 600",          monthly: "USD 200",  pitch: "Resolvés un problema urgente en 7-10 días. Punto de entrada al mundo automatizado.", features: ["Bot de WhatsApp con respuestas automáticas (15 FAQs)", "Mensaje de bienvenida automático", "Recordatorios de turno (24h y 2h antes)", "Formulario de captación de leads", "Base de datos simple", "Capacitación 1h al equipo", "30 días de soporte"], delivery: "7–10 días" },
        { id: "medio",    tag: "Medio",    name: "Sistema Comercial",     setup: "USD 1.200",        monthly: "USD 350",  pitch: "Captura, sigue, convierte y retiene clientes solo. Tu negocio vende más sin contratar más.", badge: "popular", featured: true, features: ["Todo lo del plan Básico", "CRM con pipeline visual", "Secuencia de seguimiento (5 mensajes / 7 días)", "Bot de Instagram DM", "Agenda online con confirmación", "Reactivación de clientes inactivos", "Dashboard de métricas", "Email marketing (3 emails)", "60 días de soporte"], delivery: "14–18 días" },
        { id: "premium",  tag: "Premium",  name: "Automatización Total",  setup: "USD 2.200",        monthly: "USD 500",  pitch: "Para liderar tu sector. IA entrenada y desarrollo técnico real integrado.", features: ["Todo lo del plan Medio", "Integraciones avanzadas (APIs propias)", "IA conversacional entrenada para tu negocio", "Dashboard ejecutivo con KPIs personalizados", "Reuniones quincenales con estratega", "8 hs/mes de mejoras activas", "Soporte prioritario (<4h)", "Informe mensual de resultados"], delivery: "21–30 días" },
        { id: "empresa",  tag: "Empresa",  name: "Implementación a Medida", setup: "Desde USD 4.000", monthly: "Desde USD 900", pitch: "Procesos complejos, equipos grandes, integración con sistemas existentes.", badge: "custom", features: ["Todo lo del plan Premium", "Auditoría técnica profunda", "Integración con ERP / CRM propios", "Desarrollo de herramientas a medida", "Account manager dedicado", "SLA <2h en horario laboral", "20 hs/mes de desarrollo activo", "NDA y documentación técnica completa"], delivery: "30–60 días" },
      ],
    },
    blog: {
      title: "Recursos",
      subtitle: "Guías, casos y artículos del estudio",
      lead: "Material de lectura del estudio. Casos reales, guías y opiniones sobre IA aplicada al trabajo de verdad.",
      readMin: "min",
      newsletterTitle: "Una vez al mes, nada más.",
      newsletterDesc: "Recibí un email mensual con casos, plantillas y aprendizajes del estudio.",
      newsletterPlaceholder: "tu@empresa.com",
      newsletterButton: "Suscribirme",
      newsletterSuccess: "¡Gracias! Te sumamos al newsletter.",
      items: [
        { tag: "Guía",        title: "Cómo elegir qué automatizar primero en tu PyME",                       read: "6", date: "Mayo 2026" },
        { tag: "Caso",        title: "De 40 turnos perdidos por mes a cero: una clínica estética",          read: "4", date: "Abril 2026" },
        { tag: "Comparativa", title: "WhatsApp Business vs WhatsApp Business API: cuándo conviene cada uno", read: "8", date: "Abril 2026" },
        { tag: "Plantilla",   title: "Checklist: ¿está tu negocio listo para un sistema de tickets?",       read: "3", date: "Marzo 2026" },
        { tag: "Análisis",    title: "Por qué el 80% de las automatizaciones fallan en el primer año",      read: "7", date: "Marzo 2026" },
        { tag: "Tutorial",    title: "Conectá tu agenda con WhatsApp en menos de una hora",                  read: "5", date: "Febrero 2026" },
      ],
    },
    form: {
      title: "Empezá tu prueba gratis",
      titleSuccess: "Recibido. Gracias.",
      stepOf: "Paso", of: "de",
      stepNames: ["Tu objetivo", "Tu empresa", "Tus datos"],
      footerHints: ["¿Cuál es tu objetivo?", "Contanos sobre tu empresa", "Por dónde te contactamos"],

      q1: "¿Qué te gustaría mejorar?",
      q1Hint: "Marcá una o varias. Si no estás seguro, marcá \"Otro\".",
      q1Options: [
        { id: "flujos",   label: "Mejorar flujos de trabajo",        desc: "Tareas que el equipo hace manual y consumen tiempo" },
        { id: "tickets",  label: "Sistema de tickets",                desc: "Centralizar pedidos, incidencias y soporte" },
        { id: "agendas",  label: "Agendas y turnos",                   desc: "Calendario, confirmaciones y recordatorios" },
        { id: "rrhh",     label: "Administración de funcionarios",     desc: "Solicitudes, licencias, horarios" },
        { id: "atencion", label: "Atención automatizada",              desc: "Bots de WhatsApp / Instagram con IA" },
        { id: "otro",     label: "Otro / aún no lo tengo claro",       desc: "Te ayudamos a definirlo en el diagnóstico" },
      ],
      q2: "¿Qué tan urgente es?",
      q2Options: [
        { id: "ya",     label: "Lo necesito ya",     desc: "Hay un problema urgente que resolver" },
        { id: "trim",   label: "En este trimestre",   desc: "Tenemos un plan a corto plazo" },
        { id: "explor", label: "Estoy explorando",    desc: "Quiero entender qué es posible" },
      ],

      q3: "¿De qué tamaño es tu empresa?",
      q3Options: [
        { id: "1-10",   label: "1 – 10 personas" },
        { id: "11-50",  label: "11 – 50 personas" },
        { id: "51-200", label: "51 – 200 personas" },
        { id: "200+",   label: "Más de 200 personas" },
      ],
      q4: "Presupuesto orientativo",
      q4Hint: "Para entender qué plan tiene sentido proponerte.",
      q4Options: [
        { id: "<1000", label: "Menos de USD 1.000",  tag: "Básico" },
        { id: "1k-3k", label: "USD 1.000 – 3.000",   tag: "Medio" },
        { id: "3k-6k", label: "USD 3.000 – 6.000",   tag: "Premium" },
        { id: "6k+",   label: "Más de USD 6.000",    tag: "Empresa" },
        { id: "ndd",   label: "No lo tengo definido", tag: "—" },
      ],

      yourData: "Tus datos",
      fNombre: "Nombre",
      fEmpresa: "Empresa",
      fEmail: "Email",
      fTelefono: "Teléfono / WhatsApp",
      fMensaje: "Algo más que quieras contarnos",
      pNombre: "Tu nombre",
      pEmpresa: "Nombre de tu empresa",
      pTelefono: "+...",
      pMensaje: "Procesos concretos que querés mejorar, herramientas que ya usan, fechas importantes...",
      slaNote: "Respondemos en",
      slaBold: "menos de 24 hs hábiles",
      slaTail: "con una propuesta inicial y una invitación a una llamada de diagnóstico gratuita.",

      successTitle: (name) => `Tu consulta llegó, ${name || "gracias"}.`,
      successBody: "Te respondemos en menos de 24 hs hábiles con una propuesta inicial y una invitación a una llamada de diagnóstico gratuita de 90 minutos.",
      successRef: "ref:",
      successEmail: "email:",
      successObj: "objetivos:",
      successSize: "tamaño:",
    },
  },

  // ╔═════════════════════════════════════════════════════════════╗
  // ║ ENGLISH                                                     ║
  // ╚═════════════════════════════════════════════════════════════╝
  en: {
    brand: {
      tagline: "Intelligent automation",
      descIntro: "We build AI-powered systems so your company can",
      descVerbs: ["respond", "sell", "organize"],
      descConnector: "and",
      descLast: "operate",
      descTail: "better.",
    },
    common: {
      esc: "ESC",
      online: "online",
      whatsapp: "WhatsApp",
      requestQuote: "Try 15 days free",
      requestDiagnostic: "Book diagnostic",
      requestPlan: "Choose this plan",
      writeUs: "Write to us",
      back: "Back",
      cancel: "Cancel",
      next: "Next",
      sendRequest: "Send request",
      backToHome: "Back to home",
      writeWhatsApp: "Write on WhatsApp",
      subscribe: "Subscribe",
      menuConocer: "Explore",
      menuTrabajar: "Work",
      goHome: "Back to home",
      close: "Close",
      brandTag: "Automation studio",
    },
    nav: {
      conocerLabel: "[ Explore ]",
      trabajarLabel: "[ Work with us ]",
      left: [
        { id: "soluciones", label: "Solutions",        num: "01" },
        { id: "proceso",    label: "How we work?",     num: "02" },
        { id: "beneficios", label: "Why Elementa?",    num: "03" },
        { id: "faq",        label: "FAQ",              num: "04" },
      ],
      right: [
        { id: "planes",   label: "Plans",     num: "05" },
        { id: "blog",     label: "Resources", num: "06" },
        { id: "contacto", label: "Contact",   num: "07" },
      ],
    },
    soluciones: {
      title: "Solutions",
      subtitle: "A system for every reality",
      lead: "Choose your case. Instant setup and a 15-day free trial.",
      cur: "USD",
      perMonth: "/mo",
      soonLabel: "Coming soon",
      items: [
        { id: "beauty", name: "Elementa Beauty", rubro: "Beauty & Aesthetics",
          pitch: "Scheduling, clients, payments and courses in one place, built for the beauty entrepreneur.",
          feats: ["Online booking & scheduling", "Client profiles and history", "Payments and due-date alerts", "Students and course management"],
          price: "29" },
        { id: "civil", name: "Elementa Civil", rubro: "Construction", featured: true, badge: "Featured",
          pitch: "Manage your crew and the resources of each site: who works, where, with what and how much is spent.",
          feats: ["Hours and attendance tracking", "Staff assigned per site", "Uniform and tool control", "Petty cash and site expenses"],
          price: "50" },
        { id: "facility", name: "Elementa Facility", rubro: "Cleaning & Facilities",
          pitch: "Coordinate services, teams and clients from a single platform, with an app for your staff.",
          feats: ["Service and route assignment", "Mobile app for employees", "Attendance and task control", "Billing and per-client reports"],
          price: "90" },
        { id: "retail", name: "Elementa Retail", rubro: "Retail & Proximity", soon: true, badge: "Coming soon",
          pitch: "Stock, suppliers, sales and staff of your store, organized in a single system.",
          feats: ["Stock control and restocking", "Supplier management", "Sales and cash data", "Shifts and staff"] },
      ],
      askNote: "Not what you're looking for?",
      askButton: "Contact us",
      trialTitle: "Try Elementa, 15 days free",
      trialBody: "Instant setup and no commitment.",
      trialButton: "Start your 15 free days",
    },
    proceso: {
      title: "How we work?",
      subtitle: "From picking the solution to running on a system",
      lead: "At ELEMENTA we believe organization shouldn't be a luxury or an endless project. That's why we build specialized systems for different industries, ready to implement and use from day one.",
      steps: [
        { num: "01", title: "You choose the right solution for your business",
          body: "Every industry has different needs. That's why we offer specific solutions for:",
          bullets: ["ELEMENTA Beauty", "ELEMENTA Civil", "ELEMENTA Facility", "ELEMENTA Retail"],
          note: "Each one is designed to solve the management challenges of its sector." },
        { num: "02", title: "We activate your workspace",
          body: "We create your account and leave the structure ready to start using. You need no technical knowledge and no months spent configuring tools." },
        { num: "03", title: "You centralize your whole operation",
          body: "Your information stops being scattered across WhatsApp, spreadsheets, notebooks and different apps. Everything stays organized in a single place:",
          bullets: ["Clients", "Staff", "Tasks", "Supplies", "Payments", "Documentation", "Indicators"] },
        { num: "04", title: "Your team works with clear processes",
          body: "Everyone knows what to do, when to do it and how to record it. This brings more order, better communication and less dependence on a single person." },
        { num: "05", title: "You pay a monthly subscription",
          body: "Access works through a monthly membership. Each solution has a price adapted to the needs of its sector. The subscription includes:",
          bullets: ["System access", "Continuous updates", "Support", "Improvements and new features", "Guidance while you use it"],
          note: "No complex contracts. No costly custom development. No high upfront investment." },
      ],
      objetivoTitle: "Our goal",
      objetivoBody: "That you spend less time organizing the business and more time growing it. Because when a system exists, people work better, processes are clearer and decisions are made with real information.",
      ctaNote: "Start today, no commitment.",
      ctaButton: "Try 15 days free",
    },
    beneficios: {
      title: "Why Elementa?",
      subtitle: "What changes when you work with us",
      lead: "What matters isn't the technology. It's what changes day-to-day when the system actually works.",
      sectionDifferentLabel: "What makes us different",
      ctaNote: "Let's talk.",
      ctaButton: "Try 15 days free",
      stats: [
        { k: "−70%", v: "Manual repetitive tasks", body: "What the team did by hand now runs in the background." },
        { k: "24/7", v: "Always-on attention",      body: "Your business responds at night, on weekends and holidays." },
        { k: "+3×",  v: "Response speed",           body: "Leads don't cool down: instant contact and automated follow-up." },
        { k: "1",    v: "One control panel",        body: "A single screen for what matters. No more three spreadsheets and two tabs." },
      ],
      reasons: [
        { t: "Real technical team",      p: "We're not an agency stitching templates. Our co-founder built enterprise software used by 1,000+ people." },
        { t: "Business before tech",     p: "We start by understanding the problem that keeps you up at night. Technology is just the means." },
        { t: "No lock-in",               p: "We work on standard tools (WhatsApp API, Airtable, Make, your CRM). If we part ways, everything keeps running." },
        { t: "Fixed-price quotes",       p: "We tell you exactly what it costs and how long it takes before we start. No surprises." },
      ],
    },
    faq: {
      title: "Frequently asked",
      subtitle: "The questions we hear the most",
      lead: "If yours isn't here, write to us. We reply in under 24 business hours.",
      ctaNote: "Don't see your question?",
      ctaButton: "Write to us",
      items: [
        { q: "Do I need technical knowledge?", a: "No. Everything is designed for non-technical people to operate. We train your team and leave clear manuals." },
        { q: "How soon will I see results?", a: "The first automations (WhatsApp bot, reminders) go live in 7-14 days. Complex flows take 3-6 weeks." },
        { q: "Does it work with the tools I already use?", a: "Yes. We integrate with your CRM, ERP, spreadsheets, accounting system or any API. If it doesn't expose an API, we assess it case by case." },
        { q: "What if I want to leave?", a: "We hand over all documentation and access. The system keeps running because it sits on standard tools, not on locked-in infrastructure." },
        { q: "Is it setup + monthly fee?", a: "Yes. A one-time setup for the implementation + monthly fee for maintenance, improvements and support. The monthly fee is what keeps the system alive." },
        { q: "Do you work with companies abroad?", a: "Yes — we serve clients across LATAM, Europe and the US. Meetings are remote and systems are delivered in your team's language." },
      ],
    },
    planes: {
      title: "Plans",
      subtitle: "From a quick pilot to corporate-grade implementation",
      lead: "Four steps. Start where it makes sense for your business and grow when you're ready. Every plan is one-time setup + monthly fee.",
      setupLabel: "setup",
      perMonth: "/mo",
      deliveryLabel: "Delivery",
      diagnosticBoxTitle: "Free diagnostic.",
      diagnosticBoxBody: "Before quoting, we run a 90-minute no-commitment call to map your processes and recommend the right plan. If none fits, we'll tell you.",
      badges: { popular: "Most popular", custom: "Custom" },
      items: [
        { id: "basico",  tag: "Basic",    name: "Essential Setup",      setup: "USD 600",          monthly: "USD 200",  pitch: "Solve an urgent problem in 7-10 days. Entry point to the automated world.", features: ["WhatsApp bot with auto replies (15 FAQs)", "Automatic welcome message", "Appointment reminders (24h and 2h ahead)", "Lead capture form", "Simple database", "1h team training", "30 days support"], delivery: "7–10 days" },
        { id: "medio",   tag: "Standard", name: "Commercial System",     setup: "USD 1,200",        monthly: "USD 350",  pitch: "Capture, follow up, convert and retain customers on its own. Sell more without hiring more.", badge: "popular", featured: true, features: ["Everything in Basic", "CRM with visual pipeline", "Follow-up sequence (5 messages / 7 days)", "Instagram DM bot", "Online booking with confirmation", "Inactive-customer reactivation", "Metrics dashboard", "Email marketing (3 emails)", "60 days support"], delivery: "14–18 days" },
        { id: "premium", tag: "Premium",  name: "Total Automation",      setup: "USD 2,200",        monthly: "USD 500",  pitch: "To lead your sector. Trained AI and real technical development built in.", features: ["Everything in Standard", "Advanced integrations (custom APIs)", "Conversational AI trained on your business", "Executive dashboard with custom KPIs", "Bi-weekly strategy meetings", "8h/month of active improvements", "Priority support (<4h)", "Monthly results report"], delivery: "21–30 days" },
        { id: "empresa", tag: "Enterprise", name: "Custom Implementation", setup: "From USD 4,000", monthly: "From USD 900", pitch: "Complex processes, large teams, integration with existing systems.", badge: "custom", features: ["Everything in Premium", "Deep technical audit", "ERP / proprietary CRM integration", "Custom tool development", "Dedicated account manager", "SLA <2h business hours", "20h/month of active development", "NDA and full technical documentation"], delivery: "30–60 days" },
      ],
    },
    blog: {
      title: "Resources",
      subtitle: "Guides, cases and articles from the studio",
      lead: "Reading material from the studio. Real cases, guides and opinions on AI applied to actual work.",
      readMin: "min",
      newsletterTitle: "Once a month, no more.",
      newsletterDesc: "Get a monthly email with cases, templates and lessons from the studio.",
      newsletterPlaceholder: "you@company.com",
      newsletterButton: "Subscribe",
      newsletterSuccess: "Thanks! You're on the list.",
      items: [
        { tag: "Guide",      title: "How to choose what to automate first in your SMB",                  read: "6", date: "May 2026" },
        { tag: "Case",       title: "From 40 missed bookings a month to zero: an aesthetic clinic",      read: "4", date: "April 2026" },
        { tag: "Comparison", title: "WhatsApp Business vs WhatsApp Business API: when to use each",       read: "8", date: "April 2026" },
        { tag: "Template",   title: "Checklist: is your business ready for a ticketing system?",         read: "3", date: "March 2026" },
        { tag: "Analysis",   title: "Why 80% of automations fail in the first year",                     read: "7", date: "March 2026" },
        { tag: "Tutorial",   title: "Connect your calendar to WhatsApp in under an hour",                read: "5", date: "February 2026" },
      ],
    },
    form: {
      title: "Start your free trial",
      titleSuccess: "Received. Thank you.",
      stepOf: "Step", of: "of",
      stepNames: ["Your goal", "Your company", "Your details"],
      footerHints: ["What's your goal?", "Tell us about your company", "How to reach you"],

      q1: "What would you like to improve?",
      q1Hint: "Pick one or more. If unsure, pick \"Other\".",
      q1Options: [
        { id: "flujos",   label: "Improve workflows",            desc: "Tasks your team does manually that eat time" },
        { id: "tickets",  label: "Ticketing system",              desc: "Centralize requests, incidents and support" },
        { id: "agendas",  label: "Scheduling & bookings",         desc: "Calendar, confirmations and reminders" },
        { id: "rrhh",     label: "Employee administration",       desc: "Requests, leaves, schedules" },
        { id: "atencion", label: "Automated customer service",    desc: "WhatsApp / Instagram bots with AI" },
        { id: "otro",     label: "Other / not sure yet",          desc: "We'll help you define it in the diagnostic" },
      ],
      q2: "How urgent is it?",
      q2Options: [
        { id: "ya",     label: "I need it now",       desc: "There's an urgent problem to solve" },
        { id: "trim",   label: "This quarter",         desc: "We have a short-term plan" },
        { id: "explor", label: "I'm exploring",        desc: "I want to understand what's possible" },
      ],

      q3: "How big is your company?",
      q3Options: [
        { id: "1-10",   label: "1 – 10 people" },
        { id: "11-50",  label: "11 – 50 people" },
        { id: "51-200", label: "51 – 200 people" },
        { id: "200+",   label: "More than 200 people" },
      ],
      q4: "Approximate budget",
      q4Hint: "To understand which plan makes sense to propose.",
      q4Options: [
        { id: "<1000", label: "Under USD 1,000",        tag: "Basic" },
        { id: "1k-3k", label: "USD 1,000 – 3,000",       tag: "Standard" },
        { id: "3k-6k", label: "USD 3,000 – 6,000",       tag: "Premium" },
        { id: "6k+",   label: "Over USD 6,000",          tag: "Enterprise" },
        { id: "ndd",   label: "Not defined yet",          tag: "—" },
      ],

      yourData: "Your details",
      fNombre: "Name",
      fEmpresa: "Company",
      fEmail: "Email",
      fTelefono: "Phone / WhatsApp",
      fMensaje: "Anything else you want to share",
      pNombre: "Your name",
      pEmpresa: "Your company name",
      pTelefono: "+...",
      pMensaje: "Specific processes you want to improve, tools you already use, important dates...",
      slaNote: "We reply in",
      slaBold: "under 24 business hours",
      slaTail: "with an initial proposal and an invitation to a free diagnostic call.",

      successTitle: (name) => `Your request is in, ${name || "thank you"}.`,
      successBody: "We'll reply in under 24 business hours with an initial proposal and an invitation to a free 90-minute diagnostic call.",
      successRef: "ref:",
      successEmail: "email:",
      successObj: "goals:",
      successSize: "size:",
    },
  },
};

// ───────────────────────────────────────────────────────────────────
function useT() {
  const [lang] = useLang();
  return CONTENT[lang] || CONTENT.es;
}

// Expose
Object.assign(window, { CONTENT, useT, useLang, getLang, setLang });
