// Bundled components — Baycon AI marketing site (simplified — process & AI tools focus + i18n)

const { useState, useEffect, useMemo, useRef, useContext } = React;

// ============================================================
// Language context + translations
// ============================================================
const LangCtx = React.createContext('en');
window.LangCtx = LangCtx;

const TRANSLATIONS = {
  en: {
    // Nav
    nav_help: 'How I help', nav_examples: 'Examples', nav_how: 'How it works',
    nav_blog: 'Blog', nav_contact: 'Get in touch →',

    // Hero
    hero_eyebrow: 'Bringing home the Baycon · Bay Area AI consulting',
    hero_aria: 'AI that earns its keep.',
    hero_l1: 'AI that', hero_em: 'earns', hero_end: ' its keep.',
    hero_sub: "I find the work that's slowing your business down, build AI into the way you already work, and train your team to run it without me. No hype — just fewer hours spent on the boring stuff.",
    hero_cta1: 'Book a discovery call →', hero_cta2: 'See how it works ↓',
    hero_stats: [
      { v: '3–4 wks', l: 'first call to working AI' },
      { v: '100%', l: 'yours to keep & run' },
      { v: 'Fixed-fee', l: 'scoped in writing, no surprises' },
    ],
    marquee: [
      'Wealth advisors', 'Accounting firms', 'Boutique law', 'Marketing & creative',
      'Founder-led teams', 'San Francisco', 'Peninsula', 'Silicon Valley',
      'East Bay', 'Marin', 'Remote across the US',
    ],

    // Capabilities — how I help
    cap_kicker: 'How I help',
    cap_h1: 'Where AI ', cap_h_em: 'earns its keep.',
    cap_lead: "I don't sell software. I find the parts of your business that quietly eat time, build AI into the tools you already use, and leave your team able to run it on their own.",
    cap_cards: [
      {
        verb: 'Find', name: 'The bottlenecks',
        blurb: 'We map how work actually moves through your business — and where it gets stuck, repeated, or copy-pasted by hand.',
        items: [
          'A clear picture of where the time goes',
          'The handful of tasks AI can genuinely take over',
          "An honest take on what's worth automating — and what isn't",
        ],
      },
      {
        verb: 'Build', name: 'AI into your work',
        blurb: 'Working automations and assistants wired into the tools you already use — not another app for your team to learn and babysit.',
        items: [
          'Workflows connected to your existing tools',
          'Assistants trained on how your firm actually works',
          'Everything documented as it gets built',
        ],
      },
      {
        verb: 'Train', name: 'Your team to run it',
        blurb: "When I'm done, your team owns it. Clear docs, live training, and a prompt library so it keeps working long after I leave.",
        items: [
          'Live training for the people who use it',
          'A prompt library written for your business',
          "Support through the first weeks — then it's yours",
        ],
      },
    ],

    // Examples — what it looks like
    ex_kicker: 'What that looks like',
    ex_h1: 'Real work, ', ex_h_em: 'quietly automated.',
    ex_lead: 'A few of the things AI can take off your plate. Yours will look different — these are just here to make it concrete.',
    ex_items: [
      { tag: 'Onboarding', title: 'Client onboarding that runs itself', body: 'A new client comes in, the paperwork drafts itself, folders and tasks get created, and nothing slips through the cracks.' },
      { tag: 'Proposals', title: 'Proposals drafted in minutes', body: 'Pull the details, draft the proposal in your voice and format, ready for you to review and send the same day.' },
      { tag: 'Inbox & docs', title: 'Email and documents triaged', body: 'Incoming requests sorted, summarized, and routed — so your team starts the day with a clear, prioritized list.' },
      { tag: 'Knowledge', title: 'An assistant that knows your firm', body: 'A private assistant trained on your processes and documents, answering the questions your team asks all day long.' },
    ],
    ex_note: "Every build is fixed-fee and scoped in writing — you'll know exactly what you're getting before we start.",

    // Process
    proc_kicker: 'How it works',
    proc_h1: 'From hello to ', proc_h_em: 'handoff', proc_h_end: '.',
    proc_steps: [
      { title: 'Discovery call', body: 'A 30-minute conversation to understand your business and find where AI helps. No charge, no pitch.' },
      { title: 'Scoped proposal', body: 'A short written plan: what we build, by when, and a fixed price. No hourly billing.' },
      { title: 'Work begins', body: 'I build it into your tools and keep you in the loop the whole way — you see the work, never a black box.' },
      { title: 'Handoff', body: 'Your team owns what we build. Documentation and training come with every engagement.' },
    ],
    proc_places_pre: 'In person across ',
    proc_places: ['San Francisco', 'the Peninsula', 'Silicon Valley', 'the East Bay', 'Marin'],
    proc_places_note: "The build itself is remote, asynchronous, and visible — you'll see what's being made, not a black box.",

    // Contact
    contact_kicker: 'Get in touch',
    contact_h1: "Let's see if there's a ", contact_h_em: 'fit', contact_h_end: '.',
    contact_lead: "The first conversation is a 30-minute discovery call — no charge, no pitch. Tell me what you're trying to do; I'll tell you whether AI helps and what the shortest path looks like.",
    contact_meta: 'San Francisco Bay Area · Remote across the US',
    contact_f_name: 'Name', contact_f_company: 'Company', contact_f_email: 'Email',
    contact_f_phone: 'Phone (optional)', contact_f_interest: 'Interested in', contact_f_context: 'A little context',
    contact_opts: [
      "Not sure yet — let's talk",
      'Automating a workflow',
      'A custom AI assistant',
      'Training my team on AI',
    ],
    contact_submit: 'Send inquiry →',
    contact_note: 'Submitting opens your email client with your message ready to send to ai@bayconai.com',
    contact_opened: ' — opened.',

    // Footer
    footer_tag: 'Bay Area AI consulting that actually sticks. Built into your business, not bolted on.',
    footer_col_explore: 'Explore', footer_col_contact: 'Contact', footer_col_legal: 'Legal',
    footer_explore_links: ['How I help', 'What it looks like', 'How it works', 'Get in touch'],
    footer_copyright: '© Baycon AI', footer_region: 'Serving the Bay Area · Remote across the US',
  },

  pt: {
    // Nav
    nav_help: 'Como ajudo', nav_examples: 'Exemplos', nav_how: 'Como funciona',
    nav_blog: 'Blog', nav_contact: 'Fale conosco →',

    // Hero
    hero_eyebrow: 'Trazendo o Baycon para casa · Consultoria de IA na Bay Area',
    hero_aria: 'IA que se paga.',
    hero_l1: 'IA que', hero_em: 'se paga', hero_end: '.',
    hero_sub: 'Eu encontro o trabalho que está atrasando o seu negócio, integro a IA à forma como você já trabalha e treino sua equipe para operar sem mim. Sem hype — apenas menos horas gastas no trabalho chato.',
    hero_cta1: 'Agende uma conversa →', hero_cta2: 'Veja como funciona ↓',
    hero_stats: [
      { v: '3–4 sem', l: 'da conversa à IA funcionando' },
      { v: '100%', l: 'fica com você para operar' },
      { v: 'Taxa fixa', l: 'escopo por escrito, sem surpresas' },
    ],
    marquee: [
      'Assessores de patrimônio', 'Escritórios de contabilidade', 'Advocacia boutique',
      'Marketing e criação', 'Equipes de fundadores', 'São Francisco', 'Península',
      'Vale do Silício', 'East Bay', 'Marin', 'Remoto nos EUA',
    ],

    // Capabilities
    cap_kicker: 'Como ajudo',
    cap_h1: 'Onde a IA ', cap_h_em: 'se paga.',
    cap_lead: 'Eu não vendo software. Eu encontro as partes do seu negócio que consomem tempo silenciosamente, integro a IA às ferramentas que você já usa e deixo sua equipe capaz de operar sozinha.',
    cap_cards: [
      {
        verb: 'Encontrar', name: 'Os gargalos',
        blurb: 'Mapeamos como o trabalho realmente flui pelo seu negócio — e onde ele trava, se repete ou é copiado e colado à mão.',
        items: [
          'Uma visão clara de para onde vai o tempo',
          'As poucas tarefas que a IA pode realmente assumir',
          'Uma opinião honesta sobre o que vale automatizar — e o que não vale',
        ],
      },
      {
        verb: 'Construir', name: 'A IA no seu trabalho',
        blurb: 'Automações e assistentes funcionando, conectados às ferramentas que você já usa — não mais um aplicativo para a equipe aprender e cuidar.',
        items: [
          'Fluxos conectados às suas ferramentas existentes',
          'Assistentes treinados em como sua empresa realmente trabalha',
          'Tudo documentado conforme é construído',
        ],
      },
      {
        verb: 'Treinar', name: 'Sua equipe para operar',
        blurb: 'Quando termino, sua equipe assume. Documentação clara, treinamento ao vivo e uma biblioteca de prompts para continuar funcionando muito depois de eu sair.',
        items: [
          'Treinamento ao vivo para quem vai usar',
          'Uma biblioteca de prompts escrita para o seu negócio',
          'Suporte nas primeiras semanas — depois é seu',
        ],
      },
    ],

    // Examples
    ex_kicker: 'Como isso se parece',
    ex_h1: 'Trabalho real, ', ex_h_em: 'automatizado em silêncio.',
    ex_lead: 'Algumas das coisas que a IA pode tirar do seu prato. O seu caso será diferente — estes exemplos servem apenas para deixar concreto.',
    ex_items: [
      { tag: 'Onboarding', title: 'Onboarding de clientes que se resolve sozinho', body: 'Um novo cliente chega, a papelada se redige sozinha, as pastas e tarefas são criadas e nada escapa.' },
      { tag: 'Propostas', title: 'Propostas redigidas em minutos', body: 'Reúne os detalhes, redige a proposta na sua voz e formato, pronta para você revisar e enviar no mesmo dia.' },
      { tag: 'Caixa e docs', title: 'E-mails e documentos triados', body: 'Solicitações recebidas organizadas, resumidas e encaminhadas — para sua equipe começar o dia com uma lista clara e priorizada.' },
      { tag: 'Conhecimento', title: 'Um assistente que conhece sua empresa', body: 'Um assistente privado treinado nos seus processos e documentos, respondendo às perguntas que sua equipe faz o dia inteiro.' },
    ],
    ex_note: 'Todo projeto tem taxa fixa e escopo por escrito — você sabe exatamente o que vai receber antes de começarmos.',

    // Process
    proc_kicker: 'Como funciona',
    proc_h1: 'Do olá à ', proc_h_em: 'entrega', proc_h_end: '.',
    proc_steps: [
      { title: 'Conversa inicial', body: 'Uma conversa de 30 minutos para entender seu negócio e achar onde a IA ajuda. Sem custo, sem pitch.' },
      { title: 'Proposta com escopo', body: 'Um plano curto por escrito: o que construímos, até quando e um preço fixo. Sem cobrança por hora.' },
      { title: 'O trabalho começa', body: 'Eu integro às suas ferramentas e mantenho você por dentro o tempo todo — você vê o trabalho, nunca uma caixa preta.' },
      { title: 'Entrega', body: 'Sua equipe fica com o que construímos. Documentação e treinamento vêm com todo engajamento.' },
    ],
    proc_places_pre: 'Presencial em ',
    proc_places: ['São Francisco', 'Península', 'Vale do Silício', 'East Bay', 'Marin'],
    proc_places_note: 'A construção em si é remota, assíncrona e visível — você verá o que está sendo feito, não uma caixa preta.',

    // Contact
    contact_kicker: 'Fale conosco',
    contact_h1: 'Vamos ver se há um ', contact_h_em: 'encaixe', contact_h_end: '.',
    contact_lead: 'A primeira conversa é uma chamada de descoberta de 30 minutos — sem custo, sem pitch. Me diga o que você está tentando fazer; eu te digo se a IA ajuda e qual é o caminho mais curto.',
    contact_meta: 'Bay Area, São Francisco · Remoto nos EUA',
    contact_f_name: 'Nome', contact_f_company: 'Empresa', contact_f_email: 'Email',
    contact_f_phone: 'Telefone (opcional)', contact_f_interest: 'Interesse em', contact_f_context: 'Um pouco de contexto',
    contact_opts: [
      'Ainda não sei — vamos conversar',
      'Automatizar um fluxo de trabalho',
      'Um assistente de IA personalizado',
      'Treinar minha equipe em IA',
    ],
    contact_submit: 'Enviar consulta →',
    contact_note: 'Ao enviar, seu cliente de email abrirá com a mensagem pronta para enviar a ai@bayconai.com',
    contact_opened: ' — aberto.',

    // Footer
    footer_tag: 'Consultoria de IA na Bay Area que realmente funciona. Integrada ao seu negócio, não apenas colada.',
    footer_col_explore: 'Navegar', footer_col_contact: 'Contato', footer_col_legal: 'Legal',
    footer_explore_links: ['Como ajudo', 'Como isso se parece', 'Como funciona', 'Fale conosco'],
    footer_copyright: '© Baycon AI', footer_region: 'Servindo a Bay Area · Remoto nos EUA',
  },
};

function useT() {
  const lang = useContext(LangCtx);
  return (key) => {
    const v = TRANSLATIONS[lang] && TRANSLATIONS[lang][key];
    return v !== undefined ? v : TRANSLATIONS.en[key];
  };
}
window.useT = useT;


// ============================================================
// Language Toggle (lives inside the header)
// ============================================================
function LangToggle({ lang, setLang }) {
  return (
    <div className="bk-lang-pill" role="group" aria-label="Language">
      <button
        className={`bk-lang-btn ${lang === 'pt' ? 'is-active' : ''}`}
        onClick={() => setLang('pt')}
        title="Português (Brasil)"
        aria-pressed={lang === 'pt'}
      >
        <span className="bk-lang-flag">🇧🇷</span>
        <span className="bk-lang-code">PT</span>
      </button>
      <span className="bk-lang-divider" aria-hidden="true"></span>
      <button
        className={`bk-lang-btn ${lang === 'en' ? 'is-active' : ''}`}
        onClick={() => setLang('en')}
        title="English"
        aria-pressed={lang === 'en'}
      >
        <span className="bk-lang-flag">🇺🇸</span>
        <span className="bk-lang-code">EN</span>
      </button>
    </div>
  );
}
window.LangToggle = LangToggle;


// ============================================================
// Reveal — fade-up on scroll into view
// ============================================================
function Reveal({ className = '', delay = 0, children }) {
  const ref = useRef(null);
  const [inView, setInView] = useState(false);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
    if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
      setInView(true);
      return;
    }
    const io = new IntersectionObserver(
      ([e]) => { if (e.isIntersecting) { setInView(true); io.disconnect(); } },
      { threshold: 0.12, rootMargin: '0px 0px -6% 0px' }
    );
    io.observe(el);
    return () => io.disconnect();
  }, []);
  return (
    <div ref={ref}
      className={`bk-reveal ${inView ? 'is-in' : ''} ${className}`}
      style={delay ? { transitionDelay: `${delay}ms` } : undefined}>
      {children}
    </div>
  );
}
window.Reveal = Reveal;


// ============================================================
// Section scaffold
// ============================================================
function Section({ id, num, eyebrow, heading, lead, children, className = '', dark = false }) {
  return (
    <section id={id} data-num={num} className={`bk-section ${dark ? 'bk-dark' : ''} ${className}`}>
      <div className="bk-section-inner">
        <Reveal>
          <div className="bk-kicker">
            <span className="bk-kicker-num">{num}</span>
            <span className="bk-kicker-rule" aria-hidden="true"></span>
            <span className="bk-kicker-label">{eyebrow}</span>
          </div>
          {heading && <h2 className="bk-h2">{heading}</h2>}
          {lead && <p className="bk-lead">{lead}</p>}
        </Reveal>
        {children}
      </div>
    </section>
  );
}
window.Section = Section;


// ============================================================
// Header
// ============================================================
function Header({ lang, setLang }) {
  const t = useT();
  const [past, setPast] = useState(false);
  const [open, setOpen] = useState(false);
  useEffect(() => {
    const onScroll = () => setPast(window.scrollY > window.innerHeight * 0.7);
    onScroll();
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  const links = [
    ['#capabilities', t('nav_help')],
    ['#examples', t('nav_examples')],
    ['#process', t('nav_how')],
    ['/blog', t('nav_blog')],
  ];

  return (
    <header className={`bk-header ${past ? 'is-past' : ''}`}>
      <a href="#top" className="bk-brand" aria-label="Baycon AI home">
        <img
          src={past ? '/brand/mark-animated.svg' : '/brand/mark-animated-dark.svg'}
          alt="" width="36" height="36" className="bk-brand-mark" aria-hidden="true" />
        <span className="bk-brand-text">Baycon<em>AI</em></span>
      </a>
      <div className="bk-header-right">
        <nav className="bk-nav" aria-label="Primary">
          {links.map(([href, label]) => <a key={href} href={href}>{label}</a>)}
          <a href="#contact" className="bk-nav-cta">{t('nav_contact')}</a>
        </nav>
        <LangToggle lang={lang} setLang={setLang} />
        <button className="bk-burger" aria-label="Open menu" aria-expanded={open}
          onClick={() => setOpen(v => !v)}>
          <span></span><span></span>
        </button>
      </div>
      {open && (
        <div className="bk-drawer" role="dialog">
          {links.map(([href, label]) =>
            <a key={href} href={href} onClick={() => setOpen(false)}>{label}</a>)}
          <a href="#contact" onClick={() => setOpen(false)} className="bk-nav-cta">{t('nav_contact')}</a>
        </div>
      )}
    </header>
  );
}
window.Header = Header;


// ============================================================
// Marquee
// ============================================================
function Marquee() {
  const t = useT();
  const items = t('marquee');
  const group = (key) => (
    <div className="bk-marquee-group" key={key} aria-hidden={key === 'b'}>
      {items.map((txt, i) => (
        <span className="bk-marquee-item" key={i}>
          {txt}<span className="bk-marquee-dot" aria-hidden="true">◆</span>
        </span>
      ))}
    </div>
  );
  return (
    <div className="bk-marquee">
      <div className="bk-marquee-track">{group('a')}{group('b')}</div>
    </div>
  );
}
window.Marquee = Marquee;


// ============================================================
// Hero
// ============================================================
function Hero() {
  const t = useT();
  return (
    <section className="bk-hero bk-dark" id="top">
      <div className="bk-hero-inner">
        <div className="bk-hero-mark-wrap" aria-hidden="true">
          <img src="/brand/mark-animated-dark.svg" alt="" className="bk-hero-mark" width="460" height="460" />
        </div>
        <p className="bk-hero-eyebrow">{t('hero_eyebrow')}</p>
        <h1 className="bk-hero-h" aria-label={t('hero_aria')}>
          <span className="bk-hl" aria-hidden="true"><span className="bk-hl-in">{t('hero_l1')}</span></span>
          <span className="bk-hl" aria-hidden="true">
            <span className="bk-hl-in">
              <em className="bk-hero-em">
                {t('hero_em')}
                <svg className="bk-hero-swash" viewBox="0 0 320 60" preserveAspectRatio="none" aria-hidden="true">
                  <path className="bk-swash-path" d="M8 42 C 90 56, 240 54, 312 32" pathLength="1" />
                </svg>
              </em>
              {t('hero_end')}
            </span>
          </span>
        </h1>
        <p className="bk-hero-sub">{t('hero_sub')}</p>
        <div className="bk-hero-ctas">
          <a className="bk-btn bk-btn-primary" href="#contact">{t('hero_cta1')}</a>
          <a className="bk-btn bk-btn-secondary" href="#capabilities">{t('hero_cta2')}</a>
        </div>
        <div className="bk-hero-stats">
          {t('hero_stats').map((s, i) => (
            <div className="bk-hero-stat" key={i}>
              <strong>{s.v}</strong>
              <span>{s.l}</span>
            </div>
          ))}
        </div>
      </div>
      <Marquee />
    </section>
  );
}
window.Hero = Hero;


// ============================================================
// Capabilities — how I help (Find / Build / Train)
// ============================================================
function Capabilities() {
  const t = useT();
  return (
    <Section id="capabilities" num="01" eyebrow={t('cap_kicker')}
      heading={<>{t('cap_h1')}<em>{t('cap_h_em')}</em></>}
      lead={t('cap_lead')}>
      <div className="bk-caps">
        {t('cap_cards').map((c, i) => (
          <Reveal key={c.verb} delay={i * 120}>
            <article className="bk-cap-card">
              <div className="bk-cap-top">
                <span className="bk-cap-num">{String(i + 1).padStart(2, '0')}</span>
                <span className="bk-cap-verb">{c.verb}</span>
              </div>
              <h3 className="bk-cap-name">{c.name}</h3>
              <p className="bk-cap-blurb">{c.blurb}</p>
              <ul className="bk-cap-list">
                {c.items.map(it => <li key={it}>{it}</li>)}
              </ul>
            </article>
          </Reveal>
        ))}
      </div>
    </Section>
  );
}
window.Capabilities = Capabilities;


// ============================================================
// Examples — what it looks like
// ============================================================
function Examples() {
  const t = useT();
  return (
    <Section id="examples" num="02" eyebrow={t('ex_kicker')}
      heading={<>{t('ex_h1')}<em>{t('ex_h_em')}</em></>}
      lead={t('ex_lead')}>
      <div className="bk-ex-grid">
        {t('ex_items').map((e, i) => (
          <Reveal key={e.title} delay={(i % 2) * 100}>
            <article className="bk-ex-card">
              <span className="bk-ex-tag">{e.tag}</span>
              <h4 className="bk-ex-title">{e.title}</h4>
              <p className="bk-ex-body">{e.body}</p>
            </article>
          </Reveal>
        ))}
      </div>
      <Reveal>
        <p className="bk-ex-note">
          <span className="bk-numeral">↳</span>
          {t('ex_note')}
        </p>
      </Reveal>
    </Section>
  );
}
window.Examples = Examples;


// ============================================================
// Process band — hello to handoff + Bay Area
// ============================================================
function Process() {
  const t = useT();
  const places = t('proc_places');
  return (
    <Section id="process" num="03" eyebrow={t('proc_kicker')}
      heading={<>{t('proc_h1')}<em>{t('proc_h_em')}</em>{t('proc_h_end')}</>}
      className="bk-process">
      <div className="bk-process-grid">
        {t('proc_steps').map((s, i) => (
          <Reveal key={s.title} delay={i * 90}>
            <div className="bk-process-step">
              <div className="bk-process-num">{String(i + 1).padStart(2, '0')}</div>
              <h4>{s.title}</h4>
              <p>{s.body}</p>
            </div>
          </Reveal>
        ))}
      </div>
      <Reveal>
        <p className="bk-places-line">
          {t('proc_places_pre')}
          {places.map((p, i) => (
            <React.Fragment key={p}>
              {p}{i < places.length - 1 && <span className="bk-places-sep">—</span>}
            </React.Fragment>
          ))}
          {'. '}
          <span className="bk-places-note">{t('proc_places_note')}</span>
        </p>
      </Reveal>
    </Section>
  );
}
window.Process = Process;


// ============================================================
// ContactSection (dark)
// ============================================================
function ContactSection() {
  const t = useT();
  const [form, setForm] = useState({
    name: '', company: '', email: '', phone: '',
    interest: '', context: '',
  });
  const [submitted, setSubmitted] = useState(false);
  const set = (k) => (e) => setForm(s => ({ ...s, [k]: e.target.value }));
  const opts = t('contact_opts');
  const interest = form.interest || opts[0];
  const onSubmit = (e) => {
    e.preventDefault();
    const subject = encodeURIComponent('Baycon AI Inquiry');
    const body = encodeURIComponent(
`Name: ${form.name}
Company: ${form.company}
Email: ${form.email}
Phone: ${form.phone}
Interested in: ${interest}

${form.context}`);
    window.location.href = `mailto:ai@bayconai.com?subject=${subject}&body=${body}`;
    setSubmitted(true);
  };

  return (
    <Section id="contact" num="04" eyebrow={t('contact_kicker')} dark
      heading={<>{t('contact_h1')}<em>{t('contact_h_em')}</em>{t('contact_h_end')}</>}
      lead={t('contact_lead')}>
      <div className="bk-contact-grid">
        <Reveal>
          <div className="bk-contact-aside">
            <ul className="bk-contact-list">
              <li><a href="mailto:ai@bayconai.com">ai@bayconai.com →</a></li>
              <li><a href="tel:+13373261806">+1 (337) 326-1806 →</a></li>
            </ul>
            <p className="bk-contact-meta">{t('contact_meta')}</p>
          </div>
        </Reveal>
        <Reveal delay={120}>
          <form className="bk-form" onSubmit={onSubmit}>
            <div className="bk-row">
              <div className="bk-field"><label>{t('contact_f_name')}</label><input value={form.name} onChange={set('name')} required /></div>
              <div className="bk-field"><label>{t('contact_f_company')}</label><input value={form.company} onChange={set('company')} /></div>
            </div>
            <div className="bk-row">
              <div className="bk-field"><label>{t('contact_f_email')}</label><input type="email" value={form.email} onChange={set('email')} required /></div>
              <div className="bk-field"><label>{t('contact_f_phone')}</label><input type="tel" value={form.phone} onChange={set('phone')} /></div>
            </div>
            <div className="bk-field"><label>{t('contact_f_interest')}</label>
              <select value={interest} onChange={set('interest')}>
                {opts.map(o => <option key={o}>{o}</option>)}
              </select>
            </div>
            <div className="bk-field"><label>{t('contact_f_context')}</label><textarea rows="4" value={form.context} onChange={set('context')} /></div>
            <button type="submit" className="bk-btn bk-btn-primary">{t('contact_submit')}</button>
            <p className="bk-form-note">
              {t('contact_note')}
              {submitted && <span className="bk-form-confirm">{t('contact_opened')}</span>}
            </p>
          </form>
        </Reveal>
      </div>
    </Section>
  );
}
window.ContactSection = ContactSection;


// ============================================================
// Footer (dark)
// ============================================================
function Footer() {
  const t = useT();
  const exploreLinks = t('footer_explore_links');
  const exploreHrefs = ['#capabilities', '#examples', '#process', '#contact'];
  return (
    <footer className="bk-footer bk-dark">
      <div className="bk-footer-grid">
        <div>
          <div className="bk-footer-brand">
            <img src="/brand/lockup-horizontal-dark.svg" alt="Baycon AI" height="40" className="bk-footer-lockup" />
          </div>
          <p className="bk-footer-tag">{t('footer_tag')}</p>
        </div>
        <div>
          <div className="bk-eyebrow bk-eyebrow-sm">{t('footer_col_explore')}</div>
          <ul className="bk-footer-list">
            {exploreLinks.map((label, i) => (
              <li key={label}><a href={exploreHrefs[i]}>{label}</a></li>
            ))}
          </ul>
        </div>
        <div>
          <div className="bk-eyebrow bk-eyebrow-sm">{t('footer_col_contact')}</div>
          <ul className="bk-footer-list">
            <li><a href="mailto:ai@bayconai.com">ai@bayconai.com</a></li>
            <li><a href="tel:+13373261806">+1 (337) 326-1806</a></li>
            <li>San Francisco Bay Area</li>
            <li><a href="/blog">Blog</a></li>
          </ul>
        </div>
        <div>
          <div className="bk-eyebrow bk-eyebrow-sm">{t('footer_col_legal')}</div>
          <ul className="bk-footer-list">
            <li><a href="/legal/terms">Terms of Service</a></li>
            <li><a href="/legal/privacy">Privacy Policy</a></li>
            <li><a href="/legal/msa">Master Services Agreement</a></li>
            <li><a href="/legal/cookies">Cookie Policy</a></li>
            <li><a href="/legal/aup">Acceptable Use</a></li>
            <li><a href="/legal/dpa">Data Processing Addendum</a></li>
          </ul>
        </div>
      </div>
      <div className="bk-footer-meta">
        <span>{t('footer_copyright')}</span>
        <span>{t('footer_region')}</span>
      </div>
    </footer>
  );
}
window.Footer = Footer;
