(()=>{
const NX=window.NURVEXAIDesignSystem_4750bb;const {Stage,Plane,Sk,useTick,useInView,scrollToId}=window.NXH;const {useRef,useState,useEffect}=React;
const CAPS={
  web:null,app:null,
  agents:['Customer support agents','Lead qualification','Knowledge assistants','Booking + scheduling','CRM actions','Website + WhatsApp chat'],
  voice:['Inbound call handling','Appointment booking','Lead qualification','Call routing','Follow-up calls','CRM call logging'],
  auto:['Lead routing','CRM automation','Email + WhatsApp follow-up','Data sync','Reporting','Internal workflows']
};
const Chip=({on,children})=><span className={'v-chip'+(on?' on':'')}>{children}</span>;
function WebViz(){return <Stage rx={8} ry={-22}>
  <Plane z={-150} x={-70} y={-50} w={420} h={270} className="pl-card pl-dim"><div className="v-pad"><span className="v-lab">Sitemap</span><div className="v-map">{[...Array(8)].map((_,i)=><i key={i}></i>)}</div></div></Plane>
  <Plane w={460} h={300} className="pl-card"><div className="v-bar"><i></i><i></i><i></i><span>yourbusiness.com</span></div><div className="v-pad"><Sk w="64%" h={14}/><Sk w="42%" h={14} style={{marginTop:8}}/><Sk w="78%" style={{marginTop:18}}/><Sk w="66%" style={{marginTop:8}}/><span className="v-btn">Book now →</span><div className="v-row3"><i></i><i></i><i></i></div></div></Plane>
  <Plane z={130} x={220} y={50} w={130} h={240} className="pl-card pl-lit"><div className="v-pad" style={{padding:14,display:'flex',flexDirection:'column',gap:8}}><Sk w="40%" h={4} style={{margin:'0 auto 6px'}}/><i style={{height:70,display:'block',background:'linear-gradient(160deg,rgba(22,140,255,.35),rgba(108,99,255,.15))'}}></i><Sk w="80%"/><Sk w="60%"/><Sk b w="100%" h={22} style={{marginTop:'auto'}}/></div></Plane>
  <Plane z={210} x={-230} y={-150}><Chip on>Responsive ✓</Chip></Plane>
  <Plane z={170} x={-200} y={175}><Chip>Booking flow ✓</Chip></Plane>
</Stage>}
function AppViz(){return <Stage rx={10} ry={20}>
  <Plane z={-90} x={-40} w={480} h={310} className="pl-card"><div style={{display:'grid',gridTemplateColumns:'64px 1fr',height:'100%'}}><div style={{borderRight:'1px solid var(--border-default)',padding:14,display:'flex',flexDirection:'column',gap:12}}>{[1,0,0,0,0].map((b,i)=><Sk key={i} b={b} h={8}/>)}</div>
    <div className="v-pad"><span className="v-lab b">Dashboard</span><div style={{display:'grid',gridTemplateColumns:'repeat(3,1fr)',gap:10,marginTop:14}}>{[0,1,2].map(i=><div key={i} style={{border:'1px solid var(--border-strong)',padding:10}}><Sk w="50%"/><Sk w="80%" h={12} style={{marginTop:8}} b={i===0}/></div>)}</div>
    <svg viewBox="0 0 300 90" style={{width:'100%',height:110,marginTop:14}}><polyline points="0,70 40,62 80,66 120,44 160,50 200,30 240,34 300,12" fill="none" stroke="#4DB8FF" strokeWidth="1.5"/><polyline points="0,80 60,76 120,70 180,72 240,60 300,54" fill="none" stroke="rgba(167,162,255,.6)" strokeWidth="1" strokeDasharray="3 4"/></svg></div></div></Plane>
  <Plane z={120} x={190} y={30} w={170} h={330} className="pl-card pl-lit"><div className="v-pad" style={{padding:14,display:'flex',flexDirection:'column',gap:10,height:'100%',boxSizing:'border-box'}}><span className="v-lab b">Today</span>
    {[0,1,2,3].map(i=><div key={i} style={{display:'flex',alignItems:'center',gap:8,padding:'8px 0',borderBottom:'1px solid var(--border-default)'}}><i style={{width:22,height:22,background:i?'rgba(255,255,255,.06)':'rgba(22,140,255,.4)'}}></i><div style={{flex:1}}><Sk w="80%"/><Sk w="50%" h={4} style={{marginTop:5}}/></div><i style={{width:20,height:10,borderRadius:6,background:i%2?'rgba(255,255,255,.12)':'var(--nx-blue-500)'}}></i></div>)}
    <div style={{marginTop:'auto',display:'flex',justifyContent:'space-around'}}>{[1,0,0,0].map((b,i)=><Sk key={i} b={b} w={18} h={4}/>)}</div></div></Plane>
  <Plane z={200} x={-250} y={-150}><Chip on>Web + mobile</Chip></Plane>
</Stage>}
function AgentsViz(){const r=useRef();const on=useInView(r);const t=useTick(1400,on);return <div ref={r}><Stage rx={8} ry={-18}>
  <Plane z={-40} x={-70} w={400} h={340} className="pl-card"><div className="v-pad" style={{display:'flex',flexDirection:'column',gap:10}}><div style={{display:'flex',justifyContent:'space-between'}}><span className="v-lab b">AI agent</span><span className="v-lab">Demonstration</span></div>
    <NX.ChatMessage role="ai">Hi, I can check an order, answer a question or book a consultation.</NX.ChatMessage>
    <NX.ChatMessage role="user">I need to move Friday's appointment.</NX.ChatMessage>
    {t%5>1?<NX.ChatMessage role="ai">Done. You're booked for Monday at 10:00 and a confirmation is on its way.</NX.ChatMessage>:<NX.ChatMessage role="ai" typing/>}</div></Plane>
  <Plane z={130} x={230} y={10} className="pl-card pl-lit" style={{padding:16}}><NX.WorkflowFlow direction="vertical" compact steps={window.NX_DATA.services[2].flow} activeIndex={t%5}/></Plane>
</Stage></div>}
function VoiceViz(){const r=useRef();const on=useInView(r);const t=useTick(1100,on);const n=t%8;return <div ref={r}><Stage rx={8} ry={18}>
  <Plane z={-180} w={10} h={10}><i className="v-ring"></i><i className="v-ring" style={{animationDelay:'1.2s'}}></i><i className="v-ring" style={{animationDelay:'2.4s'}}></i></Plane>
  <Plane w={360} h={360} className="pl-card pl-lit"><div className="v-pad" style={{display:'flex',flexDirection:'column',gap:14,height:'100%',boxSizing:'border-box'}}>
    <div style={{display:'flex',justifyContent:'space-between'}}><NX.Badge tone="online" dot pulse>Live call</NX.Badge><span className="v-lab">00:{String(12+n*3).padStart(2,'0')}</span></div>
    <div style={{fontFamily:'var(--font-display)',fontWeight:700,fontSize:24,textTransform:'uppercase'}}>AI receptionist</div>
    <NX.Waveform active bars={36} height={64}/>
    <div style={{fontSize:13,lineHeight:1.5,color:'var(--text-secondary)',marginTop:'auto'}}><span className="v-lab b" style={{display:'block',marginBottom:6}}>Transcript</span>{n<4?'"Good afternoon, how can I help you today?"':'"Thursday at 15:00 is booked. You will get a text confirmation."'}</div>
    <span className="v-lab">Demonstration</span></div></Plane>
  <Plane z={140} x={-240} y={90} w={220} className="pl-card" style={{padding:16}}><span className="v-lab b">Actions</span><div className="v-log">{['Intent: booking','Calendar checked','Appointment booked','CRM updated'].slice(0,Math.max(1,n-2)).map(s=><span key={s}><b>✓</b>{s}</span>)}</div></Plane>
</Stage></div>}
function AutoViz(){const r=useRef();const on=useInView(r);const t=useTick(900,on);const steps=window.NX_DATA.services[4].flow;const a=t%(steps.length+2);return <div ref={r}><Stage rx={14} ry={-14}>
  <Plane z={-120} x={-170} y={-150}><Chip on>Trigger — new lead</Chip></Plane>
  <Plane w={560} className="pl-card" style={{padding:22}}><span className="v-lab b" style={{display:'block',marginBottom:16}}>Workflow — lead to sales</span><NX.WorkflowFlow compact steps={steps} activeIndex={Math.min(a,steps.length-1)}/></Plane>
  <Plane z={140} x={190} y={170} w={240} className="pl-card pl-lit" style={{padding:16}}><span className="v-lab">Run log</span><div className="v-log">{steps.slice(0,Math.min(a+1,steps.length)).slice(-3).map(s=><span key={s+a}><b>✓</b>{s}</span>)}</div></Plane>
</Stage></div>}
const VIZ={web:WebViz,app:AppViz,agents:AgentsViz,voice:VoiceViz,auto:AutoViz};window.NXViz=VIZ;
function Services({onCta,page}){
  const S=window.NX_DATA.services;const [act,setAct]=useState(S[0].id);
  useEffect(()=>{const io=new IntersectionObserver(es=>es.forEach(e=>{if(e.isIntersecting)setAct(e.target.dataset.id)}),{rootMargin:'-45% 0px -45% 0px'});
    document.querySelectorAll('.svc').forEach(el=>io.observe(el));return()=>io.disconnect()},[]);
  return <section className="sec" id="services" data-screen-label="Services" style={{paddingBottom:0,paddingTop:page?0:undefined}}><div className="wrap">
    {page?null:<div className="rv"><NX.SectionHeader index="02" label="Services" size="h1" title={['One technology partner.',<span style={{color:'var(--nx-blue-400)'}}>Multiple possibilities.</span>]}/></div>}
    <div style={{marginTop:32}}>
      <div>{S.map((s,i)=>{const V=VIZ[s.id];const items=s.items||CAPS[s.id];return <article key={s.id} id={'svc-'+s.id} data-id={s.id} className={'svc'+(i%2?' rev':'')} data-screen-label={'02.'+(i+1)+' '+s.name}>
        <div className="svc-copy">
          <div className="nx-label rv">{s.n} / 05 — {s.name}</div>
          <h3 className="svc-h rv">{s.headline.map((l,k)=><span key={k}>{l}</span>)}</h3>
          <p className="svc-d rv">{s.desc}</p>
          <div className="svc-tags rv">{items.map(x=><NX.Tag key={x}>{x}</NX.Tag>)}</div>
          <div className="rv"><NX.Button variant="secondary" iconRight="→" onClick={onCta}>{s.cta}</NX.Button></div>
        </div>
        <div className="rv" style={{transitionDelay:'150ms'}}><V/></div>
      </article>})}</div>
    </div></div></section>;
}
window.NXServices=Services;
})();
