/* global React, MANIFESTO, PLATFORMS, Reveal, Star, Glyph, Magnetic, ParticleField, LogoMark */

/* ---------- MANIFESTO ---------- */
function Manifesto(){
  return React.createElement('section',{className:'section marble-deep veined manifesto',id:'manifesto'},
    React.createElement('div',{className:'manifesto-aura'}),
    React.createElement('div',{className:'wrap'},
      React.createElement('div',{className:'eyebrow-row'},React.createElement(Reveal,{as:'span',className:'kicker center'},'The AetherCore Manifesto')),
      React.createElement('div',{className:'manifesto-lines'},
        MANIFESTO.map((m,i)=>React.createElement(Reveal,{key:i,as:'p',className:'manifesto-line display',delay:i*60},
          m[0],' ',React.createElement('span',{className:i===MANIFESTO.length-1?'gild italic':'engrave-strong'},m[1])
        ))
      ),
      React.createElement(Reveal,{className:'manifesto-mark',delay:120},React.createElement(Star,{size:20}))
    )
  );
}

/* ---------- FINAL CTA ---------- */
function FinalCTA(){
  return React.createElement('section',{className:'cta marble veined',id:'cta'},
    React.createElement(ParticleField,{color:'201,162,39'}),
    React.createElement('div',{className:'cta-rings'}),
    React.createElement('div',{className:'wrap center',style:{position:'relative',zIndex:3}},
      React.createElement(Reveal,{className:'cta-star'},React.createElement(Star,{size:30})),
      React.createElement(Reveal,{as:'h2',className:'display cta-head',delay:60},
        'Join the future of ',React.createElement('br'),
        React.createElement('span',{className:'gild italic'},'biological intelligence.')),
      React.createElement(Reveal,{as:'p',className:'serif-lead mx-auto',delay:140,style:{maxWidth:'560px',marginTop:'24px'}},
        'We are assembling the team, the partners, and the institutions that will engineer the next era of medicine.'),
      React.createElement(Reveal,{className:'cta-btns',delay:200},
        React.createElement(Magnetic,{strength:0.4},React.createElement('button',{className:'btn btn-gold',onClick:()=>window.goDashboard()},'Join Now',
          React.createElement(Glyph,{name:'arrow',className:'arr',width:16,height:16}))),
        React.createElement(Magnetic,{strength:0.4},React.createElement('button',{className:'btn btn-ghost',onClick:()=>window.openContact('AETHERCORE LABS')},'Contact Us')),
        React.createElement(Magnetic,{strength:0.4},React.createElement('button',{className:'btn btn-ghost',onClick:()=>window.openContact('AETHERCORE LABS',"I'd like to discuss a partnership with AetherCore Labs.\n\nOrganization:\nArea of interest:\n")},'Request Partnership'))
      )
    )
  );
}

/* ---------- FOOTER ---------- */
function Footer(){
  const cols=[
    {h:'Company',items:['Mission','Team','Careers','Manifesto']},
    {h:'Platforms',items:PLATFORMS.map(p=>p.name.replace(' RNA',' RNA'))},
    {h:'Resources',items:['Research','Publications','Documentation','The Agora']},
    {h:'Connect',items:['Contact','Partnerships','Newsletter','Press']},
  ];
  const SCROLL={'Mission':'mission','Manifesto':'manifesto','Careers':'careers','Research':'research','The Agora':'agora','Team':'who'};
  const MAILS={'Contact':'AETHERCORE LABS','Partnerships':'AETHERCORE LABS','Press':'AETHERCORE LABS','Newsletter':'AETHERCORE LABS','Publications':'AETHERCORE LABS','Documentation':'AETHERCORE LABS'};
  const onLink=(label)=>(e)=>{
    e.preventDefault();
    if(SCROLL[label]) return window.scrollToId(SCROLL[label]);
    if(MAILS[label]!==undefined) return window.openContact('AETHERCORE LABS', label==='Newsletter'?'Please add me to the AetherCore Labs newsletter.':'');
    const platform=PLATFORMS.find(p=>p.name===label);
    if(platform){ window.location.href='platforms/'+platform.id+'.html'; return; }
    return window.scrollToId('ecosystem');
  };
  return React.createElement('footer',{className:'footer marble-deep'},
    React.createElement('div',{className:'wrap'},
      React.createElement('div',{className:'footer-top'},
        React.createElement('div',{className:'footer-brand'},
          React.createElement('div',{className:'footer-logo'},React.createElement(LogoMark,null),
            React.createElement('span',null,'AETHERCORE ',React.createElement('em',null,'LABS'))),
          React.createElement('p',{className:'footer-tag serif-lead italic'},'Building the future of biological intelligence.'),
          React.createElement('div',{className:'footer-socials'},
            [['X','https://x.com'],['in','https://www.linkedin.com'],['\u25C9','https://github.com'],['\u2709','contact']].map((s,i)=>
              React.createElement('a',{key:i,href:s[1]==='contact'?'#':s[1],target:s[1]==='contact'?undefined:'_blank',rel:'noopener',
                className:'footer-soc',onClick:s[1]==='contact'?(e)=>{e.preventDefault();window.openContact('AETHERCORE LABS');}:undefined},s[0])))
        ),
        React.createElement('div',{className:'footer-cols'},
          cols.map(c=>React.createElement('div',{key:c.h,className:'footer-col'},
            React.createElement('div',{className:'footer-h'},c.h),
            c.items.map(it=>React.createElement('a',{key:it,href:'#',className:'footer-link',onClick:onLink(it)},it))
          )))
      ),
      React.createElement('div',{className:'footer-rule'}),
      React.createElement('div',{className:'footer-bottom'},
        React.createElement('span',null,'\u00A9 2026 AetherCore Labs. The operating system for biology.'),
        React.createElement('div',{className:'footer-legal'},
          React.createElement('a',{href:'#',onClick:(e)=>{e.preventDefault();window.openContact('AETHERCORE LABS');}},'Privacy'),
          React.createElement('a',{href:'#',onClick:(e)=>{e.preventDefault();window.openContact('AETHERCORE LABS');}},'Terms'),
          React.createElement('a',{href:'#',onClick:(e)=>{e.preventDefault();window.openContact('AETHERCORE LABS');}},'Security')))
    )
  );
}

Object.assign(window,{ Manifesto, FinalCTA, Footer });
