// InnerPages.jsx — For Brands, For Sports, For Apps, How It Works
const { useState: useStateIP } = React;

// ── Shared hero for inner pages ──────────────────────────────
function PageHero({ pre, line1, line2, body, cta1, cta2, onCta1, onCta2, bg = '#0D1B3E', kanji = '善', light = true }) {
  const [entered, setEntered] = React.useState(false);
  React.useEffect(() => { setTimeout(() => setEntered(true), 60); }, []);
  return (
    <section style={{ background: bg, padding: '110px 80px 90px', position: 'relative', overflow: 'hidden', minHeight: '440px' }} className="grain">
      <Kanji char={kanji} style={{ right: '40px', top: '-30px', color: light ? '#F0DFA0' : '#1A1410', opacity: 0.045 }} size={320} />
      <div style={{ position: 'absolute', left: '32px', top: '50%', transform: 'translateY(-50%)', writingMode: 'vertical-rl', fontFamily: "'Noto Sans JP',sans-serif", fontWeight: 300, fontSize: '12px', color: light ? 'rgba(240,223,160,0.25)' : 'rgba(201,74,26,0.25)', letterSpacing: '0.18em' }}>ゼンコ プロトコル</div>
      <div style={{ maxWidth: '1200px', margin: '0 auto', position: 'relative', zIndex: 2, maxWidth: '760px' }}>
        <div style={{ opacity: entered ? 1 : 0, transform: entered ? 'none' : 'translateY(24px)', transition: 'opacity 0.75s, transform 0.75s' }}>
          <PreHeadline light={light}>{pre}</PreHeadline>
          <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: 'clamp(36px,4vw,62px)', lineHeight: 1.08, color: light ? '#F0DFA0' : '#1A1410', marginBottom: '6px' }}>{line1}</div>
          {line2 && <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: 'clamp(36px,4vw,62px)', lineHeight: 1.08, color: '#C94A1A', marginBottom: '28px' }}>{line2}</div>}
          <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '17px', lineHeight: 1.85, color: light ? 'rgba(240,223,160,0.65)' : '#7A6F65', marginBottom: '40px', maxWidth: '560px' }}>{body}</p>
          <div style={{ display: 'flex', gap: '12px', flexWrap: 'wrap' }}>
            {cta1 && <BtnPrimary onClick={onCta1}>{cta1}</BtnPrimary>}
            {cta2 && <BtnOutline light={light} onClick={onCta2}>{cta2}</BtnOutline>}
          </div>
        </div>
      </div>
    </section>
  );
}

// ── FOR BRANDS ───────────────────────────────────────────────
function ForBrandsPage({ onNavigate }) {
  const steps = [
    { n: '01', title: 'Set your engagement action', body: 'Webinar attendance. Content download. Lead form completion. Product demo booking. You define what "engaging" means for your campaign.' },
    { n: '02', title: 'Set the reward', body: 'Zenko configures the incentive and redemption journey against the campaign rules. The exact reward mechanics are confirmed before a campaign goes live.' },
    { n: '03', title: 'Give people a meaningful choice', body: 'Participants can be offered personal reward, impact options, or both. Zenko calls this Gold or Good.' },
    { n: '04', title: 'Link activity to evidence', body: 'Campaign reporting can connect participation, allocated rewards and supporting delivery evidence so partners can see what was funded and who delivered it.' },
  ];
  const usecases = [
    { title: 'Lead Generation', body: 'Zenko-powered lead gen trades an action — genuine engagement with your content — for a reward that creates impact. Leads arrive knowing your brand and associate you with something good.' },
    { title: 'Webinars & Virtual Events', body: 'Add a meaningful reward to attendance, participation or follow-up. Zenko can make the action and the intended outcome clear without relying on another generic giveaway.' },
    { title: 'Content Campaigns', body: 'Gate your premium content behind a Zenko action. The audience spends focused attention. You get a genuinely engaged lead. The content actually gets read.' },
    { title: 'Account-Based Marketing', body: "For enterprise ABM, Zenko creates a differentiated touch that cuts through. You're not offering a coffee voucher — you're offering proof of impact." },
  ];

  return (
    <>
      <PageHero
        pre="For Brands" kanji="ブランド" bg="#0D1B3E"
        line1="Turn participation into"
        line2="measurable good."
        body="Zenko helps brands connect useful audience actions with rewards and evidenced real-world outcomes. Build a campaign around the action that matters to you."
        cta1="Talk to us →" cta2="For marketers →"
        onCta1={() => onNavigate('Contact')} onCta2={() => onNavigate('For Marketers')}
      />
      <Band />

      {/* Steps */}
      <section style={{ background: '#F7F3E9', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>The Mechanics</PreHeadline><SectionHeading line1="The mechanics," line2="plainly explained" /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {steps.map((s, i) => (
              <Reveal key={s.n} delay={i * 0.1}>
                <div style={{ background: '#F7F3E9', padding: '40px 36px', display: 'flex', gap: '24px' }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '42px', color: '#C94A1A', lineHeight: 1, flexShrink: 0 }}>{s.n}</div>
                  <div>
                    <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '20px', color: '#1A1410', marginBottom: '10px' }}>{s.title}</div>
                    <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '14px', lineHeight: 1.8, color: '#7A6F65' }}>{s.body}</p>
                  </div>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
      <Band />

      {/* Use cases */}
      <section style={{ background: '#EDE8D8', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>Use Cases in Depth</PreHeadline><SectionHeading line1="Where Zenko makes" line2="participation count" /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2,1fr)', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {usecases.map((u, i) => {
              const [hover, setStateHov] = useStateIP(false);
              return (
                <Reveal key={u.title} delay={i * 0.1}>
                  <div onMouseEnter={() => setStateHov(true)} onMouseLeave={() => setStateHov(false)}
                    style={{ background: hover ? '#fff' : '#EDE8D8', padding: '36px 32px', borderLeft: hover ? '4px solid #C94A1A' : '4px solid transparent', transition: 'all 0.25s', height: '100%' }}>
                    <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '22px', color: '#1A1410', marginBottom: '14px' }}>{u.title}</div>
                    <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.8, color: '#7A6F65' }}>{u.body}</p>
                  </div>
                </Reveal>
              );
            })}
          </div>
        </div>
      </section>
      <Band />

      {/* ESG section */}
      <section style={{ background: '#1B6370', padding: '96px 80px', position: 'relative', overflow: 'hidden' }} className="grain">
        <Kanji char="使命" style={{ right: '40px', top: '0', color: '#F0DFA0', opacity: 0.04 }} size={220} />
        <div style={{ maxWidth: '1200px', margin: '0 auto', position: 'relative', zIndex: 2, maxWidth: '680px' }}>
          <Reveal>
            <PreHeadline light>Impact reporting</PreHeadline>
            <SectionHeading line1="Link campaign activity" line2="to delivery evidence" light />
            <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: 'rgba(240,223,160,0.65)', marginTop: '24px', marginBottom: '16px' }}>
              Purpose claims need more than a headline. Partners need to be able to explain what was funded, when it happened and where the evidence lives.
            </p>
            <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: 'rgba(240,223,160,0.65)', marginBottom: '32px' }}>
              Zenko is designed to link campaign activity to a traceable record and supporting evidence from the delivery partner. That makes the outcome easier to report and review.
            </p>
            <BtnPrimary onClick={() => onNavigate('Contact')}>Book a strategy call →</BtnPrimary>
          </Reveal>
        </div>
      </section>
    </>
  );
}

// ── FOR MARKETERS ───────────────────────────────────────────
function ForMarketersPage({ onNavigate }) {
  const applications = [
    { title: 'Reward useful actions', body: 'Build around the action you value: registering, learning, attending, contributing a review or joining a community activity. The campaign rules define what earns a reward.' },
    { title: 'Create a better reason to engage', body: 'Offer Gold, Good or a combination. Rather than a generic incentive, participants can understand the reward and the outcome their action is intended to support.' },
    { title: 'Keep the evidence connected', body: 'Link campaign activity, reward allocation and delivery-partner evidence in one reporting journey. It is a stronger basis for explaining impact than a vague purpose claim.' },
  ];
  return (
    <>
      <PageHero
        pre="For marketers" kanji="参加" bg="#0D1B3E"
        line1="Rewards-based campaigns"
        line2="with a second outcome."
        body="Zenko helps marketing teams turn participation into a reward journey that can also support real-world impact."
        cta1="Plan a campaign →" cta2="How Zenko works →"
        onCta1={() => onNavigate('Contact')} onCta2={() => onNavigate('How It Works')}
      />
      <Band />
      <section style={{ background: '#F7F3E9', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>Promotional tools for participation</PreHeadline><SectionHeading line1="Make the action clear." line2="Make the outcome visible." /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {applications.map((application, i) => (
              <Reveal key={application.title} delay={i * 0.1}>
                <div style={{ background: '#F7F3E9', padding: '40px 32px', height: '100%' }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '22px', color: '#1A1410', marginBottom: '14px' }}>{application.title}</div>
                  <p style={{ fontFamily: "'Syne',sans-serif", fontSize: '15px', lineHeight: 1.8, color: '#7A6F65' }}>{application.body}</p>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
      <Band />
      <section style={{ background: '#1B6370', padding: '80px', position: 'relative', overflow: 'hidden' }} className="grain">
        <div style={{ maxWidth: '1200px', margin: '0 auto', display: 'grid', gridTemplateColumns: 'minmax(0,1fr) auto', gap: '32px', alignItems: 'center' }}>
          <div>
            <PreHeadline light>Evidence-led impact</PreHeadline>
            <SectionHeading line1="The claim is only as good" line2="as the proof behind it." light />
            <p style={{ fontFamily: "'Syne',sans-serif", fontSize: '16px', lineHeight: 1.85, color: 'rgba(240,223,160,0.65)', marginTop: '24px', maxWidth: '650px' }}>Zenko connects a campaign record with supporting delivery evidence. It does not turn an unsupported claim into proof.</p>
          </div>
          <BtnOutline light onClick={() => onNavigate('Causes')}>Explore outcomes →</BtnOutline>
        </div>
      </section>
    </>
  );
}

// ── FOR SPORTS ───────────────────────────────────────────────
function ForSportsPage({ onNavigate }) {
  const deployments = [
    { title: 'Shirt & Merchandise', body: 'Embed Zenko rewards into every purchase in your club shop. Every shirt bought funds a cause. The MK Dons campaign distributed 2,000 meals through three schools in the Milton Keynes City area. ITV covered it.' },
    { title: 'Match Attendance', body: 'Reward fans for showing up. Season ticket holders earn $ZENKO per match attended. Away fans earn bonus tokens. Attendance becomes participation in something bigger.' },
    { title: 'Digital Engagement', body: 'App opens, content views, quiz completions, pre-match video watches — all rewardable through Zenko. Every interaction creates impact and reinforces the habit.' },
    { title: 'Community Campaigns', body: 'Run purpose-driven campaigns tied to local causes. Partner with a food bank. Plant trees in your city. Zenko handles token rewards, on-chain proof, and impact reporting.' },
    { title: 'Sponsor Activation', body: 'Give sponsors a Zenko-powered activation package with verified ESG impact tied directly to their logo. A shirt sponsor running a Zenko campaign gets real-world good they can report.' },
  ];

  return (
    <>
      <PageHero
        pre="For Sports" kanji="スポーツ" bg="#1B6370"
        line1="Your fans are loyal."
        line2="Give them a reason that goes beyond the badge."
        body="Zenko lets sports clubs build fan engagement campaigns that create real community impact — and give clubs a new commercial and CSR story that media, sponsors, and the league actually care about."
        cta1="Talk to our sports team →" cta2="Read the MK Dons story →"
        onCta1={() => onNavigate('Contact')} onCta2={() => {}}
      />
      <Band />

      {/* Problem */}
      <section style={{ background: '#F7F3E9', padding: '96px 80px', position: 'relative', overflow: 'hidden' }}>
        <Kanji char="問" style={{ right: '-10px', top: '0', color: '#C94A1A', opacity: 0.04 }} />
        <div style={{ maxWidth: '1200px', margin: '0 auto', maxWidth: '740px' }}>
          <Reveal>
            <PreHeadline>The Problem</PreHeadline>
            <SectionHeading line1="Points schemes age out." line2="Discounts commoditise." />
            <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: '#7A6F65', marginTop: '24px', marginBottom: '24px' }}>
              Most fan engagement platforms offer points for purchases that can be redeemed for... more purchases. It creates no emotional depth and no story worth telling.
            </p>
            <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: '#7A6F65', marginBottom: '24px' }}>
              Zenko is different. When a fan earns $ZENKO for attending a match or buying the shirt — and that $ZENKO funds meals for kids in your city — the engagement stops being transactional and starts being meaningful.
            </p>
            <PullQuote>That's a story. Sponsors want to be part of it. Media want to cover it. Fans feel proud.</PullQuote>
          </Reveal>
        </div>
      </section>
      <Band />

      {/* Deployments */}
      <section style={{ background: '#EDE8D8', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>How Clubs Use Zenko</PreHeadline><SectionHeading line1="Five ways clubs are" line2="deploying Zenko" /></Reveal>
          <div style={{ display: 'flex', flexDirection: 'column', gap: '2px', marginTop: '48px' }}>
            {deployments.map((d, i) => {
              const [open, setOpen] = useStateIP(i === 0);
              return (
                <Reveal key={d.title} delay={i * 0.07}>
                  <div style={{ background: open ? '#fff' : '#EDE8D8', borderLeft: open ? '4px solid #C94A1A' : '4px solid transparent', transition: 'all 0.25s' }}>
                    <div onClick={() => setOpen(!open)} style={{ padding: '24px 28px', cursor: 'pointer', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                      <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '20px', color: '#1A1410' }}>{d.title}</div>
                      <div style={{ color: '#C94A1A', fontWeight: 700, fontSize: '20px', transition: 'transform 0.25s', transform: open ? 'rotate(45deg)' : 'none' }}>+</div>
                    </div>
                    {open && <div style={{ padding: '0 28px 24px', fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.8, color: '#7A6F65' }}>{d.body}</div>}
                  </div>
                </Reveal>
              );
            })}
          </div>
        </div>
      </section>
      <Band />

      {/* Case study */}
      <section style={{ background: '#0D1B3E', padding: '96px 80px', position: 'relative', overflow: 'hidden' }} className="grain">
        <Kanji char="証" style={{ right: '40px', top: '0', color: '#F0DFA0', opacity: 0.04 }} />
        <div style={{ maxWidth: '1200px', margin: '0 auto', position: 'relative', zIndex: 2 }}>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '80px', alignItems: 'center' }}>
            <Reveal>
              <PreHeadline light>Case Study</PreHeadline>
              <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: 'clamp(28px,3vw,42px)', color: '#F0DFA0', lineHeight: 1.15, marginBottom: '6px' }}>MK Dons × Zenko</div>
              <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: 'clamp(22px,2.5vw,34px)', color: '#C94A1A', marginBottom: '24px' }}>"Buy a shirt. Feed a child."</div>
              <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: 'rgba(240,223,160,0.65)', marginBottom: '32px' }}>
                The MK Dons campaign funded 2,000 meals, distributed through three schools in the Milton Keynes City area. ITV covered it. The EFL featured it. Fans who bought the shirt didn't just buy kit — they made a measurable contribution to their local community.
              </p>
              <BtnPrimary onClick={() => window.open('https://fast.wistia.net/embed/iframe/e2v6u9e97h', '_blank', 'noopener,noreferrer')}>Watch the ITV coverage →</BtnPrimary>
            </Reveal>
            <Reveal delay={0.2}>
              <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2px', background: 'rgba(240,223,160,0.1)' }}>
                {[{ num: '2,000', label: 'Meals Distributed' }, { num: '3', label: 'Local Schools' }, { num: 'ITV', label: 'National Coverage' }, { num: 'EFL', label: 'League Feature' }].map((s, i) => (
                  <div key={i} style={{ background: '#0D1B3E', padding: '32px 20px', textAlign: 'center' }}>
                    <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: 'clamp(26px,3vw,42px)', color: '#C94A1A', lineHeight: 1, marginBottom: '8px' }}>{s.num}</div>
                    <div style={{ fontFamily: "'Syne',sans-serif", fontWeight: 500, fontSize: '11px', color: 'rgba(240,223,160,0.5)', letterSpacing: '0.1em', textTransform: 'uppercase' }}>{s.label}</div>
                  </div>
                ))}
              </div>
            </Reveal>
          </div>
        </div>
      </section>
      <Band />

      {/* Commercial case */}
      <section style={{ background: '#F7F3E9', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '80px' }}>
          <Reveal>
            <PreHeadline>The Commercial Case</PreHeadline>
            <SectionHeading line1="This isn't just purpose." line2="It's a new commercial model." />
          </Reveal>
          <Reveal delay={0.15}>
            <div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '8px' }}>
              {['Charge sponsors a premium for purpose-driven activations with verifiable ESG outcomes', 'Open new conversations with brands that have sustainability mandates', 'Generate media coverage that a standard sponsor deal never produces', 'Build fan data through engagement mechanics traditional loyalty schemes can\'t match'].map((item, i) => (
                <div key={i} style={{ display: 'flex', gap: '14px', alignItems: 'flex-start' }}>
                  <div style={{ width: '6px', height: '6px', background: '#C94A1A', marginTop: '8px', flexShrink: 0 }}></div>
                  <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.75, color: '#7A6F65' }}>{item}</p>
                </div>
              ))}
              <div style={{ marginTop: '24px' }}>
                <BtnPrimary onClick={() => onNavigate('Contact')}>Talk to our sports team →</BtnPrimary>
              </div>
            </div>
          </Reveal>
        </div>
      </section>
    </>
  );
}

// ── ZENKO APPS ───────────────────────────────────────────────
function ZenkoAppsPage({ onNavigate }) {
  const apps = [
    { name: 'Learn', mark: '学', proposition: 'Turn knowledge into action.', action: 'Quizzes, education, onboarding and knowledge campaigns.', commercial: 'Increase completion, recall and qualified participation.', good: 'Support meals, education and local programmes.', color: '#C94A1A' },
    { name: 'Move', mark: '動', proposition: 'Turn movement into momentum.', action: 'Steps, activity, wellbeing and sponsored challenges.', commercial: 'Build repeat engagement, healthier habits and sponsor value.', good: 'Support meals, trees and carbon reduction.', color: '#1B6370' },
    { name: 'Shop', mark: '買', proposition: 'Turn purchases into proof.', action: 'Retail, merchandise and purchase-linked impact.', commercial: 'Increase conversion, basket value and repeat purchase.', good: 'Support community and environmental outcomes.', color: '#4A5C2A' },
    { name: 'Play', mark: '遊', proposition: 'Turn attention into participation.', action: 'Games, predictions, missions and fan engagement.', commercial: 'Create richer fan data, longer attention and sponsor inventory.', good: 'Support club causes and verified climate action.', color: '#0D1B3E' },
    { name: 'Explore', mark: '旅', proposition: 'Turn discovery into footfall.', action: 'Visits, trails, events and place-based campaigns.', commercial: 'Increase visits, event participation and local discovery.', good: 'Support place-based community projects.', color: '#8B3F24' },
  ];
  return (
    <>
      <PageHero pre="Zenko Apps" kanji="五" bg="#1A1410" line1="Five ways to inspire action." line2="One connected engagement engine."
        body="Activate a ready-made Zenko product around the behaviour your brand needs: learning, movement, shopping, play or exploration. We provide the participation mechanic, reward layer and proof of good."
        cta1="Build an activation →" cta2="See how Zenko works →" onCta1={() => onNavigate('Contact')} onCta2={() => onNavigate('How It Works')} />
      <Band />
      <section className="zenko-apps-page" style={{ background: '#F7F3E9', padding: '104px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>Ready-made products</PreHeadline><SectionHeading line1="Start with the action." line2="Connect it to an outcome." /></Reveal>
          <div className="zenko-apps-page__list">
            {apps.map((app, i) => (
              <Reveal key={app.name} delay={i * 0.08}>
                <article className="zenko-apps-page__item" style={{ '--app-color': app.color }}>
                  <div className="zenko-apps-page__identity"><span>{app.mark}</span><div><h2>{app.name}</h2><strong>{app.proposition}</strong></div></div>
                  <div className="zenko-apps-page__detail"><small>The action</small><p>{app.action}</p></div>
                  <div className="zenko-apps-page__detail"><small>Commercial outcome</small><p>{app.commercial}</p></div>
                  <div className="zenko-apps-page__detail"><small>Good it can fund</small><p>{app.good}</p></div>
                </article>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
      <Band />
      <section className="zenko-apps-page__choice" style={{ background: '#1B6370', padding: '88px 80px' }}>
        <div><Reveal><PreHeadline light>One ecosystem</PreHeadline><SectionHeading line1="Use one app." line2="Or connect all five." light /></Reveal></div>
        <Reveal delay={0.12}><div><p>Each app can run as a focused campaign or connect through GoZenko as part of a longer customer journey. The same participant can learn, move, shop, play and explore, with every action contributing to one measurable view of engagement and impact.</p><BtnOutline light onClick={() => onNavigate('Contact')}>Plan your activation →</BtnOutline></div></Reveal>
      </section>
    </>
  );
}

// ── FOR PLATFORMS ───────────────────────────────────────────
function ForPlatformsPage({ onNavigate }) {
  const steps = [
    { n: '01', title: 'Integrate the Zenko SDK', body: 'A lightweight integration into your existing app infrastructure. You define the actions that trigger Zenko rewards — sessions, streaks, completions, milestones.' },
    { n: '02', title: 'Your users earn for doing what they already do', body: 'Every qualifying action earns $ZENKO, delivered gaslessly to a wallet we provision automatically. Your users don\'t need to know anything about crypto.' },
    { n: '03', title: 'You become a climate-positive product', body: 'Every user action creates on-chain verified environmental or social impact. Your app\'s aggregate impact is trackable, reportable, and real.' },
  ];
  const options = [
    { title: 'White-label', body: 'Fully branded to your product. Users see your cause, your impact, your story.', color: '#C94A1A' },
    { title: 'Co-branded', body: 'Zenko visible, your brand prominent. Shared PR opportunity.', color: '#1B6370' },
    { title: 'API', body: 'Raw integration for teams who want full control.', color: '#4A5C2A' },
  ];

  return (
    <>
      <PageHero
        pre="For Platforms" kanji="接続" bg="#4A5C2A"
        line1="Your users are already using you."
        line2="What if that meant something?"
        body="Zenko is an embeddable rewards layer for apps that want to go purpose-positive without rebuilding their product. Your users earn $ZENKO for using your app — tokens that fund real-world causes."
        cta1="Talk to our partnerships team →" cta2="Request a technical brief →"
        onCta1={() => onNavigate('Contact')} onCta2={() => onNavigate('Contact')}
      />
      <Band />

      {/* Steps */}
      <section style={{ background: '#F7F3E9', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>How It Works for Platforms</PreHeadline><SectionHeading line1="Three steps." line2="Invisible complexity." /></Reveal>
          <div style={{ display: 'flex', flexDirection: 'column', gap: '2px', marginTop: '48px' }}>
            {steps.map((s, i) => (
              <Reveal key={s.n} delay={i * 0.12}>
                <div style={{ display: 'grid', gridTemplateColumns: '80px 1fr', gap: '32px', background: i % 2 === 0 ? '#F7F3E9' : '#EDE8D8', padding: '40px 40px', borderLeft: '4px solid #C94A1A', alignItems: 'start' }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '48px', color: '#C94A1A', lineHeight: 1 }}>{s.n}</div>
                  <div>
                    <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '22px', color: '#1A1410', marginBottom: '12px' }}>{s.title}</div>
                    <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.8, color: '#7A6F65' }}>{s.body}</p>
                  </div>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
      <Band />

      {/* Why now */}
      <section style={{ background: '#1B6370', padding: '80px 80px', position: 'relative', overflow: 'hidden' }} className="grain">
        <Kanji char="力" style={{ right: '40px', top: '-20px', color: '#F0DFA0', opacity: 0.05 }} />
        <div style={{ maxWidth: '1200px', margin: '0 auto', position: 'relative', zIndex: 2, maxWidth: '660px' }}>
          <Reveal>
            <PreHeadline light>Why Now</PreHeadline>
            <SectionHeading line1="ESG is moving from" line2="nice-to-have to need-to-have" light />
            <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '16px', lineHeight: 1.85, color: 'rgba(240,223,160,0.65)', marginTop: '24px' }}>
              App store algorithms, enterprise procurement teams, and Gen Z users are all starting to weight purpose. "We plant trees when you use us" is a slide-worthy claim — if you can prove it. Zenko gives you the proof layer and handles the token infrastructure so you don't have to build it.
            </p>
          </Reveal>
        </div>
      </section>
      <Band />

      {/* Integration options */}
      <section style={{ background: '#EDE8D8', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>Integration Options</PreHeadline><SectionHeading line1="Build it" line2="your way" /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {options.map((o, i) => (
              <Reveal key={o.title} delay={i * 0.12}>
                <div style={{ background: '#EDE8D8', padding: '40px 32px', borderTop: `4px solid ${o.color}`, height: '100%' }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '24px', color: '#1A1410', marginBottom: '14px' }}>{o.title}</div>
                  <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.8, color: '#7A6F65', marginBottom: '24px' }}>{o.body}</p>
                  <BtnPrimary small onClick={() => onNavigate('Contact')}>Request brief →</BtnPrimary>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
    </>
  );
}

// ── HOW IT WORKS ─────────────────────────────────────────────
function HowItWorksPage({ onNavigate }) {
  const flywheelNodes = [
    { n: '1', text: 'Brand sets up a campaign in the Zenko dashboard' },
    { n: '2', text: 'Audience completes the action (attends webinar, downloads guide)' },
    { n: '3', text: 'Smart contract auto-purchases $ZENKO from open market' },
    { n: '4', text: '$ZENKO delivered to the user\'s wallet — gasless, no crypto knowledge needed' },
    { n: '5', text: 'User directs tokens to their chosen cause' },
    { n: '6', text: 'Impact created, verified, and recorded on-chain permanently' },
    { n: '7', text: 'Brand receives engagement data + ESG proof report' },
    { n: '8', text: 'Brand reinvests in next campaign — flywheel grows' },
  ];
  const tech = [
    { title: 'On-chain verification', body: 'Every cause action is recorded permanently on Base. The impact is verifiable, auditable, and immutable. Not a claim — a record.' },
    { title: 'Gasless wallets', body: 'Your audience doesn\'t need a crypto wallet or Web3 knowledge. We provision wallets automatically when someone earns their first reward.' },
    { title: 'Smart contract automation', body: 'When someone completes a qualifying action, the smart contract triggers automatically. No manual processing. No delay. No admin.' },
    { title: 'Dashboard', body: 'Brands get a real-time dashboard showing engagement metrics, $ZENKO distributed, and verified impact created.' },
  ];

  return (
    <>
      <PageHero
        pre="How It Works" kanji="学" bg="#0D1B3E"
        line1="The engagement economy,"
        line2="explained simply."
        body="Zenko is a campaign infrastructure layer. Brands, sports clubs, and apps use it to replace traditional incentives with purpose-driven rewards — powered by $ZENKO tokens. Here's exactly how."
        cta1="Talk to us →"
        onCta1={() => onNavigate('Contact')}
      />
      <Band />

      {/* Flywheel */}
      <section style={{ background: '#F7F3E9', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>The Flywheel</PreHeadline><SectionHeading line1="One loop." line2="Everyone wins." /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4,1fr)', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {flywheelNodes.map((n, i) => (
              <Reveal key={n.n} delay={i * 0.08}>
                <div style={{ background: '#F7F3E9', padding: '28px 24px', display: 'flex', gap: '14px', alignItems: 'flex-start', borderTop: `4px solid ${i % 2 === 0 ? '#C94A1A' : '#1B6370'}` }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '28px', color: '#C94A1A', lineHeight: 1, flexShrink: 0 }}>{n.n}</div>
                  <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '13px', lineHeight: 1.75, color: '#7A6F65' }}>{n.text}</p>
                </div>
              </Reveal>
            ))}
          </div>
          <Reveal delay={0.4}>
            <div style={{ marginTop: '48px' }}>
              <PullQuote>"Brand marketing budgets are what fund both the rewards and the impact. No charitable overhead. No grant dependency. Every campaign is self-sustaining."</PullQuote>
            </div>
          </Reveal>
        </div>
      </section>
      <Band />

      {/* Tech */}
      <section style={{ background: '#EDE8D8', padding: '96px 80px' }}>
        <div style={{ maxWidth: '1200px', margin: '0 auto' }}>
          <Reveal><PreHeadline>The Technical Bit</PreHeadline><SectionHeading line1="Blockchain-powered." line2="Human-friendly." /></Reveal>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2,1fr)', gap: '2px', marginTop: '48px', background: '#1A1410' }}>
            {tech.map((t, i) => (
              <Reveal key={t.title} delay={i * 0.1}>
                <div style={{ background: '#EDE8D8', padding: '40px 36px', borderLeft: `4px solid ${i < 2 ? '#C94A1A' : '#1B6370'}` }}>
                  <div style={{ fontFamily: "'Noto Serif JP',serif", fontWeight: 700, fontSize: '22px', color: '#1A1410', marginBottom: '14px' }}>{t.title}</div>
                  <p style={{ fontFamily: "'Syne',sans-serif", fontWeight: 400, fontSize: '15px', lineHeight: 1.8, color: '#7A6F65' }}>{t.body}</p>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
    </>
  );
}

Object.assign(window, { ForBrandsPage, ForSportsPage, ZenkoAppsPage, ForPlatformsPage, HowItWorksPage });
