// Brauwerk Herzog — variant-b-v2
// Stack: React + Babel (in-browser, no build step)
// Fonts: Jaini Purva (display) · Inter (body)
// Responsive: isMobile = useWindowWidth() < 980

const COLORS = {
  bg: '#F7F7F5',
  ink: '#1A1714',
  ink70: 'rgba(26,23,20,0.7)',
  line: 'rgba(26,23,20,0.12)',
  peach: '#F4977C',
  peachSoft: '#B9CEAE',
};

// Two fonts only
const FONT = {
  display: '"Jaini Purva", Georgia, serif',
  body: '"Inter", system-ui, sans-serif',
};

const I18N = {
  de: {
    nav: { story: 'Willkommen', biere: 'Biere', kurse: 'Braukurse', timeline: 'Bau', kontakt: 'Kontakt' },
    heroEyebrow: 'Eröffnung Sommer 2027',
    heroTitle: 'Eine neue Brauerei\nentsteht in Thüringen.',
    heroLead: 'In Georgenthal entsteht eine Brauerei, in der Tradition und Handwerk im Mittelpunkt stehen. Erste Fassware gibt es schon — der Bau beginnt diesen Sommer.',
    heroPrimary: 'Braukurs buchen',
    heroSecondary: 'Mehr erfahren',
    facts: [
      { k: 'Eröffnung', v: 'Sommer 2027' },
      { k: 'Standort', v: 'Georgenthal, Thüringen' },
      { k: 'Sudhaus', v: '5 hl' },
      { k: 'Aktuell', v: 'Fünf Sorten als Fassware' },
    ],
    storyEyebrow: 'Am Thüringer Wald',
    storyTitle: 'Bier mit Zeit, Leidenschaft und Charakter.',
    storyP1: 'Das Brauwerk Herzog ist eine kleine, handwerkliche Brauerei am Thüringer Wald — hier entstehen Biere in unterschiedlichsten Stilen, von modernen Interpretationen bis hin zu alten Traditionsbieren. Hauptsache, sie schmecken und bringen Menschen zusammen.',
    storyP2: 'In den kommenden Jahren laden wir zu Brauwochenenden ein: Kommt vorbei, schaut zu wie neue Kreationen entstehen, kommt ins Gespräch — oder genießt einfach ein Bier im Biergarten.',
    storyQuote: 'Gutes Bier braucht Zeit. Unsere Brauerei auch. Eröffnung 2027 – Fassware gibt\'s schon heute.',
    storyAuthor: 'Max Herzog · Braumeister',
    bierEyebrow: 'Aktuelle Fassware',
    bierTitle: 'Fünf Biere. Handwerklich gebraut.',
    bierLead: 'Unfiltriert abgefüllt, naturbelassen und voller Geschmack — so kommen unsere Biere ins Glas. Ob vertrauter Klassiker oder moderne Kreation: am Ende sollen sie Menschen zusammenbringen und schöne Momente begleiten.',
    biereList: [
      { nr: '01', name: 'Helles', sub: 'Leicht · 4,6 % vol.', desc: 'Leicht golden, schlank und unkompliziert. Eine fruchtig-blumige Whirlpoolgabe macht es zum idealen Feierabendbier.' },
      { nr: '02', name: 'Pils', sub: 'Klassisch · 5,0 % vol. · 38 IBU', desc: 'Hellgelb, trocken, klar. Klassisch hopfig-würziges Aroma trifft auf eine markante Bittere — für alle, die ein ehrliches Pils schätzen.' },
      { nr: '03', name: 'Bernstein', sub: 'Halbdunkel · 5,2 % vol.', desc: 'Kupferfarben und malzbetont, mit zarten Karamellnoten. Ein gemütliches Bier für ruhige Momente.' },
      { nr: '04', name: 'Pale Ale', sub: 'Modern · 5,2 % vol. · 20 IBU', desc: 'Zitrus, Maracuja, feines Karamallmalz. Fruchtig-aromatisch mit trockenem Abgang — zugänglich, aber mit Charakter.' },
      { nr: '05', name: 'India Pale Ale', sub: 'Hopfig · 6,5 % vol. · 60 IBU', desc: 'Intensives Hopfenaroma durch Dry Hopping: Citrus, reife Früchte, würzige Tiefe. Vollmundig und charakterstark.' },
    ],
    biereSoon: 'Mehr in Planung — Weizen, Dunkel, saisonale Spezialitäten.',
    fassOrder: 'Fass anfragen',
    fassClose: 'Schließen',
    fassSize: 'Fassgröße',
    fassQty: 'Anzahl',
    fassDate: 'Wunschtermin',
    fassDateOpt: 'optional',
    fassNote: 'Notiz',
    fassNotePh: 'Anlass, Lieferort, Rückfragen …',
    fassPrivat: 'Privat',
    fassGastro: 'Gastronomie',
    fassSendBtn: 'Anfrage senden',
    fassSummary: 'Anfrage',
    kurseEyebrow: 'Braukurse',
    kurseTitle: 'Einen Tag brauen.',
    kurseLead: 'Ab 2027 öffnen wir die Brauerei für alle, die Bier nicht nur trinken, sondern wirklich verstehen wollen. Gemeinsam brauen wir einen Sud von Anfang bis Ende — direkt an der Anlage, Schritt für Schritt, mit Zeit für alle Fragen.',
    kurseDetails: [
      'Geführter Braukurs mit Braumeister Max',
      'Alle Schritte am echten Sud — Maischen, Läutern, Kochen, Kühlen',
      'Bierverkostung aus dem Brauwerk Herzog',
      'Kleine Verpflegung während des Kurses',
      'Kursheft mit allen Inhalten zum Mitnehmen',
    ],
    kurseFacts: [
      { k: 'Uhrzeit', v: '10:30–15:00 Uhr' },
      { k: 'Gruppe', v: '4–15 Personen' },
      { k: 'Ort', v: 'Georgenthal, Thüringen' },
    ],
    kursePreis: '95 €',
    personenLabel: 'Wie viele Personen?',
    personenSingle: 'Person',
    personenPlural: 'Personen',
    summeLabel: 'Gesamt',
    kurseHinweis: 'Kein fixer Termin nötig — schick uns einfach eine Anfrage mit eurer Personenzahl. Wir melden uns mit verfügbaren Terminen.',
    kurseBook: 'Kursplatz anfragen',
    timelineEyebrow: 'Baufortschritt',
    timelineTitle: 'So entsteht das Brauwerk.',
    timeline: [
      { date: 'Frühjahr 2020', title: 'Idee & Gründung', text: 'Die Familie beschließt: Aus dem Hobby wird ein Betrieb. Brauwerk Herzog wird offiziell gegründet.', done: true },
      { date: 'Herbst 2024', title: 'Erste Fassware', text: 'Verschiedene Sorten entstehen durch die Unterstützung von Hops and Barley (Berlin) für regionale Gastronomie.', done: true },
      { date: 'Sommer 2026', title: 'Baubeginn', text: 'Spatenstich für das Sudhaus und den Biergarten in Georgenthal.', current: true },
      { date: 'Frühjahr 2027', title: 'Erster Sud', text: 'Die neue Anlage steht. Der erste hauseigene Sud läuft.' },
      { date: 'Sommer 2027', title: 'Eröffnung', text: 'Schankraum und Braukurse öffnen für alle.' },
    ],
    kontaktEyebrow: 'Kontakt',
    kontaktTitle: 'Schreibt uns.',
    kontaktLead: 'Fragen, Bestellungen oder einfach Hallo sagen — wir freuen uns über jede Nachricht.',
    kontaktAdresseLabel: 'Adresse',
    kontaktAdresse: 'Brauwerk Herzog\nAm Bahnhof 8\n99887 Georgenthal',
    kontaktMail: 'hallo@brauwerk-herzog.de',
    mailButton: 'E-Mail schreiben',
    footer: '© 2026 Brauwerk Herzog · Inhaber Maximilian Herzog',
  },
  en: {
    nav: { story: 'Welcome', biere: 'Beers', kurse: 'Courses', timeline: 'Build', kontakt: 'Contact' },
    heroEyebrow: 'Opening Summer 2027',
    heroTitle: 'A new brewery is\ntaking shape in Thuringia.',
    heroLead: 'In Georgenthal, a brewery is taking shape where tradition and craft come first. Our first kegs are already out — and construction begins this summer.',
    heroPrimary: 'Book a course',
    heroSecondary: 'Learn more',
    facts: [
      { k: 'Opening', v: 'Summer 2027' },
      { k: 'Location', v: 'Georgenthal, Thuringia' },
      { k: 'Brewhouse', v: '5 hl' },
      { k: 'Currently', v: 'Five beers on tap' },
    ],
    storyEyebrow: 'Thuringian Forest',
    storyTitle: 'Beer brewed with time, passion and character.',
    storyP1: 'Brauwerk Herzog is a small, craft brewery at the edge of the Thuringian Forest — a place where beers of all kinds take shape, from modern interpretations to old traditional styles. What matters most: they taste good and bring people together.',
    storyP2: 'In the years ahead we will be opening our doors for brewing weekends — come and watch new creations take shape, have a conversation, or simply enjoy a beer in the beer garden.',
    storyQuote: 'Good beer takes time. So does our brewery. Opening 2027 – kegs available today.',
    storyAuthor: 'Max Herzog · Brewmaster',
    bierEyebrow: 'On Tap Now',
    bierTitle: 'Five beers. Brewed by hand.',
    bierLead: 'Unfiltered and full of flavour — that is how our beers reach the glass. Whether a trusted classic or a modern creation: in the end, they should bring people together and make moments worth remembering.',
    biereList: [
      { nr: '01', name: 'Helles', sub: 'Light · 4.6% ABV', desc: 'Pale golden, lean and uncomplicated. A fruity, floral dry-hop addition makes it the perfect end-of-day beer.' },
      { nr: '02', name: 'Pils', sub: 'Classic · 5.0% ABV · 38 IBU', desc: 'Pale yellow, dry and clear. A classically hoppy, spicy aroma meets a pronounced bitterness — for those who appreciate an honest pilsner.' },
      { nr: '03', name: 'Bernstein', sub: 'Amber · 5.2% ABV', desc: 'Copper-coloured and malt-forward, with delicate caramel notes. An easy-going beer for quieter moments.' },
      { nr: '04', name: 'Pale Ale', sub: 'Modern · 5.2% ABV · 20 IBU', desc: 'Citrus, passion fruit, a touch of caramel malt. Fruity and aromatic with a dry finish — approachable, but with real character.' },
      { nr: '05', name: 'India Pale Ale', sub: 'Hoppy · 6.5% ABV · 60 IBU', desc: 'Intense hop aroma from dry hopping during fermentation and conditioning: citrus, ripe fruit, spicy depth. Full-bodied and bold.' },
    ],
    biereSoon: 'More in the works — Wheat, Dunkel, seasonal specials.',
    fassOrder: 'Request a keg',
    fassClose: 'Close',
    fassSize: 'Keg size',
    fassQty: 'Quantity',
    fassDate: 'Preferred date',
    fassDateOpt: 'optional',
    fassNote: 'Note',
    fassNotePh: 'Occasion, delivery, questions …',
    fassPrivat: 'Private',
    fassGastro: 'Hospitality',
    fassSendBtn: 'Send request',
    fassSummary: 'Request',
    kurseEyebrow: 'Brewing Courses',
    kurseTitle: 'A day of brewing.',
    kurseLead: 'From 2027 we\'ll open the brewery to everyone who wants to understand beer — not just drink it. Together we brew a full batch from start to finish, right at the equipment, step by step.',
    kurseDetails: [
      'Guided brew day with Brewmaster Max',
      'All steps on a real brew — mashing, lautering, boiling, cooling',
      'Beer tasting from the Brauwerk Herzog range',
      'Light refreshments throughout the day',
      'Course booklet with all content to take home',
    ],
    kurseFacts: [
      { k: 'Time', v: '10:30–15:00' },
      { k: 'Group', v: '4–15 people' },
      { k: 'Location', v: 'Georgenthal, Thuringia' },
    ],
    kursePreis: '€95',
    personenLabel: 'How many people?',
    personenSingle: 'person',
    personenPlural: 'people',
    summeLabel: 'Total',
    kurseHinweis: 'No fixed date needed — just send us an enquiry with your group size and we\'ll get back to you with available dates.',
    kurseBook: 'Request a spot',
    timelineEyebrow: 'Progress',
    timelineTitle: 'How the brewery is coming together.',
    timeline: [
      { date: 'Spring 2020', title: 'Idea & founding', text: 'The family decides: the hobby becomes a business. Brauwerk Herzog is officially founded.', done: true },
      { date: 'Autumn 2024', title: 'First kegs', text: 'Various beers brewed with the support of Hops and Barley (Berlin) for regional gastronomy.', done: true },
      { date: 'Summer 2026', title: 'Construction starts', text: 'Groundbreaking for the brewhouse and beer garden in Georgenthal.', current: true },
      { date: 'Spring 2027', title: 'First in-house brew', text: 'The new system is up. The first house brew runs.' },
      { date: 'Summer 2027', title: 'Opening', text: 'Taproom and brewing courses open to everyone.' },
    ],
    kontaktEyebrow: 'Contact',
    kontaktTitle: 'Get in touch.',
    kontaktLead: 'Questions, orders or just to say hi — we love hearing from you.',
    kontaktAdresseLabel: 'Address',
    kontaktAdresse: 'Brauwerk Herzog\nAm Bahnhof 8\n99887 Georgenthal · Germany',
    kontaktMail: 'hallo@brauwerk-herzog.de',
    mailButton: 'Send email',
    footer: '© 2026 Brauwerk Herzog · Proprietor Maximilian Herzog',
  },
};

// Reveal-on-scroll wrapper
function Reveal({ children, delay = 0, y = 32, as: As = 'div', style = {}, ...rest }) {
  const ref = React.useRef(null);
  const [shown, setShown] = React.useState(false);
  React.useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => {
        if (e.isIntersecting) {
          setShown(true);
          io.disconnect();
        }
      });
    }, { threshold: 0.12, rootMargin: '0px 0px -8% 0px' });
    io.observe(el);
    return () => io.disconnect();
  }, []);
  return (
    <As
      ref={ref}
      style={{
        opacity: shown ? 1 : 0,
        transform: shown ? 'translateY(0)' : `translateY(${y}px)`,
        transition: `opacity 0.9s ${delay}ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s ${delay}ms cubic-bezier(0.2, 0.7, 0.2, 1)`,
        ...style,
      }}
      {...rest}
    >
      {children}
    </As>
  );
}

function useWindowWidth() {
  const [w, setW] = React.useState(window.innerWidth);
  React.useEffect(() => {
    const onResize = () => setW(window.innerWidth);
    window.addEventListener('resize', onResize, { passive: true });
    return () => window.removeEventListener('resize', onResize);
  }, []);
  return w;
}

// Reusable button/anchor with hover state
function NavLink({ href, children }) {
  const [hover, setHover] = React.useState(false);
  return (
    <a
      href={href}
      onMouseEnter={() => setHover(true)}
      onMouseLeave={() => setHover(false)}
      style={{
        color: COLORS.ink,
        textDecoration: 'none',
        cursor: 'pointer',
        position: 'relative',
        paddingBottom: 4,
        borderBottom: hover ? `1px solid ${COLORS.ink}` : '1px solid transparent',
        transition: 'border-color 180ms ease, opacity 180ms ease',
        opacity: hover ? 1 : 0.85,
      }}
    >{children}</a>
  );
}

function Btn({ href, variant = 'primary', children, fullWidth = false, style = {}, ...rest }) {
  const [hover, setHover] = React.useState(false);
  const base = {
    padding: '14px 28px',
    borderRadius: 999,
    fontSize: 13,
    letterSpacing: '0.06em',
    textTransform: 'uppercase',
    fontWeight: 600,
    cursor: 'pointer',
    fontFamily: "'Inter', system-ui, sans-serif",
    textDecoration: 'none',
    display: fullWidth ? 'flex' : 'inline-flex',
    alignItems: 'center',
    justifyContent: fullWidth ? 'center' : 'flex-start',
    gap: 8,
    width: fullWidth ? '100%' : undefined,
    boxSizing: 'border-box',
    transition: 'transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease',
    transform: hover ? 'translateY(-2px)' : 'translateY(0)',
    boxShadow: hover ? '0 8px 22px rgba(26,23,20,0.18)' : '0 0 0 rgba(0,0,0,0)',
    border: 'none',
  };
  const variants = {
    primary: {
      background: hover ? 'rgba(26,23,20,0.85)' : COLORS.ink,
      color: COLORS.bg,
    },
    secondary: {
      background: hover ? 'rgba(26,23,20,0.85)' : 'transparent',
      color: hover ? COLORS.bg : COLORS.ink,
      border: hover ? '1px solid transparent' : `1px solid ${COLORS.ink}`,
    },
    light: {
      background: hover ? COLORS.bg : 'transparent',
      color: hover ? COLORS.ink : COLORS.bg,
      border: `1px solid ${COLORS.bg}`,
    },
  };
  const css = { ...base, ...variants[variant], ...style };
  if (href) {
    return (
      <a href={href} onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)} style={css} {...rest}>{children}</a>
    );
  }
  return (
    <button onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)} style={css} {...rest}>{children}</button>
  );
}

function LangPill({ lang, setLang }) {
  const [hovered, setHovered] = React.useState(null);
  return (
    <div style={{
      display: 'inline-flex',
      border: `1px solid ${COLORS.line}`,
      borderRadius: 999,
      padding: 2,
      fontSize: 12,
    }}>
      {['de', 'en'].map((k) => {
        const active = lang === k;
        const hover = hovered === k && !active;
        return (
          <button
            key={k}
            onClick={() => setLang(k)}
            onMouseEnter={() => setHovered(k)}
            onMouseLeave={() => setHovered(null)}
            style={{
              border: 'none',
              background: active ? COLORS.ink : hover ? COLORS.line : 'transparent',
              color: active ? COLORS.bg : COLORS.ink,
              padding: '5px 12px',
              borderRadius: 999,
              cursor: active ? 'default' : 'pointer',
              fontWeight: 600,
              letterSpacing: '0.06em',
              textTransform: 'uppercase',
              transition: 'background 160ms ease, color 160ms ease',
              opacity: hover ? 0.85 : 1,
            }}
          >{k}</button>
        );
      })}
    </div>
  );
}

// Beer colour tones — one per beer, used in both cards and the drawer
const BEER_TONES = [
  { bg: '#F2ECC4', label: '#1A1714' }, // Helles
  { bg: '#F5E3DB', label: '#1A1714' }, // Pils
  { bg: '#C46F59', label: '#F7F7F5' }, // Bernstein
  { bg: '#E8A96A', label: '#1A1714' }, // Pale Ale
  { bg: '#7A3E28', label: '#F7F7F5' }, // IPA
];

function BeerDrawer({ b, tone, t, fassSize, setFassSize, fassQty, setFassQty, fassKind, setFassKind, fassDate, setFassDate, fassNote, setFassNote, mailHref, onClose, isMobile }) {
  const [mounted, setMounted] = React.useState(false);
  const [dateError, setDateError] = React.useState(false);
  React.useEffect(() => {
    const id = requestAnimationFrame(() => setMounted(true));
    document.body.style.overflow = 'hidden';
    return () => {
      cancelAnimationFrame(id);
      document.body.style.overflow = '';
    };
  }, []);

  const minDate = (() => { const d = new Date(); d.setDate(d.getDate() + 14); return d.toISOString().split('T')[0]; })();

  const handleDateChange = (e) => {
    const val = e.target.value;
    if (val && val < minDate) {
      setFassDate('');
      setDateError(true);
      setTimeout(() => setDateError(false), 3000);
    } else {
      setFassDate(val);
      setDateError(false);
    }
  };

  const sizes = [30, 50];
  const labelStyle = { fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 600, marginBottom: 10 };
  const groupStyle = { display: 'flex', flexDirection: 'column' };
  const pillRow = { display: 'flex', gap: 8, flexWrap: 'wrap' };

  const revealStyle = (i) => ({
    opacity: mounted ? 1 : 0,
    transform: mounted ? 'translateY(0)' : 'translateY(8px)',
    transition: `opacity 450ms cubic-bezier(0.22, 1, 0.36, 1) ${100 + i * 60}ms, transform 500ms cubic-bezier(0.22, 1, 0.36, 1) ${100 + i * 60}ms`,
  });

  const pillBase = (active) => ({
    padding: '10px 16px',
    borderRadius: 999,
    border: `1px solid ${COLORS.ink}`,
    background: active ? COLORS.ink : 'transparent',
    color: active ? COLORS.bg : COLORS.ink,
    cursor: 'pointer',
    fontSize: 13,
    fontWeight: 500,
    fontFamily: "'Inter', system-ui, sans-serif",
    transition: 'all 180ms ease',
  });

  const stepperBtn = {
    width: 36, height: 36, borderRadius: 999,
    border: `1px solid ${COLORS.ink}`,
    background: 'transparent', color: COLORS.ink,
    cursor: 'pointer', fontSize: 18, lineHeight: 1,
    fontFamily: 'inherit',
  };

  const inputStyle = {
    background: 'transparent',
    border: 'none',
    borderBottom: `1px solid ${COLORS.line}`,
    padding: '8px 0',
    fontSize: 14,
    color: COLORS.ink,
    fontFamily: "'Inter', system-ui, sans-serif",
    width: '100%',
    outline: 'none',
  };

  return (
    <>
      {/* Backdrop */}
      <div onClick={onClose} style={{
        position: 'fixed', inset: 0,
        background: 'rgba(26,23,20,0.55)',
        zIndex: 300,
        opacity: mounted ? 1 : 0,
        transition: 'opacity 300ms ease',
        cursor: 'pointer',
      }} />
      {/* Modal panel */}
      <div style={{
        position: 'fixed',
        top: '50%', left: '50%',
        transform: mounted ? 'translate(-50%, -50%)' : 'translate(-50%, calc(-50% + 24px))',
        opacity: mounted ? 1 : 0,
        transition: 'transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms ease',
        zIndex: 301,
        width: isMobile ? '95%' : '90%',
        maxWidth: isMobile ? 480 : 880,
        maxHeight: '88vh',
        borderRadius: 24,
        boxShadow: '0 40px 80px -20px rgba(26,23,20,0.45)',
        display: 'grid',
        gridTemplateColumns: isMobile ? '1fr' : '5fr 7fr',
        gridTemplateRows: isMobile ? 'auto 1fr' : '1fr',
        overflow: 'hidden',
        boxSizing: 'border-box',
      }}>

      {/* Top/Left: beer colour panel */}
      <div style={{
        background: tone.bg, color: tone.label,
        padding: isMobile ? '28px 28px 24px' : 48,
        display: 'flex', flexDirection: 'column', justifyContent: 'space-between',
        minHeight: isMobile ? 'auto' : 360,
        position: 'relative',
        ...revealStyle(0),
      }}>
        {/* Close button — lives here on mobile so it's always visible on the colour block */}
        {isMobile && (
          <button
            type="button" onClick={onClose} aria-label={t.fassClose}
            style={{
              position: 'absolute', top: 16, right: 16,
              width: 36, height: 36, borderRadius: 999,
              border: `1px solid ${tone.label === COLORS.bg ? 'rgba(247,247,245,0.4)' : 'rgba(26,23,20,0.25)'}`,
              background: 'transparent', color: tone.label,
              cursor: 'pointer', fontSize: 20, lineHeight: 1,
              fontFamily: 'inherit', zIndex: 5,
              display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 0,
              transition: 'background 180ms ease',
            }}
            onMouseEnter={(e) => { e.currentTarget.style.background = 'rgba(0,0,0,0.12)'; }}
            onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; }}
          >×</button>
        )}
        <div style={{ fontSize: 13, letterSpacing: '0.1em' }}>
          № {b.nr} · <span style={{ fontSize: 11, letterSpacing: '0.16em', textTransform: 'uppercase', opacity: 0.78 }}>{b.sub}</span>
        </div>
        <div style={{ marginTop: isMobile ? 16 : 0 }}>
          <h3 style={{ fontFamily: "'Jaini Purva', serif", fontSize: isMobile ? 56 : 88, lineHeight: 0.92, letterSpacing: '-0.03em', margin: 0, fontWeight: 400 }}>{b.name}</h3>
          <p style={{ fontSize: 14, lineHeight: 1.55, marginTop: 14, opacity: 0.9 }}>{b.desc}</p>
        </div>
      </div>

      {/* Bottom/Right: white form panel */}
      <div style={{
        background: COLORS.bg, color: COLORS.ink,
        padding: isMobile ? '28px 28px 28px' : 48,
        display: 'flex', flexDirection: 'column', gap: isMobile ? 18 : 24,
        position: 'relative',
        overflowY: 'auto',
      }}>
      {/* Close — desktop only, mobile close is in the colour panel */}
      {!isMobile && (
        <button
          type="button" onClick={onClose} aria-label={t.fassClose}
          style={{
            position: 'absolute', top: 20, right: 20,
            width: 40, height: 40, borderRadius: 999,
            border: `1px solid ${COLORS.line}`,
            background: 'transparent', color: COLORS.ink,
            cursor: 'pointer', fontSize: 20, lineHeight: 1,
            fontFamily: 'inherit', zIndex: 5,
            display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 0,
            transition: 'background 180ms ease, color 180ms ease, transform 180ms ease',
          }}
          onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
          onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
        >×</button>
      )}
        <div style={{ ...groupStyle, ...revealStyle(1) }}>
          <div style={labelStyle}>Typ</div>
          <div style={pillRow}>
            {[['privat', t.fassPrivat], ['gastro', t.fassGastro]].map(([k, label]) => (
              <button key={k} onClick={() => setFassKind(k)} style={pillBase(fassKind === k)}
                onMouseEnter={(e) => { if (fassKind !== k) e.currentTarget.style.background = 'rgba(26,23,20,0.08)'; }}
                onMouseLeave={(e) => { if (fassKind !== k) e.currentTarget.style.background = 'transparent'; }}
              >{label}</button>
            ))}
          </div>
        </div>
        <div style={{ ...groupStyle, ...revealStyle(2) }}>
          <div style={labelStyle}>{t.fassSize}</div>
          <div style={pillRow}>
            {sizes.map((s) => (
              <button key={s} onClick={() => setFassSize(s)} style={pillBase(fassSize === s)}
                onMouseEnter={(e) => { if (fassSize !== s) e.currentTarget.style.background = 'rgba(26,23,20,0.08)'; }}
                onMouseLeave={(e) => { if (fassSize !== s) e.currentTarget.style.background = 'transparent'; }}
              >{s} L</button>
            ))}
          </div>
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: isMobile ? 16 : 24, ...revealStyle(3) }}>
          <div style={groupStyle}>
            <div style={labelStyle}>{t.fassQty}</div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
              <button onClick={() => setFassQty(Math.max(1, fassQty - 1))} style={stepperBtn} aria-label="Anzahl verringern"
                onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
                onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
              >−</button>
              <div style={{ fontSize: 32, fontWeight: 500, minWidth: 36, textAlign: 'center' }}>{fassQty}</div>
              <button onClick={() => setFassQty(Math.min(20, fassQty + 1))} style={stepperBtn} aria-label="Anzahl erhöhen"
                onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
                onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
              >+</button>
            </div>
          </div>
          <div style={groupStyle}>
            <div style={labelStyle}>{t.fassDate} <span style={{ opacity: 0.6, fontWeight: 400, letterSpacing: '0.04em', textTransform: 'none' }}>· {t.fassDateOpt}</span></div>
            <input type="date" value={fassDate} onChange={handleDateChange} min={minDate} aria-label={t.fassDate} style={{ ...inputStyle, borderBottomColor: dateError ? COLORS.peach : COLORS.line }} />
            {dateError && <div style={{ fontSize: 12, color: COLORS.peach, marginTop: 6, transition: 'opacity 300ms ease' }}>Bitte mindestens 2 Wochen im Voraus wählen.</div>}
          </div>
        </div>
        <div style={{ ...groupStyle, ...revealStyle(4) }}>
          <div style={labelStyle}>{t.fassNote}</div>
          <textarea value={fassNote} onChange={(e) => setFassNote(e.target.value)} placeholder={t.fassNotePh} aria-label={t.fassNote} rows={2} style={{ ...inputStyle, resize: 'vertical', minHeight: 44, lineHeight: 1.5 }} />
        </div>
        <div style={{ fontSize: 12, color: COLORS.ink70, lineHeight: 1.5, ...revealStyle(5) }}>
          Bitte mindestens 2 Wochen im Voraus anfragen — wir melden uns zur Bestätigung.
        </div>
        <a href={mailHref} style={{
          marginTop: 4, background: COLORS.ink, color: COLORS.bg,
          padding: '16px 28px', borderRadius: 999, textDecoration: 'none', textAlign: 'center',
          fontSize: 13, letterSpacing: '0.08em', textTransform: 'uppercase', fontWeight: 600,
          fontFamily: "'Inter', system-ui, sans-serif",
          transition: 'transform 180ms ease, opacity 180ms ease',
          ...revealStyle(6),
        }}
        onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.opacity = 0.85; }}
        onMouseLeave={(e) => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.opacity = 1; }}
        >
          {t.fassSendBtn} · {fassQty} × {fassSize} L →
        </a>
      </div>
      </div>
    </>
  );
}


function VariantBv2() {
  const [lang, setLang] = React.useState('de');
  const t = I18N[lang];
  const [persons, setPersons] = React.useState(2);
  const [expandedBeer, setExpandedBeer] = React.useState(null);
  const [fassSize, setFassSize] = React.useState(30);
  const [fassQty, setFassQty] = React.useState(1);
  const [fassKind, setFassKind] = React.useState('privat');
  const [fassDate, setFassDate] = React.useState('');
  const [fassNote, setFassNote] = React.useState('');
  const [navSolid, setNavSolid] = React.useState(false);
  const [menuOpen, setMenuOpen] = React.useState(false);
  const isMobile = useWindowWidth() < 980;

  React.useEffect(() => {
    const onS = () => setNavSolid(window.scrollY > 80);
    onS();
    window.addEventListener('scroll', onS, { passive: true });
    return () => window.removeEventListener('scroll', onS);
  }, []);

  const total = persons * 95;

  return (
    <div style={{
      background: COLORS.bg,
      backgroundImage: `radial-gradient(rgba(26,23,20,0.07) 1px, transparent 1px)`,
      backgroundSize: '22px 22px',
      backgroundPosition: '0 0',
      color: COLORS.ink,
      fontFamily: FONT.body,
      fontSize: 16,
      lineHeight: 1.55,
      width: '100%',
      minHeight: '100%',
      boxSizing: 'border-box',
      overflowX: 'clip',
    }}>
      {/* Nav */}
      <nav style={{
        position: 'sticky',
        top: 0,
        zIndex: 50,
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        padding: navSolid ? `14px ${isMobile ? 24 : 56}px` : `20px ${isMobile ? 24 : 56}px`,
        background: (navSolid || menuOpen) ? 'rgba(247, 247, 245, 0.96)' : 'transparent',
        backdropFilter: (navSolid || menuOpen) ? 'blur(10px)' : 'none',
        borderBottom: `1px solid ${(navSolid || menuOpen) ? COLORS.line : 'transparent'}`,
        transition: 'all 0.25s ease',
        boxSizing: 'border-box',
      }}>
        {/* Logo + Desktop nav links */}
        <div style={{ display: 'flex', alignItems: 'center', gap: 40 }}>
          <a href="#" style={{ display: 'flex', alignItems: 'center', lineHeight: 0 }}>
            <img src="assets/logo-wordmark.png" alt="Brauwerk Herzog" style={{ height: navSolid ? 28 : 36, transition: 'height 0.25s ease' }} />
          </a>
          {!isMobile && (
            <div style={{ display: 'flex', gap: 28, fontSize: 16 }}>
              {Object.entries(t.nav).map(([k, v]) => (
                <NavLink key={k} href={`#${k}`}>{v}</NavLink>
              ))}
            </div>
          )}
        </div>
        {!isMobile && (
          <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
            <LangPill lang={lang} setLang={setLang} />
            <Btn href="#kurse" variant="primary" style={{ width: 220, justifyContent: 'center', whiteSpace: 'nowrap' }}>{t.heroPrimary}</Btn>
          </div>
        )}

        {/* Mobile: lang + hamburger */}
        {isMobile && (
          <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
            <LangPill lang={lang} setLang={setLang} />
            <button
              onClick={() => setMenuOpen(o => !o)}
              aria-label={menuOpen ? 'Menü schließen' : 'Menü öffnen'}
              style={{
                width: 40, height: 40, borderRadius: 999,
                border: `1px solid ${COLORS.line}`,
                background: 'transparent', color: COLORS.ink,
                cursor: 'pointer', display: 'flex',
                flexDirection: 'column', alignItems: 'center',
                justifyContent: 'center', gap: 5, padding: 0,
                transition: 'border-color 180ms ease',
              }}
            >
              <span style={{ display: 'block', width: 18, height: 1.5, background: COLORS.ink, borderRadius: 2, transition: 'transform 250ms ease, opacity 250ms ease', transform: menuOpen ? 'translateY(6.5px) rotate(45deg)' : 'none' }} />
              <span style={{ display: 'block', width: 18, height: 1.5, background: COLORS.ink, borderRadius: 2, transition: 'opacity 250ms ease', opacity: menuOpen ? 0 : 1 }} />
              <span style={{ display: 'block', width: 18, height: 1.5, background: COLORS.ink, borderRadius: 2, transition: 'transform 250ms ease, opacity 250ms ease', transform: menuOpen ? 'translateY(-6.5px) rotate(-45deg)' : 'none' }} />
            </button>
          </div>
        )}
      </nav>

      {/* Mobile menu overlay */}
      {isMobile && menuOpen && (
        <div style={{
          position: 'fixed', top: 0, left: 0, right: 0, bottom: 0,
          background: COLORS.bg,
          zIndex: 40,
          display: 'flex',
          flexDirection: 'column',
          padding: '100px 32px 48px',
          gap: 0,
        }}>
          {Object.entries(t.nav).map(([k, v]) => (
            <a
              key={k}
              href={`#${k}`}
              onClick={() => setMenuOpen(false)}
              style={{
                display: 'block',
                fontSize: 32,
                fontFamily: FONT.display,
                fontWeight: 400,
                color: COLORS.ink,
                textDecoration: 'none',
                padding: '16px 0',
                borderBottom: `1px solid ${COLORS.line}`,
              }}
            >{v}</a>
          ))}
          <div style={{ marginTop: 40, display: 'flex', flexDirection: 'column', gap: 16 }}>
            <Btn href="#kurse" variant="primary" fullWidth onClick={() => setMenuOpen(false)} style={{ padding: '18px', fontSize: 14, justifyContent: 'center' }}>
              {t.heroPrimary}
            </Btn>
          </div>
        </div>
      )}

      {/* Hero */}
      <section style={{
        display: 'grid',
        gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr',
        minHeight: isMobile ? 'auto' : '90vh',
      }}>

        {/* Mobile: Lachs-Panel oben */}
        {isMobile && (
          <div style={{
            background: COLORS.peach,
            height: '50vw',
            borderBottomLeftRadius: 24,
            borderBottomRightRadius: 24,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
          }}>
            <img
              src="assets/logo-herzog-transparent.png"
              alt="Brauwerk Herzog"
              style={{ width: '50%', objectFit: 'contain' }}
            />
          </div>
        )}

        {/* Text-Spalte */}
        <div style={{ padding: isMobile ? '48px 24px 64px' : '160px 64px 80px', display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
          <Reveal delay={0}>
            <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, marginBottom: 28, fontWeight: 500 }}>
              ● {t.heroEyebrow}
            </div>
          </Reveal>

          <Reveal delay={120}>
            <h1 style={{
              fontFamily: FONT.display,
              fontSize: isMobile ? 56 : 96,
              lineHeight: 0.98,
              letterSpacing: '-0.025em',
              margin: 0,
              fontWeight: 400,
              whiteSpace: 'pre-line',
            }}>{t.heroTitle}</h1>
          </Reveal>

          <Reveal delay={260}>
            <p style={{ fontSize: isMobile ? 16 : 19, lineHeight: 1.6, color: COLORS.ink70, marginTop: isMobile ? 16 : 32, maxWidth: 480 }}>{t.heroLead}</p>
          </Reveal>

          <Reveal delay={400}>
            <div style={{ display: 'flex', flexDirection: isMobile ? 'column' : 'row', gap: 12, marginTop: isMobile ? 20 : 36 }}>
              <Btn href="#kurse" variant="primary" fullWidth={isMobile}>{t.heroPrimary} →</Btn>
              <Btn href="#story" variant="secondary" fullWidth={isMobile}>{t.heroSecondary}</Btn>
            </div>
          </Reveal>
        </div>

        {/* Desktop: Lachs-Panel rechts */}
        {!isMobile && (
          <div style={{
            background: COLORS.peach,
            borderTopLeftRadius: 24,
            borderBottomLeftRadius: 24,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
          }}>
            <img
              src="assets/logo-herzog-transparent.png"
              alt="Brauwerk Herzog"
              style={{ width: '88%', maxWidth: 520, objectFit: 'contain' }}
            />
          </div>
        )}
      </section>

      {/* Fact strip under hero */}
      <section style={{ borderTop: `1px solid ${COLORS.line}`, borderBottom: `1px solid ${COLORS.line}`, padding: isMobile ? '0 24px' : '0 64px', marginTop: isMobile ? 16 : 64, marginBottom: isMobile ? 0 : 0 }}>
        <div style={{ maxWidth: 1280, margin: '0 auto', display: 'grid', gridTemplateColumns: isMobile ? 'repeat(2, 1fr)' : 'repeat(4, 1fr)' }}>
          {t.facts.map((f, i) => (
            <div key={i} style={{
              padding: isMobile ? '24px 16px' : `32px ${i === t.facts.length - 1 ? 0 : 28}px 32px ${i === 0 ? 0 : 28}px`,
              borderLeft: isMobile
                ? (i % 2 === 0 ? 'none' : `1px solid ${COLORS.line}`)
                : (i === 0 ? 'none' : `1px solid ${COLORS.line}`),
              borderTop: isMobile && i >= 2 ? `1px solid ${COLORS.line}` : 'none',
              display: 'flex', flexDirection: 'column', gap: 6,
            }}>
              <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500 }}>{f.k}</div>
              <div style={{ fontFamily: FONT.body, fontSize: isMobile ? 16 : 22, fontWeight: 500, lineHeight: 1.2 }}>{f.v}</div>
            </div>
          ))}
        </div>
      </section>

      {/* Story */}
      <section id="story" style={{ padding: isMobile ? '64px 24px' : '160px 64px' }}>
        <div style={{ maxWidth: 1280, margin: '0 auto', display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '5fr 7fr', gap: isMobile ? 32 : 80 }}>
          <div>
            <Reveal>
              <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 24 }}>
                {t.storyEyebrow}
              </div>
              <h2 style={{ fontFamily: FONT.display, fontSize: isMobile ? 40 : 64, lineHeight: 1.02, letterSpacing: '-0.02em', margin: 0, fontWeight: 400 }}>
                {t.storyTitle}
              </h2>
            </Reveal>
            <Reveal delay={200}>
              <div style={{ marginTop: isMobile ? 28 : 48 }}>
                <div style={{ position: 'relative', borderRadius: 24, overflow: 'hidden', aspectRatio: isMobile ? '16 / 9' : '4 / 5' }}>
                  <img src="assets/image-01.png" alt="Familie Herzog" style={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }} />
                  <div style={{ position: 'absolute', bottom: 0, left: 0, right: 0, padding: '48px 28px 24px', background: 'linear-gradient(transparent, rgba(26,23,20,0.55))', color: '#F7F7F5' }}>
                    <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', fontWeight: 500 }}>Gemeinsam anstoßen</div>
                  </div>
                </div>
              </div>
            </Reveal>
          </div>

          <div style={{ paddingTop: isMobile ? 0 : 60 }}>
            <Reveal delay={120}>
              <p style={{ fontSize: isMobile ? 16 : 19, lineHeight: 1.6, fontWeight: 500, margin: 0 }}>
                {t.storyP1}
              </p>
            </Reveal>
            <Reveal delay={220}>
              <p style={{ fontSize: 16, lineHeight: 1.7, color: COLORS.ink70, marginTop: isMobile ? 16 : 28 }}>{t.storyP2}</p>
            </Reveal>
            <Reveal delay={320}>
              <div style={{
                marginTop: isMobile ? 24 : 48,
                padding: isMobile ? 24 : 40,
                background: COLORS.peachSoft,
                borderRadius: 24,
              }}>
                <div style={{ fontSize: isMobile ? 20 : 32, lineHeight: 1.4, fontWeight: 400, fontStyle: 'italic' }}>
                  „{t.storyQuote}"
                </div>
                <div style={{ marginTop: 16, fontSize: 13, letterSpacing: '0.16em', textTransform: 'uppercase', color: COLORS.ink70 }}>
                  — {t.storyAuthor}
                </div>
              </div>
            </Reveal>
          </div>
        </div>
      </section>

      {/* Biere */}
      <section id="biere" style={{ background: '#EFEFED', padding: isMobile ? '64px 24px' : '160px 64px' }}>
        <div style={{ maxWidth: 1280, margin: '0 auto' }}>
          <Reveal>
            <div style={{ marginBottom: isMobile ? 32 : 64 }}>
              <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 16 }}>
                {t.bierEyebrow}
              </div>
              <h2 style={{ fontFamily: FONT.display, fontSize: isMobile ? 40 : 64, lineHeight: 1.02, letterSpacing: '-0.02em', margin: '0 0 20px', fontWeight: 400 }}>
                {t.bierTitle}
              </h2>
              <p style={{ fontSize: 16, lineHeight: 1.7, color: COLORS.ink70, maxWidth: 680, margin: 0 }}>{t.bierLead}</p>
            </div>
          </Reveal>

          {/* Konfigurator-Drawer — opens above grid, always at the same spot */}
          {expandedBeer !== null && (() => {
            const i = expandedBeer;
            const b = t.biereList[i];
            const tone = BEER_TONES[i];
            const subj = encodeURIComponent(`${t.fassSummary}: ${b.name} · ${fassQty} × ${fassSize}L · ${fassKind === 'privat' ? t.fassPrivat : t.fassGastro}`);
            const body = encodeURIComponent(
              `Bier: ${b.name} (${b.sub})\n` +
              `${t.fassSize}: ${fassSize} L\n` +
              `${t.fassQty}: ${fassQty}\n` +
              `Typ: ${fassKind === 'privat' ? t.fassPrivat : t.fassGastro}\n` +
              (fassDate ? `${t.fassDate}: ${fassDate}\n` : '') +
              (fassNote ? `\n${t.fassNote}:\n${fassNote}\n` : '') +
              `\n— `
            );
            const mailHref = `mailto:${t.kontaktMail}?subject=${subj}&body=${body}`;
            return (
              <BeerDrawer
                key={`drawer-${i}`}
                b={b} tone={tone} t={t}
                fassSize={fassSize} setFassSize={setFassSize}
                fassQty={fassQty} setFassQty={setFassQty}
                fassKind={fassKind} setFassKind={setFassKind}
                fassDate={fassDate} setFassDate={setFassDate}
                fassNote={fassNote} setFassNote={setFassNote}
                mailHref={mailHref}
                onClose={() => setExpandedBeer(null)}
                isMobile={isMobile}
              />
            );
          })()}

          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(3, 1fr)', gap: isMobile ? 12 : 20 }}>
            {t.biereList.map((b, i) => {
              const tone = BEER_TONES[i];
              const isOpen = expandedBeer === i;

              return (
                <Reveal key={i} delay={i * 120}>
                  <article style={{
                    background: tone.bg,
                    color: tone.label,
                    padding: isMobile ? 24 : 36,
                    borderRadius: 24,
                    cursor: 'default',
                    transition: 'transform 300ms ease, box-shadow 300ms ease',
                    transform: 'scale(1)',
                    boxShadow: '0 0 0 rgba(0,0,0,0)',
                    display: 'flex',
                    flexDirection: 'column',
                    justifyContent: 'space-between',
                    minHeight: isMobile ? 'auto' : 440,
                  }}
                  >
                    <div style={{
                      display: 'flex',
                      flexDirection: 'column',
                      justifyContent: 'space-between',
                      gap: 24,
                      flex: 1,
                    }}>
                      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', fontSize: 13, letterSpacing: '0.1em' }}>
                        <span>№ {b.nr}</span>
                        <span style={{ fontSize: 11, letterSpacing: '0.16em', textTransform: 'uppercase', opacity: 0.78 }}>{b.sub}</span>
                      </div>

                      <div>
                        <h3 style={{
                          fontFamily: FONT.display,
                          fontSize: isMobile ? 52 : 76,
                          lineHeight: 0.92,
                          letterSpacing: '-0.03em',
                          margin: 0,
                          fontWeight: 400,
                        }}>{b.name}</h3>
                        <p style={{ fontSize: 14, lineHeight: 1.55, marginTop: isMobile ? 12 : 18, opacity: 0.9, maxWidth: 320 }}>{b.desc}</p>
                      </div>

                      <button
                        onClick={() => setExpandedBeer(i)}
                        style={{
                          alignSelf: isMobile ? 'stretch' : 'flex-start',
                          marginTop: isMobile ? 16 : 0,
                          background: 'transparent',
                          color: tone.label,
                          border: `1px solid ${tone.label}`,
                          padding: '12px 22px',
                          borderRadius: 999,
                          fontSize: 12,
                          letterSpacing: '0.08em',
                          textTransform: 'uppercase',
                          fontWeight: 600,
                          cursor: 'pointer',
                          fontFamily: FONT.body,
                          transition: 'background 180ms ease, color 180ms ease',
                        }}
                        onMouseEnter={(e) => { e.currentTarget.style.background = tone.label; e.currentTarget.style.color = tone.bg; }}
                        onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = tone.label; }}
                      >
                        {t.fassOrder} →
                      </button>
                    </div>
                  </article>
                </Reveal>
              );
            })}
          </div>

          <Reveal delay={200}>
            <div style={{
              marginTop: 32,
              textAlign: 'center',
              fontSize: 16,
              color: COLORS.ink70,
              fontStyle: 'italic',
            }}>
              {t.biereSoon}
            </div>
          </Reveal>
        </div>
      </section>

      {/* Braukurse */}
      <section id="kurse" style={{ padding: isMobile ? '64px 24px' : '160px 64px' }}>
        <div style={{ maxWidth: 1280, margin: '0 auto' }}>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '5fr 7fr', gap: isMobile ? 40 : 80 }}>
            <Reveal>
              <div>
                <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 24 }}>
                  {t.kurseEyebrow}
                </div>
                <h2 style={{ fontFamily: FONT.display, fontSize: isMobile ? 40 : 64, lineHeight: 1.02, letterSpacing: '-0.02em', margin: 0, fontWeight: 400 }}>
                  {t.kurseTitle}
                </h2>
                <p style={{ fontSize: 16, marginTop: 28 }}>{t.kurseLead}</p>

                <div style={{ marginTop: 36 }}>
                  {t.kurseDetails.map((d, i) => (
                    <div key={i} style={{ display: 'flex', alignItems: 'baseline', gap: 14, padding: '8px 0' }}>
                      <span style={{ width: 8, height: 8, background: COLORS.peach, borderRadius: '50%', flexShrink: 0, transform: 'translateY(-2px)' }} />
                      <span style={{ fontSize: 16 }}>{d}</span>
                    </div>
                  ))}
                </div>

                <div style={{ marginTop: isMobile ? 24 : 36, paddingTop: 24, borderTop: `1px solid ${COLORS.line}`, display: 'flex', flexDirection: 'column', alignItems: 'flex-start', gap: 6 }}>
                  <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500 }}>{lang === 'de' ? 'Preis' : 'Price'}</div>
                  <div style={{ fontSize: isMobile ? 44 : 56, fontWeight: 500, lineHeight: 1 }}>{t.kursePreis}</div>
                  <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500 }}>{lang === 'de' ? 'Pro Person' : 'Per person'}</div>
                </div>
              </div>
            </Reveal>

            <Reveal delay={150}>
              <div>
                {/* Kurs-Eckdaten */}
                <div style={{ display: 'grid', gridTemplateColumns: isMobile ? 'repeat(3, 1fr)' : 'repeat(3, 1fr)', gap: 1, background: COLORS.line, borderRadius: 16, overflow: 'hidden', marginBottom: isMobile ? 24 : 32 }}>
                  {t.kurseFacts.map((f, i) => (
                    <div key={i} style={{ background: COLORS.bg, padding: '20px 20px' }}>
                      <div style={{ fontSize: 11, letterSpacing: '0.16em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 6 }}>{f.k}</div>
                      <div style={{ fontSize: 14, fontWeight: 500, lineHeight: 1.3 }}>{f.v}</div>
                    </div>
                  ))}
                </div>

                {/* Personenanzahl */}
                <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 16 }}>
                  {t.personenLabel}
                </div>
                <div style={{
                  display: 'flex',
                  alignItems: 'center',
                  justifyContent: 'space-between',
                  padding: '20px 24px',
                  border: `1px solid ${COLORS.line}`,
                  borderRadius: 24,
                  marginBottom: 32,
                  background: COLORS.bg,
                }}>
                  <div style={{ display: 'flex', alignItems: 'center', gap: 20 }}>
                    <button
                      onClick={() => setPersons(Math.max(1, persons - 1))}
                      aria-label="Personenanzahl verringern"
                      style={{ width: 40, height: 40, borderRadius: '50%', border: `1px solid ${COLORS.ink}`, background: 'transparent', color: COLORS.ink, fontSize: 20, cursor: 'pointer', fontFamily: 'inherit', transition: 'background 180ms ease, color 180ms ease' }}
                      onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
                      onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
                    >−</button>
                    <div style={{ fontSize: isMobile ? 28 : 32, fontWeight: 500, minWidth: 50, textAlign: 'center' }}>
                      {persons}
                    </div>
                    <button
                      onClick={() => setPersons(Math.min(8, persons + 1))}
                      aria-label="Personenanzahl erhöhen"
                      style={{ width: 40, height: 40, borderRadius: '50%', border: `1px solid ${COLORS.ink}`, background: COLORS.ink, color: COLORS.bg, fontSize: 20, cursor: 'pointer', fontFamily: 'inherit', transition: 'opacity 180ms ease' }}
                      onMouseEnter={(e) => { e.currentTarget.style.opacity = 0.75; }}
                      onMouseLeave={(e) => { e.currentTarget.style.opacity = 1; }}
                    >+</button>
                    <span style={{ fontSize: 16, color: COLORS.ink70, marginLeft: 8 }}>
                      {persons === 1 ? t.personenSingle : t.personenPlural}
                    </span>
                  </div>
                  <div style={{ textAlign: 'right' }}>
                    <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, marginBottom: 4 }}>{t.summeLabel}</div>
                    <div style={{ fontFamily: FONT.body, fontSize: isMobile ? 28 : 32, fontWeight: 500, letterSpacing: '-0.01em' }}>
                      {lang === 'de' ? `${total} €` : `€${total}`}
                    </div>
                  </div>
                </div>

                {/* Hinweis */}
                <div style={{
                  padding: '20px 24px',
                  border: `1px solid ${COLORS.line}`,
                  borderRadius: 16,
                  marginBottom: 24,
                  fontSize: 14,
                  lineHeight: 1.6,
                  color: COLORS.ink70,
                }}>
                  {t.kurseHinweis}
                </div>

                <Btn href={`mailto:${t.kontaktMail}?subject=${encodeURIComponent(`Braukurs-Anfrage · ${persons} ${persons === 1 ? t.personenSingle : t.personenPlural}`)}&body=${encodeURIComponent(`Hallo,\n\nwir würden gerne an einem Braukurs teilnehmen.\n\nPersonen: ${persons}\nGeschaetzter Gesamtpreis: ${lang === 'de' ? `${total} €` : `€${total}`}\n\nBitte meldet euch mit verfügbaren Terminen.\n\n`)}`} variant="primary" fullWidth style={{ padding: '18px', fontSize: 14 }}>
                  {t.kurseBook} · {persons} {persons === 1 ? t.personenSingle : t.personenPlural} · {lang === 'de' ? `${total} €` : `€${total}`} →
                </Btn>
              </div>
            </Reveal>
          </div>
        </div>
      </section>

      {/* Timeline */}
      <section id="timeline" style={{ background: COLORS.ink, color: COLORS.bg, padding: isMobile ? '64px 24px' : '160px 64px' }}>
        <div style={{ maxWidth: 1280, margin: '0 auto' }}>
          <Reveal>
            <div style={{ marginBottom: isMobile ? 40 : 80 }}>
              <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.peach, fontWeight: 500, marginBottom: 24 }}>
                {t.timelineEyebrow}
              </div>
              <h2 style={{ fontFamily: FONT.display, fontSize: isMobile ? 40 : 64, lineHeight: 1.02, letterSpacing: '-0.02em', margin: 0, fontWeight: 400, maxWidth: 800 }}>
                {t.timelineTitle}
              </h2>
            </div>
          </Reveal>

          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(5, 1fr)', gap: isMobile ? 0 : 24 }}>
            {t.timeline.map((m, i) => (
              <Reveal key={i} delay={i * 100}>
                <div style={{
                  padding: isMobile ? '20px 0 20px 20px' : '32px 0',
                  borderTop: isMobile ? 'none' : `2px solid ${m.done ? COLORS.peach : (m.current ? COLORS.peach : 'rgba(255,255,255,0.2)')}`,
                  borderLeft: isMobile ? `2px solid ${m.done ? COLORS.peach : (m.current ? COLORS.peach : 'rgba(255,255,255,0.2)')}` : 'none',
                  height: '100%',
                  boxSizing: 'border-box',
                }}>
                  <div style={{ fontSize: 11, letterSpacing: '0.12em', color: m.current ? COLORS.peach : 'rgba(255,255,255,0.6)', marginBottom: 16, textTransform: 'uppercase', fontWeight: 500 }}>
                    {m.done ? '✓' : m.current ? '●' : '○'} &nbsp;{m.date}
                  </div>
                  <h3 style={{ fontSize: isMobile ? 18 : 22, lineHeight: 1.1, margin: 0, fontWeight: 500, color: m.current ? COLORS.peach : COLORS.bg }}>{m.title}</h3>
                  <p style={{ fontSize: 14, lineHeight: 1.6, color: 'rgba(255,255,255,0.7)', marginTop: 12 }}>{m.text}</p>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>

      {/* Kontakt — minimal */}
      <section id="kontakt" style={{ padding: isMobile ? '64px 24px' : '160px 64px' }}>
        <div style={{ maxWidth: 1100, margin: '0 auto' }}>
          <Reveal>
            <div style={{ textAlign: 'center', marginBottom: isMobile ? 40 : 80 }}>
              <div style={{ fontSize: 13, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 24 }}>
                {t.kontaktEyebrow}
              </div>
              <h2 style={{ fontFamily: FONT.display, fontSize: isMobile ? 40 : 64, lineHeight: 1, letterSpacing: '-0.02em', margin: 0, fontWeight: 400 }}>
                {t.kontaktTitle}
              </h2>
              <p style={{ fontSize: 16, color: COLORS.ink70, marginTop: 24, maxWidth: 540, marginLeft: 'auto', marginRight: 'auto' }}>
                {t.kontaktLead}
              </p>
            </div>
          </Reveal>

          <Reveal delay={150}>
            <div style={{
              display: 'grid',
              gridTemplateColumns: isMobile ? '1fr' : 'repeat(3, 1fr)',
              gap: isMobile ? 24 : 32,
              padding: isMobile ? '32px 28px' : '48px 56px',
              background: COLORS.peachSoft,
              borderRadius: 24,
            }}>
              <div>
                <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 10 }}>
                  {t.kontaktAdresseLabel}
                </div>
                <div style={{ fontSize: 16, whiteSpace: 'pre-line', lineHeight: 1.5 }}>
                  {t.kontaktAdresse}
                </div>
              </div>
              <div>
                <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: COLORS.ink70, fontWeight: 500, marginBottom: 10 }}>
                  E-Mail
                </div>
                <div style={{ fontSize: 16, lineHeight: 1.5 }}>
                  <a href={`mailto:${t.kontaktMail}`} style={{ color: COLORS.ink, textDecoration: 'none' }}>{t.kontaktMail}</a>
                </div>
              </div>
              <div style={{ display: 'flex', alignItems: isMobile ? 'flex-start' : 'center', justifyContent: isMobile ? 'flex-start' : 'flex-end' }}>
                <Btn href={`mailto:${t.kontaktMail}`} variant="primary" fullWidth={isMobile} style={{ padding: '20px 32px', fontSize: 14 }}>
                  {t.mailButton} →
                </Btn>
              </div>
            </div>
          </Reveal>
        </div>
      </section>

      {/* Footer */}
      <footer style={{
        padding: isMobile ? '40px 24px 32px' : '56px 64px 40px',
        borderTop: `1px solid ${COLORS.line}`,
        display: 'grid',
        gridTemplateColumns: isMobile ? '1fr' : '1fr auto 1fr',
        alignItems: 'center',
        gap: isMobile ? 20 : 32,
        boxSizing: 'border-box',
      }}>
        {/* Instagram — first on mobile so it's prominent */}
        {isMobile && (
          <div>
            <a href="https://instagram.com/brauwerk.herzog" style={{
              display: 'inline-flex',
              alignItems: 'center',
              gap: 10,
              padding: '10px 18px',
              border: `1px solid ${COLORS.line}`,
              borderRadius: 999,
              color: COLORS.ink,
              textDecoration: 'none',
              fontSize: 13,
              fontWeight: 500,
              transition: 'all 0.2s',
            }}
            onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
            onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
            >
              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><rect x="3" y="3" width="18" height="18" rx="5"/><circle cx="12" cy="12" r="4"/><circle cx="17.5" cy="6.5" r="1" fill="currentColor"/></svg>
              <span>@brauwerk.herzog</span>
            </a>
          </div>
        )}

        <div style={{ fontSize: 13, color: COLORS.ink70 }}>
          {t.footer}
        </div>

        {/* Instagram — desktop center */}
        {!isMobile && (
          <div style={{ display: 'flex', gap: 14, alignItems: 'center' }}>
            <a href="https://instagram.com/brauwerk.herzog" style={{
              display: 'inline-flex',
              alignItems: 'center',
              gap: 10,
              padding: '10px 18px',
              border: `1px solid ${COLORS.line}`,
              borderRadius: 999,
              color: COLORS.ink,
              textDecoration: 'none',
              fontSize: 13,
              fontWeight: 500,
              transition: 'all 0.2s',
            }}
            onMouseEnter={(e) => { e.currentTarget.style.background = COLORS.ink; e.currentTarget.style.color = COLORS.bg; }}
            onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = COLORS.ink; }}
            >
              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><rect x="3" y="3" width="18" height="18" rx="5"/><circle cx="12" cy="12" r="4"/><circle cx="17.5" cy="6.5" r="1" fill="currentColor"/></svg>
              <span>@brauwerk.herzog</span>
            </a>
          </div>
        )}

        <div style={{ fontSize: 13, color: COLORS.ink70, textAlign: isMobile ? 'left' : 'right', display: 'flex', justifyContent: isMobile ? 'flex-start' : 'flex-end', gap: 24 }}>
          <a href="./impressum.html" style={{ color: 'inherit', textDecoration: 'none' }}>Impressum</a>
          <a href="./datenschutz.html" style={{ color: 'inherit', textDecoration: 'none' }}>Datenschutz</a>
        </div>
      </footer>
    </div>
  );
}

window.VariantBv2 = VariantBv2;
