// Rvertising — V2 Solo, ported from Claude Design (claude.ai/design) handoff.
// Source variant: variant-sf.jsx. Tweaks-Panel/edit-mode logic stripped for production.

const T = {
  pricingLayout: "cards",
  sfFontDisplay: "Geist",
  sfFontSerif: "DM Serif Display",
  sfFontBody: "Geist",
  sfFontMono: "Geist Mono",
  sfBg: "#0a0a0c",
  sfBg2: "#111114",
  sfSurface: "#16161b",
  sfFg: "#fafaf7",
  sfAccent: "#ff5b14",
  sfAccent2: "#ffb800"
};

function hexToRgba(hex, a = 1) {
  const h = hex.replace('#', '');
  const v = h.length === 3 ? h.split('').map((c) => c + c).join('') : h;
  const r = parseInt(v.slice(0, 2), 16), g = parseInt(v.slice(2, 4), 16), b = parseInt(v.slice(4, 6), 16);
  return `rgba(${r},${g},${b},${a})`;
}

function buildSFTokens(t) {
  const { sfFg: fg, sfBg: bg, sfBg2: bg2, sfSurface: surface, sfAccent: accent, sfAccent2: accent2 } = t;
  return {
    '--sf-bg': bg, '--sf-bg2': bg2, '--sf-surface': surface, '--sf-fg': fg,
    '--sf-dim': hexToRgba(fg, .6), '--sf-faint': hexToRgba(fg, .4),
    '--sf-line': hexToRgba(fg, .08), '--sf-line-strong': hexToRgba(fg, .16),
    '--sf-accent': accent, '--sf-accent2': accent2,
    '--sf-glow': `radial-gradient(ellipse at center, ${hexToRgba(accent, .35)}, transparent 60%)`,
    '--sf-card-grad': `linear-gradient(180deg, ${hexToRgba(fg, .04)}, ${hexToRgba(fg, .01)})`,
    '--sf-font-display': t.sfFontDisplay,
    '--sf-font-serif': t.sfFontSerif,
    '--sf-font-body': t.sfFontBody,
    '--sf-font-mono': t.sfFontMono
  };
}

const MOCKUPS = [
  { src: 'assets/mockups/mockup-01.webp', name: 'GLANZMANUFAKTUR' },
  { src: 'assets/mockups/mockup-02.webp', name: 'GLANZMANUFAKTUR' },
  { src: 'assets/mockups/mockup-03.webp', name: 'PALENGA' },
  { src: 'assets/mockups/mockup-04.webp', name: 'BLITZAREA20' },
  { src: 'assets/mockups/mockup-05.webp', name: 'AB TUNING' },
  { src: 'assets/mockups/mockup-06.webp', name: 'STATICFLOW' },
  { src: 'assets/mockups/mockup-07.webp', name: 'STATICFLOW EXPORT' },
  { src: 'assets/mockups/mockup-08.webp', name: 'STATICFLOW NICHE' },
  { src: 'assets/mockups/mockup-09.webp', name: 'STATICFLOW SHOWCASE' },
  { src: 'assets/mockups/mockup-10.webp', name: 'STATICFLOW SWAP' },
  { src: 'assets/mockups/mockup-11.webp', name: 'STATICFLOW HYPERSCAN' }
];

function SFStyles() {
  return (
    <style>{`
      .sf-root{background:var(--sf-bg);color:var(--sf-fg);font-family:var(--sf-font-body),ui-sans-serif,sans-serif;font-size:15px;line-height:1.55;font-feature-settings:"ss01","cv11"}
      .sf-root .display{font-family:var(--sf-font-display),sans-serif;font-weight:500;letter-spacing:-.035em;line-height:.95}
      .sf-root .serif{font-family:var(--sf-font-serif),serif;font-weight:400;font-style:italic;letter-spacing:-.02em;line-height:.96}
      .sf-root .mono{font-family:var(--sf-font-mono),monospace;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
      .sf-root a{color:inherit;text-decoration:none}
      .sf-root .pill{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 8px;background:rgba(250,250,247,.04);border:1px solid var(--sf-line);border-radius:999px;font-size:12px;font-weight:500;backdrop-filter:blur(12px)}
      .sf-root .pill .dot{width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}
      .sf-root .btn{padding:13px 22px;border-radius:999px;font-family:inherit;font-size:14px;font-weight:500;cursor:pointer;border:none;display:inline-flex;align-items:center;gap:10px;transition:transform .15s,background .15s,box-shadow .15s}
      .sf-root .btn-pri{background:var(--sf-fg);color:var(--sf-bg)}
      .sf-root .btn-pri:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(255,255,255,.12)}
      .sf-root .btn-pri .arr{width:24px;height:24px;background:var(--sf-accent);color:var(--sf-fg);border-radius:50%;display:grid;place-items:center;font-size:12px;margin-left:2px}
      .sf-root .btn-line{background:rgba(250,250,247,.04);color:var(--sf-fg);border:1px solid var(--sf-line-strong);backdrop-filter:blur(12px)}
      .sf-root .btn-line:hover{background:rgba(250,250,247,.08)}
      .sf-root .btn-glass{position:relative;backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));border:1px solid rgba(255,255,255,.14);color:var(--sf-fg);box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 -1px 0 rgba(0,0,0,.2) inset,0 6px 18px rgba(0,0,0,.3)}
      .sf-root .btn-glass::before{content:"";position:absolute;inset:-1px;border-radius:inherit;background:radial-gradient(60% 120% at 50% 0%,color-mix(in oklab,var(--sf-accent) 25%,transparent),transparent 75%);filter:blur(8px);opacity:.25;z-index:-1;pointer-events:none;transition:opacity .2s}
      .sf-root .btn-glass:hover{transform:translateY(-1px);background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.05));box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 -1px 0 rgba(0,0,0,.2) inset,0 8px 22px rgba(0,0,0,.35),0 0 24px -10px var(--sf-accent)}
      .sf-root .btn-glass:hover::before{opacity:.5}
      .sf-root .btn-glass.btn-pri{background:linear-gradient(180deg,color-mix(in oklab,var(--sf-accent) 18%,rgba(255,255,255,.10)),color-mix(in oklab,var(--sf-accent) 8%,rgba(255,255,255,.03)));color:var(--sf-fg);border-color:color-mix(in oklab,var(--sf-accent) 30%,rgba(255,255,255,.18))}
      .sf-root .btn-glass.btn-pri .arr{background:rgba(255,255,255,.92);color:var(--sf-bg)}
      .sf-root .glow-bg{position:absolute;width:1200px;height:600px;background:var(--sf-glow);filter:blur(60px);pointer-events:none;z-index:0}
      .sf-root .marquee-wrap{overflow:hidden;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
      .sf-root .marquee-track{display:flex;gap:20px;animation:sf-mq 60s linear infinite;will-change:transform;width:max-content}
      .sf-root .marquee-track.fast{animation-duration:42s}
      .sf-root .marquee-track.rev{animation-direction:reverse}
      .sf-root .dock-item{display:flex;flex-shrink:0;transform-origin:center bottom;will-change:transform}
      @keyframes sf-mq{from{transform:translateX(0)}to{transform:translateX(-50%)}}
      @keyframes sf-bar{0%{transform:scaleY(.55)}100%{transform:scaleY(1)}}
      @keyframes sf-tool-cycle{0%{transform:translateX(110%);opacity:0}22%{transform:translateX(0);opacity:1}78%{transform:translateX(0);opacity:1}100%{transform:translateX(-30%);opacity:0}}
      @keyframes sf-tool-cycle-rev{0%{transform:translateX(-110%);opacity:0}22%{transform:translateX(0);opacity:1}78%{transform:translateX(0);opacity:1}100%{transform:translateX(30%);opacity:0}}
      @keyframes sf-tool-caption{0%,15%{opacity:0;transform:translateY(8px)}25%,80%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
      @keyframes sf-porsche-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
      .sf-root .porsche-shadow{animation:sf-porsche-float 6s ease-in-out infinite}
      .sf-root .text-marquee{display:flex;gap:48px;animation:sf-mq 38s linear infinite;will-change:transform;width:max-content;align-items:center}
      .sf-root .mock-card{flex-shrink:0;width:340px;height:220px;border-radius:14px;border:1px solid var(--sf-line);overflow:hidden;position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:14px 16px;box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 20px 40px rgba(0,0,0,.6)}
      .sf-root .hero-dock-row .mock-card,.sf-root .hero-mockrow-2 .mock-card{height:160px;width:260px}
      .sf-root .mock-card.tall{width:280px;height:380px}
      .sf-root .mock-card .chrome{position:absolute;top:0;left:0;right:0;height:24px;background:rgba(0,0,0,.4);display:flex;align-items:center;gap:5px;padding:0 10px;backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.08)}
      .sf-root .mock-card .chrome .led{width:7px;height:7px;border-radius:50%}
      .sf-root .nav-blur{background:rgba(10,10,12,.6);backdrop-filter:blur(18px) saturate(150%);border:1px solid var(--sf-line)}
      .sf-root details>summary{list-style:none;cursor:pointer}
      .sf-root details>summary::-webkit-details-marker{display:none}
      .sf-root details[open] .faq-plus{transform:rotate(45deg)}
      .sf-root .faq-plus{transition:transform .25s}
      .sf-root .price-card{background:var(--sf-card-grad),var(--sf-surface);border:1px solid var(--sf-line);border-radius:24px;padding:32px;position:relative;display:flex;flex-direction:column;gap:18px;transition:border-color .2s,transform .2s}
      .sf-root .price-card:hover{border-color:var(--sf-line-strong);transform:translateY(-3px)}
      .sf-root .price-card.hot{background:linear-gradient(180deg,rgba(255,91,20,.10),rgba(255,91,20,.02)),var(--sf-surface);border-color:rgba(255,91,20,.4)}
      .sf-root .feat-card{background:var(--sf-card-grad),var(--sf-surface);border:1px solid var(--sf-line);border-radius:24px;overflow:hidden;position:relative}
      .sf-root .grain{position:absolute;inset:0;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");opacity:.4;mix-blend-mode:overlay;pointer-events:none}
      .sf-root .sphere-tile{position:absolute;width:160px;height:96px;border-radius:8px;border:1px solid rgba(255,255,255,.1);overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.6)}
    `}</style>
  );
}

function SFMockCard({ m, tall }) {
  return (
    <div className={`mock-card${tall ? ' tall' : ''}`} style={{ background: '#0d0d10' }}>
      <div className="chrome">
        <span className="led" style={{ background: '#ff5f57' }}></span>
        <span className="led" style={{ background: '#febc2e' }}></span>
        <span className="led" style={{ background: '#28c840' }}></span>
        <span style={{ flex: 1, fontSize: 9, color: 'rgba(255,255,255,.4)', fontFamily: 'var(--sf-font-mono),monospace', letterSpacing: '.05em', textAlign: 'center', marginRight: 30 }}>{m.name.toLowerCase().replace(/\s/g, '')}.de</span>
      </div>
      <img src={m.src} alt={m.name} style={{ position: 'absolute', top: 24, left: 0, right: 0, bottom: 0, width: '100%', height: 'calc(100% - 24px)', objectFit: 'cover', objectPosition: 'top center', display: 'block' }} />
    </div>
  );
}

function SFNav() {
  return (
    <header style={{ position: 'sticky', top: 14, zIndex: 100, padding: '0 24px', marginBottom: -72 }}>
      <div className="nav-blur" style={{ maxWidth: 1240, margin: '0 auto', borderRadius: 999, padding: '8px 8px 8px 22px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
          <img src="assets/logo-r.webp" alt="Rvertising" style={{ width: 32, height: 32, objectFit: 'contain', filter: 'invert(1)' }} />
          <span style={{ fontWeight: 600, letterSpacing: '-.01em' }}>Rvertising<span style={{ color: 'var(--sf-accent)' }}>®</span></span>
        </div>
        <nav style={{ display: 'flex', gap: 24, fontSize: 13, fontWeight: 500, color: 'var(--sf-dim)' }}>
          {[['Cases', '#cases'], ['Prozess', '#process'], ['Pakete', '#pricing'], ['Über', '#about'], ['FAQ', '#faq']].map(([l, h]) =>
            <a key={h} href={h} style={{ transition: 'color .15s' }} onMouseEnter={(e) => e.target.style.color = 'var(--sf-fg)'} onMouseLeave={(e) => e.target.style.color = 'var(--sf-dim)'}>{l}</a>)}
        </nav>
        <button className="btn btn-pri" style={{ padding: '8px 8px 8px 18px', fontSize: 13 }}>Termin <span className="arr">→</span></button>
      </div>
    </header>
  );
}

function SFHero() {
  const { useMemo, useEffect, useState, useRef } = React;
  const [topOrder, bottomOrder] = useMemo(() => {
    const shuffle = (arr) => {
      const a = arr.slice();
      for (let i = a.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [a[i], a[j]] = [a[j], a[i]];
      }
      return a;
    };
    return [shuffle(MOCKUPS), shuffle(MOCKUPS)];
  }, []);

  useEffect(() => {
    const items = Array.from(document.querySelectorAll('.sf-root .hero-dock-row .dock-item'));
    if (!items.length) return;
    let raf = 0;
    const update = () => {
      const vw = window.innerWidth;
      const cx = vw / 2;
      const radius = vw * 0.45;
      const minScale = 0.35;
      const maxScale = 1;
      for (const el of items) {
        const r = el.getBoundingClientRect();
        const itemCx = r.left + r.width / 2;
        const dist = Math.min(1, Math.abs(itemCx - cx) / radius);
        const t = 0.5 + 0.5 * Math.cos(dist * Math.PI);
        const scale = minScale + (maxScale - minScale) * t;
        el.style.transform = `scale(${scale.toFixed(3)})`;
      }
      raf = requestAnimationFrame(update);
    };
    raf = requestAnimationFrame(update);
    return () => cancelAnimationFrame(raf);
  }, []);

  // Scroll-pinned hero: outer wrapper height = sticky 100vh + REVEAL_PX of pin scroll.
  // Drive transforms via refs in rAF — no React state, no rerenders per scroll tick.
  const wrapRef = useRef(null);
  const porscheRef = useRef(null);
  const shadowRef = useRef(null);
  const REVEAL_PX = 700;
  useEffect(() => {
    let raf = 0;
    const apply = () => {
      const el = wrapRef.current;
      if (!el) return;
      const r = el.getBoundingClientRect();
      const scrollable = r.height - window.innerHeight;
      const p = scrollable <= 0 ? 0 : Math.min(1, Math.max(0, -r.top / scrollable));
      const porsche = porscheRef.current;
      if (porsche) {
        porsche.style.opacity = Math.min(1, p * 2.4);
        porsche.style.transform = `translateY(${(1 - p) * 70}%) scale(${0.92 + p * 0.08})`;
      }
      const shadow = shadowRef.current;
      if (shadow) {
        shadow.style.opacity = Math.min(1, p * 1.6) * 0.55;
        shadow.style.transform = `translateX(${(1 - p) * 80}%)`;
      }
    };
    const onScroll = () => {
      if (raf) return;
      raf = requestAnimationFrame(() => { raf = 0; apply(); });
    };
    apply();
    window.addEventListener('scroll', onScroll, { passive: true });
    window.addEventListener('resize', apply);
    return () => {
      if (raf) cancelAnimationFrame(raf);
      window.removeEventListener('scroll', onScroll);
      window.removeEventListener('resize', apply);
    };
  }, []);

  return (
    <div ref={wrapRef} style={{ position: 'relative', height: `calc(100vh + ${REVEAL_PX}px)` }}>
    <section style={{ position: 'sticky', top: 0, height: '100vh', padding: '90px 24px 16px', boxSizing: 'border-box', display: 'flex', flexDirection: 'column' }}>
      <div className="glow-bg" style={{ top: -40, left: '50%', transform: 'translateX(-50%)', zIndex: 1 }}></div>
      <div className="grain" style={{ zIndex: 1 }}></div>
      <div ref={shadowRef} style={{
          position: 'absolute',
          top: '-20%',
          right: 'calc(50% - 50vw - 18vw)',
          width: 'min(150vw, 4500px)', zIndex: 0, pointerEvents: 'none',
          opacity: 0,
          willChange: 'transform, opacity'
        }}>
        <img
          className="porsche-shadow"
          src="assets/porsche-hero.webp"
          alt=""
          aria-hidden="true"
          style={{
            display: 'block', width: '100%', height: 'auto',
            filter: 'blur(28px) brightness(.3) saturate(0)'
          }} />
      </div>
      <div
        ref={porscheRef}
        style={{
          position: 'absolute',
          top: '20%',
          right: 'calc(50% - 50vw)',
          width: 'min(69vw, 2070px)', zIndex: 1, pointerEvents: 'none',
          opacity: 0,
          transformOrigin: 'right bottom',
          willChange: 'transform, opacity',
          filter: 'drop-shadow(0 50px 80px rgba(0,0,0,.6))'
        }}>
        {(() => {
          const layers = [
            { blur: 0,  mask: 'linear-gradient(to right, #000 45%, transparent 70%)' },
            { blur: 4,  mask: 'linear-gradient(to right, transparent 45%, #000 60%, #000 70%, transparent 82%)' },
            { blur: 12, mask: 'linear-gradient(to right, transparent 65%, #000 78%, #000 86%, transparent 94%)' },
            { blur: 28, mask: 'linear-gradient(to right, transparent 82%, #000 96%)' }
          ];
          return layers.map((l, i) => (
            <img key={i} src="assets/porsche-hero.webp" alt={i === 0 ? '' : undefined} aria-hidden={i !== 0 || undefined} style={{ position: i === 0 ? 'relative' : 'absolute', inset: i === 0 ? undefined : 0, display: 'block', width: '100%', height: 'auto', filter: l.blur ? `blur(${l.blur}px)` : undefined, WebkitMaskImage: l.mask, maskImage: l.mask, pointerEvents: 'none' }} />
          ));
        })()}
      </div>

      <div style={{ flex: '1 1 auto', display: 'flex', flexDirection: 'column', justifyContent: 'center', maxWidth: 1240, marginInline: 'auto', width: '100%', position: 'relative', zIndex: 2, textAlign: 'left' }}>
        <div style={{ display: 'flex', justifyContent: 'flex-start', marginBottom: 36 }}>
          <span className="pill"><span className="dot"></span>Q3 2026 · Noch 2 Slots verfügbar</span>
        </div>
        <h1 className="display" style={{ margin: 0, maxWidth: '13ch', fontSize: 'clamp(96px, 10vw, 140px)', lineHeight: '0.88', textAlign: 'left', textShadow: '0 4px 24px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5)' }}>
          Websites, die deine <span className="serif" style={{ color: 'var(--sf-accent)' }}>Aufbereitung</span> zur <span className="serif">ersten Wahl</span> machen.
        </h1>
        <p style={{ fontSize: 18, color: 'var(--sf-dim)', maxWidth: 640, margin: '32px 0 0', lineHeight: 1.6 }}>
          Premium-Webdesign &amp; Performance-Ads — exklusiv für Fahrzeugaufbereiter. Ab <span style={{ color: 'var(--sf-fg)', fontWeight: 500 }}>1.750 €</span> netto. <span style={{ color: 'var(--sf-fg)' }}>Kein Abo. Kein Bullshit.</span>
        </p>
        <div style={{ display: 'flex', gap: 12, justifyContent: 'flex-start', marginTop: 32, flexWrap: 'wrap' }}>
          <button className="btn btn-pri btn-glass">Beratung sichern <span className="arr">→</span></button>
          <button className="btn btn-line btn-glass">Cases ansehen</button>
        </div>
        <div style={{ display: 'flex', justifyContent: 'flex-start', alignItems: 'center', gap: 20, marginTop: 36, fontSize: 13, color: 'var(--sf-dim)', flexWrap: 'wrap' }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
            <span style={{ display: 'flex', color: 'var(--sf-accent2)', letterSpacing: '.2em' }}>★★★★★</span>
            <span><span style={{ color: 'var(--sf-fg)', fontWeight: 600 }}>4,9</span> · 38 Trustpilot-Bewertungen</span>
          </div>
          <span style={{ color: 'var(--sf-line)' }}>•</span>
          <span><span style={{ color: 'var(--sf-fg)', fontWeight: 600 }}>38</span> gelaunchte Studios</span>
          <span style={{ color: 'var(--sf-line)' }}>•</span>
          <span><span style={{ color: 'var(--sf-fg)', fontWeight: 600 }}>3 Jahre</span> nur Aufbereiter</span>
        </div>
      </div>

      <div style={{ marginTop: 'auto', paddingTop: 40, position: 'relative', width: '100vw', marginLeft: 'calc(50% - 50vw)', marginRight: 'calc(50% - 50vw)', zIndex: 2 }}>
        <div className="marquee-wrap hero-dock-row">
          <div className="marquee-track" style={{ justifyContent: 'flex-start', alignItems: 'stretch', textAlign: 'left' }}>
            {[...topOrder, ...topOrder, ...topOrder].map((m, i) =>
              <div key={i} className="dock-item"><SFMockCard m={m} /></div>)}
          </div>
        </div>
        <div className="marquee-wrap hero-mockrow-2" style={{ marginTop: 16 }}>
          <div className="marquee-track fast rev">
            {[...bottomOrder, ...bottomOrder, ...bottomOrder].map((m, i) => <SFMockCard key={i} m={m} />)}
          </div>
        </div>
        <div style={{ position: 'absolute', inset: 0, background: 'linear-gradient(180deg,transparent 60%,var(--sf-bg))', pointerEvents: 'none' }}></div>
      </div>
    </section>
    </div>
  );
}

function SFLogos() {
  const items = ['MAX7M CLEAN', 'PERFECT LINE', 'CASPARI OBERFLÄCHENDESIGN', 'CLEAN GARAGE RHEINGAU', 'REITENGLANZ', 'ASPHALT REBELLEN', 'GLANZAFFE', 'PALENGA', 'REININGER', 'OLDTIMER MASTERCLASS', 'ELITE CAR CARE'];
  return (
    <section style={{ padding: '48px 24px 24px', borderTop: '1px solid var(--sf-line)', borderBottom: '1px solid var(--sf-line)', background: 'var(--sf-bg2)' }}>
      <div className="mono" style={{ textAlign: 'center', color: 'var(--sf-faint)', marginBottom: 24 }}>// 38 DETAILER-STUDIOS. 3 LÄNDER. 1 ANSPRECHPARTNER.</div>
      <div className="marquee-wrap">
        <div className="text-marquee">
          {[...items, ...items].map((it, i) =>
            <span key={i} className="serif" style={{ fontSize: 36, color: 'var(--sf-dim)', whiteSpace: 'nowrap' }}>{it} <span style={{ color: 'var(--sf-accent)', fontSize: 14, marginLeft: 48, fontStyle: 'normal' }}>✦</span></span>
          )}
        </div>
      </div>
    </section>
  );
}

function SFToolStage({ items, reverse, startDelay = 0 }) {
  const { useState, useEffect, useRef } = React;
  const [idx, setIdx] = useState(0);
  const [started, setStarted] = useState(false);
  const stageRef = useRef(null);
  const [active, setActive] = useState(false);

  useEffect(() => {
    if (!stageRef.current) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => { if (e.isIntersecting) setActive(true); });
    }, { rootMargin: '600px 0px 600px 0px', threshold: 0 });
    io.observe(stageRef.current);
    return () => io.disconnect();
  }, []);

  useEffect(() => {
    if (!active || started) return;
    const t = setTimeout(() => setStarted(true), startDelay || 0);
    return () => clearTimeout(t);
  }, [active, started, startDelay]);

  useEffect(() => {
    if (!active || !started) return;
    const t = setTimeout(() => setIdx((i) => (i + 1) % items.length), 3200);
    return () => clearTimeout(t);
  }, [idx, active, items.length, started]);

  const it = items[idx];
  const shownIdx = idx;

  return (
    <div ref={stageRef} style={{ position: 'relative', height: '100%', minHeight: 520, overflow: 'visible' }}>
      {started && it.image &&
        <div key={'blur-' + shownIdx} style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', animation: `${reverse ? 'sf-tool-cycle-rev' : 'sf-tool-cycle'} 3.2s cubic-bezier(.22,.8,.2,1) both`, zIndex: 0, pointerEvents: 'none' }}>
          <img src={it.image} alt="" style={{ width: '500%', maxWidth: 'none', objectFit: 'contain', filter: 'blur(48px) saturate(.9)', opacity: 0.18, mixBlendMode: 'multiply' }} />
        </div>
      }
      {started &&
        <div key={shownIdx} style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: reverse ? 'flex-start' : 'flex-end', animation: `${reverse ? 'sf-tool-cycle-rev' : 'sf-tool-cycle'} 3.2s cubic-bezier(.22,.8,.2,1) both`, zIndex: 1 }}>
          {it.image ?
            <img src={it.image} alt={it.model} style={{ objectFit: 'contain', filter: 'drop-shadow(0 30px 40px rgba(0,0,0,.25))', ...(it.imgStyle || {}), padding: '0px 106px 8px 1px', margin: '0px 1px 0px 0px', width: '1050px', height: '374px' }} /> :
            <div style={{ width: '100%', maxWidth: 520, aspectRatio: '4/3', borderRadius: 22, border: '1px dashed rgba(14,13,10,.2)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: 'rgba(14,13,10,.45)', fontFamily: 'var(--sf-font-mono),monospace', fontSize: 11, letterSpacing: '.18em', background: 'transparent' }}>
              // {it.model.toUpperCase()}
            </div>
          }
        </div>
      }
      <div key={'cap-' + shownIdx} style={{ position: 'absolute', [reverse ? 'left' : 'right']: 8, bottom: 8, fontFamily: 'var(--sf-font-mono),monospace', textAlign: reverse ? 'left' : 'right', zIndex: 5, animation: 'sf-tool-caption 3.2s ease both' }}>
        <div style={{ fontSize: 11, color: '#7a766f', letterSpacing: '.18em' }}>{String(shownIdx + 1).padStart(2, '0')} / {String(items.length).padStart(2, '0')} — {it.label}</div>
        <div style={{ fontSize: 22, color: '#0e0d0a', fontFamily: 'var(--sf-font-display),sans-serif', fontWeight: 700, letterSpacing: '-.01em', marginTop: 4 }}>{it.model}</div>
      </div>
    </div>
  );
}

function SFToolsRow({ kicker, copy, ghostNumber, headline, headlineWords, items, reverse }) {
  const headlineCol = (
    <div style={{ position: 'relative', minHeight: 520, zIndex: 3, pointerEvents: 'none' }}>
      <div className="mono" style={{ color: '#7a766f', marginBottom: 14, fontSize: 11, letterSpacing: '.18em' }}>{kicker}</div>
      <h3 className="display" style={{ fontSize: 'clamp(72px,9vw,160px)', lineHeight: .88, margin: 0, fontWeight: 800, letterSpacing: '-.03em', color: '#0e0d0a', textTransform: 'uppercase', position: 'relative', zIndex: 4 }}>
        {headlineWords}
      </h3>
      <div style={{ position: 'absolute', bottom: -20, [reverse ? 'right' : 'left']: -10, fontFamily: 'var(--sf-font-display),sans-serif', fontWeight: 800, fontSize: 'clamp(220px,28vw,420px)', lineHeight: 1, letterSpacing: '-.04em', color: 'transparent', WebkitTextStroke: '1.5px rgba(14,13,10,.10)', pointerEvents: 'none', whiteSpace: 'nowrap', zIndex: 0 }}>{ghostNumber}</div>
      {copy &&
        <p style={{ marginTop: 28, maxWidth: 360, fontSize: 14, lineHeight: 1.6, color: '#3a3833', position: 'relative', zIndex: 4 }}>{copy}</p>
      }
    </div>
  );

  const heroWord = headline.toUpperCase();
  const imageCol = (
    <div style={{ position: 'relative', minHeight: 520 }}>
      <div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: reverse ? 'flex-start' : 'center', transform: reverse ? 'translateX(-12%)' : 'none', fontFamily: 'var(--sf-font-display),sans-serif', fontWeight: 800, fontSize: 'clamp(140px,18vw,260px)', lineHeight: 1, letterSpacing: '-.04em', color: 'transparent', WebkitTextStroke: '1.5px rgba(14,13,10,.10)', whiteSpace: 'nowrap', pointerEvents: 'none', zIndex: 0, textTransform: 'uppercase' }}>{heroWord}</div>
      <SFToolStage items={items} reverse={reverse} startDelay={reverse ? 1600 : 0} />
    </div>
  );

  return (
    <div style={{ position: 'relative', padding: '80px 0', minHeight: 620 }}>
      <div style={{ position: 'absolute', top: 0, bottom: 0, [reverse ? 'left' : 'right']: reverse ? '-12%' : 0, width: '70%', zIndex: 1 }}>
        {imageCol}
      </div>
      <div style={{ position: 'relative', width: '60%', zIndex: 3, marginLeft: reverse ? 'auto' : 0, marginRight: reverse ? 0 : 'auto' }}>
        {headlineCol}
      </div>
    </div>
  );
}

function CasinoWord({ words, color }) {
  const { useState, useEffect, useRef } = React;
  const [text, setText] = useState(words[0]);
  const [spinning, setSpinning] = useState(false);
  const ref = useRef(null);
  useEffect(() => {
    if (!ref.current) return;
    const fillers = ['Magisches', 'Brillantes', 'Episches', 'Stylisches', 'Krasses', 'Geniales', 'Wildes', 'Funkelndes'];
    let started = false;
    let intervalId = 0;
    const timeouts = [];
    const io = new IntersectionObserver((es) => es.forEach(e => {
      if (!e.isIntersecting || started) return;
      started = true;
      let nextIdx = 0;
      const cycle = () => {
        nextIdx = (nextIdx + 1) % words.length;
        setSpinning(true);
        let spin = 0;
        const total = 7;
        const tick = () => {
          if (spin < total - 1) {
            setText(fillers[Math.floor(Math.random() * fillers.length)]);
            spin++;
            timeouts.push(setTimeout(tick, 70));
          } else {
            setText(words[nextIdx]);
            setSpinning(false);
          }
        };
        tick();
      };
      intervalId = setInterval(cycle, 3200);
    }), { threshold: 0.4 });
    io.observe(ref.current);
    return () => { io.disconnect(); if (intervalId) clearInterval(intervalId); timeouts.forEach(clearTimeout); };
  }, []);
  return (
    <span ref={ref} className="serif" style={{ fontWeight: 400, fontStyle: 'italic', letterSpacing: '-.01em', textTransform: 'none', color, textShadow: '0 2px 14px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.55)', display: 'inline-block', filter: spinning ? 'blur(6px)' : 'blur(0)', transition: 'filter .12s linear' }}>{text}</span>
  );
}

function SFTools() {
  const { useEffect, useRef } = React;
  const finaleRef = useRef(null);
  const mclarenRef = useRef(null);
  const mclarenShadowRef = useRef(null);
  const headlineRef = useRef(null);
  useEffect(() => {
    let raf = 0;
    const apply = () => {
      const el = finaleRef.current;
      if (!el) return;
      const r = el.getBoundingClientRect();
      const vh = window.innerHeight;
      // progress: 0 when finale is one viewport below entering, 1 when finale top reaches mid-viewport
      const p = Math.min(1, Math.max(0, 1 - (r.top - vh * 0.2) / (vh * 0.8)));
      const m = mclarenRef.current;
      if (m) {
        m.style.opacity = Math.min(1, p * 1.6);
        m.style.transform = `translateX(${(1 - p) * -40}%)`;
      }
      const s = mclarenShadowRef.current;
      if (s) {
        s.style.opacity = Math.min(1, p * 1.4) * 0.55;
        s.style.transform = `translateX(${(1 - p) * -80}%)`;
      }
      const h = headlineRef.current;
      if (h) {
        const scale = 1 + (1 - p) * 1.4;
        h.style.transform = `scale(${scale})`;
      }
    };
    const onScroll = () => {
      if (raf) return;
      raf = requestAnimationFrame(() => { raf = 0; apply(); });
    };
    apply();
    window.addEventListener('scroll', onScroll, { passive: true });
    window.addEventListener('resize', apply);
    return () => {
      if (raf) cancelAnimationFrame(raf);
      window.removeEventListener('scroll', onScroll);
      window.removeEventListener('resize', apply);
    };
  }, []);
  const top = [
    { mono: '01 / 03', label: 'HOCHDRUCKREINIGER', model: 'BigBoi WashR Pro MKII', image: 'assets/tool-bigboi.webp', imgStyle: { width: '1000px', height: 'auto', margin: '0', transform: 'none' } },
    { mono: '02 / 03', label: 'POLIERMASCHINE', model: 'Rupes HLR21', image: 'assets/tool-rupes.webp', imgStyle: { width: '1288px', height: '541px', margin: '-83px -83px -79px', transform: 'rotate(15deg)' } },
    { mono: '03 / 03', label: 'LED-LAMPE', model: 'Scangrip Multimatch + Sunmatch', image: 'assets/tool-scangrip.webp', imgStyle: { width: '1000px', height: 'auto', margin: '0', transform: 'none' } }
  ];
  const bottom = [
    { mono: '01 / 03', label: 'WORKSTATION', model: 'MacBook Pro 16"', image: 'assets/setup-macbook.webp', imgStyle: { width: '1000px', height: 'auto', margin: '0', transform: 'none' } },
    { mono: '02 / 03', label: 'DISPLAY', model: 'Alienware 34"', image: 'assets/setup-alienware.webp', imgStyle: { width: '1000px', height: 'auto', margin: '0', padding: '0px 16px 0px 0px', transform: 'none' } },
    { mono: '03 / 03', label: 'INPUT · AUDIO', model: 'Magic + Bowers & Wilkins Px8', image: 'assets/setup-audio.webp', imgStyle: { width: '1000px', height: 'auto', margin: '0', transform: 'none' } }
  ];

  return (
    <section style={{ position: 'relative', width: '100vw', marginLeft: 'calc(50% - 50vw)', marginRight: 'calc(50% - 50vw)', padding: '160px 48px 640px', background: 'linear-gradient(180deg, var(--sf-bg) 0%, #2a2823 30px, #6e6857 60px, #c9c2b1 95px, #f5f3ee 130px, #f5f3ee calc(100% - 480px), #ddd6c4 calc(100% - 360px), #9a9382 calc(100% - 240px), #4d493e calc(100% - 130px), #16151a calc(100% - 50px), var(--sf-bg) 100%)', color: '#0e0d0a', overflow: 'hidden' }}>
      <div style={{ position: 'absolute', inset: '130px 0 480px 0', pointerEvents: 'none', opacity: .5, backgroundImage: 'radial-gradient(rgba(14,13,10,.05) 1px, transparent 1px)', backgroundSize: '3px 3px' }}></div>
      <div style={{ maxWidth: 1480, margin: '0 auto', position: 'relative' }}>
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', marginBottom: 40, gap: 60 }}>
          <div className="mono" style={{ color: '#7a766f', fontSize: 11, letterSpacing: '.22em' }}>// CHAPTER 02 — WERKZEUGE</div>
          <p style={{ maxWidth: 360, fontSize: 13, lineHeight: 1.7, color: '#3a3833', margin: 0 }}>
            Du arbeitest mit Hochdruck, Politur und Licht. Ich arbeite mit Pixeln, Code und Conversion-Daten. Beides ist Handwerk — und beides braucht das richtige Werkzeug.
          </p>
        </div>

        <div style={{ position: 'sticky', top: 0, zIndex: 1 }}>
          <SFToolsRow
            kicker="// 01 — DEIN STUDIO"
            headline="DETAIL"
            headlineWords={<>DEIN<br />T&Auml;GLICHES<br /><span className="serif" style={{ fontWeight: 400, fontStyle: 'italic', letterSpacing: '-.01em', textTransform: 'none', color: '#d94e1f' }}>Werkzeug</span>.</>}
            ghostNumber="01"
            copy="Hochdruckreiniger, Poliermaschine, Lichtquelle. Damit holst du jeden Tag das Maximum aus jedem Lack — Mikrometer für Mikrometer."
            items={top} />

          <SFToolsRow
            kicker="// 02 — MEIN STUDIO"
            headline="BUILD"
            headlineWords={<>MEIN<br />T&Auml;GLICHES<br /><span className="serif" style={{ fontWeight: 400, fontStyle: 'italic', letterSpacing: '-.01em', textTransform: 'none', color: '#d94e1f' }}>Werkzeug</span>.</>}
            ghostNumber="02"
            copy="MacBook, Ultra-Wide-Display, Magic-Setup, Studio-Audio. Damit baue ich Websites, die für dich verkaufen — Pixel für Pixel, Conversion für Conversion."
            items={bottom}
            reverse />
        </div>

        <div ref={finaleRef} style={{ position: 'relative', zIndex: 2, marginTop: 80, padding: '120px 24px 40px', borderTop: '1px solid rgba(14,13,10,.12)', textAlign: 'center' }}>
          <div className="mono" style={{ color: '#7a766f', marginBottom: 24, fontSize: 11, letterSpacing: '.22em', position: 'relative', zIndex: 3 }}>// 01 + 02 = ∞</div>
          <h3 ref={headlineRef} className="display" style={{ fontSize: 'clamp(72px,10vw,200px)', lineHeight: .85, margin: 0, fontWeight: 800, letterSpacing: '-.035em', color: '#0e0d0a', textTransform: 'uppercase', maxWidth: '14ch', marginInline: 'auto', position: 'relative', zIndex: 3, transformOrigin: 'center center', willChange: 'transform' }}>
            Zusammen<br />kreieren wir <CasinoWord words={['Atemberaubendes', 'Geniales', 'Wunderschönes']} color="#d94e1f" />
          </h3>
        </div>
      </div>
      <div ref={mclarenShadowRef} style={{ position: 'absolute', bottom: '450px', left: '-25vw', width: 'min(105vw, 3150px)', zIndex: 0, pointerEvents: 'none', opacity: 0, willChange: 'transform, opacity' }}>
        <img src="assets/mclaren.webp" alt="" aria-hidden="true" style={{ display: 'block', width: '100%', height: 'auto', filter: 'blur(36px) saturate(1.6) brightness(1.05)' }} />
      </div>
      <div ref={mclarenRef} style={{ position: 'absolute', bottom: '500px', left: '-18vw', width: 'min(62vw, 1870px)', zIndex: 1, pointerEvents: 'none', opacity: 0, willChange: 'transform, opacity', filter: 'drop-shadow(0 50px 80px rgba(0,0,0,.3))' }}>
        {(() => {
          const layers = [
            { blur: 0,  mask: 'linear-gradient(to left, #000 45%, transparent 70%)' },
            { blur: 4,  mask: 'linear-gradient(to left, transparent 45%, #000 60%, #000 70%, transparent 82%)' },
            { blur: 12, mask: 'linear-gradient(to left, transparent 65%, #000 78%, #000 86%, transparent 94%)' },
            { blur: 28, mask: 'linear-gradient(to left, transparent 82%, #000 96%)' }
          ];
          return layers.map((l, i) => (
            <img key={i} src="assets/mclaren.webp" alt={i === 0 ? '' : undefined} aria-hidden={i !== 0 || undefined} style={{ position: i === 0 ? 'relative' : 'absolute', inset: i === 0 ? undefined : 0, display: 'block', width: '100%', height: 'auto', filter: l.blur ? `blur(${l.blur}px)` : undefined, WebkitMaskImage: l.mask, maskImage: l.mask, pointerEvents: 'none' }} />
          ));
        })()}
      </div>
    </section>
  );
}

function Counter({ value, duration = 1600 }) {
  const { useRef, useState, useEffect } = React;
  const m = String(value).match(/^([+\-]?)(\d+(?:[.,]\d+)?)(.*)$/);
  if (!m) return <>{value}</>;
  const prefix = m[1];
  const raw = m[2];
  const suffix = m[3];
  const decimalSep = raw.includes(',') ? ',' : raw.includes('.') ? '.' : '';
  const decimals = decimalSep ? raw.split(decimalSep)[1].length : 0;
  const target = parseFloat(raw.replace(',', '.'));
  const ref = useRef(null);
  const [n, setN] = useState(0);
  const [started, setStarted] = useState(false);
  useEffect(() => {
    if (!ref.current || started) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => {
        if (e.isIntersecting && !started) {
          setStarted(true);
          const t0 = performance.now();
          const tick = (t) => {
            const p = Math.min(1, (t - t0) / duration);
            const eased = 1 - Math.pow(1 - p, 3);
            setN(target * eased);
            if (p < 1) requestAnimationFrame(tick); else setN(target);
          };
          requestAnimationFrame(tick);
        }
      });
    }, { threshold: 0.4 });
    io.observe(ref.current);
    return () => io.disconnect();
  }, [target, duration, started]);
  const formatted = decimals > 0 ? n.toFixed(decimals).replace('.', decimalSep || '.') : Math.round(n).toString();
  return <span ref={ref}>{prefix}{formatted}{suffix}</span>;
}

function SFManifest() {
  return (
    <section style={{ padding: '140px 24px 80px', position: 'relative' }}>
      <div className="glow-bg" style={{ top: 60, left: -200, opacity: .4 }}></div>
      <div style={{ maxWidth: 1100, margin: '0 auto', position: 'relative' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)', display: 'inline-block' }}></span>
          Das Problem
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6.5vw,104px)', margin: 0, maxWidth: '17ch' }}>
          Acht von zehn Auto-Besitzer googeln <span className="serif" style={{ color: 'var(--sf-accent)' }}>„Fahrzeugaufbereitung in meiner Nähe"</span> — bevor sie buchen. Die Frage ist: <span className="serif" style={{ color: 'rgb(255, 123, 0)' }}>finden sie dich?</span>
        </h2>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 1, marginTop: 80, background: 'var(--sf-line)', border: '1px solid var(--sf-line)', borderRadius: 24, overflow: 'hidden' }}>
          {[
            ['+312%', 'mehr Anfragen', 'über Google in 90 Tagen'],
            ['5,8×', 'ROAS', 'auf Meta-Werbung'],
            ['14 d', 'Time to Launch', 'vom Call zum Live-Gang']
          ].map(([n, k, sub], i) =>
            <div key={i} style={{ padding: 36, background: 'var(--sf-bg2)', position: 'relative' }}>
              <div className="display" style={{ fontSize: 88, color: 'var(--sf-accent)', lineHeight: .9, fontWeight: 400 }}><Counter value={n} /></div>
              <div style={{ fontSize: 18, fontWeight: 500, marginTop: 12 }}>{k}</div>
              <div style={{ fontSize: 13, color: 'var(--sf-dim)', marginTop: 4 }}>{sub}</div>
            </div>
          )}
        </div>
      </div>
    </section>
  );
}

function SFFeatVisual({ variant, big }) {
  if (variant === 'strategy') return (
    <div style={{ flex: 1, marginTop: 8, display: 'grid', gridTemplateColumns: '1.1fr 1fr', gap: 14, minHeight: 240 }}>
      <div style={{ borderRadius: 16, border: '1px solid var(--sf-line)', padding: 20, background: 'var(--sf-bg)', display: 'flex', flexDirection: 'column', gap: 10 }}>
        <div className="mono" style={{ color: 'var(--sf-faint)' }}>// Funnel · Aufbereiter-Studio</div>
        {[['Google „Aufbereitung X"', '12.400'], ['Klick auf Website', '3.220'], ['Anfrage gesendet', '248'], ['Termin gebucht', '89'], ['Auftrag erhalten', '71']].map(([l, v], i) =>
          <div key={i} style={{ display: 'flex', justifyContent: 'space-between', padding: '8px 0', borderTop: i ? '1px solid var(--sf-line)' : 'none', fontSize: 13 }}>
            <span style={{ color: 'var(--sf-dim)' }}>{l}</span>
            <span style={{ fontFamily: 'var(--sf-font-mono),monospace', color: i === 4 ? 'var(--sf-accent)' : 'var(--sf-fg)' }}>{v}</span>
          </div>
        )}
      </div>
      <div style={{ borderRadius: 16, border: '1px solid var(--sf-line)', padding: 20, background: 'linear-gradient(135deg,var(--sf-surface),var(--sf-bg))', display: 'flex', flexDirection: 'column', justifyContent: 'space-between' }}>
        <div className="mono" style={{ color: 'var(--sf-faint)' }}>// Ergebnis Q3</div>
        <div>
          <div className="display" style={{ fontSize: 80, color: 'var(--sf-accent)', lineHeight: .9 }}>71</div>
          <div style={{ fontSize: 13, color: 'var(--sf-dim)', marginTop: 8 }}>Aufträge im Quartal · CPL <span style={{ color: 'var(--sf-fg)' }}>14 €</span></div>
        </div>
      </div>
    </div>
  );

  if (variant === 'mockup') return (
    <div style={{ flex: 1, marginTop: 8, position: 'relative', height: 260, overflow: 'hidden', borderRadius: 14, border: '1px solid var(--sf-line)', background: 'linear-gradient(135deg,#0c1f1a,#1a3d2f,#0a1410)' }}>
      <div style={{ position: 'absolute', top: 0, left: 0, right: 0, height: 24, background: 'rgba(0,0,0,.4)', display: 'flex', alignItems: 'center', gap: 5, padding: '0 10px', borderBottom: '1px solid rgba(255,255,255,.08)' }}>
        <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#ff5f57' }}></span>
        <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#febc2e' }}></span>
        <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#28c840' }}></span>
      </div>
      <div style={{ position: 'absolute', inset: '24px 0 0', background: 'radial-gradient(ellipse at center,rgba(255,255,255,.08),transparent 60%)' }}></div>
      <div style={{ position: 'absolute', inset: '40px 32px 32px', display: 'flex', flexDirection: 'column', gap: 14 }}>
        <div className="serif" style={{ fontSize: 48, color: 'rgba(255,255,255,.95)' }}>Perfect Line.</div>
        <div style={{ fontSize: 11, color: 'rgba(255,255,255,.5)', fontFamily: 'var(--sf-font-mono),monospace', maxWidth: 360 }}>FOLIERUNG · DETAILING · KÖLN — Premium Studio für anspruchsvolle Kunden</div>
        <div style={{ display: 'flex', gap: 8, marginTop: 'auto' }}>
          <div style={{ padding: '7px 14px', background: '#fff', color: '#000', borderRadius: 999, fontSize: 11, fontWeight: 600 }}>Termin sichern →</div>
          <div style={{ padding: '7px 14px', border: '1px solid rgba(255,255,255,.2)', borderRadius: 999, fontSize: 11, color: 'rgba(255,255,255,.85)' }}>Galerie</div>
        </div>
      </div>
    </div>
  );

  if (variant === 'metrics') return (
    <div style={{ flex: 1, marginTop: 8, borderRadius: 14, border: '1px solid var(--sf-line)', padding: 20, background: 'var(--sf-bg)', display: 'flex', flexDirection: 'column', gap: 14, minHeight: 240 }}>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <div className="mono" style={{ color: 'var(--sf-faint)' }}>// Meta · 30 Tage</div>
        <div style={{ display: 'flex', gap: 6 }}>{['7d', '30d', '90d'].map((t, i) => <span key={i} style={{ fontSize: 10, padding: '3px 7px', background: i === 1 ? 'var(--sf-surface)' : 'transparent', border: i === 1 ? '1px solid var(--sf-line)' : 'none', borderRadius: 4, color: i === 1 ? 'var(--sf-fg)' : 'var(--sf-dim)', fontFamily: 'var(--sf-font-mono),monospace' }}>{t}</span>)}</div>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 12 }}>
        {[['ROAS', '5,8×', '#ff5b14'], ['CPL', '14 €', 'var(--sf-fg)'], ['CTR', '3,4%', 'var(--sf-fg)']].map(([k, v, c], i) =>
          <div key={i}><div style={{ fontSize: 11, color: 'var(--sf-dim)' }}>{k}</div><div style={{ fontFamily: 'var(--sf-font-mono),monospace', fontSize: 24, color: c, marginTop: 4 }}>{v}</div></div>
        )}
      </div>
      <div style={{ flex: 1, display: 'flex', alignItems: 'flex-end', gap: 4, marginTop: 8 }}>
        {[40, 55, 42, 68, 75, 62, 82, 90, 72, 85, 95, 100, 88, 72].map((h, i) =>
          <div key={i} style={{ flex: 1, background: 'linear-gradient(180deg,var(--sf-accent),rgba(255,91,20,.2))', height: `${h}%`, borderRadius: '2px 2px 0 0', transformOrigin: 'bottom', animation: `sf-bar ${2.4 + i % 5 * 0.35}s ease-in-out ${i * 0.12}s infinite alternate` }}></div>
        )}
      </div>
    </div>
  );

  return (
    <div style={{ flex: 1, marginTop: 8, position: 'relative', height: 240, borderRadius: 14, border: '1px solid var(--sf-line)', background: 'linear-gradient(135deg,var(--sf-surface),var(--sf-bg))', overflow: 'hidden', padding: 20, display: 'flex', flexDirection: 'column', gap: 10 }}>
      <div className="mono" style={{ color: 'var(--sf-faint)' }}>// WhatsApp · 14:32</div>
      <div style={{ maxWidth: '80%', background: 'var(--sf-bg2)', padding: '10px 14px', borderRadius: '14px 14px 14px 4px', fontSize: 13 }}>Hey, du hattest gestern wegen dem M4 angerufen — bin grad bei der Lackvermessung. Sende dir gleich die Werte.</div>
      <div style={{ maxWidth: '80%', background: 'var(--sf-accent)', color: 'var(--sf-bg)', padding: '10px 14px', borderRadius: '14px 14px 4px 14px', fontSize: 13, alignSelf: 'flex-end' }}>Top, danke! 🤘</div>
      <div style={{ maxWidth: '80%', background: 'var(--sf-bg2)', padding: '10px 14px', borderRadius: '14px 14px 14px 4px', fontSize: 13 }}>0,5–1,2 µm Klarlack noch übrig. Politur reicht, kein Schleifen nötig. Schicke dir den Plan in 10 min per Mail.</div>
      <div style={{ position: 'absolute', bottom: 14, right: 14, padding: '4px 10px', background: 'rgba(0,0,0,.4)', borderRadius: 6, fontSize: 9, color: 'var(--sf-dim)', fontFamily: 'var(--sf-font-mono),monospace' }}>echte Konversation</div>
    </div>
  );
}

function SFFeatures() {
  const feats = [
    { n: '01', title: 'Strategie', label: '— Bevor wir einen Pixel bewegen', d: 'Wir starten nicht mit Design. Wir starten mit deinen Zahlen, deinen Margen, deinen Wunschkunden. Du bekommst einen ehrlichen Plan — auch wenn wir nicht zusammenarbeiten.', visual: 'strategy' },
    { n: '02', title: 'Custom Build', label: '— Keine Templates. Nie.', d: 'Jede Seite ist von Grund auf gebaut. Custom-Komponenten, Mobile-First, Lighthouse 95+. Premium-Animationen statt Hover-Trash. Lieferzeit: 14 Tage.', visual: 'mockup' },
    { n: '03', title: 'Performance Ads', label: '— Für volle Terminkalender', d: 'Meta-Ads mit Detailer-spezifischen Funnels. Wir kennen die CPLs der Aufbereiter-Branche, die Saison-Peaks (Frühjahr & Herbst), die Trigger. Ab Tag 1 mess- und steuerbar.', visual: 'metrics' },
    { n: '04', title: '1 Ansprechpartner', label: '— Keine Account-Manager', d: 'Du redest mit dem, der baut. Direkt. Kein Ticket-System, kein PowerPoint. Dein Handy, mein Handy. Slack oder WhatsApp — du wählst.', visual: 'phone' }
  ];

  return (
    <section style={{ padding: '80px 24px', position: 'relative' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)', display: 'inline-block' }}></span>
          Was wir machen
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: '0 0 64px', maxWidth: '18ch' }}>
          Vier Bausteine. <span className="serif" style={{ color: 'var(--sf-accent)' }}>Ein</span> Ergebnis: dein Telefon klingelt.
        </h2>
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 14 }}>
          {feats.map((f, i) =>
            <div key={i} className="feat-card" style={{ padding: 32, minHeight: 380, display: 'flex', flexDirection: 'column', gap: 24, position: 'relative', gridColumn: i === 0 ? 'span 2' : 'span 1' }}>
              <div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
                <span className="serif" style={{ fontSize: 36, color: 'var(--sf-accent)' }}>{f.n}</span>
                <span style={{ fontSize: 13, color: 'var(--sf-dim)', fontFamily: 'var(--sf-font-mono),monospace', letterSpacing: '.05em' }}>{f.label}</span>
              </div>
              <h3 className="display" style={{ fontSize: i === 0 ? 54 : 42, margin: 0, maxWidth: '12ch' }}>{f.title}</h3>
              <p style={{ fontSize: 15, color: 'var(--sf-dim)', lineHeight: 1.6, margin: 0, maxWidth: 480 }}>{f.d}</p>
              <SFFeatVisual variant={f.visual} big={i === 0} />
            </div>
          )}
        </div>
      </div>
    </section>
  );
}

function SFSphere() {
  const tiles = [...MOCKUPS, ...MOCKUPS.slice(0, 4)];
  return (
    <section style={{ padding: '80px 24px 120px', position: 'relative', overflow: 'hidden' }}>
      <div className="glow-bg" style={{ top: '30%', left: '50%', transform: 'translateX(-50%)', width: 1400, height: 800, opacity: .5 }}></div>
      <div style={{ maxWidth: 1240, margin: '0 auto', position: 'relative', textAlign: 'center' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', justifyContent: 'center', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          Portfolio
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(56px,7vw,128px)', margin: '0 auto', maxWidth: '14ch' }}>
          38 Aufbereiter. <span className="serif" style={{ color: 'var(--sf-accent)' }}>Eine</span> Mission.
        </h2>
        <p style={{ fontSize: 17, color: 'var(--sf-dim)', maxWidth: 520, margin: '24px auto 0', lineHeight: 1.6 }}>
          Jede Seite custom gebaut. Jeder Funnel auf Fahrzeugaufbereitung zugeschnitten. Klick rein.
        </p>
        <div style={{ position: 'relative', height: 580, marginTop: 64 }}>
          <div style={{ position: 'absolute', inset: 0, display: 'grid', placeItems: 'center', pointerEvents: 'none' }}>
            {[420, 560, 720].map((s, i) =>
              <div key={i} style={{ position: 'absolute', width: s, height: s / 2.2, borderRadius: '50%', border: '1px dashed var(--sf-line)', transform: 'rotateX(72deg)' }}></div>
            )}
          </div>
          {tiles.slice(0, 12).map((m, i) => {
            const angle = i / 12 * Math.PI * 2;
            const ring = i % 3;
            const rx = 220 + ring * 70;
            const ry = (220 + ring * 70) / 2.4;
            const x = Math.cos(angle) * rx;
            const y = Math.sin(angle) * ry;
            const scale = 0.7 + (y + ry) / (ry * 4);
            return (
              <div key={i} className="sphere-tile" style={{ left: '50%', top: '50%', transform: `translate(${x}px,${y}px) translate(-50%,-50%) scale(${scale})`, zIndex: Math.round(scale * 100) }}>
                <div style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px)', backgroundSize: '16px 16px' }}></div>
                <div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                  <span className="serif" style={{ fontSize: 18, color: 'rgba(255,255,255,.92)' }}>{m.name}</span>
                </div>
              </div>
            );
          })}
          <div style={{ position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%,-50%)', textAlign: 'center', pointerEvents: 'none' }}>
            <div className="mono" style={{ color: 'var(--sf-faint)', marginBottom: 6 }}>// Active</div>
            <div className="display" style={{ fontSize: 64, color: 'var(--sf-fg)' }}>38</div>
          </div>
        </div>
        <button className="btn btn-line" style={{ marginTop: 32 }}>Alle Cases ansehen →</button>
      </div>
    </section>
  );
}

function SFCases() {
  const cases = [
    { co: 'Perfect Line', cat: 'Aufbereitung · Köln', res: '+312% Anfragen', span: 4, bg: 'linear-gradient(135deg,#0c1f1a,#1a3d2f)', n: '01' },
    { co: 'MAX7M Clean', cat: 'Aufbereitung · München', res: '5,8× ROAS', span: 2, bg: 'linear-gradient(135deg,#1a1a1a,#0a0a0a)', n: '02' },
    { co: 'Caspari', cat: 'Oldtimer-Aufbereitung', res: '89 Leads / Mo', span: 2, bg: 'linear-gradient(135deg,#7a2010,#3a1208)', n: '03' },
    { co: 'Asphalt Rebellen', cat: 'Aufbereitung · Stuttgart', res: '14k €/Mo Umsatz', span: 4, bg: 'linear-gradient(135deg,#0a1a2a,#1a3a5a)', n: '04' }
  ];
  return (
    <section id="cases" style={{ padding: '80px 24px', position: 'relative' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          Cases · Auswahl 2025
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: '0 0 56px', maxWidth: '17ch' }}>
          Studios, die wir <span className="serif" style={{ color: 'var(--sf-accent)' }}>schneller</span> gemacht haben. Mit Zahlen, nicht Versprechen.
        </h2>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(6,1fr)', gap: 14 }}>
          {cases.map((c, i) =>
            <a key={i} href="#" style={{ gridColumn: `span ${c.span}`, position: 'relative', height: 480, borderRadius: 24, overflow: 'hidden', background: c.bg, padding: 32, display: 'flex', flexDirection: 'column', justifyContent: 'space-between', color: '#fff', transition: 'transform .3s' }} onMouseEnter={(e) => e.currentTarget.style.transform = 'translateY(-4px)'} onMouseLeave={(e) => e.currentTarget.style.transform = 'translateY(0)'}>
              <div style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px)', backgroundSize: '40px 40px', mask: 'radial-gradient(ellipse 80% 60% at center,black,transparent)' }}></div>
              <div style={{ position: 'absolute', inset: '40% -10% -10% -10%', background: 'radial-gradient(ellipse,rgba(255,255,255,.06),transparent 60%)' }}></div>
              <div style={{ position: 'relative', display: 'flex', justifyContent: 'space-between' }}>
                <span className="serif" style={{ fontSize: 32, color: 'rgba(255,255,255,.9)' }}>{c.n}</span>
                <span style={{ width: 36, height: 36, borderRadius: '50%', background: 'rgba(255,255,255,.1)', display: 'grid', placeItems: 'center', fontSize: 14, backdropFilter: 'blur(8px)' }}>↗</span>
              </div>
              <div style={{ position: 'relative' }}>
                <div className="mono" style={{ color: 'rgba(255,255,255,.5)', marginBottom: 12 }}>{c.cat}</div>
                <div className="display" style={{ fontSize: c.span === 4 ? 64 : 46, marginBottom: 18 }}>{c.co}</div>
                <span style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '8px 14px', background: 'rgba(255,255,255,.08)', backdropFilter: 'blur(8px)', borderRadius: 999, fontSize: 13, fontWeight: 500, border: '1px solid rgba(255,255,255,.12)' }}>
                  <span style={{ color: 'var(--sf-accent2)' }}>↑</span>{c.res}
                </span>
              </div>
            </a>
          )}
        </div>
      </div>
    </section>
  );
}

function SFCompare() {
  const cards = [
    { l: 'Webflow-Vorlage', p: '59 €/mo', hot: false, r: [['—', 'Look wie 1.000 andere'], ['—', 'Keine Strategie'], ['—', 'Selbst zusammenbauen'], ['—', 'Kein Tracking-Setup'], ['—', 'Kein Ansprechpartner']] },
    { l: 'Klassische Agentur', p: '8.000–20.000 €', hot: false, r: [['—', '3–6 Monate Lieferzeit'], ['—', 'Account-Manager statt Designer'], ['—', 'Versteht Branche nicht'], ['✓', 'Tracking inklusive'], ['—', 'Slack-Threads ohne Ende']] },
    { l: 'Rvertising®', p: '2.000–5.000 €', hot: true, r: [['✓', 'Custom für Aufbereiter'], ['✓', 'In 14 Tagen live'], ['✓', 'Strategie + Build aus 1 Hand'], ['✓', 'Tracking + Ads-Setup'], ['✓', 'Mein Handy. Direkt.']] }
  ];
  return (
    <section style={{ padding: '80px 24px' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          Der ehrliche Vergleich
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: '0 0 56px', maxWidth: '15ch' }}>
          Warum nicht <span className="serif" style={{ color: 'var(--sf-accent)' }}>einfach</span> Webflow?
        </h2>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 14 }}>
          {cards.map((c, i) =>
            <div key={i} className="feat-card" style={{ padding: 32, position: 'relative', display: 'flex', flexDirection: 'column', gap: 18, ...(c.hot ? { borderColor: 'rgba(255,91,20,.4)', background: 'linear-gradient(180deg,rgba(255,91,20,.08),rgba(255,91,20,.01)),var(--sf-surface)' } : {}) }}>
              {c.hot && <div style={{ position: 'absolute', top: -12, right: 24, background: 'var(--sf-accent)', color: 'var(--sf-bg)', padding: '4px 12px', borderRadius: 999, fontSize: 11, fontWeight: 600, letterSpacing: '.04em' }}>EMPFEHLUNG</div>}
              <div>
                <div style={{ fontSize: 14, fontWeight: 500, color: c.hot ? 'var(--sf-accent)' : 'var(--sf-dim)' }}>{c.l}</div>
                <div className="display" style={{ fontSize: 38, marginTop: 6 }}>{c.p}</div>
              </div>
              <div style={{ display: 'flex', flexDirection: 'column' }}>
                {c.r.map(([icon, txt], j) =>
                  <div key={j} style={{ display: 'flex', gap: 12, alignItems: 'flex-start', fontSize: 14, padding: '12px 0', borderTop: '1px solid var(--sf-line)' }}>
                    <span style={{ minWidth: 18, color: icon === '✓' ? 'var(--sf-accent)' : 'var(--sf-faint)', fontWeight: 600 }}>{icon}</span>
                    <span style={{ color: icon === '✓' ? 'var(--sf-fg)' : 'var(--sf-dim)' }}>{txt}</span>
                  </div>
                )}
              </div>
            </div>
          )}
        </div>
      </div>
    </section>
  );
}

function SFPricing() {
  const tiers = [
    { n: 'Starter', price: '2.000', sub: 'einmalig · netto', hot: false, for: 'Solo · Lokale Aufbereitung', inc: ['5–7 Sektionen Onepager', 'Mobile-First Design', 'Google Maps + SEO Setup', 'Kontaktformular + Tracking', '2 Revisionsschleifen', '7 Tage Lieferzeit'] },
    { n: 'Studio', price: '3.500', sub: 'einmalig · netto', hot: true, for: 'Wachsende Aufbereiter · 2–5 MA', inc: ['Multi-Page bis 8 Seiten', 'Custom-Animationen', 'Erweiterte SEO + Local Pack', 'Vorher/Nachher-Galerie', 'Buchungssystem', 'Pixel · GA4 · Call-Tracking', 'Copywriting (deutsch)', '3 Wochen Lieferzeit', '30 Tage Aftercare'] },
    { n: 'Premium', price: '5.000', sub: 'einmalig + Retainer', hot: false, for: 'High-End · Premium-Aufbereitung', inc: ['Komplette Web-Architektur', 'Brand-Refresh inklusive', 'Custom-Components + CMS', 'Funnel-Setup (Lead → Call)', 'Meta Ads + 30T Mgmt', 'Conversion-Audit nach 60T', 'Priority-Support', '4–5 Wochen', '90 Tage Aftercare'] }
  ];

  return (
    <section id="pricing" style={{ padding: '80px 24px', position: 'relative' }}>
      <div className="glow-bg" style={{ top: 200, left: '50%', transform: 'translateX(-50%)', opacity: .3 }}></div>
      <div style={{ maxWidth: 1240, margin: '0 auto', position: 'relative' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          Pakete · Festpreise · netto
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: '0 0 56px', maxWidth: '14ch' }}>
          Drei Pakete. <span className="serif" style={{ color: 'var(--sf-accent)' }}>Ein</span> Ziel: dein Telefon.
        </h2>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 14 }}>
          {tiers.map((t, i) =>
            <div key={i} className={`price-card ${t.hot ? 'hot' : ''}`}>
              {t.hot && <div style={{ position: 'absolute', top: -12, right: 24, background: 'var(--sf-accent)', color: 'var(--sf-bg)', padding: '4px 12px', borderRadius: 999, fontSize: 11, fontWeight: 600 }}>★ Bestseller</div>}
              <div>
                <div style={{ fontSize: 14, fontWeight: 500, color: t.hot ? 'var(--sf-accent)' : 'var(--sf-dim)' }}>{t.n}</div>
                <div style={{ display: 'flex', alignItems: 'baseline', gap: 6, marginTop: 8 }}>
                  <span className="display" style={{ fontSize: 84, lineHeight: 1 }}>{t.price}</span>
                  <span style={{ fontSize: 24, color: 'var(--sf-dim)' }}>€</span>
                </div>
                <div className="mono" style={{ color: 'var(--sf-faint)', marginTop: 0 }}>{t.sub}</div>
                <div style={{ fontSize: 12, color: 'var(--sf-dim)', marginTop: 14, paddingTop: 14, borderTop: '1px solid var(--sf-line)' }}>FÜR: <span style={{ color: 'var(--sf-fg)', fontWeight: 500 }}>{t.for}</span></div>
              </div>
              <ul style={{ margin: 0, padding: 0, listStyle: 'none', display: 'flex', flexDirection: 'column', gap: 10, fontSize: 14, flex: 1, color: 'var(--sf-dim)' }}>
                {t.inc.map((x, j) => <li key={j} style={{ display: 'flex', gap: 10 }}><span style={{ color: 'var(--sf-accent)', fontWeight: 600 }}>→</span><span>{x}</span></li>)}
              </ul>
              <button className={t.hot ? 'btn btn-pri' : 'btn btn-line'} style={{ marginTop: 'auto', justifyContent: 'center' }}>{t.hot ? 'Studio buchen' : `${t.n} buchen`} {t.hot && <span className="arr">→</span>}</button>
            </div>
          )}
        </div>
      </div>
    </section>
  );
}

function SFReviews() {
  const reviews = [
    { q: 'Die alte Seite hat 3 Jahre nichts gebracht. Nach 2 Wochen kam die erste Aston-Anfrage.', n: 'Marc T.', c: 'MAX7M Clean' },
    { q: '4k war mir zu viel. Nach 3 Monaten hatte sich die Seite refinanziert. Punkt.', n: 'Jan-Niklas P.', c: 'Perfect Line' },
    { q: 'Endlich versteht jemand die Branche. Kein Agentur-Geschwafel.', n: 'Tobias R.', c: 'Asphalt Rebellen' },
    { q: 'Ich hatte vorher Webflow. Conversion vorher: 0,3%. Nach Rvertising: 4,1%.', n: 'Lyle S.', c: 'Oldtimer MC' },
    { q: 'Die haben verstanden was ich brauche, bevor ich es selbst wusste.', n: 'Karl C.', c: 'Caspari' },
    { q: 'Direkter Draht, keine Agentur-Politik. Genau wie es sein soll.', n: 'Sandra B.', c: 'Glanzaffe' },
    { q: 'Geile Seite, geile Ads, geiler Mensch. Mehr ist nicht zu sagen.', n: 'Mike R.', c: 'Reininger' },
    { q: 'Mehr Anfragen in 30 Tagen als im ganzen Vorjahr. Kein Witz.', n: 'Felix W.', c: 'Reitenglanz' }
  ];

  const ReviewCard = ({ r }) =>
    <div style={{ flexShrink: 0, width: 380, padding: 24, background: 'var(--sf-surface)', border: '1px solid var(--sf-line)', borderRadius: 18, display: 'flex', flexDirection: 'column', gap: 16 }}>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
        <span style={{ color: 'var(--sf-accent2)', letterSpacing: '.2em', fontSize: 13 }}>★★★★★</span>
        <span style={{ padding: '3px 8px', background: '#00b67a', color: '#fff', fontSize: 9, borderRadius: 3, fontFamily: 'var(--sf-font-mono),monospace', letterSpacing: '.05em' }}>TRUSTPILOT</span>
      </div>
      <p className="serif" style={{ fontSize: 20, lineHeight: 1.3, margin: 0, color: 'var(--sf-fg)' }}>„{r.q}"</p>
      <div style={{ display: 'flex', alignItems: 'center', gap: 10, paddingTop: 14, borderTop: '1px solid var(--sf-line)' }}>
        <div style={{ width: 32, height: 32, borderRadius: '50%', background: 'linear-gradient(135deg,var(--sf-surface),var(--sf-bg))', border: '1px solid var(--sf-line)' }}></div>
        <div>
          <div style={{ fontWeight: 500, fontSize: 13 }}>{r.n}</div>
          <div className="mono" style={{ color: 'var(--sf-faint)', marginTop: 2 }}>{r.c}</div>
        </div>
      </div>
    </div>;

  return (
    <section style={{ padding: '80px 0' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto', padding: '0 24px', marginBottom: 48 }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          O-Ton von echten Kunden
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: 0, maxWidth: '15ch' }}>
          <span className="serif" style={{ color: 'var(--sf-accent)' }}>Echte</span> Studios. Echte Zahlen. Keine Stockphotos.
        </h2>
      </div>
      <div className="marquee-wrap">
        <div className="marquee-track">
          {[...reviews, ...reviews].map((r, i) => <ReviewCard key={i} r={r} />)}
        </div>
      </div>
      <div className="marquee-wrap" style={{ marginTop: 14 }}>
        <div className="marquee-track fast rev">
          {[...reviews.slice().reverse(), ...reviews.slice().reverse()].map((r, i) => <ReviewCard key={i} r={r} />)}
        </div>
      </div>
    </section>
  );
}

function SFAbout() {
  return (
    <section id="about" style={{ padding: '80px 24px', position: 'relative' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto' }}>
        <div className="feat-card" style={{ padding: '56px', display: 'grid', gridTemplateColumns: '380px 1fr', gap: 56, alignItems: 'center', position: 'relative', overflow: 'hidden' }}>
          <div className="glow-bg" style={{ top: -100, right: -200, width: 700, height: 500, opacity: .4 }}></div>
          <div style={{ position: 'relative' }}>
            <div style={{ aspectRatio: '4/5', borderRadius: 18, overflow: 'hidden', background: 'var(--sf-bg)', border: '1px solid var(--sf-line)' }}>
              <img src="assets/founder-portrait.webp" alt="Gründer Rvertising" style={{ width: '100%', height: '100%', objectFit: 'cover', filter: 'contrast(1.05)' }} />
            </div>
            <div style={{ position: 'absolute', bottom: -12, right: -12, background: 'var(--sf-accent)', color: 'var(--sf-bg)', padding: '6px 12px', borderRadius: 999, fontSize: 11, fontWeight: 600 }}>★ Gründer · seit 2021</div>
          </div>
          <div style={{ position: 'relative' }}>
            <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 18, display: 'flex', alignItems: 'center', gap: 10 }}>
              <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
              Über mich
            </div>
            <h2 className="display" style={{ fontSize: 'clamp(40px,5vw,72px)', margin: '0 0 24px' }}>
              Kein Agentur-Fuzzi. <span className="serif" style={{ color: 'var(--sf-accent)' }}>Ein Mensch.</span> Ein Auto-Nerd. Ein Telefon.
            </h2>
            <p style={{ fontSize: 16, color: 'var(--sf-dim)', lineHeight: 1.65, marginBottom: 18 }}>
              Drei Jahre Performance-Marketing — ausschließlich für Fahrzeugaufbereiter. 38 Aufbereiter-Aufbereiter gelauncht. Ich kenne die Margen, die Kunden, den Lack. Deshalb rede ich nicht über „Storytelling" — ich rede über CPL, ROAS und volle Terminkalender.
            </p>
            <p style={{ fontSize: 16, color: 'var(--sf-dim)', lineHeight: 1.65, marginBottom: 32 }}>
              Du bekommst keinen Account-Manager. Kein PowerPoint. Du bekommst <strong style={{ color: 'var(--sf-fg)' }}>mich</strong> am Telefon.
            </p>
            <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3,1fr)', gap: 24, paddingTop: 24, borderTop: '1px solid var(--sf-line)' }}>
              {[['38', 'Aufbereiter gelauncht'], ['3 J', 'nur Aufbereiter'], ['1', 'Ansprechpartner']].map(([n, l], i) =>
                <div key={i}>
                  <div className="display" style={{ fontSize: 54, color: 'var(--sf-fg)', lineHeight: 1 }}>{n}</div>
                  <div style={{ fontSize: 13, color: 'var(--sf-dim)', marginTop: 6 }}>{l}</div>
                </div>
              )}
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

function SFFaq() {
  const qs = [
    ['Warum sind 5.000 € realistisch für eine Aufbereiter-Website?', 'Eine Premium-Aufbereitung kostet 800–2.500 €. Du machst 2 Aufträge mehr im Monat — die Seite ist nach 90 Tagen refinanziert. Plus: du gewinnst Premium-Kunden zurück, die dich vorher übersehen haben.'],
    ['Wie lange dauert das Projekt?', 'Starter: 7 Tage. Studio: 3 Wochen. Premium: 4–5 Wochen. Liefertermin steht im Vertrag — wenn wir später sind, gibt es Rabatt.'],
    ['Macht ihr auch nur Ads?', 'Ja — wenn deine bestehende Seite konvertiert. Vorab-Check kostet nichts. Wenn die Seite nicht passt, sag ich dir das vorher.'],
    ['Bin ich an euch gebunden?', 'Nein. Die Seite, die Domain, der Code — alles deins. Du kannst jederzeit gehen, kein Hosting-Zwang, kein Abo.'],
    ['Was, wenn ich keine guten Fotos habe?', 'Wir organisieren einen Fotografen aus dem Netzwerk. Halb- oder Ganztages-Shoot ab 600 € separat.'],
    ['Bietet ihr Ratenzahlung?', 'Ja: 50/50, 3 Raten zinslos, oder 6 Raten beim Premium-Paket. Direkt mit uns, keine Schufa.']
  ];
  return (
    <section id="faq" style={{ padding: '80px 24px' }}>
      <div style={{ maxWidth: 920, margin: '0 auto' }}>
        <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 24, display: 'flex', alignItems: 'center', gap: 10 }}>
          <span style={{ width: 24, height: 1, background: 'var(--sf-dim)' }}></span>
          FAQ
        </div>
        <h2 className="display" style={{ fontSize: 'clamp(48px,6vw,96px)', margin: '0 0 48px' }}>
          Häufige Fragen. <span className="serif" style={{ color: 'var(--sf-accent)' }}>Ehrliche</span> Antworten.
        </h2>
        <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
          {qs.map(([q, a], i) =>
            <details key={i} className="feat-card" style={{ padding: '24px 28px' }}>
              <summary style={{ display: 'flex', justifyContent: 'space-between', gap: 24, alignItems: 'flex-start' }}>
                <span style={{ display: 'flex', gap: 20, alignItems: 'flex-start', flex: 1 }}>
                  <span className="serif" style={{ fontSize: 22, color: 'var(--sf-accent)', minWidth: 42 }}>{String(i + 1).padStart(2, '0')}</span>
                  <span className="display" style={{ fontSize: 22, lineHeight: 1.25 }}>{q}</span>
                </span>
                <span className="faq-plus" style={{ width: 30, height: 30, borderRadius: '50%', background: 'rgba(255,255,255,.06)', display: 'grid', placeItems: 'center', fontSize: 16, color: 'var(--sf-fg)', flexShrink: 0 }}>+</span>
              </summary>
              <p style={{ margin: '16px 0 0 62px', color: 'var(--sf-dim)', fontSize: 15, lineHeight: 1.7 }}>{a}</p>
            </details>
          )}
        </div>
      </div>
    </section>
  );
}

function SFCTA() {
  const items = ['BERATUNG SICHERN', '30 MINUTEN', '0 € KOSTEN', '0 % BULLSHIT', 'TERMIN BUCHEN', 'NOCH 2 SLOTS Q3'];
  return (
    <section style={{ padding: '120px 0 60px', position: 'relative', overflow: 'hidden' }}>
      <div className="glow-bg" style={{ top: 0, left: '50%', transform: 'translateX(-50%)', width: 1400, height: 700, opacity: .6 }}></div>
      <div style={{ maxWidth: 1240, margin: '0 auto 48px', padding: '0 24px', position: 'relative', textAlign: 'center' }}>
        <h2 className="display" style={{ fontSize: 'clamp(72px,11vw,180px)', margin: '0 auto', maxWidth: '14ch' }}>
          Lass deinen <span className="serif" style={{ color: 'var(--sf-accent)' }}>Terminkalender</span> wieder voll werden.
        </h2>
        <p style={{ fontSize: 18, color: 'var(--sf-dim)', maxWidth: 540, margin: '32px auto 0', lineHeight: 1.6 }}>
          30 Minuten. Du erzählst mir alles. Ich gebe dir einen Plan — auch wenn wir nicht zusammenarbeiten.
        </p>
        <div style={{ display: 'flex', gap: 12, justifyContent: 'center', marginTop: 32, flexWrap: 'wrap' }}>
          <button className="btn btn-pri">Termin sichern <span className="arr">→</span></button>
          <button className="btn btn-line">hello@rvertising.com</button>
        </div>
      </div>
      <div className="marquee-wrap" style={{ borderTop: '1px solid var(--sf-line)', borderBottom: '1px solid var(--sf-line)', padding: '24px 0', background: 'rgba(255,91,20,.04)' }}>
        <div className="text-marquee">
          {[...items, ...items, ...items].map((it, i) =>
            <span key={i} className="serif" style={{ fontSize: 48, color: 'var(--sf-fg)', whiteSpace: 'nowrap' }}>{it} <span style={{ color: 'var(--sf-accent)', fontSize: 24, marginLeft: 48, fontStyle: 'normal' }}>✦</span></span>
          )}
        </div>
      </div>
    </section>
  );
}

function SFFooter() {
  return (
    <footer style={{ padding: '56px 24px 32px', background: 'var(--sf-bg2)', borderTop: '1px solid var(--sf-line)' }}>
      <div style={{ maxWidth: 1240, margin: '0 auto' }}>
        <div style={{ display: 'grid', gridTemplateColumns: '2fr 1fr 1fr 1fr', gap: 48, paddingBottom: 48, borderBottom: '1px solid var(--sf-line)' }}>
          <div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 18 }}>
              <div style={{ width: 30, height: 30, background: 'var(--sf-accent)', borderRadius: 8, display: 'grid', placeItems: 'center', color: 'var(--sf-bg)', fontFamily: 'var(--sf-font-serif),serif', fontStyle: 'italic', fontSize: 20, fontWeight: 600 }}>R</div>
              <span style={{ fontWeight: 600, fontSize: 18 }}>Rvertising<span style={{ color: 'var(--sf-accent)' }}>®</span></span>
            </div>
            <p style={{ fontSize: 14, color: 'var(--sf-dim)', lineHeight: 1.6, maxWidth: 300 }}>Premium-Webdesign &amp; Performance-Ads — ausschließlich für Fahrzeugaufbereiter. Made in Germany.</p>
          </div>
          {[
            ['Site', ['Hero', 'Cases', 'Prozess', 'Pakete', 'FAQ']],
            ['Pakete', ['Starter · 2k', 'Studio · 3,5k', 'Premium · 5k', 'Nur Ads', 'Nur Beratung']],
            ['Kontakt', ['hello@rvertising.com', '+49 151 XXXXXXX', 'Instagram', 'Trustpilot']]
          ].map(([k, arr], i) =>
            <div key={i}>
              <div className="mono" style={{ color: 'var(--sf-dim)', marginBottom: 16 }}>{k}</div>
              <div style={{ display: 'flex', flexDirection: 'column', gap: 10, fontSize: 14, color: 'var(--sf-fg)' }}>
                {arr.map((a, j) => <a key={j} href="#" style={{ color: 'var(--sf-fg)', opacity: .85 }}>{a}</a>)}
              </div>
            </div>
          )}
        </div>
        <div className="display" style={{ fontSize: 'clamp(140px,24vw,420px)', color: 'var(--sf-fg)', letterSpacing: '-.04em', lineHeight: .85, padding: '40px 0', textAlign: 'center', position: 'relative' }}>
          <span style={{ position: 'relative' }}>Rvertising<span className="serif" style={{ color: 'var(--sf-accent)', fontSize: '.6em' }}>®</span></span>
        </div>
        <div style={{ display: 'flex', justifyContent: 'space-between', color: 'var(--sf-faint)', fontSize: 12, flexWrap: 'wrap', gap: 16, paddingTop: 24, borderTop: '1px solid var(--sf-line)' }}>
          <span>© 2026 Rvertising. Made for Detailer, by Aufbereiter-Nerds.</span>
          <span>Impressum · Datenschutz · AGB</span>
        </div>
      </div>
    </footer>
  );
}

function App() {
  const tokens = buildSFTokens(T);
  React.useEffect(() => {
    if (typeof Lenis === 'undefined') return;
    const lenis = new Lenis({ lerp: 0.1, smoothWheel: true });
    let raf = 0;
    const tick = (t) => { lenis.raf(t); raf = requestAnimationFrame(tick); };
    raf = requestAnimationFrame(tick);
    const onAnchor = (e) => {
      const a = e.target.closest('a[href^="#"]');
      if (!a) return;
      const id = a.getAttribute('href');
      if (id.length <= 1) return;
      const target = document.querySelector(id);
      if (!target) return;
      e.preventDefault();
      lenis.scrollTo(target);
    };
    document.addEventListener('click', onAnchor);
    return () => { cancelAnimationFrame(raf); document.removeEventListener('click', onAnchor); lenis.destroy(); };
  }, []);
  return (
    <div className="sf-root" style={tokens}>
      <SFStyles />
      <SFNav />
      <SFHero />
      <SFTools />
      <SFManifest />
      <SFFeatures />
      <SFSphere />
      <SFCases />
      <SFCompare />
      <SFPricing />
      <SFReviews />
      <SFAbout />
      <SFFaq />
      <SFCTA />
      <SFFooter />
    </div>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<App />);
