/* global React, GradText, SectionHead */
// Copy registry — four voices, all run through the Sozee Brand Voice spec (two-beat turns,
// sentence case + full stops, exact product nouns, no banned words, specifics over adjectives).
// A "Editorial" = house voice · B "Grinder" = §2.2 hours-back, punchy · C "Climber" = §2.3 on-ramp,
// shortest sentences, prices stated · D "Worldbuilder" = §2.5 studio register, worlds and control.
const CopyCtx = React.createContext('A');

const LGRAD = { backgroundImage: 'linear-gradient(135deg,#C9A8FF,#A675FF)' };
const F = ({ children }) => <React.Fragment>{children}</React.Fragment>;

const SECTIONS = {
  train: { eyebrow: '01 — Your Character', cta: 'Join for free',
    A: { title: <F>Three photos.<br /><GradText>Forever.</GradText></F>,
      sub: 'A face shot, a body shot, a voice sample. Sozee builds your Character in about ten minutes — locked to your likeness, private, never shared.' },
    B: { title: <F>Clone yourself.<br /><GradText>Once.</GradText></F>,
      sub: 'Three photos and about ten minutes. Your Character looks like you in every photo — and they never take a day off.' },
    C: { title: <F>Three photos.<br /><GradText>That’s the setup.</GradText></F>,
      sub: 'A face shot, two body shots, and a voice sample. No training, no waiting. Your Character is private — nobody sees them but you.' },
    D: { title: <F>One likeness.<br /><GradText>Locked.</GradText></F>,
      sub: 'Sozee holds your creator’s face and body steady across every set, every week. The foundation a persona gets built on.' },
    E: { title: <F>Three photos.<br /><GradText>That’s the setup.</GradText></F>,
      sub: 'A face shot, two body shots, and a voice sample. No training, no waiting. Your Character is private — nobody sees them but you.' } },
  builder: { eyebrow: '02 — Character Builder', cta: 'Start today',
    A: { title: <F>No muse?<br /><GradText>Build one.</GradText></F>,
      sub: 'Design a Character from scratch — origin, features, physique, the details that make them unmistakable — through a push-button wizard. No prompting skill required.' },
    B: { title: <F>Pick their look.<br /><GradText>Tile by tile.</GradText></F>,
      sub: 'Face, hair, body, the works — Sozee generates their portraits on the spot. They work everywhere: Create, Photo Shoot, the Scheduler, Copilot.' },
    C: { title: <F>No photos?<br /><GradText>Start anyway.</GradText></F>,
      sub: 'Pick their origin, hair and body from tiles. Portraits generate in about a minute — one credit each.' },
    D: { title: <F>Cast them<br /><GradText>from zero.</GradText></F>,
      sub: 'Origin, features, physique, the marks that make them real — then editable generation prompts when you want exact control. They\u2019re yours, everywhere.' },
    E: { title: <F><span style={{ whiteSpace: 'nowrap' }}>No muse or character?</span><br /><GradText>Build an AI influencer.</GradText></F>,
      sub: 'Design a Character from scratch — origin, features, physique, the details that make them unmistakable — through a push-button wizard. No prompting skill required.' } },
  studio: { eyebrow: '03 — Create', cta: 'Start generating',
    A: { title: <F>Type it. <GradText>Shot.</GradText></F>,
      sub: 'Create turns a sentence into a set — 4:5 or 9:16, up to 4K, one to four photos at a time. Your Character, your call on every detail.' },
    B: { title: <F>Skip the studio.<br /><GradText>Keep the looks.</GradText></F>,
      sub: 'Describe the scene once. Twenty seconds later, photos of you — no photographer, no ring light, no reshoots.' },
    C: { title: <F>Type a scene.<br /><GradText>Get the photo.</GradText></F>,
      sub: 'One credit per image. The first lands in about twenty seconds. Edit the prompt or skip it — Explore pre-fills it for you.' },
    D: { title: <F>A studio<br /><GradText>with no walls.</GradText></F>,
      sub: 'Any scene you can name, shot with your Character in it — 4:5 to 9:16, up to 4K. The set list never runs out.' },
    E: { title: <F>No shoot day.<br /><GradText>Still a drop day.</GradText></F>,
      sub: 'Twenty seconds from idea to image means the queue is never empty — and neither is the feed. Create is where the backlog comes from.' } },
  control: { eyebrow: '04 — Photo Control', cta: 'Join for free',
    A: { title: <F>You don’t prompt it.<br /><GradText>You direct it.</GradText></F>,
      sub: 'Five dimensions you set — Setting, Outfit, Shot style, Expression, Object — from presets and your own saved libraries. No prompt-craft, no re-rolling.' },
    B: { title: <F>Stop describing the outfit.<br /><GradText>Pick it.</GradText></F>,
      sub: 'Dial in the room, the fit, the framing, the face and the props from tiles. The pill stacks your picks — Photo Control · 3 — and every one of them holds.' },
    C: { title: <F>No prompts.<br /><GradText>Just picks.</GradText></F>,
      sub: 'Tap the face, the framing, the room, the fit. Five tabs, all presets. Sozee does the rest.' },
    D: { title: <F>Set the scene.<br /><GradText>Keep the scene.</GradText></F>,
      sub: 'Setting, Outfit, Shot style, Expression, Object — dialed in from libraries you build once and reuse forever.' },
    E: { title: <F>One aesthetic.<br /><GradText>Zero accidents.</GradText></F>,
      sub: 'Fans subscribe to a look. Photo Control keeps every post inside it — the room, the fit, the framing, all yours, all repeatable.' } },
  shoot: { eyebrow: '05 — Photo Shoot', cta: 'Start generating',
    A: { title: <F>They don’t shoot more.<br /><GradText>They produce more.</GradText></F>,
      sub: 'One image becomes a locked set of up to ten — same Character, same outfit, same room. A month of content in an afternoon.' },
    B: { title: <F>One photo.<br /><GradText>A month of posts.</GradText></F>,
      sub: 'Pick a source image and Sozee shoots the rest of the set around it — identity locked, angles and expressions moving. Post daily without shooting daily.' },
    C: { title: <F>One good photo.<br /><GradText>Ten posts.</GradText></F>,
      sub: 'Pick your best photo and Sozee shoots the set around it — about one credit per image, same face in every one.' },
    D: { title: <F>Direct<br /><GradText>the whole set.</GradText></F>,
      sub: 'Identity, outfit and environment lock; angle, pose and expression move. Ten photos from one world — coherent enough to carry a story arc.' },
    E: { title: <F>Turn 1 photo<br /><GradText>into a full set.</GradText></F>,
      sub: 'One Photo Shoot fills the calendar for weeks — which is the difference between posting daily and living behind a camera.' } },
  edit: { eyebrow: '06 — Edit Image', cta: 'Start today',
    A: { title: <F>Fix anything.<br /><GradText>Reshoot nothing.</GradText></F>,
      sub: 'Brush the spot, describe it, and only that part moves — or Reimagine the whole photo. Expressions, backgrounds, Filters, upscale to 4K.' },
    B: { title: <F>Point at it.<br /><GradText>Say what to change.</GradText></F>,
      sub: 'Paint over the eyes, type \u201csunglasses,\u201d done. Every image opens into Brush, Reimagine, Filters and one-tap expressions.' },
    C: { title: <F>Wrong shirt.<br /><GradText>Two taps.</GradText></F>,
      sub: 'Brush the spot, type the change. Expressions are one click. Upscale to 4K for one credit.' },
    D: { title: <F>Fix the detail.<br /><GradText>Keep the world.</GradText></F>,
      sub: 'Brush and Reimagine change what you point at — the rest of the photo, and the world it lives in, stays put.' },
    E: { title: <F>Nothing reshot.<br /><GradText>Nothing wasted.</GradText></F>,
      sub: 'The almost-right photo becomes the right one — so every generation you paid for ends up postable.' } },
  video: { eyebrow: '07 — Create video', cta: 'Start generating',
    A: { title: <F>Type it.<br /><GradText>Watch it move.</GradText></F>,
      sub: 'Four ways in: animate a photo, clone a library reference, paste a reel link, or describe the idea — Sozee expands thin prompts before they run. Five to fifteen seconds, up to 1080p.' },
    B: { title: <F>Your best photo.<br /><GradText>Now it moves.</GradText></F>,
      sub: 'Start from a photo, a reference, a link or a sentence. Direct the motion in plain words — \u201cslow push-in, they turn to camera.\u201d' },
    C: { title: <F>Videos.<br /><GradText>No camera.</GradText></F>,
      sub: 'Pick a photo or paste a link. Five-second clips on every paid plan — five credits at 480p.' },
    D: { title: <F>Stills were<br /><GradText>act one.</GradText></F>,
      sub: 'Animate any photo, direct the camera in plain words, or clone a reference — their face holds at 1080p, fifteen seconds at a time.' },
    E: { title: <F>On video daily.<br /><GradText>On camera never.</GradText></F>,
      sub: 'Reels keep an account alive. Now yours ship without a single take — five to fifteen seconds at a time.' } },
  reel: { eyebrow: '08 — Reel Cloning', cta: 'Join for free',
    A: { title: <F>Steal the motion.<br /><GradText style={LGRAD}>Keep yourself.</GradText></F>,
      sub: 'Paste any Instagram, TikTok or YouTube link. Sozee re-shoots the reel\u2019s motion as your Character — frame for frame, camera move for camera move.' },
    B: { title: <F>Saw a reel pop?<br /><GradText style={LGRAD}>Clone it as you.</GradText></F>,
      sub: 'Paste the link. Same motion, same cuts, your face. Trend to post in minutes.' },
    C: { title: <F>Copy the trend.<br /><GradText style={LGRAD}>Keep your face.</GradText></F>,
      sub: 'Paste an Instagram, TikTok or YouTube link. Sozee re-shoots it as you — no dance practice, no ring light.' },
    D: { title: <F>Any motion.<br /><GradText style={LGRAD}>Their performance.</GradText></F>,
      sub: 'A reference reel becomes their scene — frame for frame, camera move for camera move.' },
    E: { title: <F>Catch the trend<br /><GradText style={LGRAD}>while it’s a trend.</GradText></F>,
      sub: <span>Trends have a shelf life of days. Reel Cloning turns one around{' '}<br className="d-br" />in minutes — so you ride the wave instead of watching it.</span> } },
  voice: { eyebrow: '09 — Voice Notes & Live Mode', cta: 'Start today',
    A: { title: <F>Their voice.<br /><GradText>Your words.</GradText></F>,
      sub: 'Clone the voice once — free, from fifteen seconds of audio. Type anything and send it spoken. Or open Live Mode and direct the performance on camera, in real time.' },
    B: { title: <F>Talk to fans.<br /><GradText>Without talking.</GradText></F>,
      sub: 'Type it, they say it. Or go live — your camera feed, your creator on it, six credits a minute.' },
    C: { title: <F>Fifteen seconds.<br /><GradText>Their voice forever.</GradText></F>,
      sub: 'Record or upload a clip — cloning is free. Voice Notes cost about 0.01 credits a second. Live Mode runs six credits a minute.' },
    D: { title: <F>Give them a voice.<br /><GradText>Then a pulse.</GradText></F>,
      sub: 'Cloned speech for the DMs, Live Mode for real time — you act, they perform, frame by frame.' },
    E: { title: <F>Fans feel close.<br /><GradText>You stay free.</GradText></F>,
      sub: 'Voice Notes keep the DMs warm without recording a thing. And talking-head videos ship in their voice — camera-ready, without you saying a word on camera.' } },
  copilot: { eyebrow: '10 — Copilot', cta: 'Start generating',
    A: { title: <F>“What should<br />we <GradText>make?”</GradText></F>,
      sub: 'Copilot reads your Characters, your Vault and what\u2019s performing — then answers with working controls, not paragraphs. Every suggestion arrives ready to generate.' },
    B: { title: <F>Plan less.<br /><GradText>Approve more.</GradText></F>,
      sub: 'Tell it what you want. It drafts the shoot, generates the content and books the posts — you approve.' },
    C: { title: <F>Ask for it.<br /><GradText>Approve it.</GradText></F>,
      sub: 'Copilot drafts the shot, generates it and schedules the post inside one thread. Chat turns cost about 0.1 credits.' },
    D: { title: <F>You set direction.<br /><GradText>It runs production.</GradText></F>,
      sub: 'Copilot reads your Characters, your Vault and your numbers — then plans briefs, shoots them and books the calendar.' },
    E: { title: <F>Skip the learning curve.<br /><GradText>Keep the output.</GradText></F>,
      sub: 'You don’t have to master five tools to run like someone who did. Ask Copilot, approve the result, move on with your day.' } },
  sched: { eyebrow: '11 — The Scheduler', cta: 'Join for free',
    A: { title: <F>Shoot today.<br /><GradText>Posted all week.</GradText></F>,
      sub: 'Accounts connect per Character — Instagram, TikTok, X, Facebook, Reddit, Fanvue. Queue posts straight from a shoot and the split shows what Sozee drove.' },
    B: { title: <F>Queue it.<br /><GradText>Close the laptop.</GradText></F>,
      sub: 'A week of posts in one sitting. Sozee hits every slot while you\u2019re offline.' },
    C: { title: <F>Post everywhere.<br /><GradText>From one place.</GradText></F>,
      sub: 'Instagram, TikTok, X, Facebook, Reddit, Fanvue. Pick times, write captions, done — Sozee posts while you\u2019re at work.' },
    D: { title: <F>One queue.<br /><GradText>Every platform.</GradText></F>,
      sub: 'Accounts connect per Character. Posts flow from shoot to slot to stats without leaving Sozee.' },
    E: { title: <F>Generate. Schedule.<br /><GradText>Post. Repeat.</GradText></F>,
      sub: 'The feed stays daily whether you’re working, traveling or offline — six platforms, zero missed slots.' } },
  calendar: { eyebrow: '12 — The Scheduler · Calendar', cta: 'Start today',
    A: { title: <F>Your week,<br /><GradText>already posted.</GradText></F>,
      sub: 'Every Character keeps their own connected accounts and their own queue. Fill the calendar once — Sozee hits every slot without you.' },
    B: { title: <F>Set the week.<br /><GradText>Walk away.</GradText></F>,
      sub: 'Twelve posts across Instagram, TikTok and Fanvue in one sitting. The calendar runs itself while you make the next set.' },
    C: { title: <F>Fill a week.<br /><GradText>In one sitting.</GradText></F>,
      sub: 'Quick times — 9:00, 1:00, 5:00 — or your own. The queue runs whether you\u2019re online or not.' },
    D: { title: <F>Their week,<br /><GradText>plotted.</GradText></F>,
      sub: 'Every Character keeps their own calendar and cadence. Twelve posts land on schedule while you build the next world.' },
    E: { title: <F>Take the weekend.<br /><GradText>Keep the streak.</GradText></F>,
      sub: 'Consistency is what the algorithm pays for — and what burnout kills first. The calendar holds the streak so you don’t have to.' } },
  analytics: { eyebrow: '13 — The Scheduler · Analytics', cta: 'Join for free',
    A: { title: <F>Proof,<br />not <GradText>vibes.</GradText></F>,
      sub: 'Impressions, reach, likes, comments, shares, engagement — every post, every platform, one table. The Sozee-posted split shows exactly what the studio drove.' },
    B: { title: <F>Receipts,<br /><GradText>live.</GradText></F>,
      sub: 'Per post, per platform — with the Sozee-posted vs. you-posted split doing the talking.' },
    C: { title: <F>Numbers in.<br /><GradText>Guesswork out.</GradText></F>,
      sub: 'Impressions, reach, likes and engagement per post — plus what Sozee posted versus what you did.' },
    D: { title: <F>The loop<br /><GradText>closes here.</GradText></F>,
      sub: 'Cast, direct, publish, measure — the split shows what the studio drove, per post, per platform.' },
    E: { title: <F>Hope less.<br /><GradText>Know more.</GradText></F>,
      sub: 'The Sozee-posted split shows what the studio actually moved — so doubling down is a decision, not a guess.' } },
  explore: { eyebrow: '14 — Explore', cta: 'Start generating',
    A: { title: <F>Start from <GradText>what works.</GradText></F>,
      sub: 'A feed of proven concepts. Tap one and it generates as your Character — prompt pre-filled, fully editable, one credit.' },
    B: { title: <F>Out of ideas. <GradText>Not out of posts.</GradText></F>,
      sub: 'Scroll concepts that already perform, tap, and it renders as you — one click, one credit.' },
    C: { title: <F>Tap it. <GradText>It’s you.</GradText></F>,
      sub: 'A feed of ready-made concepts — one credit, about twenty seconds, prompt editable if you want.' },
    D: { title: <F>Borrow the concept. <GradText>Own the result.</GradText></F>,
      sub: 'Proven scenes, re-cast with your Character — a starting point for worlds of your own.' },
    E: { title: <F>Viral inspiration.<br /><GradText>Updated weekly.</GradText></F>,
      sub: 'You never start from zero again — Explore keeps a feed of concepts that already perform, one tap from being yours.' } },
  anywhere: { eyebrow: 'Work from anywhere', cta: 'Start today',
    A: { title: <F>Full studio.<br /><GradText>Any screen.</GradText></F>,
      sub: 'The same Create, Photo Shoot and Scheduler on desktop and phone — start a set at the desk, approve it from bed.' },
    B: { title: <F>Shoot from<br /><GradText>the couch.</GradText></F>,
      sub: 'Everything works on your phone — generate, edit, schedule. The desk is optional.' },
    C: { title: <F>Phone or laptop.<br /><GradText>Same studio.</GradText></F>,
      sub: 'Nothing to install. Log in and the whole studio is there — both screens, one account.' },
    D: { title: <F>The studio<br /><GradText>travels.</GradText></F>,
      sub: 'Direct from anywhere — the worlds, wardrobes and queues sync across every screen.' },
    E: { title: <F>Desk optional.<br /><GradText>Output constant.</GradText></F>,
      sub: 'The studio runs wherever you are — desktop for deep sessions, phone for everything else. The feed never notices the difference.' } },
};

function useCopy(k) {
  const v = React.useContext(CopyCtx);
  const s = SECTIONS[k];
  return { eyebrow: s.eyebrow, cta: s.cta, ...(s[v] || s.A) };
}

const CopyHead = ({ k, dark = false, center = false, row = false }) => {
  const c = useCopy(k);
  const { SectionHead: SH, Reveal: Rv, CTAButton: Btn } = window;
  if (row) return (
    <div style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'space-between', gap: 40, flexWrap: 'wrap' }}>
      <SH num={c.eyebrow} title={c.title} sub={c.sub} dark={dark} wide={true} />
      <Rv delay={240} style={{ paddingBottom: 6 }}>
        <Btn>{c.cta}</Btn>
      </Rv>
    </div>
  );
  return (
    <div style={{ textAlign: center ? 'center' : 'left' }}>
      <SH num={c.eyebrow} title={c.title} sub={c.sub} dark={dark} center={center} />
      <Rv delay={240} style={{ marginTop: 28 }}>
        <Btn>{c.cta}</Btn>
      </Rv>
    </div>
  );
};

const VoiceSwitch = ({ voice, setVoice }) => (
  <div style={{ position: 'fixed', left: 22, bottom: 22, zIndex: 60, display: 'flex', alignItems: 'center', gap: 4,
    background: 'rgba(20,16,23,0.88)', backdropFilter: 'blur(10px)', WebkitBackdropFilter: 'blur(10px)',
    borderRadius: 9999, padding: 4, border: '1px solid rgba(255,255,255,0.14)', boxShadow: '0 10px 30px rgba(0,0,0,0.35)' }}>
    <span style={{ fontSize: 10, fontWeight: 700, letterSpacing: '0.1em', textTransform: 'uppercase', color: 'rgba(255,255,255,0.55)', padding: '0 8px 0 12px' }}>Copy</span>
    {[['A', 'Editorial'], ['B', 'Grinder'], ['C', 'Climber'], ['D', 'Worldbuilder'], ['E', 'Outcomes']].map(([v, l]) => (
      <button key={v} onClick={() => setVoice(v)} style={{
        border: 0, cursor: 'pointer', borderRadius: 9999, padding: '7px 12px', fontSize: 11.5, fontWeight: 700,
        background: voice === v ? 'linear-gradient(135deg, #6813D4, #813CED)' : 'transparent',
        color: voice === v ? '#fff' : 'rgba(255,255,255,0.65)', transition: 'all 0.2s' }}>{l}</button>
    ))}
  </div>
);

Object.assign(window, { CopyCtx, useCopy, CopyHead, VoiceSwitch });
