/* GCCReady — Competitor comparison pages.
 * Routes: /compare-with/:slug
 * SEO/AEO/AI-search goldmine: catches "GCCReady vs Simandhar", "Imarticus vs GCCReady" etc.
 *
 * Honest, factual positioning — strengths of competitor, where GCCReady differs.
 * No false claims, no smear; just specific differentiators.
 */

const COMPETITORS = {
  'simandhar': {
    name: 'Simandhar Education',
    domain: 'simandhareducation.com',
    sub: 'Strong US CPA-only coaching academy in India.',
    summary: "Simandhar has built a respected US CPA-focused academy. Our positioning is broader — we add Skill Badge readiness, role pods, mentor network, named-GCC placement support, and four other certification pathways alongside CPA.",
    rows: [
      ['Primary credential focus',     'US CPA',                                       'US CPA · CMA · EA · CFA · ACCA (5 pathways)'],
      ['Skill Badge / readiness score','—',                                            '✓ Free L1/L2/L3 readiness with shareable credential'],
      ['Role pods (function-specific)','—',                                            '✓ 22 GCC role pods with tools, certs, salary signal'],
      ['Named GCC placement partners', 'Limited',                                       '✓ 41 named hiring partners (BFSI · Big 4 · Big Tech · Pharma)'],
      ['Mentor network (working pros)','—',                                            '✓ Verified Mentor Badge · ₹1,500–6,000 / session'],
      ['Mini-GCC for US founders',     '—',                                            '✓ Pilot → Scale → Own Entity with TCO calculator'],
      ['Library (long-form content)',  'Limited',                                       '✓ 301 deep-dive articles · 1.1M words · free'],
      ['Free interactive tools',       '1–2',                                           '✓ 13 calculators / scorecards / quizzes'],
      ['College / TPO partnerships',    'Limited',                                       '✓ 22 partner colleges · NAAC/NEP evidence pack'],
      ['Pricing',                       '~₹3.5–5 L (CPA only)',                          'CPA same range; CMA ₹1.5–2 L; EA ₹70K–1L'],
    ],
    use_them_when: 'You want a single-credential CPA-only experience and Simandhar\'s well-known instructor pool resonates with you.',
    use_us_when:    'You want broader options (5 certs, Skill Badge, Mentor Network, Mini-GCC, role pods, GCC placement support).',
    aliases: ['simandhar academy','simandhar education','simandhar cpa'],
  },

  'imarticus': {
    name: 'Imarticus Learning',
    domain: 'imarticus.org',
    sub: 'Established analytics + finance bootcamp brand.',
    summary: "Imarticus runs strong analytics, FinTech and PG programs. We're sharper on certifications (US CPA / CMA / EA / CFA / ACCA), GCC-specific role pods, and a mentor network of working pros at named GCCs.",
    rows: [
      ['Primary focus',                 'Analytics, FinTech, PG diplomas',              'GCC-specific certs + role pods'],
      ['US Certification pathways',     'CFA, CMA',                                     'CPA · CMA · EA · CFA · ACCA (5 pathways)'],
      ['Skill Badge / readiness score', '—',                                             '✓ Free L1/L2/L3 readiness'],
      ['Role pods (22)',                '—',                                             '✓ AI PM, AI Data, FinOps, Tax, etc'],
      ['Named GCC partners',            'Some',                                          '✓ 41 named hiring partners'],
      ['Mentor network',                'In-house faculty',                             '✓ Verified Mentor Badge for working pros'],
      ['Mini-GCC for founders',         '—',                                             '✓ Live TCO calc, EOR-vs-entity matrix'],
      ['Library / free content',        'Blog only',                                     '✓ 301 long-form articles + 13 free tools'],
      ['Pricing',                       '~₹1.5–4.5 L per program',                       'Free Skill Badge → ₹7.9K Crash → ₹35K Sprint'],
    ],
    use_them_when: 'You want a broad-spectrum bootcamp covering analytics and finance combined with placement support.',
    use_us_when:    'You want a sharper GCC-only career platform with role pods, Skill Badge, Mentor Network and 5 cert pathways.',
    aliases: ['imarticus','imarticus learning','imarticus analytics'],
  },

  'becker': {
    name: 'Becker Professional Education',
    domain: 'becker.com',
    sub: 'Premium global US CPA + CMA exam-prep brand.',
    summary: "Becker is the global gold-standard for CPA + CMA exam-prep content. We complement that with India-specific Skill Badge, GCC placement support, role pods, mentor network, and 41 named hiring partners — most of whom Becker's product doesn't address.",
    rows: [
      ['Geography focus',               'Global (US-first)',                            'India-first, US-aligned'],
      ['Primary product',               'Exam prep content (CPA / CMA / CIA / EA)',     'Career platform + cert prep + GCC placement'],
      ['Indian context (state selection, NACES, exemptions)', 'Limited',                  '✓ State-by-state CPA eligibility checker, exemption guidance'],
      ['India placement support',       '—',                                             '✓ 41 GCC hiring partners, Sprint cohort'],
      ['Indian pricing',                '$2,500–4,000+ (₹2–3.5 L per cert)',             'CPA ₹3–5 L all-in (incl. exam) · CMA ₹1.5–2 L'],
      ['Mentor network',                'Faculty in-house',                              '✓ Verified Mentors at named India GCCs'],
      ['Skill Badge / Role pods',       '—',                                             '✓ All included free'],
      ['Library',                       'Member-only',                                   '✓ 301 free articles · 1.1M words'],
    ],
    use_them_when: 'You\'re self-studying and want premium global exam-prep content (and your employer pays for it).',
    use_us_when:    'You want India-specific eligibility / state guidance, GCC placement help, and cohort-based prep + mentors.',
    aliases: ['becker','becker cpa','becker cma','becker review'],
  },

  'northwest': {
    name: 'Northwest Executive Education',
    domain: 'northwest.education',
    sub: 'Mid-career executive education, often partnered with US universities.',
    summary: "Northwest delivers mid-career exec ed via US-university partnerships. We're for early-career talent prepping for first-job at a GCC — different stage, different price point, different outcomes.",
    rows: [
      ['Audience',                      'Mid-career executives, 5+ yrs experience',     'Students + early-career, 0–5 yrs'],
      ['Primary product',               'University-co-branded exec programs',           'Cert pathways + Skill Badge + GCC placement'],
      ['Indicative cost',               '₹2.5–6 L per program',                          'Free Skill Badge · CMA ₹1.5–2 L · CPA ₹3.5–5 L'],
      ['Time commitment',               '6–10 months part-time',                         'Skill Badge: 5 min · CMA: 8–12 mo · Sprint: 12 wk'],
      ['Placement support',             '—',                                             '✓ 41 named GCC partners + Sprint placement guarantee'],
      ['Skill Badge',                   '—',                                             '✓ Free, shareable, verified L1/L2/L3'],
      ['Mentor Network',                '—',                                             '✓ Working pros at named GCCs'],
      ['Library',                       '—',                                             '✓ 301 free articles · 13 free tools'],
    ],
    use_them_when: 'You\'re a mid-career professional with a US-university brand goal in mind.',
    use_us_when:    'You\'re a student or early-career professional targeting your first GCC role.',
    aliases: ['northwest','northwest executive education','northwest education'],
  },
};

function CompareWithPage({ slug }) {
  const c = COMPETITORS[slug];
  if (!c) return <CompareWithIndex/>;
  return (
    <>
      <PageHead
        title={`GCCReady vs ${c.name} — Side-by-Side Honest Comparison`}
        description={`How GCCReady compares with ${c.name} across credential focus, India-specific support, GCC placement, mentor network, free tools and pricing. ${c.summary.slice(0, 80)}…`}
        canonical={`/compare-with/${slug}`}
        schema={[
          schemaBreadcrumb([
            {label:'Home',href:'/'},
            {label:'Compare with',href:'/compare-with'},
            {label: c.name, href:`/compare-with/${slug}`},
          ]),
          schemaFAQ([
            { q:`Should I pick GCCReady or ${c.name}?`,
              a:`Use ${c.name} when: ${c.use_them_when} Use GCCReady when: ${c.use_us_when}` },
            { q:`Is GCCReady cheaper than ${c.name}?`,
              a:'Pricing depends on the program. Skill Badge is always free. Cert prep ranges ₹70K–5L depending on credential. See pricing rows in the comparison.' },
            { q:`Does ${c.name} offer placement support?`,
              a:`See the placement row above. GCCReady has 41 named GCC hiring partners with the Sprint placement-guarantee program.` },
          ]),
        ]}
      />
      <HeroDark>
        <div style={{maxWidth:980}}>
          <Crumbs items={[{label:'Compare with', href:'#/compare-with'},{label: c.name}]}/>
          <Pill tone="dark" icon="layers">Honest comparison · {c.sub}</Pill>
          <h1 className="gr-h1" style={{color:'#fff', marginTop:14, fontSize:60, lineHeight:1.05}}>
            GCCReady <span style={{color:'rgba(255,255,255,.5)', fontWeight:400}}>vs</span><br/>
            <span style={{color:'#F59E0B'}}>{c.name}</span>
          </h1>
          <p className="gr-lead" style={{color:'rgba(255,255,255,.78)', marginTop:18, maxWidth:760}}>{c.summary}</p>
        </div>
      </HeroDark>

      <section className="gr-section">
        <div className="gr-container" style={{maxWidth:1100}}>
          <div className="gr-card" style={{padding:0, overflow:'hidden'}}>
            <table style={{width:'100%', borderCollapse:'collapse'}}>
              <thead>
                <tr style={{background:'var(--gr-bg-tint)'}}>
                  <th style={cmpTh}>Dimension</th>
                  <th style={cmpTh}>{c.name}</th>
                  <th style={{...cmpTh, color:'var(--gr-gold-700)'}}>GCCReady</th>
                </tr>
              </thead>
              <tbody>
                {c.rows.map((r, i) => (
                  <tr key={i} style={{borderTop: i>0 ? '1px solid var(--gr-border-soft)' : 'none'}}>
                    <td style={{...cmpTd, font:'700 13.5px/1.4 "DM Sans"', color:'var(--gr-navy)'}}>{r[0]}</td>
                    <td style={{...cmpTd, font:'500 14px/1.55 Inter', color:'var(--gr-fg-2)'}}>{r[1]}</td>
                    <td style={{...cmpTd, font:'600 14px/1.55 Inter', color:'var(--gr-navy)', background:'var(--gr-gold-50)'}}>{r[2]}</td>
                  </tr>
                ))}
              </tbody>
            </table>
          </div>

          <div style={{display:'grid', gridTemplateColumns:'1fr 1fr', gap:16, marginTop:18}}>
            <div className="gr-card" style={{padding:24, background:'var(--gr-bg-cream)'}}>
              <div className="gr-eyebrow">Pick {c.name} when</div>
              <p className="gr-p" style={{marginTop:8, fontSize:14.5}}>{c.use_them_when}</p>
            </div>
            <div className="gr-card" style={{padding:24, background:'rgba(245,158,11,.08)', border:'1px solid var(--gr-gold-100)'}}>
              <div className="gr-eyebrow" style={{color:'var(--gr-gold-700)'}}>Pick GCCReady when</div>
              <p className="gr-p" style={{marginTop:8, fontSize:14.5, color:'var(--gr-fg-1)'}}>{c.use_us_when}</p>
            </div>
          </div>

          <div style={{marginTop:24, display:'flex', gap:10, flexWrap:'wrap'}}>
            <a href="#/skill-badge/take" className="gr-btn gr-btn-gold gr-btn-lg">Take the free Skill Badge <Icon name="arrow-right" size={14}/></a>
            <a href="#/contact?intent=cert" className="gr-btn gr-btn-ghost gr-btn-lg">Talk to an advisor</a>
            <a href="#/compare-with" className="gr-btn gr-btn-ghost gr-btn-lg">Compare other options</a>
          </div>

          <p style={{font:'500 12px/1.5 Inter', color:'var(--gr-fg-4)', marginTop:18}}>
            This comparison is intended to help students choose objectively. {c.name} is a respected brand in their domain. Information is sourced from public materials at {c.domain} as of {new Date().toLocaleDateString('en-IN', { month:'long', year:'numeric' })}; minor inaccuracies should be flagged to info@gccready.com and we will correct.
          </p>
        </div>
      </section>

      <CTABand title={`Still deciding between GCCReady and ${c.name}?`} sub="Take the free Skill Badge first. The result tells you which path actually fits your degree, target role and timeline." primaryLabel="Get your Skill Badge" primaryHref="#/skill-badge/take"/>
    </>
  );
}

function CompareWithIndex() {
  return (
    <>
      <PageHead
        title="Compare GCCReady — vs Simandhar / Imarticus / Becker / Northwest"
        description="Honest side-by-side comparisons of GCCReady with the major alternatives in CPA, CMA, EA, CFA, ACCA prep + GCC placement."
        canonical="/compare-with"
        schema={[schemaBreadcrumb([{label:'Home',href:'/'},{label:'Compare with',href:'/compare-with'}])]}
      />
      <HeroDark>
        <div style={{maxWidth:780}}>
          <Pill tone="dark" icon="layers">Compare honestly</Pill>
          <h1 className="gr-h1" style={{color:'#fff', marginTop:14, fontSize:54}}>How does GCCReady compare?</h1>
          <p className="gr-lead" style={{color:'rgba(255,255,255,.78)', marginTop:14}}>
            Pick a competitor below for a side-by-side look at credential focus, India context, placement support, mentor network, and pricing.
          </p>
        </div>
      </HeroDark>
      <section className="gr-section">
        <div className="gr-container">
          <div style={{display:'grid', gridTemplateColumns:'repeat(auto-fill, minmax(280px, 1fr))', gap:18}}>
            {Object.entries(COMPETITORS).map(([slug, c]) => (
              <a key={slug} href={`#/compare-with/${slug}`} className="gr-card" style={{padding:24, textDecoration:'none', color:'var(--gr-fg-1)', display:'flex', flexDirection:'column', gap:12}}>
                <div style={{font:'700 11.5px/1 Inter', color:'var(--gr-gold-700)', letterSpacing:'.14em', textTransform:'uppercase'}}>vs Comparison</div>
                <h3 className="gr-h4" style={{fontSize:22, marginTop:4}}>GCCReady vs {c.name}</h3>
                <p className="gr-p" style={{fontSize:13.5, margin:0}}>{c.sub}</p>
                <div style={{marginTop:'auto', font:'700 13px/1 Inter', color:'var(--gr-gold-700)', display:'inline-flex', alignItems:'center', gap:6, paddingTop:6}}>
                  Read comparison <Icon name="arrow-right" size={12}/>
                </div>
              </a>
            ))}
          </div>
        </div>
      </section>
      <CTABand title="Stop comparing. Start." sub="Take the free Skill Badge — 5 minutes. The result tells you which path fits."/>
    </>
  );
}

const cmpTh = { padding:'14px 18px', textAlign:'left', font:'700 11.5px/1 Inter', letterSpacing:'.10em', textTransform:'uppercase', color:'var(--gr-fg-3)' };
const cmpTd = { padding:'16px 18px', verticalAlign:'top' };

Object.assign(window, { CompareWithPage, CompareWithIndex, COMPETITORS });
