/* Legadoss, estate likeness management, a section of talicense (own identity,
   shared plumbing). Bilingual (window.LANG = 'en' | 'es'). Reuses SiteNav / SiteFooter
   from shell.jsx and the talicense token system, with its own lg-* brand styling in
   styles.css. Legadoss is the SERVICE company that represents a deceased icon's estate
   and runs its whole digital side. CTA = talk to us (no report offer on this page). */

const GLANG = (typeof window !== 'undefined' && window.LANG) || 'en';
const GMAIL = 'mailto:hello@talicense.com?subject=Legadoss%20estate%20inquiry';

/* The Legadoss wordmark. CSS-only, its own identity: Fraunces "Legad" in ink,
   a red seriffe accent, "oss" closing in cobalt. No image file. */
const Wordmark = () => (
  <span className="lg-mark" aria-label="Legadoss">
    <span className="lg-wordmark">Legad<span className="lg-dot">o</span><span className="lg-tail">ss</span></span>
  </span>
);

const Monogram = () => (
  <span className="lg-monogram" aria-hidden="true">L<em>·</em></span>
);

const G = {
  en: {
    kicker: 'A talicense service · Estate likeness management',
    tagline: <>The estate manager a <em>legend deserves.</em></>,
    lead: "We represent the families of iconic performers who are no longer with us. We run the digital side of the legacy: we find AI misuse of the face and voice, we license the likeness properly, and we collect what the estate is owed. You keep the name. We do the work.",
    cta: 'Talk to us',

    problemEyebrow: 'The gap',
    problemTitle: <>Families have lawyers. <em>Nobody runs the digital estate.</em></>,
    problemSub: "When a famous artist dies, the family inherits the rights and, soon after, the problem. AI can rebuild a face and a voice in an afternoon. The clones spread, brands ask questions, and the estate has no one steering any of it.",
    plates: [
      { bad: true, k: 'What they have', h: 'A lawyer, one deal at a time', p: 'Good for a single contract, then they move on. No one is watching the whole legacy day to day.' },
      { bad: true, k: 'What is happening', h: 'AI misuse, unwatched', p: 'Deepfakes, cloned voices and fake ads use the likeness for free. The family rarely even knows.' },
      { k: 'What is missing', h: 'A manager for the digital side', p: 'Someone to find it, license it, and collect for the family, so the legacy earns instead of leaking.' },
    ],

    doEyebrow: 'What Legadoss does',
    doTitle: <>One manager for the <em>whole legacy.</em></>,
    ledger: [
      { k: 'Represent the estate', v: 'We become the official manager of the name, image and voice. One authority speaks for the legacy, so the family does not have to.' },
      { k: 'Protect the rights', v: 'We watch for unauthorized and AI use of the likeness and act on it, from takedowns to formal legal enforcement, on the family’s behalf.' },
      { k: 'License the likeness', v: 'Brands and studios come to us. We negotiate and approve every use, on the family’s terms and at the right price.' },
      { k: 'Manage the income', v: 'We handle the contracts, royalties and payments, and give the family one clear account of what the legacy earns.' },
    ],

    modelEyebrow: 'How it works',
    modelTitle: <>You sign once. <em>We represent the estate.</em></>,
    modelSub: "One agreement appoints us as the estate’s manager. We handle the entire legal and commercial side of the likeness, for a yearly management fee and a set fee on each deal we close.",
    model: [
      { b: 'Yearly management agreement', s: 'One signature, and we manage the likeness for the year.', v: 'Fixed fee' },
      { b: 'A set fee per deal', s: 'A fixed fee each time we license the likeness. No hidden percentages.', v: 'Per contract' },
      { b: 'Legal and setup handled', s: 'Registration, contracts and paperwork are part of the service.', v: 'Included' },
    ],
    modelNote: "Legadoss is a dedicated estate management service. We represent the family and administer the protection, licensing and collection of the likeness on their behalf, from first contract to final payment.",

    closeTitle: <>The legacy, in the <em>right hands.</em></>,
    closeSub: "We protect the name today and give it a clear, well managed digital future.",
    closeCue: 'One conversation starts it.',

    forLine: <>For families and estates of iconic performers in Spain and Latin America.</>,
  },

  es: {
    kicker: 'Un servicio de talicense · Gestión de imagen de herederos',
    tagline: <>El gestor que un <em>legado merece.</em></>,
    lead: "Representamos a las familias de artistas icónicos que ya no están. Nos ocupamos de la parte digital del legado: encontramos el uso indebido con IA del rostro y la voz, licenciamos la imagen como corresponde y cobramos lo que le pertenece al patrimonio. Ustedes conservan el nombre. Nosotros hacemos el trabajo.",
    cta: 'Habla con nosotros',

    problemEyebrow: 'El vacío',
    problemTitle: <>Las familias tienen abogados. <em>Nadie gestiona el patrimonio digital.</em></>,
    problemSub: "Cuando muere un artista famoso, la familia hereda los derechos y, poco después, el problema. La IA reconstruye un rostro y una voz en una tarde. Los clones se multiplican, las marcas preguntan y nadie lleva las riendas.",
    plates: [
      { bad: true, k: 'Lo que tienen', h: 'Un abogado, un contrato a la vez', p: 'Sirve para un acuerdo puntual y luego se va. Nadie vigila el legado completo, día a día.' },
      { bad: true, k: 'Lo que pasa', h: 'Uso indebido con IA, sin vigilancia', p: 'Deepfakes, voces clonadas y anuncios falsos usan la imagen gratis. La familia casi nunca se entera.' },
      { k: 'Lo que falta', h: 'Un gestor para la parte digital', p: 'Alguien que lo encuentre, lo licencie y cobre para la familia, para que el legado gane en vez de perderse.' },
    ],

    doEyebrow: 'Qué hace Legadoss',
    doTitle: <>Un solo gestor para todo el <em>legado.</em></>,
    ledger: [
      { k: 'Representar al patrimonio', v: 'Nos convertimos en el gestor oficial del nombre, la imagen y la voz. Una sola autoridad habla por el legado, para que la familia no tenga que hacerlo.' },
      { k: 'Proteger los derechos', v: 'Vigilamos el uso no autorizado y con IA de la imagen y actuamos, desde las retiradas hasta la vía legal formal, en nombre de la familia.' },
      { k: 'Licenciar la imagen', v: 'Las marcas y los estudios acuden a nosotros. Negociamos y aprobamos cada uso, según las condiciones de la familia y al precio justo.' },
      { k: 'Administrar los ingresos', v: 'Gestionamos los contratos, las regalías y los pagos, y damos a la familia una cuenta clara de lo que genera el legado.' },
    ],

    modelEyebrow: 'Cómo funciona',
    modelTitle: <>Firmas una vez. <em>Nosotros representamos al patrimonio.</em></>,
    modelSub: "Un acuerdo nos nombra gestores del patrimonio. Nos ocupamos de toda la parte legal y comercial de la imagen, por una cuota anual de gestión y una tarifa fija por cada acuerdo que cerramos.",
    model: [
      { b: 'Acuerdo anual de gestión', s: 'Una firma y gestionamos la imagen durante el año.', v: 'Cuota fija' },
      { b: 'Tarifa fija por acuerdo', s: 'Una tarifa fija cada vez que licenciamos la imagen. Sin porcentajes ocultos.', v: 'Por contrato' },
      { b: 'Legal y alta incluidos', s: 'Registro, contratos y papeleo forman parte del servicio.', v: 'Incluido' },
    ],
    modelNote: "Legadoss es un servicio de gestión de patrimonio dedicado. Representamos a la familia y administramos la protección, la licencia y el cobro de la imagen en su nombre, del primer contrato al pago final.",

    closeTitle: <>El legado, en las <em>manos correctas.</em></>,
    closeSub: "Protegemos el nombre hoy y le damos un futuro digital claro y bien gestionado.",
    closeCue: 'Una conversación lo empieza.',

    forLine: <>Para familias y herederos de artistas icónicos en España y Latinoamérica.</>,
  },
}[GLANG];

const Btn = ({ href, kind, children, icon }) => (
  <a href={href} className={'lg-btn ' + (kind === 'primary' ? 'lg-btn-primary' : 'lg-btn-ghost')}>
    {children}
    {icon && <span className="lg-btn-ic" aria-hidden="true">→</span>}
  </a>
);

const LegadossPage = () => (
  <div className="lg-scope">
    <SiteNav />

    <header className="lg-hero">
      <div className="container">
        <div className="lg-hero-lockup">
          <Monogram />
          <div className="lg-hero-name"><Wordmark /></div>
        </div>
        <div className="lg-kicker">{G.kicker}</div>
        <h1 className="lg-tagline">{G.tagline}</h1>
        <p className="lg-lead">{G.lead}</p>
        <div className="lg-hero-cta">
          <Btn href={GMAIL} kind="primary" icon>{G.cta}</Btn>
        </div>
      </div>
    </header>

    {/* The problem, editorial split */}
    <section className="lg-section">
      <div className="container">
        <div className="lg-split">
          <div>
            <div className="lg-eyebrow">{G.problemEyebrow}</div>
            <h2 className="lg-h2">{G.problemTitle}</h2>
            <p className="lg-sub">{G.problemSub}</p>
          </div>
          <div className="lg-plates">
            {G.plates.map((pl, i) => (
              <div className={'lg-plate' + (pl.bad ? ' lg-plate-bad' : '')} key={i}>
                <div className="lg-plate-core">
                  <div className="lg-plate-k">{pl.k}</div>
                  <h3>{pl.h}</h3>
                  <p>{pl.p}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>

    {/* What Legadoss does, numbered ledger */}
    <section className="lg-section lg-section-cream">
      <div className="container" style={{ textAlign: 'center' }}>
        <div className="lg-eyebrow">{G.doEyebrow}</div>
        <h2 className="lg-h2" style={{ marginLeft: 'auto', marginRight: 'auto' }}>{G.doTitle}</h2>
        <div className="lg-ledger">
          {G.ledger.map((row, i) => (
            <div className="lg-ledger-row" key={i}>
              <div className="lg-ledger-n">{String(i + 1).padStart(2, '0')}</div>
              <div className="lg-ledger-k">{row.k}</div>
              <div className="lg-ledger-v">{row.v}</div>
            </div>
          ))}
        </div>
      </div>
    </section>

    {/* How it works, plain money model */}
    <section className="lg-section lg-section-ink">
      <div className="container">
        <div className="lg-model">
          <div>
            <div className="lg-eyebrow">{G.modelEyebrow}</div>
            <h2 className="lg-h2">{G.modelTitle}</h2>
            <p className="lg-sub">{G.modelSub}</p>
            <p className="lg-model-note">{G.modelNote}</p>
          </div>
          <div className="lg-model-card">
            <div className="lg-model-core">
              {G.model.map((m, i) => (
                <div className="lg-model-line" key={i}>
                  <div className="lg-model-k">
                    <b>{m.b}</b>
                    <span>{m.s}</span>
                  </div>
                  <div className="lg-model-v">{m.v}</div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
    </section>

    {/* Closing, talk to us */}
    <section className="lg-section lg-section-end">
      <div className="container">
        <div className="lg-close">
          <h2>{G.closeTitle}</h2>
          <p className="lg-close-sub">{G.closeSub}</p>
          <div className="lg-close-cue">{G.closeCue}</div>
          <div className="lg-hero-cta">
            <Btn href={GMAIL} kind="primary" icon>{G.cta}</Btn>
          </div>
        </div>
      </div>
    </section>

    <div className="lg-foot">
      <div className="lg-foot-brand"><Monogram /><Wordmark /></div>
      <p>{G.forLine}</p>
    </div>

    <SiteFooter />
  </div>
);

Object.assign(window, { LegadossPage });
