// sections.jsx — sections 2-9 of the homepage:
// LogoStrip, CreativePipeline, Showcase, HowItWorks, Differentiators,
// Trust, FinalCTA, Footer.

/* eslint-disable react/prop-types */

// Reusable wordmark renderer for the logo strip
function Wordmark({ name, style, img, h }) {
  if (img) {
    return <img className="logo-img" src={img} alt={name} style={{ height: h }} loading="lazy" />;
  }
  return <span className="wordmark" style={style}>{name}</span>;
}

// ─────────── 2. Logo strip (marquee) ───────────
function LogoStrip() {
  const row = window.BRAND_LOGOS.concat(window.BRAND_LOGOS);
  return (
    <section className="section-sm logo-strip" id="brands">
      <div className="container">
        <div className="logo-strip-label">
          <span className="eyebrow">Trusted by performance teams at</span>
        </div>
      </div>
      <div className="logo-marquee">
        <div className="logo-track">
          {row.map((b, i) =>
          <div className="logo-cell" key={b.name + i}>
              <Wordmark name={b.name} style={b.style} img={b.img} h={b.h} />
            </div>
          )}
        </div>
      </div>
    </section>);

}

// ─────────── 3. Creative pipeline (before/after) ───────────
function CreativePipeline() {
  return (
    <section className="section" id="pipeline">
      <div className="container">
        <div className="section-head">
          <span className="eyebrow">The core promise</span>
          <h2 className="section-title">
            Don't just build creatives. <span className="serif-italic">Build Ad generation systems.</span>
          </h2>
          <p className="section-sub">
            You and your team brings creativity, taste and judgement. Deploy agents for the rest. Remove bottlenecks to generate marketing videos at large scale.
          </p>
        </div>

        <div className="pipeline">
          <div className="pipeline-side pipeline-before">
            <div className="pipeline-tag chip">RAW</div>
            <div className="pipeline-raw">
              <div className="pipeline-raw-frame">
                <div className="raw-clip-bg" />
                <div className="raw-product" />
                <div className="raw-meta mono">CLIP_001.MOV · 0:42</div>
              </div>
            </div>
            <div className="pipeline-caption">One brief, few references.</div>
          </div>

          <div className="pipeline-arrow" aria-hidden="true">
            <svg viewBox="0 0 80 24" fill="none">
              <defs>
                <linearGradient id="arr-grad" x1="0" x2="1">
                  <stop offset="0%" stopColor="var(--fg-3)" stopOpacity="0.2" />
                  <stop offset="100%" stopColor="var(--accent)" stopOpacity="1" />
                </linearGradient>
              </defs>
              <path d="M2 12 L72 12 M62 4 L74 12 L62 20" stroke="url(#arr-grad)" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" fill="none" />
            </svg>
            <div className="pipeline-arrow-label mono">PREXI</div>
          </div>

          <div className="pipeline-side pipeline-after">
            <div className="pipeline-tag chip" data-variant="output">12 VARIANTS</div>
            <div className="pipeline-after-grid">
              {Array.from({ length: 12 }, (_, i) =>
              <div key={i} className={`pipeline-out pipeline-out-${i + 1}`}>
                  <div className="pipeline-out-thumb" />
                  <div className="pipeline-out-meta mono">
                    {[
                  "9:16 · :15",
                  "1:1 · :30",
                  "9:16 · :06",
                  "9:16 · :15",
                  "1:1 · :15",
                  "9:16 · :30",
                  "4:5 · :15",
                  "9:16 · :06",
                  "9:16 · :15",
                  "4:5 · :30",
                  "1:1 · :06",
                  "9:16 · :15"][
                  i]}
                  </div>
                </div>
              )}
            </div>
            <div className="pipeline-caption">Twelve in the auction by Friday.</div>
          </div>
        </div>
      </div>
    </section>);

}

// ─────────── 4. Showcase — real Meta ads ───────────
function AdCard({ ad, layout }) {
  const [hovered, setHovered] = React.useState(false);
  return (
    <article
      className={`ad-card ad-${ad.productShape}`}
      style={{ background: ad.bg, color: ad.fg }}
      onMouseEnter={() => setHovered(true)}
      onMouseLeave={() => setHovered(false)}>
      
      <div className="ad-meta-top">
        <span className="ad-meta-brand mono">SPONSORED · {ad.brand}</span>
        <span className="ad-meta-format mono">9:16</span>
      </div>

      {/* product art — abstracted per shape */}
      <ProductArt shape={ad.productShape} accent={ad.accent} />

      {/* gradient scrim for legibility */}
      <div className="ad-scrim" />

      {/* copy + CTA */}
      <div className="ad-overlay">
        <div className="ad-headline" style={{ color: ad.fg }}>
          {ad.headline}
        </div>
        {ad.body && <div className="ad-body" style={{ color: ad.fg, opacity: 0.82 }}>{ad.body}</div>}
        <div className="ad-cta" style={{ background: ad.accent, color: ad.fg === "#1F1B16" ? "#F4F1EA" : ad.bg.includes("#1F1B16") || ad.bg.includes("#0D0B08") ? "#1F1B16" : "#1F1B16" }}>
          {ad.cta} <span style={{ opacity: 0.6 }}>→</span>
        </div>
      </div>

      {/* "play" pseudo-controls along bottom */}
      <div className="ad-controls">
        <div className="ad-progress">
          <div className="ad-progress-fill" />
        </div>
      </div>

      {/* hover state: subtle play button */}
      <div className={`ad-play ${hovered ? "in" : ""}`}>
        <svg viewBox="0 0 14 14" fill="currentColor"><path d="M3 2L11 7L3 12Z" /></svg>
      </div>
    </article>);

}

// Abstracted product illustrations — purely SVG so they read as
// "product photography" stand-ins at small sizes.
function ProductArt({ shape, accent }) {
  if (shape === "bottle-amber") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="135" rx="20" ry="3" fill="rgba(0,0,0,0.4)" />
        <rect x="42" y="20" width="16" height="8" fill="#3A2418" />
        <rect x="44" y="28" width="12" height="6" fill="#5A3A1B" />
        <path d="M30 38 Q30 34 38 34 H62 Q70 34 70 38 V128 Q70 134 64 134 H36 Q30 134 30 128 Z" fill="#8E5A2E" />
        <path d="M30 38 Q30 34 38 34 H62 Q70 34 70 38 V128 Q70 134 64 134 H36 Q30 134 30 128 Z" fill="url(#bottle-shine)" opacity="0.5" />
        <defs>
          <linearGradient id="bottle-shine" x1="0" x2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.3" />
            <stop offset="40%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <rect x="36" y="62" width="28" height="40" fill="#F4EAD7" />
        <text x="50" y="78" textAnchor="middle" fontFamily="Instrument Serif" fontSize="9" fill="#1F1B16">VELLUM</text>
        <text x="50" y="92" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="5" letterSpacing="1" fill="#6F6A5E">SLEEP · 30ml</text>
      </svg>);

  }
  if (shape === "pack-olive") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="135" rx="28" ry="3" fill="rgba(0,0,0,0.4)" />
        <path d="M28 50 Q28 38 38 38 H62 Q72 38 72 50 V128 Q72 134 66 134 H34 Q28 134 28 128 Z" fill="#3F4A33" />
        <path d="M28 50 Q28 38 38 38 H62 Q72 38 72 50 V128 Q72 134 66 134 H34 Q28 134 28 128 Z" fill="url(#pack-shine)" opacity="0.4" />
        <defs>
          <linearGradient id="pack-shine" x1="0" x2="0" y1="0" y2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.3" />
            <stop offset="50%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <rect x="34" y="58" width="32" height="8" fill="#5A6841" rx="1" />
        <rect x="34" y="70" width="32" height="44" fill="#4A5538" rx="1" />
        <rect x="38" y="100" width="24" height="2" fill={accent} opacity="0.8" />
        <rect x="42" y="44" width="16" height="3" fill="#7A8A5C" rx="1" />
      </svg>);

  }
  if (shape === "powder-jar") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="135" rx="26" ry="3" fill="rgba(0,0,0,0.25)" />
        <rect x="28" y="40" width="44" height="10" fill="#2E5D4F" rx="2" />
        <rect x="30" y="50" width="40" height="80" fill="#F4F1EA" rx="2" />
        <rect x="30" y="50" width="40" height="80" fill="url(#jar-shine)" opacity="0.6" rx="2" />
        <defs>
          <linearGradient id="jar-shine" x1="0" x2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.5" />
            <stop offset="50%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <text x="50" y="80" textAnchor="middle" fontFamily="Plus Jakarta Sans" fontSize="7" fontWeight="500" fill="#2E5D4F">hempstead</text>
        <rect x="38" y="86" width="24" height="1" fill="#2E5D4F" />
        <text x="50" y="100" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="4" letterSpacing="1.5" fill="#1F1B16">DAILY GREENS</text>
        <text x="50" y="116" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="3" letterSpacing="1" fill="#6F6A5E">30 SERVINGS</text>
      </svg>);

  }
  if (shape === "bottle-tall") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="138" rx="20" ry="3" fill="rgba(0,0,0,0.5)" />
        <path d="M38 24 H62 V32 H58 V38 H42 V32 H38 Z" fill="#E8A45C" />
        <path d="M40 38 H60 V134 Q60 138 56 138 H44 Q40 138 40 134 Z" fill="#1A1612" stroke="#3A2A1B" strokeWidth="0.5" />
        <rect x="44" y="60" width="12" height="60" fill="url(#bottle-tall-shine)" opacity="0.3" />
        <defs>
          <linearGradient id="bottle-tall-shine" x1="0" x2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.6" />
            <stop offset="100%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <text x="50" y="80" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="7" fontWeight="700" fill="#E8A45C">LOOP.</text>
        <line x1="44" y1="86" x2="56" y2="86" stroke="#E8A45C" strokeWidth="0.5" />
        <text x="50" y="100" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="4" letterSpacing="1" fill="#F4F1EA" opacity="0.6">750ml</text>
      </svg>);

  }
  if (shape === "candle") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="135" rx="28" ry="3" fill="rgba(0,0,0,0.4)" />
        <ellipse cx="50" cy="62" rx="22" ry="4" fill="#3A2418" />
        <path d="M28 62 Q28 130 28 130 Q28 134 32 134 H68 Q72 134 72 130 V62 Z" fill="#6F2F1F" />
        <path d="M28 62 Q28 130 28 130 Q28 134 32 134 H68 Q72 134 72 130 V62 Z" fill="url(#candle-shine)" opacity="0.5" />
        <defs>
          <linearGradient id="candle-shine" x1="0" x2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.4" />
            <stop offset="40%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <rect x="36" y="86" width="28" height="22" fill="#F4DEC6" />
        <text x="50" y="98" textAnchor="middle" fontFamily="Instrument Serif" fontSize="6" fontStyle="italic" fill="#6F2F1F">Sable &amp; Pine</text>
        <text x="50" y="105" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="3" letterSpacing="1" fill="#6F2F1F">CEDAR · 8oz</text>
        {/* flame */}
        <ellipse cx="50" cy="44" rx="3" ry="6" fill="#F4DEC6">
          <animate attributeName="ry" values="6;7;6" dur="1.5s" repeatCount="indefinite" />
        </ellipse>
        <ellipse cx="50" cy="46" rx="2" ry="4" fill="#E8C77D">
          <animate attributeName="ry" values="4;5;4" dur="1.5s" repeatCount="indefinite" />
        </ellipse>
        <line x1="50" y1="56" x2="50" y2="62" stroke="#1F1B16" strokeWidth="0.8" />
      </svg>);

  }
  if (shape === "can") {
    return (
      <svg className="ad-art" viewBox="0 0 100 150" fill="none">
        <ellipse cx="50" cy="135" rx="22" ry="3" fill="rgba(0,0,0,0.25)" />
        <ellipse cx="50" cy="38" rx="18" ry="4" fill="#0F0E0C" />
        <path d="M32 38 V128 Q32 132 36 132 H64 Q68 132 68 128 V38 Z" fill="#1F1B16" />
        <path d="M32 38 V128 Q32 132 36 132 H64 Q68 132 68 128 V38 Z" fill="url(#can-shine)" opacity="0.4" />
        <defs>
          <linearGradient id="can-shine" x1="0" x2="1">
            <stop offset="0%" stopColor="#fff" stopOpacity="0.35" />
            <stop offset="50%" stopColor="#fff" stopOpacity="0" />
          </linearGradient>
        </defs>
        <text x="50" y="68" textAnchor="middle" fontFamily="Instrument Serif" fontStyle="italic" fontSize="7" fill="#F2EAD3">Northbound</text>
        <line x1="38" y1="74" x2="62" y2="74" stroke="#F2EAD3" strokeWidth="0.5" />
        <text x="50" y="96" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="5" letterSpacing="2" fill="#F2EAD3">COLD</text>
        <text x="50" y="106" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="5" letterSpacing="2" fill="#F2EAD3">BREW</text>
        <text x="50" y="120" textAnchor="middle" fontFamily="JetBrains Mono" fontSize="3" letterSpacing="1" fill="#F2EAD3" opacity="0.6">12 fl oz</text>
      </svg>);

  }
  return null;
}

function Showcase({ layout }) {
  const ads = window.SHOWCASE_ADS;
  return (
    <section className="section showcase" id="showcase">
      <div className="container-wide">
        <div className="section-head section-head-row">
          <div>
            <span className="eyebrow">The grounding moment</span>
            <h2 className="section-title">
              Real Meta ads. <span className="serif-italic">Made with Prexi.</span>
            </h2>
          </div>
          <div className="showcase-controls">
            <button className="chip showcase-tag">9:16 · auto-loop</button>
          </div>
        </div>

        <div className={`showcase-${layout}`} data-layout={layout}>
          {ads.map((ad) =>
          <AdCard ad={ad} key={ad.id} layout={layout} />
          )}
        </div>

        <div className="showcase-foot">
          <span className="link-arrow">
            See the full archive <span className="ar">→</span>
          </span>
        </div>
      </div>
    </section>);

}

// ─────────── 5. How it works ───────────
function HowItWorks() {
  return (
    <section className="section how" id="how">
      <div className="container">
        <div className="section-head">
          <span className="eyebrow">How it works</span>
          <h2 className="section-title">
            Three steps. <span className="serif-italic">You stay in the director's chair.</span>
          </h2>
        </div>

        <div className="how-grid">
          <div className="how-steps">
            <HowStep
              num="01"
              title="Define your workflow"
              body="Walk Prexi through how your team makes ads: the briefs, the brand rules, the assets, the platforms. The agent learns your house style, not a generic one." />
            
            <HowStep
              num="02"
              title="The agent builds"
              body="Prexi sources footage, drafts scenes, writes captions in your voice, and sizes for every placement. The boring 90% of the job, done in the background." />
            
            <HowStep
              num="03"
              title="You direct"
              body="Approve, swap, recut. Every scene is editable; the agent re-renders downstream. You ship what you'd ship, just sooner, and more of it." />
            
          </div>

          <div className="how-visual">
            <div className="how-visual-frame">
              <div className="how-app">
                {/* Left: agent activity feed */}
                <div className="how-app-feed">
                  <div className="how-feed-head">
                    <span className="mono" style={{ fontSize: 10, opacity: 0.6, letterSpacing: "0.08em" }}>
                      AGENT · LIVE
                    </span>
                  </div>
                  <div className="how-feed-list">
                    {[
                    { dot: "var(--accent-color)", t: "Drafting 8 captions in your voice…" },
                    { dot: "var(--persona-scientist)", t: "Resizing 9:16 → 1:1 (6 of 12)" },
                    { dot: "var(--amber)", t: "Flagged: claim needs legal sign-off" },
                    { dot: "var(--accent-color)", t: "Sourcing UGC from /vellum-creators" },
                    { dot: "var(--persona-gold)", t: "Ready for review: Hook 03B" }].
                    map((f, i) =>
                    <div key={i} className="how-feed-row" style={{ animationDelay: `${i * 0.4}s` }}>
                        <span className="how-feed-dot" style={{ background: f.dot }} />
                        <span className="how-feed-text">{f.t}</span>
                      </div>
                    )}
                  </div>
                </div>
                {/* Right: review panel */}
                <div className="how-app-review">
                  <div className="how-review-header">
                    <span style={{ fontSize: 11, fontWeight: 600 }}>Hook 03B · Awaiting your call</span>
                  </div>
                  <div className="how-review-preview">
                    <div className="how-review-frame" />
                    <div className="how-review-frame how-review-frame-2" />
                    <div className="how-review-frame how-review-frame-3" />
                  </div>
                  <div className="how-review-actions">
                    <span className="how-review-btn how-review-btn-pri">Approve</span>
                    <span className="how-review-btn">Recut</span>
                    <span className="how-review-btn">Swap</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>);

}

function HowStep({ num, title, body }) {
  return (
    <div className="how-step">
      <span className="mono how-step-num">{num}</span>
      <div className="how-step-body">
        <h3 className="how-step-title">{title}</h3>
        <p className="how-step-text">{body}</p>
      </div>
    </div>);

}

// ─────────── 6. What's different ───────────
function Differentiators() {
  const items = [
  {
    tag: "Your workflow",
    title: "Trained on how your team works.",
    body: "Most AI tools generate from templates. Prexi starts from your briefs, your brand voice, your assets, your past winners. The output looks like you, because it learned from you.",
    visual: "workflow"
  },
  {
    tag: "Scene-level control",
    title: "Every scene is editable, and the rest re-renders.",
    body: "Swap a clip, rewrite a line, change a CTA. The agent regenerates the variants downstream so the whole grid stays coherent without redoing the work.",
    visual: "scenes"
  },
  {
    tag: "Human taste, AI ops",
    title: "The agent removes the grind. You stay the editor.",
    body: "Sourcing, captioning, resizing, exporting: gone. The judgement that actually moves performance stays with your team: what's funny, what's on-brand, what works.",
    visual: "taste"
  }];

  return (
    <section className="section diff" id="differentiators">
      <div className="container">
        <div className="section-head">
          <span className="eyebrow">What's different</span>
          <h2 className="section-title">
            Most AI video tools generate. <span className="serif-italic">Prexi gets directed.</span>
          </h2>
        </div>
        <div className="diff-grid">
          {items.map((it, i) =>
          <div className="diff-card" key={i}>
              <div className="diff-card-visual">
                <DiffVisual kind={it.visual} />
              </div>
              <div className="diff-card-body">
                <span className="chip diff-tag">{it.tag}</span>
                <h3 className="diff-title">{it.title}</h3>
                <p className="diff-text">{it.body}</p>
              </div>
            </div>
          )}
        </div>
      </div>
    </section>);

}

function DiffVisual({ kind }) {
  if (kind === "workflow") {
    return (
      <div className="dv-workflow">
        <div className="dv-doc">
          <div className="dv-doc-line" style={{ width: "70%" }} />
          <div className="dv-doc-line" style={{ width: "92%" }} />
          <div className="dv-doc-line" style={{ width: "60%" }} />
          <div className="dv-doc-line dv-doc-hl" style={{ width: "85%" }} />
          <div className="dv-doc-line" style={{ width: "50%" }} />
        </div>
        <div className="dv-doc dv-doc-2">
          <div className="dv-doc-line" style={{ width: "55%" }} />
          <div className="dv-doc-line" style={{ width: "80%" }} />
          <div className="dv-doc-line dv-doc-hl" style={{ width: "70%" }} />
          <div className="dv-doc-line" style={{ width: "92%" }} />
        </div>
        <div className="dv-arrow" />
        <div className="dv-output">
          <div className="dv-output-thumb dv-out-1" />
          <div className="dv-output-thumb dv-out-2" />
          <div className="dv-output-thumb dv-out-3" />
        </div>
      </div>);

  }
  if (kind === "scenes") {
    return (
      <div className="dv-scenes">
        <div className="dv-scene-row">
          <div className="dv-scene-tile dv-scene-locked" />
          <div className="dv-scene-tile dv-scene-locked" />
          <div className="dv-scene-tile dv-scene-edit">
            <div className="dv-scene-edit-ring" />
          </div>
          <div className="dv-scene-tile dv-scene-locked" />
        </div>
        <div className="dv-scene-arrow">↓ re-renders</div>
        <div className="dv-scene-out">
          <div className="dv-scene-out-tile" />
          <div className="dv-scene-out-tile" />
          <div className="dv-scene-out-tile" />
          <div className="dv-scene-out-tile" />
        </div>
      </div>);

  }
  if (kind === "taste") {
    return (
      <div className="dv-taste">
        <div className="dv-taste-grind">
          <div className="dv-taste-grind-row">
            <span className="dv-taste-pill mono">SOURCE</span>
            <span className="dv-taste-strike" />
          </div>
          <div className="dv-taste-grind-row">
            <span className="dv-taste-pill mono">CAPTION</span>
            <span className="dv-taste-strike" />
          </div>
          <div className="dv-taste-grind-row">
            <span className="dv-taste-pill mono">RESIZE</span>
            <span className="dv-taste-strike" />
          </div>
          <div className="dv-taste-grind-row">
            <span className="dv-taste-pill mono">EXPORT</span>
            <span className="dv-taste-strike" />
          </div>
        </div>
        <div className="dv-taste-keep">
          <span className="serif-italic dv-taste-keep-title">Taste.</span>
          <span className="dv-taste-keep-sub">What's funny. What's on-brand. What works.</span>
        </div>
      </div>);

  }
  return null;
}

// ─────────── 7. Trust & brand safety ───────────
function Trust() {
  const trusts = [
  {
    title: "Your data stays yours.",
    body: "We never train on your footage or briefs. Your library is encrypted, isolated per workspace, and exportable any time."
  },
  {
    title: "Output follows your brand guidelines.",
    body: "Type, color, tone, claims, banned words: all encoded once. Every variant the agent ships is checked against your house rules before it reaches you."
  },
  {
    title: "Nothing ships without your sign-off.",
    body: "Variants land in a review queue. No auto-publish, no surprise. You approve what goes to Meta, every time."
  }];

  return (
    <section className="section trust" id="trust">
      <div className="container">
        <div className="trust-grid">
          <div className="trust-intro">
            <span className="eyebrow">Trust & brand safety</span>
            <h2 className="section-title">
              Built for <span className="serif-italic">brand-safe</span> marketing.
            </h2>
            <p className="section-sub">
              Your footage, your briefs, your brand, handled with care. Brand safety isn't a setting you switch on. It's how Prexi is built, end to end.
            </p>
          </div>

          <div className="trust-list">
            {trusts.map((t, i) =>
            <div className="trust-item" key={i}>
                <span className="trust-bullet" />
                <div>
                  <h3 className="trust-title">{t.title}</h3>
                  <p className="trust-body">{t.body}</p>
                </div>
              </div>
            )}
          </div>
        </div>
      </div>
    </section>);

}

// ─────────── 8. Final CTA ───────────
function FinalCTA() {
  return (
    <section className="section section-lg final" id="final">
      <div className="container">
        <div className="final-card">
          <div className="final-bg" aria-hidden="true" />
          <div className="final-content">
            <span className="eyebrow">Ready to deploy</span>
            <h2 className="final-title">
              Stop staffing the grind.<br />
              <span className="serif-italic">Start building the system.</span>
            </h2>
            <p className="final-sub">
              Twenty minutes with a founder. Bring a campaign you're stuck scaling; we'll show you how Prexi's agents would run it, and what's left for your team to direct.
            </p>
            <div className="final-ctas">
              <button className="btn btn-primary">
                <PlayIcon /> Watch the demo
              </button>
              <a className="btn btn-ghost" href="book-a-call.html">
                Talk to founder <ArrowIcon2 />
              </a>
            </div>
          </div>
        </div>
      </div>
    </section>);

}

// ─────────── 9. Footer ───────────
function Footer() {
  return (
    <footer className="site-footer">
      <div className="container">
        <div className="footer-top">
          <div className="footer-brand">
            <a className="brand" href="index.html" style={{ fontSize: 32 }}>
              Prexi<span className="brand-dot" />
            </a>
            <p className="footer-tag">
              The AI video agent for performance marketing teams.
            </p>
            <div className="footer-cta">
              <a className="btn btn-ghost btn-sm" href="book-a-call.html">
                Schedule demo <ArrowIcon2 />
              </a>
            </div>
          </div>
          <div className="footer-cols">
            {window.FOOTER_GROUPS.map((g) =>
            <div className="footer-col" key={g.title}>
                <div className="footer-col-title">{g.title}</div>
                <ul className="footer-col-links">
                  {g.links.map((l) =>
                <li key={l.label}><a href={l.href}>{l.label}</a></li>
                )}
                </ul>
              </div>
            )}
          </div>
        </div>
        <div className="footer-bottom">
          <div className="footer-meta">© 2026 Prexi Labs, Inc. · Built for the world</div>
          <div className="footer-meta-right">
            <span>Privacy</span>
            <span>Terms</span>
            <span>Brand safety</span>
            <span className="mono" style={{ fontSize: 11, opacity: 0.6 }}>v1.0</span>
          </div>
        </div>
      </div>
    </footer>);

}

function PlayIcon() {
  return (
    <svg viewBox="0 0 14 14" fill="none">
      <path d="M3.5 2.5L11 7L3.5 11.5V2.5Z" fill="currentColor" />
    </svg>);

}
function ArrowIcon2() {
  return (
    <svg viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
      <path d="M2.5 7H11.5M8 3.5L11.5 7L8 10.5" />
    </svg>);

}

Object.assign(window, {
  LogoStrip, CreativePipeline, Showcase, AdCard, HowItWorks,
  Differentiators, Trust, FinalCTA, Footer
});