const { Badge } = window.Talensity_b45625;

const FULL_STEPS = ['Submit your role brief (or upload a JD)','We source, score, and review candidates','You receive a scored shortlist with rationale','Request introductions to unlock contact details','Interview, offer — and we pay them compliantly'];
const SELF_STEPS = ['Describe your ideal hire in natural language','Review the AI-structured criteria — edit if needed','Browse matched, pre-scored candidates','Request introductions to the ones you want','Escalate to full-service at any point — no restart'];
const SHORTLIST = [
  ['Score + rationale','Candidate card with AI match score bar and a three-line written rationale excerpt. Eagle Green accents.','Each candidate arrives with an AI match score and a written brief — role fit, relevant experience, considerations to explore in interview, and suggested validation steps.'],
  ['Verification status','Three-tier verification badge — consistency-checked, reference-verified, background-checked','Candidates carry a verification tier: AI-consistency-checked on entry, reference-verified at shortlist, background-checked as a premium add-on. You always know where each person stands.'],
  ['Pipeline visibility','Pipeline view showing candidate stages — suggested, presented, engaged, interviewing, hired','See every candidate screened for your role — not just the ones you hired. Track stage, engagement status, and history across your whole team.'],
];
const PAYROLL = [
  ['AOR by default','We become the Agent of Record for your contractor — payments, documentation, and compliance handled, without you becoming their legal employer.'],
  ['EOR when you’re ready','Convert a contractor to a full employee and Talensity becomes the legal employer on paper: taxes, benefits, and statutory filings in their home country.'],
  ['Cross-border payments and FX','One invoice in your currency. Talent paid in theirs, at a rate you can see, on a date they can plan around.'],
  ['Local tax and compliance','Withholding, filings, and contractor documentation handled in-market — not improvised from a spreadsheet in another time zone.'],
];
const GUARANTEES = [
  ['60-day replacement','If a placed candidate leaves within 60 days, we replace them at no additional fee.'],
  ['Non-circumvention','Candidates introduced by Talensity trigger the agreement fee if hired within the tail period, even off-platform.'],
  ['Instant click-wrap','The legal step is instant. Quality review is human. You’re protected from the moment you engage.'],
];
const PRICE_FULL = ['Success fee on placement','Shortlist delivery included','Rationale reports included','AOR payments and compliance included','60-day replacement guarantee','3 team seats included'];
const PRICE_SELF = ['Success fee on placement','Direct pool access','Engagement wall protects fee model','Can escalate to full-service anytime','3 team seats included'];

function Steps({ items, gold }) {
  return (
    <ol className="stack g3" style={{margin:0,padding:0,listStyle:'none',counterReset:'s'}}>
      {items.map((s, i) => (
        <li key={s} className="li" style={{fontSize:'14.5px',color:'var(--warm-grey)',lineHeight:1.6}}>
          <span style={{flex:'none',width:'22px',height:'22px',borderRadius:'999px',display:'grid',placeItems:'center',fontSize:'12px',fontWeight:600,background:gold ? 'var(--golden-yellow)' : 'var(--eagle-green)',color:gold ? 'var(--near-black)' : '#fff'}}>{i + 1}</span>
          <span>{s}</span>
        </li>
      ))}
    </ol>
  );
}

function CompaniesPage() {
  return (
    <Page>
      <section className="sec dark">
        <div className="pat"></div>
        <div className="wrap grid split" style={{gridTemplateColumns:'1.35fr 1fr',alignItems:'center',gap:'var(--space-8)'}}>
          <div className="stack g5">
            <Eyebrow>For companies</Eyebrow>
            <h1 className="h1">Stop searching.<br />Start shortlisting.</h1>
            <p className="sub">Tell us what you need. We return a scored, rationale-backed shortlist of pre-vetted professionals — or let you search the pool directly. Either way, paying them compliantly is built in.</p>
            <div className="row g4">
              <a href="#brief" className="btn fill">Post a brief</a>
              <a href="How It Works.html" className="btn ghost">See how it works →</a>
            </div>
            <div className="row g2">
              {['60-day guarantee','No upfront fees','Full-service or self-service','Agencies welcome'].map(p => <span key={p} className="chip">{p}</span>)}
            </div>
          </div>
          <Ph label="Product screenshot — company dashboard with shortlist candidate cards, match scores, and written rationale. Dark UI, Eagle Green accents, floating device frame." height={380} />
        </div>
      </section>

      <section className="sec light on-light">
        <div className="wrap stack g8">
          <Head eyebrow="Your engagement options" title="Full-service or self-service — your call." sub="Both paths use the same vetted pool. Both are protected by the same agreement. You can switch between them without losing history." />
          <div className="grid c2">
            <div className="card top-accent stack g4 rv">
              <Badge tone="success">Full-service</Badge>
              <h3 className="h3">We do the sourcing.</h3>
              <p className="body">Submit a brief. We source from new applicants and our pre-scored talent pool, AI-rate every candidate, and deliver a scored shortlist with a written rationale per person. A human reviews every score before it reaches you.</p>
              <hr className="hr" />
              <Steps items={FULL_STEPS} />
            </div>
            <div className="card top-accent g stack g4 rv">
              <Badge tone="highlight">Self-service</Badge>
              <h3 className="h3">You do the searching.</h3>
              <p className="body">Describe what you need in plain language. Our AI structures your prompt into criteria, shows you the interpretation for review, then searches the vetted pool. You see scored profiles and can engage multiple candidates from one search.</p>
              <hr className="hr" />
              <Steps items={SELF_STEPS} gold />
            </div>
          </div>
          <div className="row g5" style={{justifyContent:'space-between'}}>
            <p className="body" style={{fontSize:'16px'}}>Not sure which to use? Start with a brief.</p>
            <a href="#brief" className="btn fill">Post a brief →</a>
          </div>
        </div>
      </section>

      <section className="sec dark">
        <div className="wrap stack g8">
          <Head eyebrow="What you receive" title="Not a CV dump. A reasoned shortlist." sub="Every candidate on your shortlist comes with a written rationale — not just a score. Before you see anyone’s contact details, you see exactly why they fit." />
          <div className="grid c3">
            {SHORTLIST.map(([t, ph, d], i) => (
              <div key={t} className="card glass stack g4 rv">
                <span className="num">{i + 1}</span>
                <span style={{fontSize:'18px',fontWeight:600,color:'#fff'}}>{t}</span>
                <Ph label={ph} height={120} />
                <p className="body">{d}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      <section className="sec light on-light">
        <div className="wrap stack g8">
          <Head eyebrow="Payments and compliance" title="Payment rails for the hire you just made." sub="Keep your payroll. We handle paying the African talent we placed." />
          <p className="body" style={{maxWidth:'760px',marginTop:'calc(-1 * var(--space-4))'}}>You hired someone in Lagos, Nairobi, or Accra. Your payroll was never built to pay them, and standing up a local entity for one hire makes no sense. Talensity steps in at that exact moment — we act as Agent of Record for the contractor, produce documentation that holds up locally, convert and deliver payment in their currency, and keep the tax position clean in-market. When the relationship matures, we convert them to Employer of Record without changing how you work. We only do this for hires that run through Talensity: infrastructure for your African team, not a payroll migration.</p>
          <div className="grid c4">
            {PAYROLL.map(([t, d]) => (
              <div key={t} className="stack g3 rv">
                <hr className="hr" />
                <span style={{fontSize:'18px',fontWeight:600,color:'var(--near-black)'}}>{t}</span>
                <p className="body">{d}</p>
              </div>
            ))}
          </div>
          <Ph label="Talensity payments hub — contractor list with AOR/EOR status, invoice line items, FX rate and payout date per hire. Minimal and clean." height={260} />
          <p style={{fontFamily:'var(--font-serif-display)',fontSize:'clamp(1.25rem,1.1rem + 0.7vw,1.75rem)',lineHeight:1.25,letterSpacing:'-0.01em',color:'var(--near-black)',maxWidth:'720px'}}>Not a payroll provider. The rails for hiring African talent.</p>
        </div>
      </section>

      <section className="sec dark compact">
        <div className="wrap stack g7">
          <div className="stack g4">
            <h2 className="h2" style={{fontSize:'var(--text-h2)'}}>One agreement. Everything covered.</h2>
            <p className="body" style={{maxWidth:'640px',fontSize:'16px'}}>A single Master Service Agreement covers the full engagement — fee percentage, payment terms, the 60-day replacement guarantee, and a non-circumvention clause. Accepted once via click-wrap. No re-signing per role.</p>
          </div>
          <div className="grid c3">
            {GUARANTEES.map(([t, d]) => (
              <div key={t} className="card stack g3 rv">
                <span style={{fontSize:'15px',fontWeight:600,color:'#fff'}}>{t}</span>
                <p className="body" style={{fontSize:'14px'}}>{d}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      <section className="sec light on-light">
        <div className="wrap stack g8">
          <Head eyebrow="Pricing" title="No upfront cost. Pay on success." sub="Talensity operates on a success-fee model. You pay when you hire — not before." />
          <div className="grid c2">
            <div className="card stack g4 rv" style={{padding:0,overflow:'hidden'}}>
              <div style={{background:'var(--eagle-green)',padding:'18px 28px',color:'#fff',fontSize:'12px',fontWeight:600,letterSpacing:'var(--tracking-widest)',textTransform:'uppercase'}}>Full-service</div>
              <div className="stack g3" style={{padding:'8px 28px 28px'}}>
                {PRICE_FULL.map(f => <div key={f} className="li" style={{fontSize:'14.5px',color:'var(--warm-grey)',lineHeight:1.55}}><Tick /><span>{f}</span></div>)}
                <a href="#brief" className="btn fill" style={{alignSelf:'flex-start',marginTop:'12px'}}>Post a brief →</a>
              </div>
            </div>
            <div className="card stack g4 rv" style={{padding:0,overflow:'hidden'}}>
              <div style={{background:'transparent',padding:'18px 28px',color:'var(--near-black)',borderBottom:'1px solid rgba(14,21,18,.1)',fontSize:'12px',fontWeight:600,letterSpacing:'var(--tracking-widest)',textTransform:'uppercase'}}>Self-service</div>
              <div className="stack g3" style={{padding:'8px 28px 28px'}}>
                {PRICE_SELF.map(f => <div key={f} className="li" style={{fontSize:'14.5px',color:'var(--warm-grey)',lineHeight:1.55}}><Tick /><span>{f}</span></div>)}
                <a href="#search" className="btn line" style={{alignSelf:'flex-start',marginTop:'12px'}}>Start searching →</a>
              </div>
            </div>
          </div>
          <p className="muted">Additional team seats available. Recruitment and staffing agencies welcome on the same terms.</p>
        </div>
      </section>

      <section className="sec green">
        <div className="pat wht"></div>
        <div className="wrap stack g5" style={{textAlign:'center',alignItems:'center'}}>
          <h2 className="h2" style={{fontSize:'clamp(2rem,1.7rem + 1.8vw,3rem)'}}>Your next hire is already in the pool.</h2>
          <p className="sub" style={{color:'rgba(255,255,255,.75)'}}>Post a brief and we’ll have a scored shortlist back to you.</p>
          <a href="#brief" className="btn white">Post a brief</a>
        </div>
      </section>
    </Page>
  );
}
window.CompaniesPage = CompaniesPage;
