/* Variation A — Classic Apple-style: centered hero, big product shot, generous whitespace */

function VariationA() {
  const { t, fonts, mode, pad } = useRemacTheme();
  const accent = t.accent;
  const isMobile = useIsMobile(768);

  // Scroll-spy: which section is currently in view
  const [activeId, setActiveId] = React.useState('');
  React.useEffect(() => {
    const ids = ['features', 'how', 'privacy', 'pricing'];
    const update = () => {
      const probe = window.innerHeight * 0.35;
      let current = '';
      for (const id of ids) {
        const el = document.getElementById(id);
        if (!el) continue;
        const r = el.getBoundingClientRect();
        if (r.top <= probe && r.bottom > probe) {current = id;break;}
      }
      setActiveId(current);
    };
    update();
    window.addEventListener('scroll', update, { passive: true });
    window.addEventListener('resize', update);
    return () => {
      window.removeEventListener('scroll', update);
      window.removeEventListener('resize', update);
    };
  }, []);

  const navLink = (id, label) =>
  <a key={id} href={`#${id}`} style={{
    color: activeId === id ? mode.fg : mode.fgMuted,
    textDecoration: 'none',
    transition: 'color .25s ease'
  }}>{label}</a>;


  const heroRef = React.useRef(null);
  const heroInnerRef = React.useRef(null);
  const phoneRef = React.useRef(null);
  useScrollProgress(heroRef, (p) => {
    if (heroInnerRef.current) {
      // Quantize to 0.5px to avoid sub-pixel jitter on macOS scroll inertia
      const scale = Math.round(lerp(0.82, 1.04, easeOut(clamp(p * 1.4))) * 1000) / 1000;
      const lift = Math.round(lerp(80, -40, easeOut(clamp(p * 1.3))));
      heroInnerRef.current.style.transform = `translate3d(0, ${lift}px, 0) scale(${scale})`;
    }
    if (phoneRef.current) {
      // On mobile the phone is in-flow below the Mac (no absolute offset to anchor against),
      // so we skip the parallax write and let it scroll naturally.
      if (window.innerWidth >= 768) {
        const phoneLift = Math.round(lerp(60, -30, easeOut(clamp(p * 1.5))));
        const phoneScale = Math.round(lerp(0.9, 1.0, easeOut(clamp(p * 1.6))) * 1000) / 1000;
        phoneRef.current.style.transform = `translateX(50%) translateY(${phoneLift}px) scale(${phoneScale})`;
      } else {
        phoneRef.current.style.transform = '';
      }
    }
  }, { startOffset: 1.0, endOffset: -0.3 });



  return (
    <div style={{
      width: '100%', minHeight: '100%',
      background: mode.bg, color: mode.fg,
      fontFamily: fonts.text,
      letterSpacing: '-0.011em'
    }}>
      {/* Nav */}
      <nav style={{
        position: 'sticky', top: 0, zIndex: 50,
        background: mode.bg,
        borderBottom: `1px solid ${mode.border}`
      }}>
        <div style={{
          maxWidth: 'min(1440px, 96vw)', margin: '0 auto',
          padding: isMobile ? '0 18px' : '0 32px',
          height: 52,
          display: 'flex', alignItems: 'center', justifyContent: 'space-between'
        }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
            <AppIcon size={32} accent={accent} variant="light" />
            <span style={{ fontWeight: 600, fontSize: 17, fontFamily: fonts.display }}>ReMac</span>
          </div>
          {!isMobile && <div style={{ display: 'flex', gap: 28, fontSize: 13 }}>
            {navLink('features', 'Features')}
            {navLink('how', 'How it works')}
            {navLink('privacy', 'Privacy')}
            {navLink('pricing', 'Pricing')}
          </div>}
          <a href="#download" style={{
            fontSize: 13, color: accent, textDecoration: 'none', fontWeight: 500
          }}>Download ↓</a>
        </div>
      </nav>

      {/* Hero */}
      <Section pad={pad} style={{ textAlign: 'center', padding: `${(isMobile ? 70 : 130) * pad}px ${isMobile ? 18 : 32}px ${(isMobile ? 30 : 60) * pad}px` }}>
        <Reveal as="h1" y={24} style={{
          fontFamily: fonts.display,
          fontSize: 'clamp(56px, 7vw, 96px)',
          lineHeight: 1.02,
          letterSpacing: '-0.04em',
          fontWeight: 600,
          margin: '0 0 28px',
          maxWidth: 920,
          marginInline: 'auto',
          whiteSpace: 'pre-line'
        }}>
          {t.heroHeadline}
        </Reveal>

        <Reveal as="p" delay={0.08} y={20} style={{
          fontSize: isMobile ? 16 : 22, lineHeight: 1.45,
          color: mode.fgMuted,
          maxWidth: 640, margin: isMobile ? '0 auto 28px' : '0 auto 44px',
          letterSpacing: '-0.01em'
        }}>
          {t.heroSub}
        </Reveal>

        <Reveal delay={0.16} y={16} style={{ display: 'flex', gap: 12, justifyContent: 'center', flexWrap: 'wrap', marginBottom: 18 }}>
          <DownloadBadge mode={mode} accent={accent} />
          <GhostBtn mode={mode} accent={accent}>See it in action</GhostBtn>
        </Reveal>
        <Reveal delay={0.24} y={12} style={{ fontSize: 12, color: mode.fgDim, fontFamily: fonts.mono }}>
          {'\n'}
        </Reveal>

        {/* Hero product shot: phone + Mac shot — scrubs on scroll */}
        <div ref={heroRef} style={{
          marginTop: (isMobile ? 50 : 110) * pad,
          position: 'relative'
        }}>
          <div ref={heroInnerRef} style={{
            position: 'relative',
            display: 'flex',
            flexDirection: isMobile ? 'column' : 'row',
            justifyContent: 'center',
            alignItems: 'center',
            gap: isMobile ? 24 : 0,
            transformOrigin: 'center center',
            willChange: 'transform',
            backfaceVisibility: 'hidden'
          }}>
          {/* Glow */}
          <div style={{
              position: 'absolute', inset: '-10% -20% 10% -20%',
              background: `radial-gradient(60% 60% at 50% 50%, ${accent}22 0%, transparent 65%)`,
              filter: 'blur(40px)',
              zIndex: 0
            }} />

          {/* Mac window placeholder — hidden on mobile (phone is the focal product there) */}
          {!isMobile && <div style={{
              width: 'min(820px, 70%)',
              aspectRatio: '16/10',
              borderRadius: 16,
              background: mode.surface,
              border: `1px solid ${mode.border}`,
              boxShadow: '0 50px 100px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.35)',
              overflow: 'hidden',
              position: 'relative',
              zIndex: 1
            }}>
            <div style={{
                height: 32, background: mode.surfaceHi,
                borderBottom: `1px solid ${mode.border}`,
                display: 'flex', alignItems: 'center', gap: 6, padding: '0 12px',
                position: 'relative'
              }}>
              <div style={{ width: 11, height: 11, borderRadius: 99, background: '#FF5F57' }} />
              <div style={{ width: 11, height: 11, borderRadius: 99, background: '#FEBC2E' }} />
              <div style={{ width: 11, height: 11, borderRadius: 99, background: '#28C840' }} />
              <div style={{
                  position: 'absolute', left: '50%', top: '50%',
                  transform: 'translate(-50%, -50%)',
                  fontFamily: fonts.mono, fontSize: 11, color: mode.fgMuted,
                  pointerEvents: 'none'
                }}>ReMac</div>
            </div>
            <image-slot
                id="hero-mac"
                shape="rect"
                placeholder="Drop your Mac screenshot"
                style={{ width: '100%', height: 'calc(100% - 32px)', display: 'block', background: '#000' }}>
              </image-slot>
          </div>}

          {/* Phone — overlaps right side of Mac on desktop; stacks below Mac on mobile */}
          <div ref={phoneRef} style={isMobile ? {
              position: 'relative',
              zIndex: 2,
              willChange: 'transform'
            } : {
              position: 'absolute',
              right: 'calc(50% - min(440px, 38%))',
              bottom: -60,
              zIndex: 2,
              transform: 'translateX(50%)',
              willChange: 'transform'
            }}>
            <PhoneMock width={isMobile ? 180 : 240} slotId="hero-phone" label="Drop iPhone screenshot" mode={mode} accent={accent} />
          </div>
          </div>
        </div>
      </Section>

      {/* Features */}
      <Section pad={pad} id="features" style={{ padding: `${(isMobile ? 70 : 120) * pad}px ${isMobile ? 18 : 32}px`, scrollMarginTop: 64 }}>
        <Reveal style={{ textAlign: 'center', marginBottom: 80 }}>
          <div style={{ fontFamily: fonts.mono, fontSize: 12, color: accent, letterSpacing: '0.12em', textTransform: 'uppercase', marginBottom: 16 }}>
            What's inside
          </div>
          <h2 style={{
            fontFamily: fonts.display, fontSize: 'clamp(40px,5vw,64px)',
            lineHeight: 1.05, letterSpacing: '-0.03em', fontWeight: 600,
            margin: 0, maxWidth: 760, marginInline: 'auto'
          }}>
            Built for the way developers actually work.
          </h2>
        </Reveal>

        <div style={{
          display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr',
          gap: 20
        }}>
          <Reveal y={36}><FeatureCard
              mode={mode} fonts={fonts} accent={accent} pad={pad}
              kicker="Terminals"
              title="Sessions like messages."
              body="Every terminal is a thread. Pin one, scroll back through history, swipe to switch. Long-running jobs keep streaming when you put your phone away."
              visual={<TerminalsVisual fonts={fonts} mode={mode} accent={accent} />} />
          </Reveal>
          <Reveal y={36} delay={0.08}><FeatureCard
              mode={mode} fonts={fonts} accent={accent} pad={pad}
              kicker="Files"
              title="A real Finder. On a phone."
              body="Browse, move, rename, preview. Quick Look, tags, sidebars — all the muscle memory, none of the legacy."
              visual={<FilesVisual fonts={fonts} mode={mode} accent={accent} />} />
          </Reveal>
          <Reveal y={36}><FeatureCard
              mode={mode} fonts={fonts} accent={accent} pad={pad}
              kicker="Live screen"
              title="See your Mac. Touch it back."
              body="60fps mirroring with a buttery touch overlay. Hardware keyboard, modifier keys, trackpad gestures — the whole input stack."
              visual={<ScreenVisual fonts={fonts} mode={mode} accent={accent} />}
              wide />
          </Reveal>
          <Reveal y={36} delay={0.08}><FeatureCard
              mode={mode} fonts={fonts} accent={accent} pad={pad}
              kicker="App switcher"
              title="Your dock, in your hand."
              body="See every running app, jump straight to one. No remote-desktop loading screens, no awkward Mission Control hops."
              visual={<AppsVisual fonts={fonts} mode={mode} accent={accent} />}
              wide />
          </Reveal>
        </div>
      </Section>

      {/* How it works */}
      <Section pad={pad} id="how" style={{ padding: `${(isMobile ? 70 : 120) * pad}px ${isMobile ? 18 : 32}px`, scrollMarginTop: 64 }}>
        <div style={{ textAlign: 'center', marginBottom: 72 }}>
          <div style={{ fontFamily: fonts.mono, fontSize: 12, color: accent, letterSpacing: '0.12em', textTransform: 'uppercase', marginBottom: 16 }}>
            How it works
          </div>
          <h2 style={{
            fontFamily: fonts.display, fontSize: 'clamp(40px,5vw,64px)',
            lineHeight: 1.05, letterSpacing: '-0.03em', fontWeight: 600,
            margin: 0
          }}>
            Three steps. Two devices. One pairing.
          </h2>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(3, 1fr)', gap: 24 }}>
          {[
          { n: '01', title: 'Install ReMac on your Mac', body: 'A 12 MB universal binary. Notarized, sandboxed, and signed.' },
          { n: '02', title: 'Open ReMac on iPhone', body: 'Scan the in-app QR. Devices pair over your local network — or relay if you\'re away.' },
          { n: '03', title: "You're in.", body: 'Terminals, files, screen and apps appear. Nothing leaves your devices unencrypted.' }].
          map((s, i) =>
          <Reveal key={s.n} delay={i * 0.1} y={32} style={{
            border: `1px solid ${mode.border}`,
            borderRadius: 18,
            padding: 28,
            background: mode.surface
          }}>
              <div style={{
              fontFamily: fonts.mono, fontSize: 12, color: accent,
              marginBottom: 28, letterSpacing: '0.06em'
            }}>{s.n}</div>
              <div style={{
              fontFamily: fonts.display, fontSize: 22, fontWeight: 600,
              lineHeight: 1.2, letterSpacing: '-0.02em', marginBottom: 10
            }}>{s.title}</div>
              <div style={{ color: mode.fgMuted, fontSize: 14, lineHeight: 1.55 }}>{s.body}</div>
            </Reveal>
          )}
        </div>
      </Section>

      {/* Privacy */}
      <Section pad={pad} id="privacy" style={{ padding: `${(isMobile ? 70 : 120) * pad}px ${isMobile ? 18 : 32}px`, scrollMarginTop: 64 }}>
        <Reveal y={40} style={{
          background: mode.surface,
          border: `1px solid ${mode.border}`,
          borderRadius: 24,
          padding: isMobile ? 28 : 64,
          display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: isMobile ? 32 : 64,
          alignItems: 'center'
        }}>
          <div>
            <div style={{ fontFamily: fonts.mono, fontSize: 12, color: accent, letterSpacing: '0.12em', textTransform: 'uppercase', marginBottom: 16 }}>
              Privacy
            </div>
            <h2 style={{
              fontFamily: fonts.display, fontSize: 44, lineHeight: 1.08,
              letterSpacing: '-0.03em', fontWeight: 600, margin: '0 0 20px'
            }}>
              Your Mac talks only to your phone.
            </h2>
            <p style={{ color: mode.fgMuted, fontSize: 16, lineHeight: 1.55, margin: 0 }}>
              Sessions are end-to-end encrypted with keys that never leave your devices. There is no ReMac account, no cloud sync, no telemetry. The relay (when you need it) only sees encrypted bytes.
            </p>
          </div>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
            {[
            ['End-to-end encrypted', 'Curve25519 + ChaCha20-Poly1305'],
            ['No account required', 'Pairing is on-device, by QR'],
            ['Zero telemetry', 'Open source client coming Q3'],
            ['Local-first', 'Direct LAN whenever possible']].
            map(([k, v]) =>
            <div key={k} style={{
              display: 'flex', justifyContent: 'space-between', alignItems: 'center',
              padding: '14px 18px',
              borderRadius: 12,
              background: mode.surfaceHi,
              border: `1px solid ${mode.border}`
            }}>
                <span style={{ fontWeight: 500, fontSize: 14 }}>{k}</span>
                <span style={{ color: mode.fgMuted, fontSize: 12, fontFamily: fonts.mono }}>{v}</span>
              </div>
            )}
          </div>
        </Reveal>
      </Section>

      {/* Pricing */}
      <Section pad={pad} id="pricing" style={{ padding: `${(isMobile ? 70 : 120) * pad}px ${isMobile ? 18 : 32}px`, scrollMarginTop: 64 }}>
        <Reveal style={{ textAlign: 'center', marginBottom: 64 }}>
          <div style={{ fontFamily: fonts.mono, fontSize: 12, color: accent, letterSpacing: '0.12em', textTransform: 'uppercase', marginBottom: 16 }}>
            Pricing
          </div>
          <h2 style={{
            fontFamily: fonts.display, fontSize: 'clamp(40px,5vw,64px)',
            lineHeight: 1.05, letterSpacing: '-0.03em', fontWeight: 600, margin: 0
          }}>
            Free to start. Pay when you fly.
          </h2>
        </Reveal>
        <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: 20 }}>
          <Reveal y={32}><PriceCard
              mode={mode} fonts={fonts} accent={accent}
              name="Personal"
              price="Free"
              tag=""
              features={['One paired iPhone', 'Local network only', 'Up to 3 terminal sessions']} />
          </Reveal>
          <Reveal y={32} delay={0.1}><PriceCard
              mode={mode} fonts={fonts} accent={accent}
              highlight
              name="Pro"
              price="$6"
              tag="/month, billed monthly"
              features={['Unlimited devices', 'Remote relay (away from home)', 'Unlimited terminal sessions']} />
          </Reveal>
        </div>
      </Section>

      {/* CTA */}
      <Section pad={pad} style={{ textAlign: 'center', padding: `${(isMobile ? 70 : 120) * pad}px ${isMobile ? 18 : 32}px` }}>
        <Reveal as="h2" y={28} style={{
          fontFamily: fonts.display, fontSize: 'clamp(48px,6vw,80px)',
          lineHeight: 1.02, letterSpacing: '-0.04em', fontWeight: 600, margin: '0 0 24px'
        }}>
          Take your Mac with you.
        </Reveal>
        <Reveal as="p" delay={0.08} y={20} style={{ color: mode.fgMuted, fontSize: 18, margin: '0 auto 36px', maxWidth: 520 }}>
          ReMac is free for personal use. Install on your Mac, scan once, and never feel away from your machine again.
        </Reveal>
        <Reveal delay={0.16} y={16}><DownloadBadge mode={mode} accent={accent} /></Reveal>
      </Section>

      {/* Footer */}
      <footer style={{
        borderTop: `1px solid ${mode.border}`,
        padding: '40px 32px',
        maxWidth: 'min(1440px, 96vw)', margin: '0 auto',
        display: 'flex', justifyContent: 'space-between', alignItems: 'center',
        fontSize: 12, color: mode.fgDim,
        fontFamily: fonts.mono
      }}>
        <span>© 2026 ReMac · Made for power users</span>
        <span>
</span>
      </footer>
    </div>);
}

/* ---------- Feature cards ---------- */

function FeatureCard({ kicker, title, body, visual, wide, mode, fonts, accent, pad }) {
  return (
    <div style={{
      gridColumn: wide ? 'span 1' : 'span 1',
      background: mode.surface,
      border: `1px solid ${mode.border}`,
      borderRadius: 22,
      padding: 36,
      display: 'flex', flexDirection: 'column', gap: 24,
      minHeight: 520
    }}>
      <div style={{ flex: '1 1 auto', minHeight: 240, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
        {visual}
      </div>
      <div>
        <div style={{
          fontFamily: fonts.mono, fontSize: 11, color: accent,
          letterSpacing: '0.12em', textTransform: 'uppercase', marginBottom: 10
        }}>{kicker}</div>
        <div style={{
          fontFamily: fonts.display, fontSize: 26, fontWeight: 600,
          letterSpacing: '-0.02em', lineHeight: 1.15, marginBottom: 10
        }}>{title}</div>
        <div style={{ color: mode.fgMuted, fontSize: 14, lineHeight: 1.55 }}>{body}</div>
      </div>
    </div>);

}

/* ---------- Visuals (synthetic; no fake screenshots) ---------- */

function TerminalsVisual({ fonts, mode, accent }) {
  const lines = [
  { who: 'main', text: '$ pnpm dev' },
  { who: 'main', text: '✔ ready in 312ms', dim: true },
  { who: 'logs', text: '$ tail -f api.log' },
  { who: 'logs', text: '[200] GET /v1/sessions  18ms', dim: true },
  { who: 'build', text: '$ cargo build --release' }];

  return (
    <div style={{
      width: '100%', maxWidth: 320, display: 'flex', flexDirection: 'column', gap: 8
    }}>
      {lines.map((l, i) =>
      <div key={i} style={{
        background: mode.surfaceHi,
        border: `1px solid ${mode.border}`,
        borderRadius: 12, padding: '10px 14px',
        fontFamily: fonts.mono, fontSize: 12,
        display: 'flex', justifyContent: 'space-between', alignItems: 'center',
        gap: 12
      }}>
          <span style={{ color: l.dim ? mode.fgMuted : mode.fg, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{l.text}</span>
          <span style={{ color: accent, fontSize: 10, opacity: i === 0 ? 1 : 0.4 }}>● {l.who}</span>
        </div>
      )}
    </div>);

}

function FilesVisual({ fonts, mode, accent }) {
  const files = [
  ['📁', 'projects', '— folder'],
  ['📄', 'invoice-q1.pdf', '2.1 MB'],
  ['🎬', 'demo.mov', '184 MB'],
  ['📦', 'remac-v1.0.4.dmg', '12 MB'],
  ['🖼', 'screen.png', '1.4 MB']];

  return (
    <div style={{
      width: '100%', maxWidth: 320,
      background: mode.surfaceHi, borderRadius: 14,
      border: `1px solid ${mode.border}`,
      overflow: 'hidden'
    }}>
      <div style={{
        padding: '8px 12px', borderBottom: `1px solid ${mode.border}`,
        display: 'flex', gap: 8, alignItems: 'center',
        fontFamily: fonts.mono, fontSize: 11, color: mode.fgMuted
      }}>
        <span style={{ color: accent }}>‹</span><span style={{ color: accent }}>›</span>
        <span style={{ flex: 1, textAlign: 'center' }}>~/Downloads</span>
      </div>
      {files.map(([ic, name, meta], i) =>
      <div key={i} style={{
        padding: '9px 12px',
        display: 'flex', justifyContent: 'space-between',
        fontSize: 12,
        borderBottom: i < files.length - 1 ? `1px solid ${mode.border}` : 'none',
        background: i === 1 ? `${accent}11` : 'transparent'
      }}>
          <span style={{ display: 'flex', gap: 8 }}><span>{ic}</span>{name}</span>
          <span style={{ color: mode.fgMuted, fontFamily: fonts.mono, fontSize: 10 }}>{meta}</span>
        </div>
      )}
    </div>);

}

function ScreenVisual({ fonts, mode, accent }) {
  return (
    <div style={{
      width: '100%', aspectRatio: '16/10', maxWidth: 380,
      borderRadius: 12, overflow: 'hidden',
      background: mode.bg, border: `1px solid ${mode.border}`,
      position: 'relative',
      backgroundImage: `radial-gradient(circle at 30% 30%, ${accent}33 0%, transparent 40%), radial-gradient(circle at 80% 70%, #FF6B9D33 0%, transparent 40%)`
    }}>
      <div style={{
        position: 'absolute', left: '50%', top: '50%',
        transform: 'translate(-50%, -50%)',
        width: 60, height: 60, borderRadius: 999,
        border: `2px solid ${accent}`,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        color: accent, fontSize: 22
      }}>▶</div>
      <div style={{
        position: 'absolute', bottom: 12, left: 12, right: 12,
        fontFamily: fonts.mono, fontSize: 10, color: mode.fgMuted,
        display: 'flex', justifyContent: 'space-between'
      }}>
        <span>● 1080p · 60fps</span>
        <span>14ms latency</span>
      </div>
    </div>);

}

function AppsVisual({ fonts, mode, accent }) {
  const apps = ['Xc', 'Cd', 'Fg', 'Sk', 'Ps', 'Te', 'No', 'Sa'];
  return (
    <div style={{
      display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 10,
      width: '100%', maxWidth: 320
    }}>
      {apps.map((a, i) =>
      <div key={i} style={{
        aspectRatio: '1', borderRadius: 14,
        background: i === 0 ? `linear-gradient(135deg, ${accent}, #2E5BFF)` : mode.surfaceHi,
        border: `1px solid ${mode.border}`,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        fontFamily: fonts.display, fontWeight: 600, fontSize: 18,
        color: i === 0 ? '#000' : mode.fg
      }}>{a}</div>
      )}
    </div>);

}

function PriceCard({ name, price, tag, features, highlight, mode, fonts, accent }) {
  return (
    <div style={{
      borderRadius: 22,
      padding: 36,
      background: highlight ? mode.surface : mode.bgSoft,
      border: `1px solid ${highlight ? accent + '55' : mode.border}`,
      position: 'relative',
      boxShadow: highlight ? `0 0 0 1px ${accent}22, 0 30px 60px rgba(0,0,0,.3)` : 'none', height: "377px"
    }}>
      {highlight &&
      <div style={{
        position: 'absolute', top: 24, right: 24,
        fontFamily: fonts.mono, fontSize: 10,
        color: accent, letterSpacing: '0.12em', textTransform: 'uppercase'
      }}>Recommended</div>
      }
      <div style={{
        fontFamily: fonts.display, fontSize: 22, fontWeight: 600,
        marginBottom: 16, letterSpacing: '-0.02em'
      }}>{name}</div>
      <div style={{ display: 'flex', alignItems: 'baseline', gap: 8, marginBottom: 8 }}>
        <span style={{ fontFamily: fonts.display, fontSize: 56, fontWeight: 600, letterSpacing: '-0.03em' }}>{price}</span>
        <span style={{ color: mode.fgMuted, fontSize: 13 }}>{tag}</span>
      </div>
      <div style={{ height: 1, background: mode.border, margin: '24px 0' }} />
      <ul style={{ listStyle: 'none', padding: 0, margin: '0 0 28px', display: 'flex', flexDirection: 'column', gap: 12 }}>
        {features.map((f) =>
        <li key={f} style={{ display: 'flex', alignItems: 'center', gap: 10, fontSize: 14 }}>
            <span style={{
            width: 5, height: 5, borderRadius: '50%',
            background: accent, flexShrink: 0
          }}></span>{f}
          </li>
        )}
      </ul>
      <a href="#" style={{
        display: 'block', textAlign: 'center',
        padding: '12px 18px', borderRadius: 10,
        background: highlight ? mode.fg : 'transparent',
        color: highlight ? mode.bg : mode.fg,
        border: highlight ? 'none' : `1px solid ${mode.borderStrong}`,
        textDecoration: 'none', fontWeight: 500, fontSize: 14
      }}>{highlight ? 'Start Pro free for 14 days' : 'Download free'}</a>
    </div>);

}

function Section({ children, style, id, pad = 1 }) {
  return (
    <section id={id} style={{
      padding: `${140 * pad}px 64px`,
      maxWidth: 'min(1440px, 96vw)', margin: '0 auto',
      ...style
    }}>
      {children}
    </section>
  );
}

window.VariationA = VariationA;
window.PriceCard = PriceCard;