/* global React, INK, CREAM, PULSE, GENS, GradText, CTAButton, Reveal, useReveal, Shimmer, SB_EASE, CP_ACCENTS,
   MShell, MHead */
// Copilot feature page — mobile layout (skews alternate right → left → right …).
const { useState: cmpS, useEffect: cmpE } = React;

// eyebrows are hero-only on mobile — keep the heading, drop the pill
const MCPBadgeHead = ({ title, sub }) => <MHead title={title} sub={sub} />;
const MCPCard = ({ lean = 'right', children, pad = 12 }) => (
  <div style={{ borderRadius: 18, background: '#fff', boxShadow: '0 12px 32px rgba(28,27,27,0.10), inset 0 0 0 1px rgba(28,27,27,0.08)', padding: pad, marginTop: 26, textAlign: 'left',
    transform: lean === 'left' ? 'rotate(-1.2deg) perspective(1200px) rotateY(3deg)' : 'rotate(1.2deg) perspective(1200px) rotateY(-3deg)' }}>{children}</div>
);

// hero
const MCPHero = () => {
  const [ref, on] = useReveal(0.25);
  const [step, setStep] = cmpS(0);
  cmpE(() => {
    if (!on) return;
    const times = [400, 1300, 2400, 4200];
    const ts = times.map((t, i) => setTimeout(() => setStep(i + 1), t));
    return () => ts.forEach(clearTimeout);
  }, [on]);
  const ready = step >= 4;
  return (
    <section style={{ background: CREAM, padding: '0 22px 56px' }}>
      <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '16px 0 30px' }}>
        <span style={{ display: 'inline-flex', alignItems: 'center', gap: 7 }}>
          <img loading="lazy" decoding="async" src="assets/logo-icon.png" alt="" style={{ width: 19, height: 19, objectFit: 'contain' }} />
          <span style={{ fontSize: 16, fontWeight: 800, letterSpacing: '-0.03em', color: INK }}>sozee</span>
        </span>
      </div>
      <div style={{ textAlign: 'center' }}>
        <Reveal>
          <div style={{ display: 'inline-flex', alignItems: 'center', gap: 7, marginBottom: 16, borderRadius: 9999, padding: '6px 12px', background: '#fff', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.1)' }}>
            <a href="/" style={{ fontSize: 10.5, fontWeight: 600, color: 'rgba(28,27,27,0.55)' }}>Features</a>
            <span style={{ fontSize: 10, color: 'rgba(28,27,27,0.35)' }}>/</span>
            <span style={{ fontSize: 10.5, fontWeight: 700, color: INK }}>Copilot</span>
          </div>
        </Reveal>
        <Reveal delay={90}>
          <h1 style={{ font: '800 44px/1 var(--font-sans)', letterSpacing: '-0.03em', color: INK, margin: '0 0 16px', textWrap: 'balance' }}>
            Ask for it.<br /><GradText>It ships.</GradText>
          </h1>
        </Reveal>
        <Reveal delay={170}>
          <p style={{ fontSize: 14.5, lineHeight: 1.58, color: 'var(--text-secondary)', margin: '0 0 24px' }}>
            A conversational layer over the whole studio — Copilot plans, generates, edits and schedules, all in one thread.
          </p>
        </Reveal>
        <Reveal delay={250} style={{ marginBottom: 34 }}><CTAButton size="sm">Open Copilot</CTAButton></Reveal>
      </div>
      <Reveal delay={200} y={26}>
        <div ref={ref} style={{ transform: 'rotate(1.2deg) perspective(1200px) rotateY(-3deg)', borderRadius: 20, background: '#fff', boxShadow: '0 20px 44px rgba(28,27,27,0.12), inset 0 0 0 1px rgba(28,27,27,0.08)', padding: 12, textAlign: 'left' }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 6, marginBottom: 11 }}>
            <span style={{ width: 22, height: 22, borderRadius: '50%', background: PULSE, display: 'grid', placeItems: 'center', fontSize: 10, color: '#fff' }}>✦</span>
            <span style={{ fontSize: 12, fontWeight: 800, color: INK }}>Copilot</span>
            <span style={{ fontSize: 7.5, fontWeight: 800, letterSpacing: '0.08em', color: 'var(--brand-purple-700)', background: 'var(--brand-purple-50)', border: '1px solid var(--brand-purple-200)', borderRadius: 9999, padding: '1px 6px' }}>NEW</span>
            <span style={{ marginLeft: 'auto', display: 'inline-flex', alignItems: 'center', gap: 4, fontSize: 9, fontWeight: 700, color: 'rgba(28,27,27,0.6)', background: 'rgb(246,243,242)', borderRadius: 9999, padding: '3px 8px' }}>
              <span style={{ width: 10, height: 10, borderRadius: '50%', backgroundImage: `url(${GENS[0].src})`, backgroundSize: 'cover', backgroundPosition: 'center 15%' }} />Scarlett</span>
          </div>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
            <div style={{ display: 'flex', justifyContent: 'flex-end', opacity: step >= 1 ? 1 : 0, transition: `opacity 0.4s ${SB_EASE}` }}>
              <span style={{ borderRadius: '13px 13px 3px 13px', background: INK, color: '#fff', padding: '8px 11px', fontSize: 10.5, fontWeight: 500, maxWidth: '85%' }}>Make tonight’s post — poolside, golden hour.</span>
            </div>
            <div style={{ display: 'flex', opacity: step >= 2 ? 1 : 0, transition: `opacity 0.4s ${SB_EASE}` }}>
              <span style={{ borderRadius: '13px 13px 13px 3px', background: 'rgb(246,243,242)', color: INK, padding: '8px 11px', fontSize: 10.5, fontWeight: 500, maxWidth: '85%', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.06)' }}>On it — three directions. Pick one and I’ll finish it.</span>
            </div>
            <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 6, opacity: step >= 3 ? 1 : 0, transition: `opacity 0.4s ${SB_EASE}` }}>
              {[GENS[7], GENS[1], GENS[3]].map((g, i) =>
                <div key={i} style={{ position: 'relative', borderRadius: 9, overflow: 'hidden', aspectRatio: '3/3.9', background: 'rgb(246,243,242)',
                  boxShadow: ready && i === 0 ? '0 0 0 2px var(--brand-purple-500)' : 'inset 0 0 0 1px rgba(28,27,27,0.08)' }}>
                  {!ready && <Shimmer style={{ position: 'absolute', inset: 0 }} />}
                  <img loading="lazy" decoding="async" src={g.src} alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 18%',
                    opacity: ready ? 1 : 0, filter: ready ? 'none' : 'blur(10px)', transition: `opacity 0.55s ${SB_EASE} ${i * 140}ms, filter 0.7s ${SB_EASE} ${i * 140}ms` }} />
                </div>)}
            </div>
            <div style={{ display: 'flex', opacity: step >= 4 ? 1 : 0, transition: `opacity 0.4s ${SB_EASE}` }}>
              <span style={{ borderRadius: '13px 13px 13px 3px', background: 'rgb(246,243,242)', color: INK, padding: '8px 11px', fontSize: 10.5, fontWeight: 500, maxWidth: '85%', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.06)' }}>
                Caption written, queued for 9:00 PM — <span style={{ fontWeight: 700, color: 'var(--brand-purple-700)' }}>approve to ship</span>.</span>
            </div>
          </div>
        </div>
      </Reveal>
    </section>);
};

// § 01 Quick starts
const MCP_STARTS = [['Photo for social', false], ['Photo for OnlyFans', false], ['Photoshoot for social', false], ['Photoshoot for OnlyFans', false], ['Video for social', false], ['Find reels to clone', true]];
const MCPQuickstarts = () => {
  const [sel, setSel] = cmpS(-1);
  return (
    <MShell bg="#fff">
      <MCPBadgeHead label="Copilot · Quick starts" ac={CP_ACCENTS['Quick starts']} title={<span>“What should<br /><GradText>we make?”</GradText></span>}
        sub="Six starting points — or just type. Each thread binds to one Character." />
      <MCPCard lean="left">
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 6, marginBottom: 10 }}>
          {MCP_STARTS.map(([s, plan], i) =>
            <span key={s} onClick={() => setSel(i)} style={{ display: 'flex', flexDirection: 'column', gap: 3, borderRadius: 10, padding: '9px 10px', fontSize: 10, fontWeight: sel === i ? 700 : 600, cursor: 'pointer', transition: 'all 0.18s',
              background: sel === i ? 'var(--brand-purple-50)' : 'rgb(250,247,247)',
              boxShadow: sel === i ? 'inset 0 0 0 1.5px var(--brand-purple-400)' : 'inset 0 0 0 1px rgba(28,27,27,0.08)', color: INK }}>
              {s}
              {plan && <span style={{ alignSelf: 'flex-start', fontSize: 6.5, fontWeight: 800, letterSpacing: '0.06em', color: 'var(--brand-purple-700)', background: '#fff', border: '1px solid var(--brand-purple-200)', borderRadius: 9999, padding: '1px 6px' }}>PLAN MODE</span>}
            </span>)}
        </div>
        <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
          <span style={{ display: 'inline-flex', alignItems: 'center', gap: 4, fontSize: 9, fontWeight: 700, color: 'rgba(28,27,27,0.7)', background: 'rgb(246,243,242)', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.08)', borderRadius: 9999, padding: '5px 9px', flexShrink: 0 }}>
            <span style={{ width: 11, height: 11, borderRadius: '50%', backgroundImage: `url(${GENS[0].src})`, backgroundSize: 'cover', backgroundPosition: 'center 15%' }} />Scarlett</span>
          <div style={{ flex: 1, minWidth: 0, borderRadius: 9, background: 'rgb(235,231,231)', display: 'flex', alignItems: 'center', padding: '0 10px', height: 32, fontSize: 9.5, fontWeight: 500, color: 'rgba(28,27,27,0.5)', whiteSpace: 'nowrap', overflow: 'hidden' }}>
            {sel >= 0 ? MCP_STARTS[sel][0] : 'Or just type…'}
          </div>
        </div>
      </MCPCard>
    </MShell>);
};

// § 02 Generative UI
const MCPGenUI = () => {
  const [opt, setOpt] = cmpS(0);
  const opts = [GENS[7], GENS[1], GENS[3]];
  return (
    <MShell>
      <MCPBadgeHead label="Copilot · Generative UI" ac={CP_ACCENTS['Generative UI']} title={<span>It hands you<br /><GradText>ready-to-go shots.</GradText></span>}
        sub="Copilot suggests real shots with all the Create controls attached — flip through the options and hit Generate." />
      <MCPCard lean="right">
        <div style={{ display: 'grid', gridTemplateColumns: '0.95fr 1.05fr', gap: 9 }}>
          <div style={{ position: 'relative', borderRadius: 11, overflow: 'hidden', aspectRatio: '3/4.2', background: 'rgb(246,243,242)' }}>
            {opts.map((g, i) =>
              <img loading="lazy" decoding="async" key={i} src={g.src} alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 16%',
                opacity: opt === i ? 1 : 0, transition: `opacity 0.45s ${SB_EASE}` }} />)}
            <div style={{ position: 'absolute', left: 6, right: 6, bottom: 6, display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
              {[-1, 1].map((d, j) =>
                <span key={j} onClick={() => setOpt(o => (o + d + 3) % 3)} style={{ order: j ? 3 : 1, width: 22, height: 22, borderRadius: '50%', background: 'rgba(252,248,248,0.9)', display: 'grid', placeItems: 'center', cursor: 'pointer', boxShadow: '0 4px 10px rgba(28,27,27,0.25)' }}>
                  <svg width="8" height="8" viewBox="0 0 16 16" fill="none" style={{ transform: d < 0 ? 'rotate(180deg)' : 'none' }}><path d="M6 3.5L10.5 8 6 12.5" stroke={INK} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /></svg></span>)}
              <span style={{ order: 2, fontSize: 8, fontWeight: 700, color: '#fff', background: 'rgba(28,27,27,0.55)', borderRadius: 9999, padding: '2px 7px' }}>{opt + 1} / 3</span>
            </div>
          </div>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 5, justifyContent: 'center' }}>
            {[['Character', 'Scarlett'], ['Photo Control', 'Set · Outfit'], ['Aspect', '4:5'], ['Quantity', '3']].map(([k, v]) =>
              <div key={k} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', borderRadius: 8, background: 'rgb(250,247,247)', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.07)', padding: '6px 9px' }}>
                <span style={{ fontSize: 8.5, fontWeight: 700, color: INK }}>{k}</span>
                <span style={{ fontSize: 8.5, fontWeight: 600, color: 'rgba(28,27,27,0.55)' }}>{v}</span>
              </div>)}
            <span style={{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 3, borderRadius: 9, height: 32, background: PULSE, color: '#fff', fontSize: 8.5, fontWeight: 800, letterSpacing: '0.05em', marginTop: 2 }}>GENERATE ✦</span>
          </div>
        </div>
      </MCPCard>
    </MShell>);
};

// § 03 Conversational editing
const MCPChatEdit = () => {
  const [ref, on] = useReveal(0.35);
  const [done, setDone] = cmpS(false);
  cmpE(() => {
    if (!on) return;
    const t = setInterval(() => setDone(d => !d), 3200);
    return () => clearInterval(t);
  }, [on]);
  return (
    <MShell bg="#fff">
      <MCPBadgeHead label="Copilot · Editing" ac={CP_ACCENTS.Editing} title={<span>Edit by<br /><GradText>saying so.</GradText></span>}
        sub="Copilot keeps the conversation context and targets the right image — or opens the full suite in-thread." />
      <MCPCard lean="left">
        <div ref={ref}>
          <div style={{ display: 'flex', justifyContent: 'flex-end', marginBottom: 8 }}>
            <span style={{ borderRadius: '13px 13px 3px 13px', background: INK, color: '#fff', padding: '7px 10px', fontSize: 10, fontWeight: 500 }}>make her top red</span>
          </div>
          <div style={{ position: 'relative', borderRadius: 11, overflow: 'hidden', height: 260, background: 'rgb(246,243,242)', marginBottom: 8 }}>
            <img loading="lazy" decoding="async" src="assets/edits/base.webp" alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 12%' }} />
            <img loading="lazy" decoding="async" src="assets/edits/color.webp" alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 12%',
              opacity: done ? 1 : 0, transition: `opacity 0.7s ${SB_EASE}` }} />
            <span style={{ position: 'absolute', left: 7, bottom: 7, fontSize: 8.5, fontWeight: 700, color: '#fff', background: 'rgba(28,27,27,0.55)', borderRadius: 9999, padding: '2px 8px' }}>
              {done ? 'Edited — only the top changed' : 'Targeting the right image…'}</span>
          </div>
          <div className="m-nosb" style={{ display: 'flex', gap: 4, overflowX: 'auto' }}>
            {['Reimagine', 'Inpaint', 'Background', 'Expression', 'Crop', 'Filters'].map(t =>
              <span key={t} style={{ borderRadius: 9999, padding: '4px 9px', fontSize: 8.5, fontWeight: 600, background: 'rgb(246,243,242)', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.08)', color: INK, whiteSpace: 'nowrap', flexShrink: 0 }}>{t}</span>)}
          </div>
        </div>
      </MCPCard>
    </MShell>);
};

// § 04 Publishing
const MCPPublish = () => (
  <MShell>
    <MCPBadgeHead label="Copilot · Publishing" ac={CP_ACCENTS.Publishing} title={<span>It writes.<br /><GradText>You approve.</GradText></span>}
      sub="“Create post” hands you a prefilled card — caption in your voice, platforms picked, time set." />
    <MCPCard lean="right">
      <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 9 }}>
        <span style={{ fontSize: 11, fontWeight: 800, color: INK }}>Create Post <span style={{ fontSize: 8.5, fontWeight: 700, color: 'var(--brand-purple-700)' }}>· prefilled</span></span>
        <span style={{ fontSize: 8.5, fontWeight: 600, color: 'var(--text-tertiary)' }}>@scarlett.day</span>
      </div>
      <div className="m-nosb" style={{ display: 'flex', gap: 4, overflowX: 'auto', marginBottom: 9 }}>
        {[['Instagram', '#E1306C', true], ['Twitter/X', '#5B6470', false], ['TikTok', '#1C1B1B', false], ['Fanvue', '#1FB85A', true]].map(([n, c, on]) =>
          <span key={n} style={{ display: 'inline-flex', alignItems: 'center', gap: 4, borderRadius: 9999, padding: '4px 9px', fontSize: 9, fontWeight: on ? 700 : 600, whiteSpace: 'nowrap', flexShrink: 0,
            boxShadow: on ? 'inset 0 0 0 1.5px var(--brand-purple-500)' : 'inset 0 0 0 1px rgba(28,27,27,0.1)', color: on ? INK : 'rgba(28,27,27,0.45)' }}>
            <span style={{ width: 5, height: 5, borderRadius: '50%', background: c, opacity: on ? 1 : 0.4 }} />{n}</span>)}
      </div>
      <div style={{ display: 'flex', gap: 8, marginBottom: 9 }}>
        <span style={{ width: 54, borderRadius: 9, overflow: 'hidden', flexShrink: 0, aspectRatio: '3/3.9', position: 'relative' }}>
          <img loading="lazy" decoding="async" src={GENS[7].src} alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 18%' }} />
        </span>
        <div style={{ flex: 1, minWidth: 0, borderRadius: 10, background: 'rgb(250,248,247)', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.08)', padding: '8px 10px' }}>
          <div style={{ fontSize: 10, lineHeight: 1.5, color: INK }}>poolside, golden light, zero meetings. new set live now ↗</div>
          <span style={{ display: 'inline-block', marginTop: 5, fontSize: 9, fontWeight: 700, color: 'var(--brand-purple-700)' }}>✦ Rewrite in my voice</span>
        </div>
      </div>
      <div style={{ display: 'flex', alignItems: 'center', gap: 6, borderTop: '1px solid rgba(28,27,27,0.08)', paddingTop: 9 }}>
        <span style={{ fontSize: 9.5, fontWeight: 700, color: 'var(--brand-purple-600)' }}>Tonight, 9:00 PM</span>
        <span style={{ marginLeft: 'auto', display: 'inline-flex', alignItems: 'center', borderRadius: 9999, padding: '7px 12px', background: PULSE, color: '#fff', fontSize: 8.5, fontWeight: 700, letterSpacing: '0.05em', textTransform: 'uppercase' }}>Approve & schedule</span>
      </div>
    </MCPCard>
  </MShell>
);

// § 05 Checkpoints
const MCP_NODES = [
  { t: 'The brief', time: '8:02 PM' }, { t: 'Generated 3 options', time: '8:03 PM' },
  { t: 'Edit · top → red', time: '8:05 PM' }, { t: 'Post scheduled', time: '8:06 PM' }];

const MCPCheckpoints = () => {
  const [at, setAt] = cmpS(3);
  return (
    <MShell bg="#fff">
      <MCPBadgeHead label="Copilot · Checkpoints" ac={CP_ACCENTS.Checkpoints} title={<span>Every step,<br /><GradText>a checkpoint.</GradText></span>}
        sub="Each step is a node on the thread — Resume from here rolls back to any earlier point." />
      <MCPCard lean="left">
        <div style={{ display: 'flex', flexDirection: 'column' }}>
          {MCP_NODES.map((n, i) => {
            const live = i <= at;
            return (
              <div key={n.t} onClick={() => setAt(i)} style={{ display: 'flex', gap: 10, cursor: 'pointer' }}>
                <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: 18, flexShrink: 0 }}>
                  <span style={{ width: 16, height: 16, borderRadius: '50%', display: 'grid', placeItems: 'center', transition: 'all 0.25s', flexShrink: 0,
                    background: live ? PULSE : 'rgb(235,231,231)', boxShadow: i === at ? '0 0 0 3px var(--brand-purple-100)' : 'none' }}>
                    <svg width="7" height="7" viewBox="0 0 16 16" fill="none"><path d="M3 8.4l3.2 3.2L13.5 4" stroke={live ? '#fff' : 'rgba(28,27,27,0.4)'} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" /></svg></span>
                  {i < MCP_NODES.length - 1 && <span style={{ width: 2, flex: 1, minHeight: 18, background: i < at ? 'var(--brand-purple-300)' : 'rgb(235,231,231)', transition: 'all 0.25s' }} />}
                </div>
                <div style={{ paddingBottom: i < MCP_NODES.length - 1 ? 12 : 0, opacity: live ? 1 : 0.45, transition: 'opacity 0.25s', flex: 1, minWidth: 0, display: 'flex', alignItems: 'center', gap: 6 }}>
                  <span style={{ fontSize: 11, fontWeight: 700, color: INK }}>{n.t}</span>
                  <span style={{ fontSize: 8.5, fontWeight: 600, color: 'rgba(28,27,27,0.4)' }}>{n.time}</span>
                  {i === at && <span style={{ marginLeft: 'auto', fontSize: 7.5, fontWeight: 700, color: 'var(--brand-purple-700)', background: 'var(--brand-purple-50)', border: '1px solid var(--brand-purple-200)', borderRadius: 9999, padding: '2px 7px', whiteSpace: 'nowrap' }}>Resume from here</span>}
                </div>
              </div>);
          })}
        </div>
      </MCPCard>
    </MShell>);
};

// § 06 pipeline
const MCP_NEXT = [
  { t: 'Create Image', d: 'The composer Copilot drives.', kind: 'image', href: '/create-image' },
  { t: 'Editing Suite', d: 'The tools it opens in-thread.', kind: 'edit', href: '/editing-suite' },
  { t: 'Post & Analyze', d: 'Where approved posts land.', kind: 'sched', href: '/post-analyze' }];

const MCPPipeMedia = ({ kind }) => (
  <div style={{ width: 96, borderRadius: 11, overflow: 'hidden', flexShrink: 0, aspectRatio: '4/4.4', background: '#fff', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.08)', padding: 5, boxSizing: 'border-box', display: 'flex', flexDirection: 'column', gap: 4 }}>
    {kind === 'image' && <React.Fragment>
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4, flex: 1, minHeight: 0 }}>
        {['assets/create/out-mirror.webp', 'assets/create/out-garden.webp'].map((src, i) =>
          <span key={src} style={{ position: 'relative', borderRadius: 5, overflow: 'hidden', boxShadow: i === 0 ? '0 0 0 1.5px var(--brand-purple-500)' : 'inset 0 0 0 1px rgba(28,27,27,0.08)' }}>
            <img loading="lazy" decoding="async" src={src} alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 20%' }} /></span>)}
      </div>
      <span style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 3, borderRadius: 6, padding: '4px 0', background: PULSE, color: '#fff', fontSize: 6.5, fontWeight: 800, letterSpacing: '0.05em' }}>GENERATE ✦</span>
    </React.Fragment>}
    {kind === 'edit' &&
      <span style={{ position: 'relative', flex: 1, minHeight: 0, borderRadius: 6, overflow: 'hidden', background: 'rgb(246,243,242)', display: 'block' }}>
        <img loading="lazy" decoding="async" src="assets/edits/color.webp" alt="" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 10%' }} />
        <span style={{ position: 'absolute', top: 0, bottom: 0, left: '50%', width: 1.5, background: '#fff', boxShadow: '0 0 6px rgba(0,0,0,0.3)' }} />
      </span>}
    {kind === 'sched' &&
      <div style={{ display: 'flex', flexDirection: 'column', gap: 4, flex: 1, minHeight: 0 }}>
        {[[GENS[7].src, 'IG · 9:00'], [GENS[1].src, 'FV · 9:00'], [GENS[3].src, 'TT · 12:30']].map(([src, l]) =>
          <span key={l} style={{ display: 'flex', alignItems: 'center', gap: 5, borderRadius: 6, background: 'rgb(250,247,247)', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.07)', padding: '0 5px', flex: 1, minHeight: 0 }}>
            <span style={{ width: 14, height: 14, borderRadius: 4, overflow: 'hidden', flexShrink: 0 }}>
              <img loading="lazy" decoding="async" src={src} alt="" style={{ width: '100%', height: '100%', objectFit: 'cover', objectPosition: 'center 20%' }} /></span>
            <span style={{ fontSize: 7, fontWeight: 700, color: INK, whiteSpace: 'nowrap' }}>{l}</span>
          </span>)}
      </div>}
  </div>
);

const MCPPipeline = () => (
  <MShell>
    <MHead title={<span>One thread drives<br /><GradText>the whole studio.</GradText></span>}
      sub="Everything Copilot does runs on the same tools you can drive yourself." />
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12, marginTop: 28 }}>
      {MCP_NEXT.map((c, i) =>
        <Reveal key={c.t} delay={i * 90} y={20}>
          <a href={c.href} style={{ display: 'flex', gap: 12, borderRadius: 16, overflow: 'hidden', background: '#fff', boxShadow: 'inset 0 0 0 1px rgba(28,27,27,0.08)', color: 'inherit', padding: 10, transform: `rotate(${i % 2 ? 0.9 : -0.9}deg)` }}>
            <MCPPipeMedia kind={c.kind} />
            <div style={{ minWidth: 0, alignSelf: 'center' }}>
              <div style={{ fontSize: 14.5, fontWeight: 700, letterSpacing: '-0.01em', color: INK, marginBottom: 4 }}>{c.t}</div>
              <div style={{ fontSize: 11.5, lineHeight: 1.5, color: 'var(--text-secondary)' }}>{c.d}</div>
            </div>
          </a>
        </Reveal>
      )}
    </div>
    <Reveal delay={280} style={{ textAlign: 'center', marginTop: 20 }}>
      <a href="/" style={{ fontSize: 12.5, fontWeight: 600, color: 'var(--brand-purple-700)' }}>See the full tour →</a>
    </Reveal>
  </MShell>
);

const MCPPage = () => (
  <React.Fragment>
    <div style={{ fontFamily: 'var(--font-sans)', maxWidth: 430, margin: '0 auto', boxShadow: '0 0 0 1px rgba(28,27,27,0.06), 0 0 60px rgba(28,27,27,0.08)', overflow: 'clip' }}>
      <div data-screen-label="Hero — Copilot"><MCPHero /></div>
      <div data-screen-label="01 Quick starts"><MCPQuickstarts /></div>
      <div data-screen-label="02 Generative UI"><MCPGenUI /></div>
      <div data-screen-label="03 Conversational editing"><MCPChatEdit /></div>
      <div data-screen-label="04 Publishing"><MCPPublish /></div>
      <div data-screen-label="05 Checkpoints"><MCPCheckpoints /></div>
      <div data-screen-label="06 In the studio"><MCPPipeline /></div>
      <div data-screen-label="07 Pricing"><window.MPricingSection /></div>
      <div data-screen-label="08 FAQ"><window.MFAQSection /></div>
      <div data-screen-label="CTA + Footer"><window.MFinalSection /></div>
    </div>
    <window.MCISticky />
    <window.SozeeNavMobile siteHref="/" localLabels={{ '/copilot': 'Hero — Copilot', '10 Copilot': 'Hero — Copilot', '15 Pricing': '07 Pricing', '16 FAQ': '08 FAQ' }} />
  </React.Fragment>
);

Object.assign(window, { MCPPage });
