// landing-premium-sections.jsx — Trust strip, pillars, stats, testimonials,
// pricing, final CTA, footer.

// ── Trust strip ───────────────────────────────────────────────
function LPTrustStrip() {
  const facts = [
    'Commission-free',
    'Menu set up for you',
    'Pickup ordering live today',
    'Serving the GTA',
    'No contract',
  ];
  return (
    <section style={{
      padding: '34px 0 38px', borderTop: `1px solid ${LP_BORDER}`,
      borderBottom: `1px solid ${LP_BORDER}`,
      background: 'rgba(255,251,245,0.6)',
      overflow: 'hidden',
    }}>
      <Reveal>
        <div className="lp-container" style={{ textAlign: 'center' }}>
          <span style={{
            fontFamily: LP_FM, fontSize: 11.5, color: LP_DIM,
            letterSpacing: '0.16em', textTransform: 'uppercase', fontWeight: 600,
          }}>
            New — now onboarding restaurants across the GTA
          </span>
          <div style={{
            marginTop: 18, display: 'flex', flexWrap: 'wrap', gap: 10,
            justifyContent: 'center',
          }}>
            {facts.map(f => (
              <span key={f} style={{
                display: 'inline-flex', alignItems: 'center', gap: 8,
                padding: '8px 16px', borderRadius: 999,
                border: `1px solid ${LP_BORDER}`, background: LP_CREAM,
                fontFamily: LP_FN, fontWeight: 800, fontSize: 14,
                color: LP_INK, letterSpacing: '-0.01em',
              }}>
                <LPIcon name="check" size={13} stroke={LP_FOREST} sw={2.6}/>{f}
              </span>
            ))}
          </div>
        </div>
      </Reveal>
    </section>
  );
}

// ── Pillar section: image + copy, alternating ───────────────────────────────
function LPPillar({ id, kicker, badge, title, blurb, bullets, mockup, flip = false, accent = 'amber' }) {
  return (
    <section id={id} style={{ padding: '120px 0' }}>
      <div className="lp-container">
        <div className="lp-pillar-grid" style={{
          flexDirection: flip ? 'row-reverse' : 'row',
        }}>
          <Reveal style={{ flex: 1, minWidth: 0 }}>
            <div style={{
              fontFamily: LP_FM, fontSize: 11.5, color: LP_AMBER_DEEP,
              letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
              marginBottom: 14, display: 'flex', alignItems: 'center', gap: 10,
              flexWrap: 'wrap',
            }}>
              {kicker}
              {badge && (
                <span style={{
                  fontFamily: LP_FB, fontSize: 11, fontWeight: 700,
                  letterSpacing: '0.02em', textTransform: 'none',
                  padding: '4px 10px', borderRadius: 999,
                  background: LP_AMBER_SOFT, color: LP_AMBER_DEEP,
                  border: `1px solid ${LP_BORDER_STRONG}`,
                }}>{badge}</span>
              )}
            </div>
            <h2 style={{
              fontFamily: LP_FN, fontWeight: 900,
              fontSize: 'clamp(36px, 4.4vw, 56px)',
              lineHeight: 1.02, letterSpacing: '-0.03em',
              margin: 0, color: LP_INK, textWrap: 'balance', maxWidth: 540,
            }}>{title}</h2>
            <p style={{
              marginTop: 22, fontSize: 18, lineHeight: 1.55, color: LP_MUTED,
              maxWidth: 480, textWrap: 'pretty',
            }}>{blurb}</p>
            <ul style={{
              listStyle: 'none', padding: 0, margin: '28px 0 0',
              display: 'flex', flexDirection: 'column', gap: 14,
            }}>
              {bullets.map(b => (
                <li key={b.title} style={{ display: 'flex', gap: 14, alignItems: 'flex-start' }}>
                  <div style={{
                    width: 30, height: 30, borderRadius: 9, flexShrink: 0,
                    background: LP_AMBER_SOFT, color: LP_AMBER_DEEP,
                    display: 'flex', alignItems: 'center', justifyContent: 'center',
                  }}>
                    <LPIcon name={b.icon} size={15} sw={2}/>
                  </div>
                  <div>
                    <div style={{
                      fontFamily: LP_FN, fontWeight: 800, fontSize: 15,
                      color: LP_INK, letterSpacing: '-0.005em',
                      display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap',
                    }}>
                      {b.title}
                      {b.soon && (
                        <span style={{
                          fontFamily: LP_FM, fontSize: 9.5, fontWeight: 700,
                          letterSpacing: '0.1em', textTransform: 'uppercase',
                          padding: '3px 7px', borderRadius: 6,
                          background: 'rgba(28,16,9,0.06)', color: LP_MUTED,
                        }}>Coming soon</span>
                      )}
                    </div>
                    <div style={{ fontSize: 14, color: LP_MUTED, lineHeight: 1.5, marginTop: 2 }}>{b.body}</div>
                  </div>
                </li>
              ))}
            </ul>
          </Reveal>
          <Reveal delay={120} y={40} style={{ flex: 1.05, minWidth: 0 }}>
            {mockup}
          </Reveal>
        </div>
      </div>
    </section>
  );
}

// ── Stats band ──────────────────────────────────────────────────────────────
function LPStats() {
  const stats = [
    { value: 0, suffix: '%', label: 'Commission on your direct orders. Ever.' },
    { value: 0, prefix: '$', label: 'Per-order fees. You keep the whole ticket.' },
    { value: 1, suffix: ' day', label: 'From your menu photo to a live ordering page' },
    { value: 15, suffix: ' min', label: 'How far away I am when something breaks' },
  ];
  return (
    <section style={{
      background: LP_INK, color: LP_CREAM, position: 'relative', overflow: 'hidden',
    }}>
      {/* subtle amber glow */}
      <div aria-hidden style={{
        position: 'absolute', left: '50%', top: -200, transform: 'translateX(-50%)',
        width: 900, height: 400, borderRadius: '50%',
        background: `radial-gradient(ellipse, ${LP_AMBER}33 0%, transparent 60%)`,
        pointerEvents: 'none',
      }}/>
      <div className="lp-container" style={{ padding: '88px 0', position: 'relative' }}>
        <Reveal>
          <div style={{ textAlign: 'center', marginBottom: 48 }}>
            <div style={{
              fontFamily: LP_FM, fontSize: 11.5, color: LP_AMBER,
              letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
              marginBottom: 14,
            }}>The numbers</div>
            <h2 style={{
              fontFamily: LP_FN, fontWeight: 900,
              fontSize: 'clamp(36px, 4.4vw, 52px)',
              lineHeight: 1.02, letterSpacing: '-0.03em', margin: 0,
              color: LP_CREAM, textWrap: 'balance',
            }}>The kind of math your accountant likes.</h2>
            <p style={{
              marginTop: 16, fontSize: 15, color: 'rgba(255,251,245,0.55)',
              maxWidth: 560, marginInline: 'auto', textWrap: 'pretty',
            }}>
              These are the terms, not results. We are new — we do not have customer
              numbers to show you yet, and we are not going to invent any.
            </p>
          </div>
        </Reveal>
        <div className="lp-stats-grid">
          {stats.map((s, i) => (
            <Reveal key={s.label} delay={i * 100}>
              <div style={{
                padding: '28px 24px',
                borderLeft: `1px solid rgba(255,251,245,0.12)`,
              }}>
                <div style={{
                  fontFamily: LP_FN, fontWeight: 900,
                  fontSize: 'clamp(48px, 5.6vw, 72px)',
                  lineHeight: 1, letterSpacing: '-0.035em',
                  color: LP_AMBER,
                }}>
                  <CountUp to={s.value} prefix={s.prefix || ''} suffix={s.suffix || ''} decimals={s.decimals || 0}/>
                </div>
                <div style={{
                  marginTop: 12, fontSize: 14.5, lineHeight: 1.45,
                  color: 'rgba(255,251,245,0.65)', maxWidth: 220, textWrap: 'pretty',
                }}>{s.label}</div>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}

// ── Pricing ─────────────────────────────────────────────────────────────────
function LPPricing() {
  const included = [
    'Branded ordering page, linked from your site',
    'Dine-in QR ordering',
    'In-app + card payments',
    'Live order dashboard',
    'Kitchen printing + kitchen display',
    'Always-on order alarm',
    'Sales analytics',
    'Done-for-you menu setup',
  ];
  const later = ['Promotions', 'Loyalty', 'AI Menu Studio', 'Multi-location'];
  const terms = [
    { k: '0%', v: 'Commission on every direct order' },
    { k: '$0', v: 'Per-order fees. No menu markup.' },
    { k: '1 day', v: 'From signup to taking orders' },
    { k: 'No contract', v: 'Month to month, cancel anytime' },
  ];
  return (
    <section id="pricing" style={{ padding: '120px 0', background: 'rgba(255,251,245,0.6)' }}>
      <div className="lp-container">
        <Reveal>
          <div style={{ textAlign: 'center', marginBottom: 48 }}>
            <div style={{
              fontFamily: LP_FM, fontSize: 11.5, color: LP_AMBER_DEEP,
              letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
              marginBottom: 14,
            }}>Pricing</div>
            <h2 style={{
              fontFamily: LP_FN, fontWeight: 900,
              fontSize: 'clamp(36px, 4.4vw, 52px)',
              lineHeight: 1.02, letterSpacing: '-0.03em', margin: 0,
              textWrap: 'balance',
            }}>Pay for the platform, <span style={{ color: LP_AMBER, fontStyle: 'italic' }}>not</span> for each order.</h2>
            <p style={{
              marginTop: 16, fontSize: 17, color: LP_MUTED, maxWidth: 600,
              marginInline: 'auto', textWrap: 'pretty',
            }}>One flat platform fee. No commission on your orders, no per-order fees, no menu markup. What that fee is depends on how many locations you run and how you take orders — so we quote it rather than guess at it.</p>
          </div>
        </Reveal>
        <Reveal delay={80}>
          <div style={{
            background: LP_CREAM, border: `1px solid ${LP_BORDER}`, borderRadius: 26,
            overflow: 'hidden', boxShadow: '0 24px 60px rgba(28,16,9,0.07)',
          }}>
            {/* ── Terms strip ── */}
            <div className="lp-offer-terms" style={{
              display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)',
              background: LP_INK, color: LP_CREAM,
            }}>
              {terms.map((t, i) => (
                <div key={t.k} style={{
                  padding: '26px 24px',
                  borderLeft: i === 0 ? 'none' : '1px solid rgba(255,251,245,0.1)',
                }}>
                  <div style={{
                    fontFamily: LP_FN, fontWeight: 900, fontSize: 30,
                    letterSpacing: '-0.03em', color: LP_AMBER, lineHeight: 1.05,
                  }}>{t.k}</div>
                  <div style={{
                    marginTop: 6, fontSize: 13, lineHeight: 1.4,
                    color: 'rgba(255,251,245,0.7)', textWrap: 'pretty',
                  }}>{t.v}</div>
                </div>
              ))}
            </div>
            {/* ── Body ── */}
            <div className="lp-offer-body" style={{ display: 'grid', gridTemplateColumns: '1.15fr 1fr' }}>
              <div style={{ padding: 'clamp(28px, 3.4vw, 44px)' }}>
                <div style={{
                  fontFamily: LP_FM, fontSize: 11, color: LP_AMBER_DEEP,
                  letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
                }}>Included from day one</div>
                <ul style={{
                  listStyle: 'none', padding: 0, margin: '18px 0 0',
                  display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '12px 20px',
                }}>
                  {included.map(f => (
                    <li key={f} style={{
                      display: 'flex', gap: 10, alignItems: 'flex-start',
                      fontSize: 14, lineHeight: 1.4, color: LP_INK,
                    }}>
                      <span style={{ flex: '0 0 auto', marginTop: 2 }}>
                        <LPIcon name="check" size={14} stroke={LP_FOREST} sw={2.6}/>
                      </span>
                      {f}
                    </li>
                  ))}
                </ul>
                <div style={{ marginTop: 30, paddingTop: 24, borderTop: `1px solid ${LP_BORDER}` }}>
                  <div style={{
                    fontFamily: LP_FM, fontSize: 11, color: LP_DIM,
                    letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
                  }}>In build — you get it first</div>
                  <div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, marginTop: 14 }}>
                    {later.map(l => (
                      <span key={l} style={{
                        padding: '6px 12px', borderRadius: 999,
                        background: 'rgba(28,16,9,0.04)', color: LP_MUTED,
                        border: `1px solid ${LP_BORDER}`,
                        fontSize: 13, fontWeight: 600,
                      }}>{l}</span>
                    ))}
                  </div>
                </div>
              </div>
              {/* ── Rate + CTA ── */}
              <div style={{
                padding: 'clamp(28px, 3.4vw, 44px)',
                borderLeft: `1px solid ${LP_BORDER}`,
                background: LP_AMBER_SOFT,
                display: 'flex', flexDirection: 'column', justifyContent: 'center',
              }}>
                <div style={{
                  fontFamily: LP_FM, fontSize: 11, color: LP_AMBER_DEEP,
                  letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
                }}>What each order costs you</div>
                <div style={{
                  fontFamily: LP_FN, fontWeight: 900, fontSize: 'clamp(38px, 4vw, 54px)',
                  letterSpacing: '-0.035em', lineHeight: 1, margin: '14px 0 0',
                }}>Nothing.</div>
                <p style={{
                  margin: '16px 0 0', fontSize: 14.5, lineHeight: 1.55,
                  color: LP_MUTED, textWrap: 'pretty',
                }}>Customers order through your RobinRun page, linked from your site and styled to match it. No marketplace in the middle taking a cut, so you keep the whole ticket, less standard card processing.</p>
                <div style={{ marginTop: 22, paddingTop: 20, borderTop: `1px solid ${LP_BORDER}` }}>
                  <div style={{
                    fontFamily: LP_FM, fontSize: 11, color: LP_AMBER_DEEP,
                    letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
                  }}>The platform fee</div>
                  <p style={{ margin: '10px 0 0', fontSize: 14.5, lineHeight: 1.55, color: LP_MUTED, textWrap: 'pretty' }}>
                    Tell us your locations and rough weekly order volume and we will send a flat monthly price the same day. No commission, no per-order fee, no contract.
                  </p>
                </div>
                <a href="mailto:hello@robinrun.com?subject=RobinRun%20pricing&body=Restaurant%20name%3A%0ALocations%3A%0ARoughly%20how%20many%20orders%20a%20week%3A%0ADine-in%2C%20pickup%2C%20or%20both%3A" style={{
                  marginTop: 24,
                  display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 8,
                  padding: '16px 24px', borderRadius: 13,
                  background: LP_AMBER, color: LP_CREAM,
                  fontFamily: LP_FN, fontWeight: 800, fontSize: 15.5,
                  textDecoration: 'none', boxShadow: `0 10px 26px ${LP_AMBER}55`,
                }}>
                  Contact us for pricing <LPIcon name="arrow-right" size={15} sw={2.2}/>
                </a>
                <a href="https://app.robinrun.com/auth/signup" style={{
                  marginTop: 10,
                  display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 8,
                  padding: '15px 24px', borderRadius: 13,
                  border: `1px solid ${LP_BORDER_STRONG}`, color: LP_INK,
                  fontFamily: LP_FN, fontWeight: 800, fontSize: 15,
                  textDecoration: 'none',
                }}>
                  Create your account
                </a>
                <div style={{ marginTop: 14, fontSize: 13, color: LP_DIM, textWrap: 'pretty' }}>
                  Free to set up, no card to look around. Month to month, cancel anytime.
                </div>
              </div>
            </div>
          </div>
        </Reveal>
      </div>
    </section>
  );
}

// ── Final CTA ───────────────────────────────────────────────────────────────
function LPFinalCTA() {
  return (
    <section id="start" style={{ padding: '60px 0 120px' }}>
      <div className="lp-container">
        <Reveal>
          <div style={{
            background: LP_INK, color: LP_CREAM, borderRadius: 28,
            padding: 'clamp(48px, 7vw, 96px)',
            position: 'relative', overflow: 'hidden',
            textAlign: 'center',
          }}>
            {/* big bird */}
            <div aria-hidden style={{
              position: 'absolute', right: -120, top: -60, opacity: 0.08,
              transform: 'rotate(-12deg)',
            }}>
              <RobinRunMark size={500}/>
            </div>
            <div aria-hidden style={{
              position: 'absolute', left: '50%', top: '60%', transform: 'translateX(-50%)',
              width: 700, height: 350, borderRadius: '50%',
              background: `radial-gradient(ellipse, ${LP_AMBER}33 0%, transparent 60%)`,
              pointerEvents: 'none',
            }}/>
            <div style={{ position: 'relative' }}>
              <div style={{
                fontFamily: LP_FM, fontSize: 12, color: LP_AMBER,
                letterSpacing: '0.16em', textTransform: 'uppercase', fontWeight: 700,
                marginBottom: 18,
              }}>Ready when you are</div>
              <h2 style={{
                fontFamily: LP_FN, fontWeight: 900,
                fontSize: 'clamp(40px, 5.5vw, 72px)',
                lineHeight: 1, letterSpacing: '-0.035em', margin: 0,
                textWrap: 'balance', maxWidth: 880, marginInline: 'auto',
              }}>
                Your restaurant. Your orders. <span style={{ color: LP_AMBER, fontStyle: 'italic' }}>Your customers.</span>
              </h2>
              <p style={{
                marginTop: 22, fontSize: 19, lineHeight: 1.5,
                color: 'rgba(255,251,245,0.7)', maxWidth: 600,
                marginInline: 'auto', textWrap: 'pretty',
              }}>
                Create your account and start taking orders, or email us first — whichever you prefer. No card, no contract, no obligation.
              </p>
              <div style={{
                marginTop: 40, display: 'flex', gap: 12, justifyContent: 'center', flexWrap: 'wrap',
              }}>
                <CTAPrimary size="lg" href="https://app.robinrun.com/auth/signup">
                  Create your account
                  <LPIcon name="arrow-right" size={16} sw={2.2}/>
                </CTAPrimary>
                <CTASecondary dark href="mailto:hello@robinrun.com?subject=RobinRun%20for%20my%20restaurant">
                  Talk to us
                </CTASecondary>
              </div>
            </div>
          </div>
        </Reveal>
      </div>
    </section>
  );
}

// ── Footer ──────────────────────────────────────────────────────────────────
function LPFooter() {
  const cols = [
    { title: 'Platform', links: [
      ['Dine-in ordering', '#platform'], ['Pickup ordering', '#platform'],
      ['Live dashboard', '#tour'], ['Sales analytics', '#platform'],
      ['AI Menu Studio — soon', '#ai'], ['Promotions & loyalty — soon', '#loyalty'],
      ['Pricing', '#pricing'],
    ] },
    { title: 'Company',  links: [['About', 'about.html'], ['Why RobinRun', 'why-robinrun.html'], ['Contact', 'contact.html'], ['Create your account', 'https://app.robinrun.com/auth/signup'], ['Sign in', 'https://app.robinrun.com/auth/login']] },
    { title: 'Legal',    links: [['Privacy', 'privacy.html'], ['Terms', 'terms.html'], ['Accessibility', 'accessibility.html']] },
  ];
  return (
    <footer style={{
      borderTop: `1px solid ${LP_BORDER}`,
      padding: '64px 0 32px',
      background: 'rgba(255,251,245,0.6)',
    }}>
      <div className="lp-container">
        <div className="lp-footer-grid">
          <div>
            <LPLockup size={22}/>
            <p style={{
              marginTop: 18, fontSize: 13.5, lineHeight: 1.55,
              color: LP_MUTED, maxWidth: 280, textWrap: 'pretty',
            }}>
              Commission-free pickup and dine-in ordering for independent restaurants. Built in Mississauga. Currently in beta — see our <a href="terms.html" style={{ color: LP_MUTED, textDecoration: 'underline' }}>terms</a>.
            </p>
            <div style={{ marginTop: 18, display: 'flex', gap: 8 }}>
              <div style={{
                padding: '8px 12px', borderRadius: 9,
                border: `1px solid ${LP_BORDER}`, background: LP_CREAM,
                fontSize: 11.5, fontWeight: 600, color: LP_MUTED,
              }}>Works in any phone browser — no app to download</div>
            </div>
          </div>
          {cols.map(c => (
            <div key={c.title}>
              <div style={{
                fontFamily: LP_FN, fontWeight: 800, fontSize: 13,
                color: LP_INK, marginBottom: 12, letterSpacing: '-0.005em',
              }}>{c.title}</div>
              <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 9 }}>
                {c.links.map(l => {
                  const [text, url] = Array.isArray(l) ? l : [l, '#'];
                  return (
                  <li key={text}>
                    <a href={url} style={{
                      fontSize: 13.5, color: LP_MUTED, textDecoration: 'none',
                      transition: 'color .15s',
                    }}
                      onMouseEnter={e => e.currentTarget.style.color = LP_INK}
                      onMouseLeave={e => e.currentTarget.style.color = LP_MUTED}
                    >{text}</a>
                  </li>
                  );
                })}
              </ul>
            </div>
          ))}
        </div>
        <div style={{
          marginTop: 56, paddingTop: 24, borderTop: `1px solid ${LP_BORDER}`,
          display: 'flex', justifyContent: 'space-between', alignItems: 'center',
          flexWrap: 'wrap', gap: 14,
        }}>
          <span style={{ fontFamily: LP_FM, fontSize: 11.5, color: LP_DIM, letterSpacing: '0.04em' }}>
            © 2026 RobinRun · Mississauga, ON
          </span>
          <span style={{ fontFamily: LP_FM, fontSize: 11.5, color: LP_AMBER_DEEP, letterSpacing: '0.12em', textTransform: 'uppercase', fontWeight: 700, display: 'inline-flex', alignItems: 'center', gap: 6, padding: '3px 9px', borderRadius: 999, border: '1px solid rgba(194,65,12,0.24)', background: LP_AMBER_SOFT }}>
            Beta
          </span>
        </div>
      </div>
    </footer>
  );
}

// ── Scales the fixed-width tour down on narrow screens ─────────────────────
// PAD gives the stage's 100px-blur shadow room to render inside the clip box.
function TourScaler({ design = 900, pad = 140, children }) {
  const ref = React.useRef(null);
  const [scale, setScale] = React.useState(1);
  const [h, setH] = React.useState(null);
  React.useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const measure = () => {
      const avail = el.clientWidth - pad * 2;
      const sc = Math.min(1, avail / design);
      setScale(sc);
      const inner = el.firstElementChild;
      if (inner) setH(inner.offsetHeight * sc);
    };
    measure();
    const ro = new ResizeObserver(measure);
    ro.observe(el);
    const t = setInterval(measure, 1200);
    return () => { ro.disconnect(); clearInterval(t); };
  }, [design, pad]);
  const scaled = scale < 0.999;
  return (
    <div ref={ref} style={{
      margin: `-${pad}px`, padding: pad, overflow: 'hidden',
      height: scaled && h ? Math.round(h) + pad * 2 : undefined,
    }}>
      <div style={{
        width: scaled ? design : '100%', transformOrigin: 'top left',
        transform: scaled ? `scale(${scale})` : 'none',
      }}>
        {children}
      </div>
    </div>
  );
}

// ── "See it in action" section — wraps the auto-playing DashboardTour ──────
function LPTourSection() {
  return (
    <section id="tour" style={{ padding: '96px 0 80px', position: 'relative' }}>
      <div className="lp-container">
        <Reveal>
          <div style={{ textAlign: 'center', marginBottom: 48, maxWidth: 760, marginInline: 'auto' }}>
            <div style={{
              fontFamily: LP_FM, fontSize: 11.5, color: LP_AMBER_DEEP,
              letterSpacing: '0.14em', textTransform: 'uppercase', fontWeight: 700,
              marginBottom: 14,
            }}>See it in action</div>
            <h2 style={{
              fontFamily: LP_FN, fontWeight: 900,
              fontSize: 'clamp(36px, 4.4vw, 56px)',
              lineHeight: 1.02, letterSpacing: '-0.03em', margin: 0,
              textWrap: 'balance',
            }}>
              The whole product, <span style={{ color: LP_AMBER, fontStyle: 'italic' }}>working.</span>
            </h2>
            <p style={{
              marginTop: 18, fontSize: 18, color: LP_MUTED, maxWidth: 560,
              marginInline: 'auto', textWrap: 'pretty', lineHeight: 1.5,
            }}>
              Five scenes from a sample restaurant’s Friday service. Auto-plays — hover to pause, click to jump.
            </p>
          </div>
        </Reveal>

        <Reveal delay={120} y={36}>
          <TourScaler design={900}>
            <DashboardTour/>
          </TourScaler>
        </Reveal>

        <Reveal delay={240}>
          <div style={{
            marginTop: 32, display: 'flex', gap: 12, justifyContent: 'center',
            flexWrap: 'wrap',
          }}>
            <CTAPrimary size="md" href="https://app.robinrun.com/auth/signup">
              Create your account
              <LPIcon name="arrow-right" size={14} sw={2.2}/>
            </CTAPrimary>
          </div>
        </Reveal>
      </div>
    </section>
  );
}

// ── Hero variant switcher (floating top-right) ──────────────────────────────
function HeroVariantSwitcher({ value, onChange }) {
  const opts = [
    { id: 'cream',    label: 'Cream' },
    { id: 'gradient', label: 'Gradient' },
    { id: 'dark',     label: 'Dark' },
  ];
  return (
    <div style={{
      position: 'fixed', top: 80, right: 20, zIndex: 60,
      display: 'flex', flexDirection: 'column', gap: 6,
      padding: 8, borderRadius: 14,
      background: 'rgba(255,251,245,0.92)', backdropFilter: 'blur(14px)',
      WebkitBackdropFilter: 'blur(14px)',
      border: `1px solid ${LP_BORDER}`,
      boxShadow: '0 12px 32px rgba(28,16,9,0.12)',
      fontFamily: LP_FB,
    }}>
      <div style={{
        fontFamily: LP_FM, fontSize: 9.5, color: LP_DIM,
        letterSpacing: '0.12em', textTransform: 'uppercase', fontWeight: 700,
        padding: '2px 8px',
      }}>Hero style</div>
      <div style={{ display: 'flex', gap: 4 }}>
        {opts.map(o => (
          <button key={o.id} onClick={() => onChange(o.id)} style={{
            padding: '6px 12px', borderRadius: 8, border: 0,
            background: value === o.id ? LP_INK : 'transparent',
            color: value === o.id ? LP_CREAM : LP_INK,
            fontFamily: LP_FB, fontSize: 12, fontWeight: 600,
            cursor: 'pointer', transition: 'all .2s ease',
          }}>{o.label}</button>
        ))}
      </div>
    </div>
  );
}

// ── Composer ────────────────────────────────────────────────────────────────
function LandingPremium() {
  const [heroVariant, setHeroVariant] = React.useState('dark');
  return (
    <div style={{ background: LP_CREAM, color: LP_INK, fontFamily: LP_FB }}>
      <LPNav variant={heroVariant}/>
      <LPHero variant={heroVariant}/>
      <LPTrustStrip/>
      <LPTourSection/>

      <LPPillar
        id="platform"
        kicker="Pillar 1 · Operations"
        title="Every order, in one place."
        blurb="Dine-in, pickup, and your own website orders — all on one live dashboard. No more tablet-stacking. No more 'which screen do I read?'"
        bullets={[
          { icon: 'qr',     title: 'Dine-in QR ordering',  body: 'Guests scan, order, pay. Your team gets to focus on hospitality.' },
          { icon: 'globe',  title: 'Online ordering', body: 'No commissions on direct orders. Your branding, your customers, your data.' },
          { icon: 'shop',   title: 'Live kitchen dashboard', body: 'Real-time queue with prep times, ETAs, and one-tap status updates.' },
          { icon: 'gear',   title: 'Works alongside your POS', soon: true, body: 'Keep the till you already have — RobinRun runs next to it, not through it.' },
        ]}
        mockup={
          <div style={{
            background: LP_CREAM, borderRadius: 18, overflow: 'hidden',
            border: `1px solid ${LP_BORDER}`,
            boxShadow: '0 32px 80px rgba(28,16,9,0.16)',
          }}>
            <MockOrderQueue/>
          </div>
        }
      />

      <LPPillar
        id="ai"
        kicker="Pillar 2 · AI Menu Studio"
        badge="Coming soon"
        title="Menus that sell themselves."
        blurb="In build, not live yet. The plan: generate descriptions in your voice, translate into six languages, enhance photos with one click, and get pricing nudges based on local market data."
        flip
        bullets={[
          { icon: 'wand',     title: 'Write descriptions in your voice', body: 'Tell it warm, plain, or bold. It learns your style after the first few items.' },
          { icon: 'globe',    title: 'Translate menus instantly', body: 'Six languages, kept in sync. No more outdated PDFs.' },
          { icon: 'sparkle',  title: 'Enhance photos', body: 'Auto-light, auto-crop, on-brand backgrounds. iPhone shots look pro.' },
          { icon: 'chart',    title: 'Pricing nudges', body: 'See what comparable items go for in your zip code. Optional, never mandatory.' },
        ]}
        mockup={<MockAIStudio/>}
      />

      <LPPillar
        id="loyalty"
        kicker="Pillar 3 · Loyalty + marketing"
        badge="Coming soon"
        title="Bring them back. Without the cringe."
        blurb="In build, not live yet. Promotions and a built-in loyalty program are both on the way — scheduled deals that turn themselves on and off, and rewards your regulars actually use."
        bullets={[
          { icon: 'heart',     title: 'Built-in loyalty program', soon: true, body: 'Points, tiers, free items, birthday rewards. No third-party app needed.' },
          { icon: 'megaphone', title: 'Scheduled promotions', soon: true, body: 'Set a deal to start Friday at 5 and end Sunday at close. It turns itself on and off.' },
          { icon: 'bolt',      title: 'Targeted campaigns', soon: true, body: 'Segment by frequency, last visit, or favourites, then send push, SMS, or email.' },
          { icon: 'chart',     title: 'See what it earned you', soon: true, body: 'Every campaign will track attributable revenue. So you stop guessing.' },
        ]}
        flip
        mockup={<MockLoyaltyCampaign/>}
      />

      <LPStats/>
      <LPPricing/>
      <LPFinalCTA/>
      <LPFooter/>
    </div>
  );
}

Object.assign(window, {
  LPTrustStrip, LPPillar, LPStats, LPPricing,
  LPFinalCTA, LPFooter, LPTourSection, LandingPremium,
});
