function SpecRow({ k, v }) {
  const [hover, setHover] = React.useState(false);
  return (
    <div onMouseEnter={()=>setHover(true)} onMouseLeave={()=>setHover(false)}
         style={{
           display:'flex', justifyContent:'space-between',
           padding:'18px 0 18px 18px',
           borderTop:'1px solid rgba(249,250,251,0.10)',
           font:'400 16px/1 var(--rz-font-mono)',
           position:'relative', cursor:'default',
           transform: hover ? 'translateX(4px)' : 'translateX(0)',
           transition:'transform 320ms cubic-bezier(.22,1,.36,1)'
         }}>
      <span style={{
        position:'absolute', left:0, top:'50%', width:3, height:14,
        marginTop:-7, background:'#f73f34',
        transform: hover ? 'scaleY(1)' : 'scaleY(0)',
        transition:'transform 320ms cubic-bezier(.22,1,.36,1)'
      }}/>
      <span style={{ color: hover ? '#F9FAFB' : '#9aa0a6', transition:'color 280ms ease', flexShrink:0, paddingRight:16 }}>{k}</span>
      <span style={{ textAlign:'right' }}>{v}</span>
    </div>
  );
}

function SpecTable() {
  const rows = [
    ['Deployment', 'Q4/2026 prototype'],
    ['Units per system', '6'],
    ['Resurface time', '5 min / lap'],
    ['Status', 'Pre-production'],
    ['Application', 'Autonomous Ice Resurfacing'],
    ['Autonomy', 'Fully autonomous']
  ];
  return (
    <section style={{ background:'#25282C', color:'#F9FAFB', padding:'140px 56px' }}>
      <div style={{ font:'400 12px/1 var(--rz-font-mono)', color:'#9aa0a6', letterSpacing:'0.16em', marginBottom:24 }}><span className="rz-accent-dot"/>04 / SPECIFICATION</div>
      <div className="rz-spec-heading" style={{ font:'700 64px/1 var(--rz-font-display)', marginBottom:48, letterSpacing:'-0.02em' }}>Rayzor V1.</div>
      <div className="rz-spec-grid" style={{ display:'grid', gridTemplateColumns:'1fr 1fr', columnGap:80 }}>
        {[0,1].map(col => (
          <div key={col}>
            {rows.slice(col*3, col*3+3).map(([k,v]) => (
              <SpecRow key={k} k={k} v={v}/>
            ))}
          </div>
        ))}
      </div>
    </section>
  );
}

function HazardDivider() {
  return <div style={{ height:96, background:'#25282C', backgroundImage:'repeating-linear-gradient(45deg,#25282C 0 50px,#2F3338 50px 100px)' }}/>;
}
window.SpecTable = SpecTable;
window.HazardDivider = HazardDivider;
