/* Certification.jsx — #certification — navy band + NETFILE timeline */
const TIMELINE = [
  ['NETFILE certification application submitted', 'Jun 5, 2026', true],
  ['Working prototype interview with CRA', 'Jun 15–20, 2026', false],
  ['NDA + Early Access to Specifications (EAS)', 'Jul 2026', false],
  ['Certification agreements signed', 'Oct/Nov 2026', false],
  ['NETFILE testing begins', 'Nov 2026', false],
  ['All test files submitted', 'Jan 31, 2027', false],
  ['Certification testing complete', 'Mar 31, 2027', false],
  ['2027 filing season — live', 'Feb 2027', false],
];

function Certification() {
  return (
    <Section id="certification" dark={true}>
      <TopoBg opacity={0.14} color="var(--teal-300)" />
      <Container style={{ position: 'relative' }}>
        <div className="cert-grid" style={{
          display: 'grid', gridTemplateColumns: '0.85fr 1.15fr', gap: 'clamp(40px, 6vw, 80px)', alignItems: 'start',
        }}>
          <div>
            <Eyebrow onDark={true}>Certification</Eyebrow>
            <SectionHeading onDark={true} style={{ marginTop: 18 }}>NETFILE Certification — In Progress</SectionHeading>
            <p style={{ font: 'var(--t-body)', color: 'var(--fg-on-dark-2)', marginTop: 22 }}>
              TaxTrail is actively pursuing CRA NETFILE certification for tax year 2026,
              targeting the 2027 Canadian income-tax filing season.
            </p>
            <p style={{ font: 'var(--t-body)', color: 'var(--fg-on-dark-2)', marginTop: 16 }}>
              The service is built to CRA’s published NETFILE technical specifications — including the
              T1 record layout and all applicable NETFILE transmission requirements. Quebec returns are
              supported through NetFile Québec, with Revenu Québec specifications as the correctness
              anchor.
            </p>
            <span className="ds-status" style={{
              marginTop: 26, background: 'rgba(217,145,43,0.14)', color: 'var(--amber-500)',
              border: '1px solid rgba(217,145,43,0.4)', font: 'var(--t-label)', letterSpacing: '0.08em',
              textTransform: 'uppercase', padding: '7px 14px', borderRadius: 999, display: 'inline-flex', gap: 8,
            }}>
              <Icon name="loader" size={13} /> Testing expected to begin November 2026
            </span>
          </div>

          {/* Timeline */}
          <ol style={{
            listStyle: 'none', margin: 0, padding: 0, borderTop: '1px solid var(--navy-600)',
          }}>
            {TIMELINE.map(([label, date, done], i) => (
              <li key={i} style={{
                display: 'flex', alignItems: 'center', gap: 18,
                padding: '15px 4px', borderBottom: '1px solid var(--navy-600)',
              }}>
                <span style={{
                  width: 24, height: 24, borderRadius: 999, flexShrink: 0,
                  display: 'grid', placeItems: 'center',
                  background: done ? 'var(--teal-500)' : 'transparent',
                  border: done ? 'none' : '1.5px solid var(--navy-400)',
                  color: '#fff',
                }}>
                  {done ? <Icon name="check" size={14} /> : <span style={{ width: 6, height: 6, borderRadius: 999, background: 'var(--navy-400)' }}></span>}
                </span>
                <span style={{ font: '500 15px/1.3 var(--font-sans)', color: done ? '#fff' : 'var(--fg-on-dark-2)', flex: 1 }}>{label}</span>
                <span style={{ font: '500 13px/1 var(--font-mono)', color: done ? 'var(--teal-300)' : 'var(--fg-on-dark-3)', whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' }}>{date}</span>
              </li>
            ))}
          </ol>
        </div>

        <p style={{
          font: 'var(--t-small)', color: 'var(--fg-on-dark-3)', marginTop: 28, maxWidth: 720,
          borderLeft: '2px solid var(--navy-500)', paddingLeft: 14,
        }}>
          TaxTrail is not yet certified by the Canada Revenue Agency. NETFILE certification is in
          progress for tax year 2026 and is expected to be complete in advance of the 2027 filing season.
        </p>
      </Container>
    </Section>
  );
}

window.Certification = Certification;
