// nda-panels.jsx — WorksPanel · ServicesPanel · ProcessPanel · AboutPanel · ResultsPanel · FAQPanel · StackPanel · ContactPanel · PanelFooter
const { useState, useRef, useEffect } = React;

/* ── Works Panel ───────────────────────────────────────────────────── */
const WORKS = [
{ name: 'Lume Clinic', tags: 'Web Design · Branding', role: 'Design Lead', platform: 'Mockup', live: true, href: 'https://lumi-clinic.netlify.app/', color: '#1a1727' },
{ name: 'Maison Aesthetic', tags: 'Web Design', role: 'Design Lead', platform: 'Mockup', live: true, href: 'https://maison-aesthetic.netlify.app/', color: '#1c1421' },
{ name: 'Kuro Clinic', tags: 'Web Design', role: 'Design Lead', platform: 'Mockup', live: true, href: 'https://kuro-clinic.netlify.app/', color: '#111623' },
{ name: 'Elevate IV SF', tags: 'Web Design', role: 'VA · Web Build', platform: 'Squarespace', live: true, href: 'https://www.elevateivsf.com/', color: '#0f1a1c' },
{ name: 'Leary Law Offices', tags: 'Web Maintenance', role: 'VA · Web Support', platform: 'Squarespace', live: true, href: 'https://learylawoffices.com/', color: '#12141a' },
{ name: 'Stanley Keleman', tags: 'Web Support', role: 'VA · Web Support', platform: 'Squarespace', live: true, href: 'https://www.stanleykeleman.com/', color: '#151210' },
{ name: 'Youth Experience Sponsorship', tags: 'Web Design', role: 'Web Build', platform: 'WordPress', live: true, href: 'https://youthexperiencesponsorship.org/', color: '#1a1520' },
{ name: 'Coming Soon', tags: 'Automation', role: '', platform: '', live: false, href: undefined, color: '#111018' },
{ name: 'Coming Soon', tags: 'Full System', role: '', platform: '', live: false, href: undefined, color: '#111018' }];


function WorksPanel() {
  const { SlidePanel, TextRoll } = window;
  return (
    <SlidePanel
      eyebrow="Selected Work · 2025–2026"
      title={<>What we've <em>built</em>.</>}
      num="02">
      
      <ul style={{ listStyle: 'none' }}>
        {WORKS.map((w, i) =>
        <li key={i} style={{ opacity: w.live ? 1 : .45 }}>
            <a
            href={w.live ? w.href : undefined}
            target={w.live && w.href !== '#' ? '_blank' : undefined}
            rel={w.live && w.href !== '#' ? 'noopener noreferrer' : undefined}
            onClick={!w.live ? (e) => e.preventDefault() : undefined}
            style={{
              display: 'grid', gridTemplateColumns: '2.5rem 2.5rem 1fr auto auto auto auto',
              alignItems: 'center', gap: '0 1.25rem',
              padding: '.9rem .75rem',
              borderTop: '1px solid var(--border)',
              textDecoration: 'none', transition: 'background .2s', cursor: w.live ? 'pointer' : 'default'
            }}
            onMouseEnter={w.live ? (e) => e.currentTarget.style.background = 'rgba(28,26,39,.8)' : null}
            onMouseLeave={w.live ? (e) => e.currentTarget.style.background = '' : null}
            aria-label={w.live ? `View ${w.name} project` : `${w.name} coming soon`}>
            
              <span style={{ display: 'block', width: '2.5rem', height: '1.5rem', background: w.color, border: '1px solid var(--border)', flexShrink: 0 }} aria-hidden="true" />
              <span style={{ fontSize: '.6875rem', color: 'var(--muted)', fontFamily: 'monospace', letterSpacing: '.05em' }}>{String(i + 1).padStart(2, '0')}</span>
              <span style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.25rem,2.5vw,1.875rem)', fontWeight: 300, color: w.live ? 'var(--cream)' : 'var(--muted)', fontStyle: w.live ? 'normal' : 'italic', overflow: 'hidden' }}>
                {w.live ? <TextRoll>{w.name}</TextRoll> : w.name}
              </span>
              <span style={{ fontSize: '.585rem', letterSpacing: '.18em', textTransform: 'uppercase', color: 'var(--muted)', display: 'none' }} className="work-tag-resp">{w.tags}</span>
              {w.role && <span className="work-role-badge">{w.role}</span>}
              <span style={{ fontSize: '.6875rem', color: 'var(--muted)', fontFamily: 'monospace', letterSpacing: '.06em', whiteSpace: 'nowrap' }}>{w.platform}</span>
              <span style={{ fontSize: '.8rem', color: 'var(--violet)', opacity: w.live ? 1 : 0 }} aria-hidden="true">↗</span>
            </a>
          </li>
        )}
        <li style={{ borderTop: '1px solid var(--border)' }} />
      </ul>
    </SlidePanel>);

}

/* ── Services Panel ────────────────────────────────────────────────── */
const SERVICES = [
{ num: '01', title: 'Brand Design', body: 'Visual identity systems built for aesthetic practices. Logos, color, typography, and the premium look that converts.', tags: ['Logo Design', 'Color System', 'Brand Guide'] },
{ num: '02', title: 'Websites', body: 'Conversion-focused sites that load fast and turn visitors into booked appointments. Squarespace and custom HTML/CSS.', tags: ['Squarespace', 'Custom HTML/CSS', 'Mobile-First'] },
{ num: '03', title: 'Automation', body: 'Lead capture, follow-up sequences, booking systems, and intake flows that keep your clinic running without manual work.', tags: ['Make.com', 'n8n', 'Booking Systems'] },
{ num: '04', title: 'Systems', body: 'Forms, CRMs, calendars, and email tools wired together so nothing falls through the cracks in a clinical setting.', tags: ['CRM Setup', 'Calendar Sync', 'Intake Forms'] }];


function ServicesPanel() {
  const { SlidePanel } = window;
  return (
    <SlidePanel
      eyebrow="Services / What We Do"
      title={<>Four skills. <em>One studio.</em></>}
      num="03">
      
      <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1px', background: 'var(--border)' }}>
        {SERVICES.map((s) =>
        <div key={s.num}
        style={{ background: 'var(--surface)', padding: '1.5rem 1.5rem 1.25rem', display: 'flex', flexDirection: 'column', gap: '.625rem', transition: 'background .25s', cursor: 'default' }}
        onMouseEnter={(e) => e.currentTarget.style.background = 'rgba(12,11,18,.8)'}
        onMouseLeave={(e) => e.currentTarget.style.background = 'var(--surface)'}>
          
            <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
              <span style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.25rem,2vw,1.75rem)', fontWeight: 300, color: 'var(--cream)' }}>{s.title}</span>
              <span style={{ fontSize: '.55rem', letterSpacing: '.2em', color: 'rgba(107,107,120,.35)', fontFamily: 'monospace' }}>{s.num}</span>
            </div>
            <p style={{ fontSize: '.75rem', lineHeight: 1.65, color: 'var(--muted)' }}>{s.body}</p>
            <div style={{ display: 'flex', flexWrap: 'wrap', gap: '.3rem', marginTop: 'auto' }}>
              {s.tags.map((t) => <span key={t} style={{ padding: '.2rem .55rem', border: '1px solid var(--border)', fontSize: '.55rem', letterSpacing: '.12em', textTransform: 'uppercase', color: 'var(--muted)' }}>{t}</span>)}
            </div>
          </div>
        )}
      </div>
    </SlidePanel>);

}

/* ── Process Panel ─────────────────────────────────────────────────── */
const PROCESS = [
  { id: 1, num: '01', tag: 'Discovery', title: 'Understand your practice', body: 'Deep-dive call to map your clinic, clients, and lead losses. No templates. Just a clear picture of what needs building.' },
  { id: 2, num: '02', tag: 'Design',    title: 'Build the visual system',  body: 'Brand and website designed to match the caliber of your practice. From type scale to booking flow.' },
  { id: 3, num: '03', tag: 'Build',     title: 'Develop and automate',     body: 'Dev and automation run in parallel. Site goes live while the backend gets built. CRM, follow-ups, and booking wired up automatically.' },
  { id: 4, num: '04', tag: 'Launch',    title: 'Go live and hand off',     body: 'QA, performance check, and launch. Full docs, training, and 30 days of support. Nothing gets lost post-handoff.' },
];

function ProcessIcon({ tag }) {
  const s = 'var(--cream)', a = 'var(--violet)', sw = '1.8';
  const b = { fill: 'none', strokeLinecap: 'round', strokeLinejoin: 'round' };
  if (tag === 'Discovery') return (
    <svg width="20" height="20" viewBox="0 0 24 24" {...b} stroke={s} strokeWidth={sw}>
      <circle cx="12" cy="12" r="9"/>
      <circle cx="12" cy="12" r="4.5"/>
      <circle cx="12" cy="12" r="1.5" fill={a} stroke={a}/>
      <line x1="12" y1="3" x2="12" y2="7.5" stroke={a} strokeWidth={sw}/>
      <line x1="12" y1="16.5" x2="12" y2="21" stroke={a} strokeWidth={sw}/>
      <line x1="3" y1="12" x2="7.5" y2="12" stroke={a} strokeWidth={sw}/>
      <line x1="16.5" y1="12" x2="21" y2="12" stroke={a} strokeWidth={sw}/>
    </svg>
  );
  if (tag === 'Design') return (
    <svg width="20" height="20" viewBox="0 0 24 24" {...b} stroke={s} strokeWidth={sw}>
      <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/>
      <line x1="2" y1="22" x2="12" y2="22" stroke={a} strokeWidth="2.2"/>
    </svg>
  );
  if (tag === 'Build') return (
    <svg width="20" height="20" viewBox="0 0 24 24" {...b} stroke={s} strokeWidth={sw}>
      <polyline points="16 18 22 12 16 6"/>
      <polyline points="8 6 2 12 8 18"/>
      <line x1="12" y1="5" x2="12" y2="19" stroke={a} strokeWidth="2.2"/>
    </svg>
  );
  if (tag === 'Launch') return (
    <svg width="20" height="20" viewBox="0 0 24 24" {...b} stroke={s} strokeWidth={sw}>
      <polygon points="22 2 15 22 11 13 2 9 22 2"/>
      <line x1="22" y1="2" x2="11" y2="13" stroke={a} strokeWidth="2.2"/>
    </svg>
  );
  return null;
}

function ProcessPanel() {
  const { SlidePanel } = window;
  const [activeId, setActiveId] = useState(1);
  const [rotAngle, setRotAngle] = useState(0);
  const [autoRot, setAutoRot] = useState(true);
  const timerRef = useRef(null);

  const activeStep = PROCESS.find(s => s.id === activeId);

  useEffect(() => {
    clearInterval(timerRef.current);
    if (!autoRot) return;
    timerRef.current = setInterval(() => {
      setRotAngle(prev => (prev + 0.25) % 360);
    }, 50);
    return () => clearInterval(timerRef.current);
  }, [autoRot]);

  const getPos = (index, total) => {
    const angle = ((index / total) * 360 + rotAngle) % 360;
    const rad = (angle * Math.PI) / 180;
    const R = 118;
    return {
      x: R * Math.cos(rad),
      y: R * Math.sin(rad),
      zIndex: Math.round(100 + 50 * Math.cos(rad)),
      opacity: Math.max(0.42, Math.min(1, 0.42 + 0.58 * ((1 + Math.sin(rad)) / 2))),
    };
  };

  const pick = (id) => { setActiveId(id); setAutoRot(false); };
  const resume = () => setAutoRot(true);

  return (
    <SlidePanel eyebrow="How We Work" title={<>The <em>process</em>.</>} num="05">
      <style>{`
        @keyframes proc-pulse { 0%,100%{opacity:.9} 50%{opacity:.4} }
        @keyframes proc-ping  { 75%,100%{transform:scale(2.4);opacity:0} }
        @keyframes proc-in    { from{opacity:0;transform:translateY(7px)} to{opacity:1;transform:translateY(0)} }
        .p-pulse { animation: proc-pulse 2.8s cubic-bezier(.4,0,.6,1) infinite; }
        .p-ping  { animation: proc-ping 1.9s cubic-bezier(0,0,.2,1) infinite; }
        .p-ping2 { animation: proc-ping 1.9s cubic-bezier(0,0,.2,1) infinite .72s; }
        .p-in    { animation: proc-in .32s ease both; }
        @media (max-width: 640px) {
          .proc-grid { grid-template-columns: 1fr !important; }
          .proc-orbit { width: 270px !important; height: 270px !important; margin: 0 auto; }
        }
      `}</style>

      <div className="proc-grid" style={{ display: 'grid', gridTemplateColumns: '300px 1fr', gap: '2.5rem', alignItems: 'center', minHeight: '310px' }}>

        {/* ── Orbit canvas ── */}
        <div className="proc-orbit" style={{ position: 'relative', width: '300px', height: '300px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>

          {/* Orbit ring */}
          <div style={{ position: 'absolute', width: '236px', height: '236px', borderRadius: '50%', border: '1px solid rgba(255,255,255,.07)', pointerEvents: 'none' }} />

          {/* Center orb — click to resume */}
          <div className="p-pulse" onClick={resume} title="Resume rotation"
            style={{ position: 'relative', zIndex: 10, width: '46px', height: '46px', borderRadius: '50%', cursor: 'pointer',
              background: 'radial-gradient(circle, rgba(192,132,252,.58) 0%, rgba(192,132,252,.14) 62%, transparent 100%)',
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              boxShadow: '0 0 28px rgba(192,132,252,.18)' }}>
            <div className="p-ping"  style={{ position: 'absolute', inset: 0,      borderRadius: '50%', border: '1px solid rgba(192,132,252,.22)', pointerEvents: 'none' }} />
            <div className="p-ping2" style={{ position: 'absolute', inset: '-12px', borderRadius: '50%', border: '1px solid rgba(192,132,252,.1)',  pointerEvents: 'none' }} />
            <div style={{ width: '18px', height: '18px', borderRadius: '50%', background: 'rgba(192,132,252,.75)' }} />
          </div>

          {/* Nodes */}
          {PROCESS.map((step, i) => {
            const pos = getPos(i, PROCESS.length);
            const on = activeId === step.id;
            return (
              <div key={step.id} onClick={() => pick(step.id)}
                style={{ position: 'absolute', top: 'calc(50% - 24px)', left: 'calc(50% - 24px)',
                  transform: `translate(${pos.x}px, ${pos.y}px)`,
                  zIndex: on ? 200 : pos.zIndex, opacity: on ? 1 : pos.opacity,
                  transition: 'opacity .25s', cursor: 'pointer',
                  display: 'flex', flexDirection: 'column', alignItems: 'center' }}>

                <div style={{ width: '48px', height: '48px', borderRadius: '50%',
                  display: 'flex', alignItems: 'center', justifyContent: 'center',
                  background: on ? 'rgba(192,132,252,.14)' : 'rgba(17,16,24,.95)',
                  border: `1.5px solid ${on ? 'rgba(192,132,252,.55)' : 'rgba(255,255,255,.18)'}`,
                  boxShadow: on ? '0 0 20px rgba(192,132,252,.18), inset 0 0 10px rgba(192,132,252,.06)' : 'none',
                  transform: on ? 'scale(1.18)' : 'scale(1)', transition: 'all .3s' }}>
                  <ProcessIcon tag={step.tag} />
                </div>

                <div style={{ marginTop: '.42rem', fontSize: '.5rem', letterSpacing: '.14em', textTransform: 'uppercase',
                  fontFamily: 'monospace', whiteSpace: 'nowrap', transition: 'color .3s',
                  color: on ? 'var(--cream)' : 'rgba(107,107,120,.65)', fontWeight: on ? 600 : 400 }}>
                  {step.tag}
                </div>
              </div>
            );
          })}
        </div>

        {/* ── Step info ── */}
        {activeStep && (
          <div key={activeStep.id} className="p-in" style={{ display: 'flex', flexDirection: 'column', gap: '.75rem' }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: '.75rem' }}>
              <span style={{ width: '1.25rem', height: '1px', background: 'rgba(192,132,252,.4)', flexShrink: 0 }} />
              <span style={{ fontSize: '.52rem', letterSpacing: '.2em', textTransform: 'uppercase', fontFamily: 'monospace', color: 'var(--violet)' }}>{activeStep.num}</span>
              <span style={{ fontSize: '.52rem', letterSpacing: '.2em', textTransform: 'uppercase', fontFamily: 'monospace', color: 'var(--muted)' }}>{activeStep.tag}</span>
            </div>
            <div style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.3rem,2.2vw,1.9rem)', fontWeight: 300, color: 'var(--cream)', lineHeight: 1.25 }}>
              {activeStep.title}
            </div>
            <p style={{ fontSize: '.76rem', lineHeight: 1.75, color: 'var(--muted)', maxWidth: '300px' }}>{activeStep.body}</p>

            {/* Step dots */}
            <div style={{ display: 'flex', gap: '.45rem', marginTop: '.2rem' }}>
              {PROCESS.map(s => (
                <button key={s.id} onClick={() => pick(s.id)} aria-label={s.tag}
                  style={{ height: '3px', border: 'none', cursor: 'pointer', padding: 0, borderRadius: '2px',
                    width: s.id === activeId ? '32px' : '20px',
                    background: s.id === activeId ? 'var(--violet)' : 'rgba(255,255,255,.12)',
                    transition: 'all .3s' }} />
              ))}
            </div>
            <p style={{ fontSize: '.5rem', letterSpacing: '.1em', color: 'rgba(107,107,120,.45)', fontFamily: 'monospace', marginTop: '.1rem' }}>
              {autoRot ? '◉ AUTO-ROTATING' : '◎ PAUSED · CLICK ORB TO RESUME'}
            </p>
          </div>
        )}
      </div>
    </SlidePanel>
  );
}

/* ── Results Panel (About + Proof) ────────────────────────────────── */
const GRAPH_PTS = [3, 4, 4, 6, 9, 8, 12, 16, 14, 20, 25, 29, 36];

function MiniGraph() {
  const max = Math.max(...GRAPH_PTS);
  const W = 360,H = 80;
  const pts = GRAPH_PTS.map((v, i) => ({ x: i / (GRAPH_PTS.length - 1) * W, y: H - 6 - v / max * (H - 16) }));
  let d = `M ${pts[0].x} ${pts[0].y}`;
  for (let i = 1; i < pts.length; i++) {const cx = (pts[i - 1].x + pts[i].x) / 2;d += ` C ${cx} ${pts[i - 1].y} ${cx} ${pts[i].y} ${pts[i].x} ${pts[i].y}`;}
  const last = pts[pts.length - 1];
  return (
    <svg viewBox={`0 0 ${W} ${H}`} style={{ width: '100%', height: '80px', display: 'block' }} preserveAspectRatio="none" aria-hidden="true">
      <defs>
        <linearGradient id="mg" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="var(--violet)" stopOpacity=".18" />
          <stop offset="100%" stopColor="var(--violet)" stopOpacity="0" />
        </linearGradient>
      </defs>
      <path d={`${d} L ${W} ${H} L 0 ${H} Z`} fill="url(#mg)" />
      <path d={d} stroke="var(--violet)" strokeWidth="1.6" fill="none" strokeLinecap="round" />
      <circle cx={last.x} cy={last.y} r="3" fill="var(--violet)" />
      <circle cx={last.x} cy={last.y} r="5.5" fill="none" stroke="var(--violet)" strokeWidth=".8" opacity=".4" />
    </svg>);

}

function ResultsPanel() {
  const { SlidePanel } = window;
  const circ = 2 * Math.PI * 18;
  const scores = [['Performance', 100], ['Accessibility', 100], ['Best Practices', 100], ['SEO', 100]];
  return (
    <SlidePanel
      eyebrow="Why It Works"
      title={<>Built for <em>wellness</em>, by design.</>}
      num="04">
      
      <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1px', background: 'var(--border)' }}>
        {/* Left: studio story + stats */}
        <div style={{ background: 'var(--bg)', padding: '1.5rem', display: 'flex', flexDirection: 'column', gap: '1.25rem' }}>
          <p style={{ fontSize: '.8125rem', lineHeight: 1.7, color: 'var(--muted)' }}>
            LIWAN is a boutique studio working exclusively with wellness brands. Medspas, IV clinics, functional medicine, aesthetic practices. One lane. Deep pattern recognition.
          </p>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: '1rem' }}>
            {[['12+', 'Projects'], ['100%', 'Wellness'], ['2026', 'Founded']].map(([v, l]) =>
            <div key={l} style={{ borderTop: '1px solid var(--border)', paddingTop: '.75rem' }}>
                <div style={{ fontFamily: 'var(--display-font)', fontSize: '1.6rem', fontWeight: 300, color: 'var(--cream)' }}>{v}</div>
                <div style={{ fontSize: '.55rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--muted)', marginTop: '.25rem' }}>{l}</div>
              </div>
            )}
          </div>
          <div style={{ marginTop: 'auto' }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: '.5rem', marginBottom: '.5rem' }}>
              <span style={{ display: 'inline-block', width: '.35rem', height: '.35rem', borderRadius: '50%', background: 'var(--violet)' }} />
              <span style={{ fontSize: '.585rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--muted)', fontFamily: 'monospace' }}>Client lead growth after launch</span>
              <span style={{ marginLeft: 'auto', fontSize: '.7rem', fontWeight: 700, color: 'var(--violet)', letterSpacing: '.05em', padding: '.15rem .45rem', border: '1px solid rgba(192,132,252,.25)', background: 'rgba(192,132,252,.08)' }}>+210%</span>
            </div>
            <MiniGraph />
          </div>
        </div>
        {/* Right: lighthouse rings + key metrics */}
        <div style={{ background: 'var(--bg)', padding: '1.5rem', display: 'flex', flexDirection: 'column', gap: '1.25rem' }}>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '.75rem' }}>
            <div style={{ border: '1px solid var(--border)', padding: '.875rem', textAlign: 'center' }}>
              <div style={{ fontFamily: 'var(--display-font)', fontSize: '2rem', fontWeight: 300, color: 'var(--cream)' }}>3×</div>
              <div style={{ fontSize: '.6rem', letterSpacing: '.15em', textTransform: 'uppercase', color: 'var(--muted)', marginTop: '.25rem' }}>Consultation requests</div>
            </div>
            <div style={{ border: '1px solid var(--border)', padding: '.875rem', textAlign: 'center' }}>
              <div style={{ fontFamily: 'var(--display-font)', fontSize: '2rem', fontWeight: 300, color: 'var(--cream)' }}>48h</div>
              <div style={{ fontSize: '.6rem', letterSpacing: '.15em', textTransform: 'uppercase', color: 'var(--muted)', marginTop: '.25rem' }}>Time to first lead</div>
            </div>
          </div>
          <div style={{ display: 'flex', alignItems: 'center', gap: '.5rem' }}>
            <span style={{ display: 'inline-block', width: '.35rem', height: '.35rem', borderRadius: '50%', background: 'var(--violet)' }} />
            <span style={{ fontSize: '.585rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--muted)', fontFamily: 'monospace' }}>Google Lighthouse. Live.</span>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4,1fr)', gap: '.5rem' }}>
            {scores.map(([name, val]) => {
              const dash = val / 100 * circ;
              return (
                <div key={name} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '.4rem' }}>
                  <div style={{ position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                    <svg width="52" height="52" viewBox="0 0 44 44" aria-label={`${name}: ${val}`}>
                      <circle cx="22" cy="22" r="18" fill="none" stroke="rgba(192,132,252,.12)" strokeWidth="3" />
                      <circle cx="22" cy="22" r="18" fill="none" stroke="var(--violet)" strokeWidth="3"
                      strokeDasharray={`${dash} ${circ - dash}`} strokeLinecap="round" transform="rotate(-90 22 22)" />
                    </svg>
                    <span style={{ position: 'absolute', fontSize: '.62rem', fontWeight: 700, color: 'var(--cream)' }}>{val}</span>
                  </div>
                  <span style={{ fontSize: '.5rem', textTransform: 'uppercase', letterSpacing: '.06em', color: 'var(--muted)', textAlign: 'center', lineHeight: 1.3 }}>{name}</span>
                </div>);

            })}
          </div>
        </div>
      </div>
    </SlidePanel>);

}

/* ── Contact Panel ─────────────────────────────────────────────────── */
function ContactPanel() {
  const { SlidePanel, ShinyBtn } = window;
  const [sent, setSent] = useState(false);
  const [sending, setSending] = useState(false);
  const [sendError, setSendError] = useState(false);
  const [form, setForm] = useState({ name: '', email: '', practice: '', practiceType: '', hasWebsite: '', platform: '', needs: [], message: '', consent: false });
  const set = (k, v) => setForm((p) => ({ ...p, [k]: v }));

  const submitForm = async (e) => {
    e.preventDefault();
    if (sending) return;
    setSending(true);
    setSendError(false);
    try {
      const res = await fetch('https://formsubmit.co/ajax/nathan.virtualassistance@gmail.com', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
        body: JSON.stringify({
          _subject: `New project inquiry: ${form.practice || form.name}`,
          _template: 'table',
          Name: form.name,
          Email: form.email,
          'Practice name': form.practice,
          'Practice type': form.practiceType,
          'Has website': form.hasWebsite,
          'Current platform': form.platform,
          'Needs help with': form.needs.join(', '),
          Message: form.message,
        }),
      });
      if (!res.ok) throw new Error('send failed');
      setSent(true);
    } catch (err) {
      setSendError(true);
    } finally {
      setSending(false);
    }
  };
  const ALL_NEEDS = ['Web Design', 'Brand Design', 'Automation'];
  const allNeeds = ALL_NEEDS.every((v) => form.needs.includes(v));
  const toggleNeed = (val) => setForm((p) => ({ ...p, needs: p.needs.includes(val) ? p.needs.filter((n) => n !== val) : [...p.needs, val] }));
  const toggleAllNeeds = () => setForm((p) => ({ ...p, needs: ALL_NEEDS.every((v) => p.needs.includes(v)) ? [] : [...ALL_NEEDS] }));

  return (
    <SlidePanel
      eyebrow="Get in Touch"
      title={<>Start a <em>project</em>.</>}
      num="10">
      
      <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2.5rem' }}>
        {/* Left: info */}
        <div style={{ display: 'flex', flexDirection: 'column', gap: '1.5rem' }}>
          <p style={{ fontSize: '.875rem', lineHeight: 1.7, color: 'var(--muted)' }}>
            Ready to build something that glows? Fill in the form and we will get back to you within one business day.
          </p>
          {[['Email', 'nathan.virtualassistance@gmail.com', true], ['Based in', 'Philippines. Remote worldwide.', false], ['Response', 'Within 1 business day', false]].map(([label, val, isLink]) =>
          <div key={label}>
              <div style={{ fontSize: '.55rem', letterSpacing: '.25em', textTransform: 'uppercase', color: 'var(--muted)', fontFamily: 'monospace', marginBottom: '.25rem' }}>{label}</div>
              {isLink ?
            <a href={`mailto:${val}`} style={{ fontSize: '.875rem', color: 'var(--cream)', textDecoration: 'none', transition: 'color .2s' }}
            onMouseEnter={(e) => e.target.style.color = 'var(--violet)'} onMouseLeave={(e) => e.target.style.color = 'var(--cream)'}>{val}</a> :
            <div style={{ fontSize: '.875rem', color: 'var(--cream)' }}>{val}</div>
            }
            </div>
          )}
        </div>
        {/* Right: form */}
        <div>
          {sent ?
          <div style={{ display: 'flex', flexDirection: 'column', gap: '.75rem', padding: '1rem 0' }}>
              <div style={{ fontSize: '1.75rem', color: 'var(--violet)' }}>✓</div>
              <div style={{ fontFamily: 'var(--display-font)', fontSize: '1.5rem', fontWeight: 300, color: 'var(--cream)' }}>Message received.</div>
              <div style={{ fontSize: '.8rem', color: 'var(--muted)' }}>We will be in touch within one business day.</div>
            </div> :

          <form style={{ display: 'flex', flexDirection: 'column', gap: '.5rem' }} onSubmit={submitForm} noValidate>
              <div className="rsp-2col-sm" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '.5rem' }}>
                <input className="contact-input" type="text" placeholder="Name" value={form.name} onChange={(e) => set('name', e.target.value)} required aria-label="Name" />
                <input className="contact-input" type="email" placeholder="Email" value={form.email} onChange={(e) => set('email', e.target.value)} required aria-label="Email" />
              </div>
              <input className="contact-input" type="text" placeholder="Practice name" value={form.practice} onChange={(e) => set('practice', e.target.value)} required aria-label="Practice name" />

              <div className="contact-group">
                <label className="contact-group-label" htmlFor="cp-type">Type of practice</label>
                <select id="cp-type" className="contact-select" value={form.practiceType} onChange={(e) => set('practiceType', e.target.value)} required aria-label="Type of practice">
                  <option value="" disabled>Select one</option>
                  <option value="Medspa">Medspa</option>
                  <option value="IV Therapy Clinic">IV Therapy Clinic</option>
                  <option value="Aesthetic Practice">Aesthetic Practice</option>
                  <option value="Other">Other</option>
                </select>
              </div>

              <div className="contact-group">
                <span className="contact-group-label">Do you have a current website?</span>
                <div className="contact-choices" role="radiogroup" aria-label="Do you have a current website?">
                  {['Yes', 'No'].map((opt) =>
                <label key={opt} className={`contact-choice${form.hasWebsite === opt ? ' contact-choice--on' : ''}`}>
                      <input type="radio" name="cp-website" value={opt} checked={form.hasWebsite === opt} onChange={() => set('hasWebsite', opt)} />
                      <span>{opt}</span>
                    </label>
                )}
                </div>
              </div>

              {form.hasWebsite === 'Yes' &&
            <input className="contact-input" type="text" placeholder="If yes, what platform?" value={form.platform} onChange={(e) => set('platform', e.target.value)} aria-label="Current platform" />
            }

              <div className="contact-group">
                <span className="contact-group-label">What do you need help with?</span>
                <div className="contact-choices">
                  {ALL_NEEDS.map((opt) =>
                <label key={opt} className={`contact-choice${form.needs.includes(opt) ? ' contact-choice--on' : ''}`}>
                      <input type="checkbox" checked={form.needs.includes(opt)} onChange={() => toggleNeed(opt)} />
                      <span>{opt}</span>
                    </label>
                )}
                  <label className={`contact-choice${allNeeds ? ' contact-choice--on' : ''}`}>
                    <input type="checkbox" checked={allNeeds} onChange={toggleAllNeeds} />
                    <span>All Three</span>
                  </label>
                </div>
              </div>

              <textarea className="contact-textarea" rows={4} placeholder="What is broken, what is missing, or what do you want to grow?" value={form.message} onChange={(e) => set('message', e.target.value)} required aria-label="Tell us about your project" />
              <div className="contact-consent">
                <input id="cp-consent" type="checkbox" checked={form.consent} onChange={(e) => set('consent', e.target.checked)} required />
                <label htmlFor="cp-consent">I agree to be contacted about my inquiry. No spam, ever.</label>
              </div>
              <div style={{ marginTop: '.375rem' }}>
                <ShinyBtn type="submit">{sending ? 'Sending…' : <>Send Inquiry &nbsp;→</>}</ShinyBtn>
                {sendError &&
              <p style={{ fontSize: '.7rem', color: 'var(--violet)', marginTop: '.5rem' }}>
                    Something went wrong sending your message. Please email us directly at nathan.virtualassistance@gmail.com.
                  </p>
              }
              </div>
            </form>
          }
        </div>
      </div>
    </SlidePanel>);

}

/* ── Panel Footer ──────────────────────────────────────────────────── */
function PanelFooter() {
  const { Logo, SocialLinks } = window;
  return (
    <footer className="panel-footer">
      <div className="panel-footer-inner">
        <div className="panel-footer-grid">
          <div>
            <Logo variant="primary" large />
            <p style={{ fontSize: '.8125rem', color: 'var(--muted)', lineHeight: 1.6, marginTop: '1.25rem', maxWidth: '220px' }}>
              Design, Development &amp; Automation for <em style={{ fontFamily: 'var(--display-font)', fontStyle: 'italic', color: 'var(--violet)' }}>wellness brands</em> that want to grow.
            </p>
          </div>
          <div>
            <div className="footer-col-title">Studio</div>
            <ul className="footer-links">
              {[['Work', '#work'], ['Services', '#services'], ['Process', '#process'], ['Results', '#results'], ['Resources', 'resources.html'], ['Contact', '#contact']].map(([l, h]) =>
              <li key={l}><a href={h}>{l}</a></li>
              )}
            </ul>
          </div>
          <div>
            <div className="footer-col-title">Contact</div>
            <ul className="footer-links">
              <li><a href="mailto:nathan.virtualassistance@gmail.com">nathan.virtualassistance@gmail.com</a></li>
              <li><a href="#contact">Book a Call</a></li>
            </ul>
          </div>
          <div>
            <div className="footer-col-title">Social</div>
            <div style={{ marginTop: '-.25rem' }}>
              <SocialLinks gap="1rem" />
            </div>
          </div>
        </div>
        <div className="footer-bottom">
          <p className="footer-copy">© {new Date().getFullYear()} LIWAN · Design · Development · Automation</p>
          <p className="footer-credit">Built by LIWAN &nbsp;·&nbsp; All rights reserved</p>
        </div>
      </div>
    </footer>);

}

/* ── About Panel ───────────────────────────────────────────────────── */
const PROFILE_STATS = [
{ val: '12+', icon: '◈', label: 'Projects' },
{ val: '100%', icon: '◎', label: 'Wellness Focus' },
{ val: '2026', icon: '▣', label: 'Founded' },
{ val: 'PH', icon: '◉', label: 'Location' }];


const PROFILE_ROLES = ['Founder', 'Designer', 'Automator'];

function AboutPanel() {
  const { SlidePanel, ShinyBtn } = window;
  const statsRef = useRef(null);
  const countRefs = useRef([]);

  // Count-up animation for numeric stats
  useEffect(() => {
    const el = statsRef.current;
    if (!el || !window.gsap) return;
    const obs = new IntersectionObserver(([e]) => {
      if (!e.isIntersecting) return;
      obs.disconnect();
      countRefs.current.forEach((node, i) => {
        if (!node) return;
        const raw = PROFILE_STATS[i].val;
        const numeric = parseFloat(raw);
        if (isNaN(numeric)) return; // skip non-numeric (PH, etc.)
        const suffix = raw.replace(/[\d.]/g, '');
        const obj = { val: 0 };
        window.gsap.to(obj, {
          val: numeric, duration: 1.6, ease: 'power3.out', delay: i * 0.1,
          onUpdate() {node.textContent = Math.round(obj.val) + suffix;}
        });
      });
    }, { threshold: 0.4 });
    obs.observe(el);
    return () => obs.disconnect();
  }, []);

  return (
    <SlidePanel eyebrow="About" title={null} num="06">

      {/* ── Two-column layout: photo left / profile right ── */}
      <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 0, minHeight: '400px' }}>

        {/* ── Photo column — bleeds to panel edges ── */}
        <div className="about-photo" style={{
          position: 'relative',
          margin: '-1.5rem 0 -2rem -2.25rem',
          overflow: 'hidden',
          borderRight: '1px solid var(--border)'
        }}>
          {/* Photo */}
          <img
            src="uploads/ChatGPT Image Jun 2, 2026, 06_00_49 PM.png"
            alt="Nathan, Founder of LIWAN Studio"
            style={{ width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center top', display: 'block' }} />
          

          {/* Dot-grid texture overlay */}
          <div style={{
            position: 'absolute', inset: 0, pointerEvents: 'none',
            backgroundImage: 'radial-gradient(rgba(251,248,241,.055) 1px, transparent 1px)',
            backgroundSize: '20px 20px'
          }} />

          {/* Violet ambient glow from bottom */}
          <div style={{
            position: 'absolute', pointerEvents: 'none',
            width: '340px', height: '340px', borderRadius: '50%',
            background: 'rgba(192,132,252,.18)', filter: 'blur(72px)',
            bottom: '-80px', left: '50%', transform: 'translateX(-50%)'
          }} />

          {/* Bottom fade-to-dark */}
          <div style={{
            position: 'absolute', bottom: 0, left: 0, right: 0, height: '140px', pointerEvents: 'none',
            background: 'linear-gradient(transparent, rgba(17,16,24,.85))'
          }} />

          {/* Bottom caption */}
          <div style={{
            position: 'absolute', bottom: '1rem', left: '1.25rem', right: '1.25rem',
            display: 'flex', alignItems: 'center', gap: '.5rem'
          }}>
            <span style={{ width: '1.5rem', height: '1px', background: 'rgba(251,248,241,.25)', flexShrink: 0 }} />
            <span style={{ fontSize: '.5rem', letterSpacing: '.25em', textTransform: 'uppercase', color: 'rgba(251,248,241,.35)', fontFamily: 'monospace' }}>
              Founder · Philippines · 2026
            </span>
          </div>

          {/* Corner accents */}
          <span style={{ position: 'absolute', top: '.875rem', left: '.875rem', width: '1rem', height: '1rem', borderTop: '1px solid rgba(192,132,252,.3)', borderLeft: '1px solid rgba(192,132,252,.3)' }} />
          <span style={{ position: 'absolute', bottom: '.875rem', right: '.875rem', width: '1rem', height: '1rem', borderBottom: '1px solid rgba(192,132,252,.3)', borderRight: '1px solid rgba(192,132,252,.3)' }} />
        </div>

        {/* ── Profile column ── */}
        <div className="about-profile" style={{ display: 'flex', flexDirection: 'column', gap: '1.25rem', paddingLeft: '2rem', paddingTop: '.25rem' }}>

          {/* Name block */}
          <div style={{ lineHeight: 1 }}>
            <div style={{
              fontFamily: 'var(--display-font)',
              fontSize: 'clamp(2.6rem, 4.5vw, 4rem)',
              fontWeight: 700,
              color: 'var(--cream)',
              letterSpacing: '-.01em'
            }}>Nathan</div>
            <div style={{
              fontFamily: 'var(--display-font)',
              fontSize: 'clamp(2.6rem, 4.5vw, 4rem)',
              fontWeight: 300,
              fontStyle: 'italic',
              color: 'var(--violet)',
              letterSpacing: '-.01em',
              lineHeight: 1.1
            }}>LIWAN.</div>
            <div style={{
              fontSize: '.585rem', letterSpacing: '.22em', textTransform: 'uppercase',
              color: 'var(--muted)', fontFamily: 'monospace', marginTop: '.6rem'
            }}>Design, Development &amp; Automation</div>
          </div>

          {/* Role chips */}
          <div style={{ display: 'flex', gap: '.4rem', flexWrap: 'wrap' }}>
            {PROFILE_ROLES.map((role) =>
            <span key={role} style={{
              display: 'inline-flex', alignItems: 'center', gap: '.4rem',
              padding: '.28rem .7rem',
              border: '1px solid var(--border)',
              fontSize: '.525rem', letterSpacing: '.18em', textTransform: 'uppercase',
              color: 'var(--muted)', fontFamily: 'monospace'
            }}>
                <span style={{ width: '.3rem', height: '.3rem', borderRadius: '50%', background: 'var(--violet)', display: 'block', flexShrink: 0 }} />
                {role}
              </span>
            )}
          </div>

          {/* Bio */}
          <p style={{ fontSize: '.8rem', lineHeight: 1.75, color: 'var(--muted)', maxWidth: '36ch' }}>
            Nathan has been building on the web since before it was a career. LIWAN is a boutique studio built <em style={{ fontFamily: 'var(--display-font)', fontStyle: 'italic', color: 'var(--cream)' }}>exclusively</em> for wellness and aesthetic brands, combining smart design with automation that actually works.
          </p>

          {/* CTA — smooth-scroll to contact */}
          <div>
            <ShinyBtn onClick={() => {
              const el = document.querySelector('#contact');
              if (!el) return;
              if (window.gsap && window.ScrollToPlugin) {
                window.gsap.to(window, { scrollTo: { y: el.offsetTop }, duration: 1.2, ease: 'power3.inOut' });
              } else {
                window.scrollTo({ top: el.offsetTop });
              }
            }}>Let&apos;s Talk &nbsp;→</ShinyBtn>
          </div>

          {/* Stats 2×2 grid */}
          <div ref={statsRef} style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1px', background: 'var(--border)', marginTop: 'auto' }}>
            {PROFILE_STATS.map(({ val, icon, label }, i) =>
            <div key={label} style={{
              background: 'var(--bg)',
              padding: '.875rem 1rem',
              display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between'
            }}>
                <div>
                  <div style={{ fontFamily: 'var(--display-font)', fontSize: '1.625rem', fontWeight: 700, color: 'var(--cream)', lineHeight: 1 }}>
                    <span ref={(el) => countRefs.current[i] = el}>{val}</span>
                  </div>
                  <div style={{ fontSize: '.5rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--muted)', marginTop: '.375rem' }}>{label}</div>
                </div>
                <span style={{
                width: '1.5rem', height: '1.5rem', flexShrink: 0,
                border: '1px solid var(--border)',
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                fontSize: '.6rem', color: 'rgba(192,132,252,.4)'
              }}>{icon}</span>
              </div>
            )}
          </div>

        </div>
      </div>

    </SlidePanel>);

}

/* ── Testimonials Panel ───────────────────────────────────────────── */
const TEXT_TESTIMONIALS = [
{ num: '01', quote: 'Nathan helped me grow my business with expertise in content, graphics, and industry trends. His attention to detail and work ethic made working together a pleasure. Always available and ensured timely project delivery.', name: 'Keith', role: 'MLCD' },
{ num: '02', quote: 'Nathan has been an exceptional asset to our team. Incredibly easy to work with, adapts quickly to new tasks, and can work independently while being a great team player. His suggestions have significantly contributed to our company success.', name: 'Kevin', role: 'CEO, Cohesive' },
{ num: '03', quote: 'Nathan is easy to work with, learns quickly, and handles various tasks with flexibility. He excels at managing client relationships and has a knack for social media marketing, consistently creating engaging content that boosts our online presence.', name: 'Nam', role: 'Founder, Cohesive' }];

function TestimonialsPanel() {
  const { SlidePanel } = window;
  const videoRef = useRef(null);
  const VIDEO_KEY = 'nda-wendy-video-pos';

  useEffect(() => {
    const v = videoRef.current;
    if (!v) return;
    const saved = parseFloat(localStorage.getItem(VIDEO_KEY) || '0');
    if (saved > 1) v.currentTime = saved;
    const save = () => localStorage.setItem(VIDEO_KEY, String(v.currentTime));
    v.addEventListener('timeupdate', save);
    return () => v.removeEventListener('timeupdate', save);
  }, []);

  return (
    <SlidePanel eyebrow="Client Stories · In Their Words" title={<>Straight from <em>clients</em>.</>} num="07">
      <div style={{ display: 'flex', flexDirection: 'column', gap: '1.25rem' }}>

        {/* ── Video testimonial ── */}
        <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1.1fr 1fr', gap: '1.5rem', alignItems: 'center' }}>
          {/* Player */}
          <div style={{ position: 'relative', background: '#000', border: '1px solid var(--border)', overflow: 'hidden' }}>
            <video
              ref={videoRef}
              src="uploads/Wendy Testimonial/Wendy Testimonial.mp4"
              controls
              playsInline
              style={{ width: '100%', display: 'block', maxHeight: '240px', objectFit: 'contain', background: '#000' }} />
            
            <div style={{ position: 'absolute', top: '.625rem', left: '.625rem', background: 'rgba(17,16,24,.85)', border: '1px solid var(--border)', padding: '.2rem .5rem', display: 'flex', alignItems: 'center', gap: '.35rem' }}>
              <span style={{ width: '.35rem', height: '.35rem', borderRadius: '50%', background: 'var(--violet)', display: 'block', flexShrink: 0 }} />
              <span style={{ fontSize: '.475rem', letterSpacing: '.18em', textTransform: 'uppercase', color: 'var(--muted)', fontFamily: 'monospace' }}>Video</span>
            </div>
          </div>
          {/* Identity */}
          <div style={{ display: 'flex', flexDirection: 'column', gap: '.875rem' }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: '.625rem' }}>
              <span style={{ width: '1.5rem', height: '1px', background: 'var(--muted)', flexShrink: 0 }} />
              <span style={{ fontSize: '.55rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--violet)', fontFamily: 'monospace' }}>Featured</span>
            </div>
            <div>
              <div style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.6rem,2.8vw,2.5rem)', fontWeight: 700, color: 'var(--cream)', lineHeight: 1 }}>Wendy</div>
              <div style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.2rem,2vw,1.75rem)', fontWeight: 300, fontStyle: 'italic', color: 'var(--violet)', lineHeight: 1.2 }}>Wilder Strategy Lab.</div>
            </div>
            <p style={{ fontSize: '.775rem', lineHeight: 1.75, color: 'var(--muted)', maxWidth: '28ch' }}>
              Founder of Wilder Strategy Lab on working with LIWAN to grow her wellness brand and digital presence.
            </p>
            <div style={{ display: 'flex', alignItems: 'center', gap: '.5rem' }}>
              <span style={{ display: 'inline-block', width: '.35rem', height: '.35rem', borderRadius: '50%', background: 'var(--violet)', flexShrink: 0 }} />
              <span style={{ fontSize: '.55rem', letterSpacing: '.2em', textTransform: 'uppercase', color: 'var(--muted)', fontFamily: 'monospace' }}>Founder, Wilder Strategy Lab</span>
            </div>
          </div>
        </div>

        {/* ── Three text cards ── */}
        <div className="rsp-3col" style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: '1px', background: 'var(--border)' }}>
          {TEXT_TESTIMONIALS.map(({ num, quote, name, role }) =>
          <div key={name}
          style={{ background: 'var(--surface)', padding: '1.25rem', display: 'flex', flexDirection: 'column', gap: '.75rem', transition: 'background .2s', cursor: 'default' }}
          onMouseEnter={(e) => e.currentTarget.style.background = 'rgba(12,11,18,.9)'}
          onMouseLeave={(e) => e.currentTarget.style.background = 'var(--surface)'}>
            <div style={{ fontFamily: 'var(--display-font)', fontSize: '3rem', fontWeight: 300, fontStyle: 'italic', color: 'rgba(192,132,252,.18)', lineHeight: .8 }}>&ldquo;</div>
            <p style={{ fontSize: '.75rem', lineHeight: 1.75, color: 'var(--muted)', flex: 1 }}>{quote}</p>
            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', borderTop: '1px solid var(--border)', paddingTop: '.75rem' }}>
              <div>
                <div style={{ fontSize: '.8125rem', fontWeight: 600, color: 'var(--cream)' }}>{name}</div>
                <div style={{ fontSize: '.525rem', letterSpacing: '.18em', textTransform: 'uppercase', color: 'var(--muted)', marginTop: '.2rem' }}>{role}</div>
              </div>
              <span style={{ fontSize: '.55rem', color: 'rgba(107,107,120,.25)', fontFamily: 'monospace' }}>{num}</span>
            </div>
          </div>
          )}
        </div>

      </div>
    </SlidePanel>);

}

/* ── Automation Work Panel ─────────────────────────────────────────── */
const AUTO_FLOWS = [
{
  title: "Lead Capture and Email Automation",
  body: "Captures form submissions, validates emails, creates HubSpot contacts, sends a welcome email, waits 3 days, then sends a follow-up. Logs all steps to Sheets and alerts the sales team on Slack.",
  tools: ["N8N", "HUBSPOT", "GMAIL", "GOOGLE SHEETS", "SLACK"],
  nodes: [
  { x: 40, y: 80, label: "Webhook", color: "#e8622a" },
  { x: 160, y: 80, label: "IF Node", color: "#9b5de5" },
  { x: 280, y: 50, label: "HubSpot", color: "#ff7a59" },
  { x: 280, y: 115, label: "Stop", color: "#555" },
  { x: 400, y: 50, label: "Gmail", color: "#4285f4" },
  { x: 520, y: 50, label: "Wait 3d", color: "#9b5de5" },
  { x: 640, y: 50, label: "Gmail", color: "#4285f4" },
  { x: 640, y: 130, label: "Sheets Log", color: "#34a853" },
  { x: 760, y: 90, label: "Slack", color: "#4a154b" }],

  edges: [[0, 1], [1, 2], [1, 3], [2, 4], [4, 5], [5, 6], [6, 7], [6, 8]]
},
{
  title: "Social Media Content Pipeline",
  body: "Reads a topic queue from Sheets daily, generates captions via OpenAI, creates graphics through Canva API, then posts to Instagram and TikTok. Logs all results and sends a Slack weekly report.",
  tools: ["N8N", "OPENAI", "INSTAGRAM", "TIKTOK", "CANVA"],
  nodes: [
  { x: 40, y: 80, label: "Schedule", color: "#9b5de5" },
  { x: 160, y: 80, label: "Sheets", color: "#34a853" },
  { x: 280, y: 80, label: "OpenAI", color: "#10a37f" },
  { x: 400, y: 80, label: "Canva API", color: "#7c3aed" },
  { x: 520, y: 50, label: "Instagram", color: "#e1306c" },
  { x: 520, y: 115, label: "TikTok", color: "#010101" },
  { x: 640, y: 50, label: "Sheets Log", color: "#34a853" },
  { x: 640, y: 115, label: "Slack Rpt", color: "#4a154b" }],

  edges: [[0, 1], [1, 2], [2, 3], [3, 4], [3, 5], [4, 6], [5, 7]]
},
{
  title: "Client Onboarding Automation",
  body: "Triggers on new client form submission, sets variables, creates a Drive folder, opens a ClickUp task, sends the contract via Gmail, updates HubSpot to Active, alerts Slack, and logs to Sheets and Notion.",
  tools: ["N8N", "HUBSPOT", "CLICKUP", "GOOGLE DRIVE", "GMAIL"],
  nodes: [
  { x: 40, y: 80, label: "Webhook", color: "#e8622a" },
  { x: 160, y: 80, label: "Set Vars", color: "#9b5de5" },
  { x: 280, y: 50, label: "Drive", color: "#34a853" },
  { x: 280, y: 115, label: "ClickUp", color: "#7b68ee" },
  { x: 400, y: 80, label: "Gmail", color: "#4285f4" },
  { x: 520, y: 80, label: "HubSpot", color: "#ff7a59" },
  { x: 640, y: 50, label: "Slack", color: "#4a154b" },
  { x: 640, y: 115, label: "Sheets", color: "#34a853" },
  { x: 760, y: 80, label: "Notion", color: "#000" }],

  edges: [[0, 1], [1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [5, 7], [6, 8], [7, 8]]
},
{
  title: "Medspa Intake to CRM Flow",
  body: "Triggers when a new patient fills out an intake form. Creates a HubSpot contact, sends a personalized welcome email, notifies the provider via Slack, and logs the lead to Google Sheets for weekly review.",
  tools: ["N8N", "HUBSPOT", "GMAIL", "SLACK", "GOOGLE SHEETS"],
  nodes: [
  { x: 40, y: 80, label: "Tally Form", color: "#e8622a" },
  { x: 160, y: 80, label: "IF Node", color: "#9b5de5" },
  { x: 280, y: 50, label: "HubSpot", color: "#ff7a59" },
  { x: 280, y: 115, label: "Flag Dupe", color: "#555" },
  { x: 400, y: 50, label: "Gmail", color: "#4285f4" },
  { x: 520, y: 50, label: "Slack", color: "#4a154b" },
  { x: 640, y: 80, label: "Sheets Log", color: "#34a853" }],

  edges: [[0, 1], [1, 2], [1, 3], [2, 4], [4, 5], [5, 6], [3, 6]]
}];


function N8nMockup({ nodes, edges }) {
  const W = 820,H = 200,pad = 20;
  const maxX = Math.max(...nodes.map((n) => n.x)) + 80;
  const scaleX = (x) => pad + x / maxX * (W - pad * 2);
  const scaleY = (y) => y;
  const nodeW = 82,nodeH = 28;
  return (
    <svg viewBox={`0 0 ${W} ${H}`} width="100%" height="160"
    style={{ display: "block", borderRadius: "4px", background: "#1a1a2e" }} aria-hidden="true">
      <defs>
        <pattern id="ngrid" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
          <circle cx="1" cy="1" r="0.8" fill="rgba(255,255,255,0.07)" />
        </pattern>
      </defs>
      <rect width={W} height={H} fill="url(#ngrid)" style={{ height: "0px" }} />
      {edges.map(([a, b], i) => {
        const na = nodes[a],nb = nodes[b];
        const x1 = scaleX(na.x) + nodeW,y1 = scaleY(na.y) + nodeH / 2;
        const x2 = scaleX(nb.x),y2 = scaleY(nb.y) + nodeH / 2;
        const mx = (x1 + x2) / 2;
        return <path key={i} d={`M${x1},${y1} C${mx},${y1} ${mx},${y2} ${x2},${y2}`}
        fill="none" stroke="rgba(155,93,229,0.35)" strokeWidth="1.5" strokeDasharray="4 3" />;
      })}
      {nodes.map((n, i) => {
        const x = scaleX(n.x),y = scaleY(n.y);
        return (
          <g key={i}>
            <rect x={x} y={y} width={nodeW} height={nodeH} rx="4" fill="#252540" stroke={n.color} strokeWidth="1" />
            <rect x={x} y={y} width="3" height={nodeH} rx="2" fill={n.color} />
            <text x={x + 10} y={y + nodeH / 2 + 4} fill="#e8e8f0" fontSize="8" fontFamily="monospace" fontWeight="500">{n.label}</text>
            <circle cx={x + nodeW} cy={y + nodeH / 2} r="3" fill={n.color} opacity="0.7" />
            <circle cx={x} cy={y + nodeH / 2} r="3" fill={n.color} opacity="0.5" />
          </g>);

      })}
      <rect x="0" y={H - 18} width={W} height="18" fill="rgba(0,0,0,0.4)" />
      <circle cx="12" cy={H - 9} r="4" fill="#22c55e" />
      <text x="22" y={H - 5} fill="rgba(255,255,255,0.4)" fontSize="7" fontFamily="monospace">{nodes.length} nodes · active</text>
    </svg>);

}

function AutomationWorkPanel() {
  const { SlidePanel } = window;
  return (
    <SlidePanel eyebrow="Automation Work" title={<>n8n workflows <em>built</em>.</>} num="02b">
      <p style={{ fontSize: '.8125rem', color: 'var(--muted)', lineHeight: 1.7, marginBottom: '1.5rem', maxWidth: '52ch' }}>
        Real automation systems connecting multiple apps to eliminate manual work.
        Built in n8n with AI, Google Workspace, CRMs, and social platforms.
      </p>
      <div className="auto-work-grid">
        {AUTO_FLOWS.map((flow, i) =>
        <div key={i} className="auto-card">
            <div className="auto-card-mockup"><N8nMockup nodes={flow.nodes} edges={flow.edges} /></div>
            <div className="auto-card-body">
              <h3 className="auto-card-title">{flow.title}</h3>
              <p className="auto-card-desc">{flow.body}</p>
              <div className="auto-card-tools">
                {flow.tools.map((t) => <span key={t} className="auto-tool-tag">{t}</span>)}
              </div>
            </div>
          </div>
        )}
      </div>
    </SlidePanel>);

}

/* ── FAQ Panel ─────────────────────────────────────────────────────── */
const FAQ_DATA = [
{ q: 'Who is LIWAN for?', a: 'We work exclusively with wellness practices: medspas, IV clinics, functional medicine, aesthetic medicine, and related health-focused businesses. If your practice is in this space, we are likely a good fit.' },
{ q: 'What does a typical engagement look like?', a: 'Most clients start with a Brand + Website package. From there, many add automation to handle lead follow-up, booking, and intake. We scope every project individually based on what you actually need.' },
{ q: 'How long does a project take?', a: 'A brand and website typically takes 4 to 6 weeks from kickoff to launch. Automation projects depend on complexity but most core flows are live within 2 to 3 weeks. We always give you a timeline before we start.' },
{ q: 'Do you offer ongoing support?', a: 'Yes. Every project includes 30 days of post-launch support. After that, ongoing retainers are available for clients who want continued optimization, new automation flows, or design updates.' },
{ q: 'What platforms do you build on?', a: 'We use Squarespace for content-managed sites and custom HTML/CSS/JS for fully bespoke builds. For automation we primarily use Make.com and n8n, with integrations for most major CRMs and booking tools.' },
{ q: 'How much does it cost?', a: 'Pricing varies by scope. Brand and website packages start in the mid four figures. We provide a fixed-price proposal after a discovery call so there are no surprises.' }];


function FAQPanel() {
  const { SlidePanel } = window;
  const [open, setOpen] = useState(null);
  const listRef = useRef(null);

  // Stagger-reveal items when panel enters view
  useEffect(() => {
    const el = listRef.current;
    if (!el || !window.gsap) return;
    const items = el.querySelectorAll('.faqp-item');
    window.gsap.set(items, { opacity: 0, y: 10 });
    const obs = new IntersectionObserver(([e]) => {
      if (!e.isIntersecting) return;
      obs.disconnect();
      window.gsap.to(items, { opacity: 1, y: 0, stagger: 0.07, duration: 0.45, ease: 'power2.out', delay: 0.15 });
    }, { threshold: 0.2 });
    obs.observe(el);
    return () => obs.disconnect();
  }, []);

  return (
    <SlidePanel eyebrow="FAQ" title={<>Common <em>questions</em>.</>} num="08">
      <p style={{ fontSize: '.8125rem', color: 'var(--muted)', marginBottom: '1.25rem', maxWidth: '58ch', lineHeight: 1.6 }}>
        If your question is not here, send us a message and we will reply within one business day.
      </p>
      <div ref={listRef}>
        {FAQ_DATA.map((item, i) =>
        <div key={i} className="faqp-item" style={{ borderTop: '1px solid var(--border)' }}>
            <button type="button"
          onClick={() => setOpen(open === i ? null : i)}
          style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '1.5rem', padding: '.875rem 0', background: 'none', border: 'none', cursor: 'pointer', textAlign: 'left' }}>
              <span style={{ display: 'flex', alignItems: 'center', gap: '.875rem', flex: 1 }}>
                <span style={{ fontSize: '.55rem', color: 'var(--muted)', fontFamily: 'monospace', letterSpacing: '.05em', flexShrink: 0 }}>0{i + 1}</span>
                <span style={{ fontSize: '.875rem', fontWeight: 500, color: open === i ? 'var(--violet)' : 'var(--cream)', transition: 'color .25s' }}>{item.q}</span>
              </span>
              {/* + rotates to × when open */}
              <span style={{
              width: '1.625rem', height: '1.625rem', flexShrink: 0,
              border: '1px solid rgba(192,132,252,.25)',
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              color: 'var(--violet)', fontSize: '.9rem', lineHeight: 1,
              transition: 'transform .4s cubic-bezier(.16,1,.3,1), background .2s',
              transform: open === i ? 'rotate(45deg)' : 'rotate(0deg)',
              background: open === i ? 'rgba(192,132,252,.08)' : 'transparent'
            }}>+</span>
            </button>
            {/* Smooth accordion — max-height transition */}
            <div style={{
            maxHeight: open === i ? '220px' : '0',
            overflow: 'hidden',
            transition: 'max-height .45s cubic-bezier(.16,1,.3,1), opacity .3s',
            opacity: open === i ? 1 : 0
          }}>
              <div style={{ paddingBottom: '.875rem', paddingLeft: '2.375rem', fontSize: '.8rem', color: 'var(--muted)', lineHeight: 1.75 }}>
                {item.a}
              </div>
            </div>
          </div>
        )}
        <div style={{ borderTop: '1px solid var(--border)' }} />
      </div>
    </SlidePanel>);

}

/* ── Stack Panel ───────────────────────────────────────────────────── */
const STACK_TOOLS = [
  { name: 'n8n',           cat: 'Automation' },
  { name: 'Claude AI',     cat: 'AI'         },
  { name: 'ChatGPT',       cat: 'AI'         },
  { name: 'HubSpot',       cat: 'CRM'        },
  { name: 'Squarespace',   cat: 'CMS'        },
  { name: 'Figma',         cat: 'Design'     },
  { name: 'Canva',         cat: 'Design'     },
  { name: 'Google Drive',  cat: 'Storage'    },
  { name: 'Google Sheets', cat: 'Data'       },
  { name: 'Gmail',         cat: 'Email'      },
  { name: 'Slack',         cat: 'Comms'      },
  { name: 'ClickUp',       cat: 'PM'         },
  { name: 'Airtable',      cat: 'Database'   },
  { name: 'Cal.com',       cat: 'Scheduling' },
  { name: 'Typeform',      cat: 'Forms'      },
  { name: 'Resend',        cat: 'Email'      },
  { name: 'Vercel',        cat: 'Hosting'    },
  { name: 'Cloudflare',    cat: 'Infra'      },
  { name: 'PostHog',       cat: 'Analytics'  },
  { name: 'HTML / CSS',    cat: 'Code'       },
];

function StackPanel() {
  const { SlidePanel } = window;
  const wrapRef = useRef(null);

  useEffect(() => {
    const wrap = wrapRef.current;
    if (!wrap || !window.gsap) return;
    const pills = wrap.querySelectorAll('.sp-pill');
    window.gsap.set(pills, { opacity: 0, y: 10 });
    const obs = new IntersectionObserver(([e]) => {
      if (!e.isIntersecting) return;
      obs.disconnect();
      window.gsap.to(pills, { opacity: 1, y: 0, stagger: 0.04, duration: 0.4, ease: 'power2.out', delay: 0.1 });
    }, { threshold: 0.15 });
    obs.observe(wrap);
    return () => obs.disconnect();
  }, []);

  return (
    <SlidePanel eyebrow="Our Tools" title={<>The <em>stack</em>.</>} num="09">
      <div ref={wrapRef} style={{ display: 'flex', flexWrap: 'wrap', gap: '.5rem', padding: '.25rem 0 .5rem' }}>
        {STACK_TOOLS.map((item) => (
          <div key={item.name} className="sp-pill"
            style={{
              display: 'flex', alignItems: 'center', gap: '.45rem',
              padding: '.4rem 1rem .4rem .75rem',
              background: 'rgba(255,255,255,.04)',
              border: '1px solid var(--border)',
              borderRadius: '999px',
              cursor: 'default',
              transition: 'background .2s, border-color .2s',
            }}
            onMouseEnter={(e) => {
              e.currentTarget.style.background = 'rgba(192,132,252,.1)';
              e.currentTarget.style.borderColor = 'rgba(192,132,252,.35)';
            }}
            onMouseLeave={(e) => {
              e.currentTarget.style.background = 'rgba(255,255,255,.04)';
              e.currentTarget.style.borderColor = 'var(--border)';
            }}
          >
            <span style={{ width: '6px', height: '6px', borderRadius: '50%', background: 'var(--violet)', flexShrink: 0 }} />
            <span style={{ fontSize: '.72rem', fontWeight: 500, color: 'var(--cream)', letterSpacing: '.01em', whiteSpace: 'nowrap' }}>{item.name}</span>
          </div>
        ))}
      </div>
    </SlidePanel>
  );
}

/* ── Work Showcase Panel (merged Design + Automation with tabs) ───── */
function WorkShowcasePanel() {
  const { SlidePanel, TextRoll } = window;
  const [active, setActive] = useState('design');

  const DESIGN_BULLETS = ['100 Lighthouse score on every build', 'Squarespace and custom HTML/CSS', 'Brand system included', 'Mobile-first from the first frame'];
  const AUTO_BULLETS = ['Built in n8n and Make.com', 'CRM, calendar, and email connected', 'Live in under 3 weeks', 'Fully documented and handed off'];

  const Bullet = ({ items }) =>
  <ul style={{ listStyle: 'none', display: 'flex', flexDirection: 'column', gap: '.5rem' }}>
      {items.map((b) =>
    <li key={b} style={{ display: 'flex', alignItems: 'center', gap: '.625rem', fontSize: '.775rem', color: 'var(--muted)' }}>
          <span style={{ color: 'var(--violet)', fontSize: '.45rem', flexShrink: 0 }}>◆</span>{b}
        </li>
    )}
    </ul>;


  return (
    <SlidePanel eyebrow="Selected Work · 2025–2026" title={<>What we&apos;ve <em>built</em>.</>} num="02">

      {/* Tab switcher */}
      <div className="wsp-tabs">
        {[['design', 'Web Design'], ['automation', 'Automation']].map(([id, label]) =>
        <button key={id} type="button"
        className={`wsp-tab${active === id ? ' wsp-tab--active' : ''}`}
        onClick={() => setActive(id)}>
            <span className="wsp-tab-dot" />
            {label}
          </button>
        )}
      </div>

      {/* Crossfade pane container */}
      <div className="wsp-panes">

        {/* ── Design pane ── */}
        <div className={`wsp-pane${active === 'design' ? ' wsp-pane--active' : ' wsp-pane--inactive'}`}>
          <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1.7fr', gap: '2.5rem', alignItems: 'start' }}>

            <div style={{ display: 'flex', flexDirection: 'column', gap: '.875rem' }}>
              <span style={{ fontSize: '.55rem', letterSpacing: '.22em', textTransform: 'uppercase', color: 'var(--violet)', fontFamily: 'monospace' }}>01 / DESIGN</span>
              <h3 style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.5rem,2.2vw,2.1rem)', fontWeight: 700, color: 'var(--cream)', lineHeight: 1.15 }}>
                Websites that <em style={{ fontStyle: 'italic', fontWeight: 300, color: 'var(--violet)' }}>book appointments</em>.
              </h3>
              <p style={{ fontSize: '.8rem', lineHeight: 1.75, color: 'var(--muted)', maxWidth: '34ch' }}>
                Aesthetic practices need a website that earns trust before a visitor picks up the phone. Every project starts with brand and ends with a site built to convert.
              </p>
              <Bullet items={DESIGN_BULLETS} />
            </div>

            <ul style={{ listStyle: 'none' }}>
              {WORKS.map((w, i) =>
              <li key={i} style={{ opacity: w.live ? 1 : .45 }}>
                  <a href={w.live ? w.href : undefined}
                target={w.live && w.href !== '#' ? '_blank' : undefined}
                rel={w.live && w.href !== '#' ? 'noopener noreferrer' : undefined}
                onClick={!w.live ? (e) => e.preventDefault() : undefined}
                style={{ display: 'grid', gridTemplateColumns: '1.75rem 1.75rem 1fr auto auto auto', alignItems: 'center', gap: '0 .875rem', padding: '.875rem .5rem', borderTop: '1px solid var(--border)', textDecoration: 'none', transition: 'background .2s', cursor: w.live ? 'pointer' : 'default' }}
                onMouseEnter={w.live ? (e) => e.currentTarget.style.background = 'rgba(28,26,39,.8)' : null}
                onMouseLeave={w.live ? (e) => e.currentTarget.style.background = '' : null}
                aria-label={w.live ? `View ${w.name} project` : `${w.name} coming soon`}>
                    <span style={{ display: 'block', width: '1.75rem', height: '1.125rem', background: w.color, border: '1px solid var(--border)', flexShrink: 0 }} aria-hidden="true" />
                    <span style={{ fontSize: '.575rem', color: 'var(--muted)', fontFamily: 'monospace', letterSpacing: '.05em' }}>{String(i + 1).padStart(2, '0')}</span>
                    <span style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1rem,1.8vw,1.5rem)', fontWeight: 300, color: w.live ? 'var(--cream)' : 'var(--muted)', fontStyle: w.live ? 'normal' : 'italic', overflow: 'hidden' }}>
                      {w.live ? <TextRoll>{w.name}</TextRoll> : w.name}
                    </span>
                    {w.role && <span className="work-role-badge">{w.role}</span>}
                    <span style={{ fontSize: '.575rem', color: 'var(--muted)', fontFamily: 'monospace', letterSpacing: '.06em', whiteSpace: 'nowrap' }}>{w.platform}</span>
                    <span style={{ fontSize: '.8rem', color: 'var(--violet)', opacity: w.live ? 1 : 0 }} aria-hidden="true">↗</span>
                  </a>
                </li>
              )}
              <li style={{ borderTop: '1px solid var(--border)' }} />
            </ul>

          </div>
        </div>

        {/* ── Automation pane ── */}
        <div className={`wsp-pane${active === 'automation' ? ' wsp-pane--active' : ' wsp-pane--inactive'}`}>
          <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1.7fr', gap: '2.5rem', alignItems: 'start' }}>

            <div style={{ display: 'flex', flexDirection: 'column', gap: '.875rem' }}>
              <span style={{ fontSize: '.55rem', letterSpacing: '.22em', textTransform: 'uppercase', color: 'var(--violet)', fontFamily: 'monospace' }}>02 / AUTOMATION</span>
              <h3 style={{ fontFamily: 'var(--display-font)', fontSize: 'clamp(1.5rem,2.2vw,2.1rem)', fontWeight: 700, color: 'var(--cream)', lineHeight: 1.15 }}>
                Systems that <em style={{ fontStyle: 'italic', fontWeight: 300, color: 'var(--violet)' }}>run without you</em>.
              </h3>
              <p style={{ fontSize: '.8rem', lineHeight: 1.75, color: 'var(--muted)', maxWidth: '34ch' }}>
                Lead capture, intake flows, follow-up sequences, and booking integrations. Built once, running daily. Your clinic keeps moving even when you step away.
              </p>
              <Bullet items={AUTO_BULLETS} />
            </div>

            <div className="rsp-2col" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1px', background: 'var(--border)' }}>
              {AUTO_FLOWS.map((flow, i) =>
              <div key={i}
              style={{ background: 'var(--bg)', display: 'flex', flexDirection: 'column', transition: 'background .25s, box-shadow .25s', cursor: 'default', overflow: 'hidden' }}
              onMouseEnter={(e) => { e.currentTarget.style.background = 'rgba(214,168,183,.06)'; e.currentTarget.style.boxShadow = 'inset 0 0 0 1px rgba(214,168,183,.4)'; }}
              onMouseLeave={(e) => { e.currentTarget.style.background = 'var(--bg)'; e.currentTarget.style.boxShadow = 'none'; }}>
                  {/* N8n flow diagram — full height, no clip */}
                  <div style={{ borderBottom: '1px solid var(--border)', flexShrink: 0 }}>
                    <N8nMockup nodes={flow.nodes} edges={flow.edges} />
                  </div>
                  {/* Card copy — full description, no clamp */}
                  <div style={{ padding: '1rem 1.125rem 1.125rem', display: 'flex', flexDirection: 'column', gap: '.5rem', flex: 1 }}>
                    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
                      <span style={{ fontSize: '.55rem', letterSpacing: '.18em', textTransform: 'uppercase', color: 'var(--violet)', fontFamily: 'monospace' }}>0{i + 1}</span>
                      <span style={{ fontSize: '.65rem', color: 'rgba(214,168,183,.3)' }}>↗</span>
                    </div>
                    <h4 style={{ fontSize: '.8125rem', fontWeight: 600, color: 'var(--cream)', lineHeight: 1.35 }}>{flow.title}</h4>
                    <p style={{ fontSize: '.7rem', color: 'var(--muted)', lineHeight: 1.6 }}>{flow.body}</p>
                    <div style={{ display: 'flex', flexWrap: 'wrap', gap: '.3rem', marginTop: 'auto', paddingTop: '.5rem' }}>
                      {flow.tools.slice(0, 3).map((t) => <span key={t} className="auto-tool-tag">{t}</span>)}
                    </div>
                  </div>
                </div>
              )}
            </div>

          </div>
        </div>

      </div>
    </SlidePanel>);

}

Object.assign(window, { WorksPanel, ServicesPanel, ProcessPanel, AboutPanel, ResultsPanel, TestimonialsPanel, FAQPanel, StackPanel, ContactPanel, PanelFooter, AutomationWorkPanel, WorkShowcasePanel });