/* About + legal pages (Privacy, Terms). Bilingual (window.LANG = 'en' | 'es').
   These HTML files load shell.jsx + legal.jsx only, so the hero/section bits are defined
   here, reusing the ipage-* classes from styles.css. Content is left-aligned prose (.ipage-prose).
   NOTE: Privacy and Terms are standard starter policies, NOT legal advice. A lawyer should
   review them and confirm the legal entity + governing jurisdiction before heavy promotion. */

const LLANG = (typeof window !== 'undefined' && window.LANG) || 'en';
const LUPDATED = LLANG === 'es' ? '30 de junio de 2026' : 'June 30, 2026';
const LMAIL = 'hello@talicense.com';
const mail = <a href={`mailto:${LMAIL}`}>{LMAIL}</a>;

const LC = {
  en: {
    about: {
      title: <>About <span style={{color: 'var(--accent)'}}>talicense</span></>,
      lead: 'AI likeness rights infrastructure for the people who own the face.',
      sections: [
        { h: 'Why we exist', body: [
          "AI can now clone a performer's face and voice in minutes. The people who actually own those rights, talent agencies, estates and rights organizations, have had no practical way to find that abuse, prove it, or turn it into licensed revenue.",
          "talicense was built to close that gap. We give rights holders one platform to store consent, detect unauthorized AI use, document it with court-ready evidence, and license their talent on their own terms.",
        ]},
        { h: 'What we do', body: [
          "Protect: continuous monitoring across the major platforms for unauthorized AI use of your talent's face and voice, with documented evidence and takedown or licensing action.",
          "License: estate and agency to studio deals with clear, upfront terms, where every request comes to you first and payment is collected on platform.",
        ]},
        { h: 'Who we are', body: [
          "talicense is built and operated by Zinkvision, a technology studio. We work directly with rights holders and alongside legal partners in each jurisdiction.",
          "We are in an early, pre-pilot phase and partnering with a small number of agencies, estates and rights organizations. If that is you, we would like to talk.",
        ]},
        { h: 'Contact', body: [
          <>Email us at {mail}, or use the request form on our home page.</>,
        ]},
      ],
    },
    privacy: {
      title: 'Privacy Policy',
      updated: true,
      sections: [
        { h: 'Overview', body: [
          'This Privacy Policy explains how talicense, operated by Zinkvision ("we", "us"), handles information when you use talicense.com or contact us. We keep this simple: we collect only what we need to respond to you and run our service.',
        ]},
        { h: 'Information we collect', body: [
          'Information you give us: when you submit the intake form or email us, we receive your name, email address, the name of the talent or subject of the scan, your role, and anything else you choose to include.',
          'Information collected automatically: basic technical logs such as IP address and browser type, kept by our hosting providers for security and reliability. We do not use advertising or tracking cookies.',
        ]},
        { h: 'How we use it', body: [
          'To respond to your request and run a free violation scan, to communicate with you about a possible pilot, and to operate, secure and improve the site. We do not use your information for advertising.',
        ]},
        { h: 'How we share it', body: [
          'We do not sell your information. We share it only with the service providers that help us operate the site and communicate with you, for example hosting and email delivery, and with legal partners only when you ask us to act on a violation. We may disclose information if required by law.',
        ]},
        { h: 'Data retention', body: [
          'We keep your information only as long as needed to handle your inquiry and any resulting relationship, then delete or anonymize it.',
        ]},
        { h: 'Your rights', body: [
          <>Depending on where you live, you may have the right to access, correct, delete, or object to our use of your information. To exercise these rights, email us at {mail}.</>,
        ]},
        { h: 'Changes', body: [
          'We may update this policy. The current version is always posted here with its last-updated date.',
        ]},
        { h: 'A note', body: [
          'This is a standard privacy policy provided for transparency. It is not legal advice. For the definitive terms that apply to a specific engagement, contact us.',
        ]},
      ],
    },
    terms: {
      title: 'Terms of Service',
      updated: true,
      sections: [
        { h: 'Acceptance', body: ['By using talicense.com you agree to these terms. If you do not agree, please do not use the site.'] },
        { h: 'Who we are', body: ['talicense is AI likeness rights infrastructure, built and operated by Zinkvision.'] },
        { h: 'What this site is', body: ['This site provides information about our services and lets you request a free violation scan. Submitting the form starts a conversation; it is not a binding contract and does not guarantee that we will provide any service.'] },
        { h: 'Not legal advice', body: ['Information on this site about likeness rights, AI law and enforcement is general information only, not legal advice. Laws differ by country and change quickly. Always consult qualified counsel in your jurisdiction before acting.'] },
        { h: 'Intellectual property', body: ['The content, design and brand on this site are owned by talicense and Zinkvision and may not be copied or reused without permission.'] },
        { h: 'Acceptable use', body: ['Do not misuse the site, attempt to disrupt it, or submit false information or content you do not have the right to share.'] },
        { h: 'No warranties', body: ['The site is provided "as is", without warranties of any kind. We do not guarantee it will always be available or error-free.'] },
        { h: 'Limitation of liability', body: ['To the extent permitted by law, talicense and Zinkvision are not liable for any indirect or consequential damages arising from your use of the site.'] },
        { h: 'Governing law', body: ['These terms are governed by the law applicable where talicense operates. For questions about jurisdiction, contact us.'] },
        { h: 'Changes', body: ['We may update these terms. The current version is always posted here with its last-updated date.'] },
        { h: 'Contact', body: [<>Email us at {mail}.</>] },
      ],
    },
  },

  es: {
    about: {
      title: <>Sobre <span style={{color: 'var(--accent)'}}>talicense</span></>,
      lead: 'Infraestructura de derechos de imagen con IA, para quienes son dueños de su rostro.',
      sections: [
        { h: 'Por qué existimos', body: [
          'La IA ahora puede clonar el rostro y la voz de un artista en minutos. Quienes realmente poseen esos derechos, las agencias de talento, los herederos y las organizaciones de gestión, no han tenido una forma práctica de encontrar ese abuso, probarlo, ni convertirlo en ingresos por licencia.',
          'talicense nació para cerrar esa brecha. Damos a los titulares de derechos una sola plataforma para guardar el consentimiento, detectar el uso no autorizado de IA, documentarlo con pruebas listas para un tribunal y licenciar a su talento en sus propios términos.',
        ]},
        { h: 'Qué hacemos', body: [
          'Proteger: monitoreo continuo en las principales plataformas del uso no autorizado con IA del rostro y la voz de tu talento, con pruebas documentadas y acción de retirada o licencia.',
          'Licenciar: acuerdos de herederos y agencias con estudios, con condiciones claras desde el inicio, donde cada solicitud llega primero a ti y el pago se cobra en la plataforma.',
        ]},
        { h: 'Quiénes somos', body: [
          'talicense está creado y operado por Zinkvision, un estudio de tecnología. Trabajamos directamente con los titulares de derechos y junto a socios legales en cada jurisdicción.',
          'Estamos en una fase temprana, previa al piloto, y colaboramos con un grupo reducido de agencias, herederos y organizaciones de derechos. Si ese es tu caso, nos gustaría hablar.',
        ]},
        { h: 'Contacto', body: [
          <>Escríbenos a {mail}, o usa el formulario de solicitud en nuestra página principal.</>,
        ]},
      ],
    },
    privacy: {
      title: 'Política de Privacidad',
      updated: true,
      sections: [
        { h: 'Resumen', body: [
          'Esta Política de Privacidad explica cómo talicense, operado por Zinkvision ("nosotros"), maneja la información cuando usas talicense.com o nos contactas. Lo mantenemos simple: solo recopilamos lo necesario para responderte y operar nuestro servicio.',
        ]},
        { h: 'Qué información recopilamos', body: [
          'Información que nos das: cuando envías el formulario de admisión o nos escribes, recibimos tu nombre, tu correo, el nombre del talento o sujeto del escaneo, tu rol y cualquier otra cosa que decidas incluir.',
          'Información recopilada automáticamente: registros técnicos básicos como la dirección IP y el tipo de navegador, que guardan nuestros proveedores de alojamiento por seguridad y fiabilidad. No usamos cookies de publicidad ni de seguimiento.',
        ]},
        { h: 'Cómo la usamos', body: [
          'Para responder a tu solicitud y realizar un escaneo gratuito de infracciones, para comunicarnos contigo sobre un posible piloto, y para operar, asegurar y mejorar el sitio. No usamos tu información para publicidad.',
        ]},
        { h: 'Cómo la compartimos', body: [
          'No vendemos tu información. Solo la compartimos con los proveedores que nos ayudan a operar el sitio y a comunicarnos contigo, por ejemplo el alojamiento y el envío de correo, y con socios legales únicamente cuando nos pides actuar ante una infracción. Podemos divulgarla si la ley lo exige.',
        ]},
        { h: 'Conservación de datos', body: [
          'Conservamos tu información solo durante el tiempo necesario para gestionar tu consulta y la relación que surja, y después la eliminamos o anonimizamos.',
        ]},
        { h: 'Tus derechos', body: [
          <>Según donde vivas, puedes tener derecho a acceder, corregir, eliminar u oponerte al uso de tu información. Para ejercer estos derechos, escríbenos a {mail}.</>,
        ]},
        { h: 'Cambios', body: [
          'Podemos actualizar esta política. La versión vigente siempre está publicada aquí con su fecha de última actualización.',
        ]},
        { h: 'Una nota', body: [
          'Esta es una política de privacidad estándar, ofrecida por transparencia. No constituye asesoramiento legal. Para los términos definitivos que apliquen a un acuerdo concreto, contáctanos.',
        ]},
      ],
    },
    terms: {
      title: 'Términos del Servicio',
      updated: true,
      sections: [
        { h: 'Aceptación', body: ['Al usar talicense.com aceptas estos términos. Si no estás de acuerdo, por favor no uses el sitio.'] },
        { h: 'Quiénes somos', body: ['talicense es infraestructura de derechos de imagen con IA, creada y operada por Zinkvision.'] },
        { h: 'Qué es este sitio', body: ['Este sitio ofrece información sobre nuestros servicios y te permite solicitar un escaneo gratuito de infracciones. Enviar el formulario inicia una conversación; no es un contrato vinculante ni garantiza que prestemos ningún servicio.'] },
        { h: 'No es asesoramiento legal', body: ['La información de este sitio sobre derechos de imagen, ley de IA y defensa de derechos es solo información general, no asesoramiento legal. Las leyes varían según el país y cambian rápido. Consulta siempre a un abogado calificado en tu jurisdicción antes de actuar.'] },
        { h: 'Propiedad intelectual', body: ['El contenido, el diseño y la marca de este sitio son propiedad de talicense y Zinkvision y no pueden copiarse ni reutilizarse sin permiso.'] },
        { h: 'Uso aceptable', body: ['No hagas mal uso del sitio, no intentes interrumpirlo ni envíes información falsa o contenido que no tengas derecho a compartir.'] },
        { h: 'Sin garantías', body: ['El sitio se ofrece "tal cual", sin garantías de ningún tipo. No garantizamos que esté siempre disponible ni libre de errores.'] },
        { h: 'Limitación de responsabilidad', body: ['En la medida permitida por la ley, talicense y Zinkvision no son responsables de daños indirectos o consecuentes derivados del uso del sitio.'] },
        { h: 'Ley aplicable', body: ['Estos términos se rigen por la ley aplicable en el lugar donde opera talicense. Para preguntas sobre jurisdicción, contáctanos.'] },
        { h: 'Cambios', body: ['Podemos actualizar estos términos. La versión vigente siempre está publicada aquí con su fecha de última actualización.'] },
        { h: 'Contacto', body: [<>Escríbenos a {mail}.</>] },
      ],
    },
  },
};

const LegalPage = ({ slug }) => {
  const d = LC[LLANG][slug];
  return (
    <>
      <SiteNav />
      <header className="ipage-hero">
        <div className="container">
          <h1 className="ipage-title">{d.title}</h1>
          {d.lead && <p className="ipage-lead">{d.lead}</p>}
        </div>
      </header>
      <section className="ipage-section" style={{ paddingTop: 0 }}>
        <div className="container">
          <div className="ipage-prose">
            {d.updated && (
              <p className="ipage-prose-meta">
                {(LLANG === 'es' ? 'Última actualización: ' : 'Last updated: ') + LUPDATED}
              </p>
            )}
            {d.sections.map((s, i) => (
              <div className="ipage-prose-block" key={i}>
                {s.h && <h2>{s.h}</h2>}
                {s.body.map((p, j) => <p key={j}>{p}</p>)}
              </div>
            ))}
          </div>
        </div>
      </section>
      <SiteFooter />
    </>
  );
};

const AboutPage = () => <LegalPage slug="about" />;
const PrivacyPage = () => <LegalPage slug="privacy" />;
const TermsPage = () => <LegalPage slug="terms" />;

Object.assign(window, { AboutPage, PrivacyPage, TermsPage });
