/* global React */
// Dentertain — i18n (DE primary / EN secondary)
// Voice: authentic, emotional, direct (after julianbaecher.de's style, in Dennis' words).

const STRINGS = {
  de: {
    // Nav
    "nav.about": "Über mich",
    "nav.portfolio": "Portfolio",
    "nav.contact": "Kontakt",
    "nav.cta": "Anfragen",

    // Hero — Julian-Bächer voice ("authentisch · emotional · einzigartig")
    "hero.kicker": ["Authentisch", "Emotional", "Einzigartig"],
    "hero.eyebrow": "Hochzeitsfilm & Fotografie · Bruchsal · Karlsruhe · Heidelberg",
    "hero.line1": "Euer",
    "hero.line2": "Tag.",
    "hero.line3": "wie ein Kinofilm.",
    "hero.sub": "Ich fange euer Lachen ein. Eure Freudentränen. Die Küsse, das Tanzen, den langen Blick zwischen den Reden. Emotionen in Bildern — das ist mein Versprechen.",
    "hero.cta1": "Jetzt anfragen",
    "hero.cta2": "Portfolio ansehen",
    "hero.meta1": "Verfügbar 2026 · 2027",
    "hero.meta2": "40+ Hochzeiten · 13 Jahre",
    "hero.reel": "SHOWREEL · LIVE",

    // Marquee — bold word stream
    "marquee.words": ["Cinematic", "Emotional", "Authentisch", "Stimmungsvoll", "Echt", "Ungestellt"],

    // Promise band (after marquee)
    "promise.line1": "Lachen.",
    "promise.line2": "Freudentränen.",
    "promise.line3": "Küsse.",
    "promise.line4": "Tanzen.",
    "promise.connect": "—",
    "promise.tagline": "Ich halte alles, was an dem Tag wirklich passiert.",
    "promise.sub": "Wohlbefinden ist das Wichtigste, um Bilder zu schaffen, die bleiben. Als euer Fotograf und Kameramann kümmere ich mich darum, dass ihr entspannt und ihr selbst seid — den Rest erledige ich.",
    "promise.sig": "„Let's create magic together.\u201C",

    // Services
    "services.eyebrow": "Leistungen · 2026",
    "services.title.a": "Sechs Wege,",
    "services.title.b": "den Tag zu halten.",
    "services.lead": "Hauptsächlich Film, ergänzt durch Fotografie. Allein oder mit kleinem, eingespielten Team — je nach Größe eures Tages. Keine versteckten Stunden, keine Verkaufstricks.",
    "services.cta": "Angebot anfragen",

    // About
    "about.eyebrow": "Hi, ich bin Dennis",
    "about.hi": "„Zuhause bin ich in Bruchsal — und überall, wo ihr mich braucht.\u201C",
    "about.title.a": "Foto & Film,",
    "about.title.b": "mit Herz und Kinoauge.",
    "about.p1": "Foto- und Videografie sind meine Leidenschaft — seit über 13 Jahren. Es bereitet mir unglaubliche Freude, das Leuchten in den Augen meiner Paare zu sehen, wenn ich ihnen den Film übergebe. Diese Erfahrung erfüllt mich zutiefst und treibt mich an, immer das Beste zu geben.",
    "about.p2": "Ich werde von meinen Paaren oft als vertrauensvoll, locker und bodenständig beschrieben — und gleichzeitig hochkonzentriert, wenn es darauf ankommt. Mein Stil ist dynamisch, stimmungsvoll und von Herzen emotional. Perfektionist bin ich aus Liebe zum Detail, nicht aus Zwang.",
    "about.p3": "Euer Hochzeitsfilm soll sich nicht anfühlen wie eine Aufzeichnung. Er soll sich anfühlen wie ein Kinofilm — euer Kinofilm.",
    "about.quote": "\u201EDie schönsten Momente entstehen, wenn keiner mehr daran denkt, dass ich da bin. Daran arbeite ich den ganzen Tag.\u201C",
    "about.cta": "Mehr über mich",
    "about.stat1.num": "40+",
    "about.stat1.lbl": "Hochzeiten",
    "about.stat2.num": "13",
    "about.stat2.lbl": "Jahre",
    "about.stat3.num": "Top 50",
    "about.stat3.lbl": "99fire · 2025",
    "about.badge": "Seit 2013",

    // Style strip — Julian-Bächer's three-card style row
    "style.eyebrow": "Mein Versprechen",
    "style.title.a": "Mein Stil —",
    "style.title.b": "zeitlos, emotional, ungestellt.",
    "style.lead": "Was ihr von einem Film mit mir erwarten dürft. Drei Sätze, kein Marketing.",
    "style.items": [
      { t: "Mein Ansatz", b: "Momente sind einzigartig. Ich fange sie ein — lebendig, echt und magisch." },
      { t: "Mein Anspruch", b: "Erwartungen übertreffen, weil mir eure Fotos und eure Filme wirklich wichtig sind." },
      { t: "Mein Stil", b: "Zeitlos, romantisch, warm. Frei, emotional und ungestellt." },
    ],

    // Gear
    "gear.eyebrow": "Setup",
    "gear.title.a": "Kinoniveau —",
    "gear.title.b": "weil's der Tag verdient.",
    "gear.lead": "Ich setze auf Ausrüstung auf höchstem Niveau und auf Wissen, das man nur in einer echten Postproduktion lernt — nicht in einem Workshop.",
    "gear.items": [
      { t: "Canon EOS R5 Mark II", b: "Kinoniveau, 8K-RAW möglich, Premium-Objektive." },
      { t: "DJI Mavic 4 Pro", b: "Drohne für Establishing-Shots und cinematische Reveal-Sequenzen bis zu 6K – wenn die Location es trägt." },
      { t: "Schnitt & VFX", b: "Mitwirkung an einem professionellen Kinofilm. Visual & Special Effects im eigenen Schnitt – das macht fast niemand." },
      { t: "Audio · Sennheiser", b: "Lavaliers an Bräutigam & Pfarrer, plus Recorder am Mischpult. Reden, Versprechen, Lachen – alles in voller Qualität." },
    ],

    // Process
    "process.giant": "Cinematic",
    "process.eyebrow": "Der Ablauf",
    "process.title.a": "Vier Schritte. Von der ersten Mail",
    "process.title.b": "bis zum Film.",
    "process.lead": "Ich mag klare Prozesse — sie machen alles entspannter. Hier ist, was passiert, wenn ihr mir schreibt.",
    "process.steps": [
      { n: "01", t: "Kennenlernen", b: "Ein Call oder ein Kaffee. Ich will wissen, wer ihr seid und wie der Tag aussehen soll — bevor wir über Pakete reden." },
      { n: "02", t: "Planung", b: "Vier Wochen vor dem Tag: Timeline, Locations, Familien-Listen. Ich koordiniere mit Planer:innen, DJs, Caterern — ohne, dass ihr es merkt." },
      { n: "03", t: "Der Tag", b: "10 – 14 Stunden mit euch. Unauffällig, in dunkler Kleidung, mit zwei Kameras gleichzeitig. Selten Anweisungen, nie Posen-Theater." },
      { n: "04", t: "Lieferung", b: "Vorschau voraussichtlich nach etwa zwei Wochen. Vollständige Galerie nach rund sechs Wochen. Cinematischer Film in der Regel nach ungefähr drei Monaten." },
    ],

    // Testimonials (echte Google-Bewertungen, Backend-gepflegt)
    "testi.eyebrow": "Was die Paare sagen",
    "testi.via": "via Google",
    "testi.cta": "Auf Google bewerten",

    // CTA
    "cta.eyebrow": "Lass uns reden",
    "cta.title.a": "Schreibt mir vom",
    "cta.title.b": "Tag.",
    "cta.sub": "Auch ohne festes Datum, ohne Location, ohne Plan — ein erster Call dauert zwanzig Minuten. Alles andere kommt danach.",
    "cta.btn1": "Anfrage stellen",
    "cta.btn2": "Portfolio ansehen",

    // Portfolio
    "pf.eyebrow": "Portfolio",
    "pf.title.a": "Ausgewählte",
    "pf.title.b": "Arbeiten.",
    "pf.lead": "Eine Auswahl aus 13 Jahren — Hochzeiten, Standesämter, ein Festival-Film. Ich zeige nur, wofür ich die Freigabe der Paare habe.",
    "pf.tab.all": "Alle",
    "pf.tab.photo": "Foto",
    "pf.tab.video": "Film",
    "pf.view.dock": "Dock",
    "pf.view.grid": "Kacheln",
    "pf.dock.hint": "Bewegt den Cursor über die Leiste",
    "pf.dock.hint.touch": "Wischt über die Leiste — Antippen öffnet",
    "pf.more.title.a": "Die vollständige",
    "pf.more.title.b": "Sammlung.",
    "pf.more.eyebrow": "Mehr Arbeiten",
    "pf.more.sub": "Klickt ein Bild für die Großansicht. Mit den Pfeiltasten geht's weiter.",
    "pf.more.sub.touch": "Tippt ein Bild für die Großansicht. Wischen blättert weiter.",
    "pf.cta.title.a": "Ein Wochenende. Ein Paar.",
    "pf.cta.title.b": "Volle Aufmerksamkeit.",
    "pf.cta.sub": "Ich nehme nur Hochzeiten an, bei denen ich nach jedem Dreh zwei ruhige Tage zum Atmen und für die Schnitt-Vorbereitung habe. Sommer-Wochenenden gehen zuerst weg.",
    "pf.cta.btn": "Datum prüfen",

    // Contact
    "ct.eyebrow": "Lass uns reden · 2026 Booking",
    "ct.title.a": "Erzählt mir",
    "ct.title.b": "vom Tag.",
    "ct.lead": "Ich antworte innerhalb von zwei Werktagen — immer persönlich, nie automatisch. Wenn ich nicht der Richtige für euch bin, sage ich's ehrlich und empfehle jemanden, der es ist.",
    "ct.info.mail": "Schreibt direkt",
    "ct.info.phone": "Rückruf · Mo–Fr 10–18",
    "ct.info.studio": "Standort",
    "ct.info.studio.value": "Bruchsal · Region Karlsruhe + Heidelberg",
    "ct.info.ig": "Auf Instagram",
    "ct.form.eyebrow": "Anfrageformular",
    "ct.form.title": "Ein paar Eckdaten — und ich melde mich.",
    "ct.form.sub": "Pflichtfelder sind markiert. Den Rest gerne, wenn ihr's schon wisst.",
    "ct.form.pkg": "Paket",
    "ct.form.names": "Eure Namen",
    "ct.form.email": "E-Mail",
    "ct.form.date": "Hochzeitsdatum",
    "ct.form.loc": "Location",
    "ct.form.loc.opt": "(falls bekannt)",
    "ct.form.guests": "Anzahl Gäste",
    "ct.form.source": "Wie habt ihr mich gefunden?",
    "ct.form.story": "Erzählt mir vom Tag",
    "ct.form.story.ph": "Wie soll sich der Tag anfühlen? Welcher Teil ist euch am wichtigsten? Worüber freut ihr euch besonders?",
    "ct.form.send": "Anfrage senden",
    "ct.form.consent": "Ich habe die Datenschutzhinweise gelesen.",
    "ct.sent.eyebrow": "Erhalten · Danke",
    "ct.sent.title": "Ich hab eure Nachricht.",
    "ct.sent.body": "Innerhalb von zwei Werktagen kommt eine Antwort — von mir persönlich, mit konkretem nächsten Schritt. Falls eilig: Anruf geht auch.",
    "ct.sent.btn1": "Direkt mailen",
    "ct.sent.btn2": "Weitere Anfrage senden",

    "ct.faq.eyebrow": "Häufige Fragen",
    "ct.faq.title.a": "Das wollen die meisten",
    "ct.faq.title.b": "vorher wissen.",

    "pkg.photo": "Nur Foto",
    "pkg.film": "Nur Film",
    "pkg.both": "Foto + Film",
    "pkg.unsure": "Noch unentschieden",
  },

  en: {
    "nav.about": "About",
    "nav.portfolio": "Portfolio",
    "nav.contact": "Contact",
    "nav.cta": "Enquire",

    "hero.kicker": ["Authentic", "Emotional", "Unique"],
    "hero.eyebrow": "Wedding film & photography · Bruchsal · Karlsruhe · Heidelberg",
    "hero.line1": "Your",
    "hero.line2": "day.",
    "hero.line3": "like a film.",
    "hero.sub": "I capture your laughter. Your tears of joy. The kisses, the dance, the long glance between speeches. Emotions in images — that's my promise.",
    "hero.cta1": "Enquire now",
    "hero.cta2": "View portfolio",
    "hero.meta1": "Now booking 2026 · 2027",
    "hero.meta2": "40+ weddings · 13 years",
    "hero.reel": "SHOWREEL · LIVE",

    "marquee.words": ["Cinematic", "Emotional", "Authentic", "Atmospheric", "Real", "Unposed"],

    "promise.line1": "Laughter.",
    "promise.line2": "Tears of joy.",
    "promise.line3": "Kisses.",
    "promise.line4": "Dancing.",
    "promise.connect": "—",
    "promise.tagline": "I hold everything that really happens that day.",
    "promise.sub": "Comfort is everything when it comes to making images that last. As your photographer and cameraman I make sure you are relaxed and yourselves — the rest is on me.",
    "promise.sig": "“Let's create magic together.”",

    "services.eyebrow": "Services · 2026",
    "services.title.a": "Six ways",
    "services.title.b": "to hold the day.",
    "services.lead": "Mostly film, complemented by photography. Solo or with a small, well-rehearsed team — depending on the scale of your day. No hidden hours, no upselling.",
    "services.cta": "Request quote",

    "about.eyebrow": "Hi, I'm Dennis",
    "about.hi": "\u201CHome is Bruchsal — and anywhere you need me.\u201D",
    "about.title.a": "Photo & film,",
    "about.title.b": "with heart and a cinema eye.",
    "about.p1": "Photo and video have been my passion for 13+ years. There's nothing like seeing the spark in a couple's eyes when I hand over the film — that feeling fuels me to keep raising the bar.",
    "about.p2": "Couples often describe me as trustworthy, easy-going and grounded — and at the same time focused when it counts. My style is dynamic, atmospheric and deeply emotional. Perfectionism out of love for detail, not out of pressure.",
    "about.p3": "Your wedding film shouldn't feel like a recording. It should feel like a film. Your film.",
    "about.quote": "\u201CThe best moments happen when nobody remembers I'm there. That's what I work on all day.\u201D",
    "about.cta": "More about me",
    "about.stat1.num": "40+",
    "about.stat1.lbl": "Weddings",
    "about.stat2.num": "13",
    "about.stat2.lbl": "Years",
    "about.stat3.num": "Top 50",
    "about.stat3.lbl": "99fire · 2025",
    "about.badge": "Since 2013",

    "style.eyebrow": "My promise",
    "style.title.a": "My style —",
    "style.title.b": "timeless, emotional, unposed.",
    "style.lead": "What you can expect from a film with me. Three sentences, no marketing.",
    "style.items": [
      { t: "My approach", b: "Moments are unique. I capture them — alive, honest and magical." },
      { t: "My standard", b: "Exceeding expectations because your photos and your films truly matter to me." },
      { t: "My style", b: "Timeless, romantic, warm. Free, emotional and unposed." },
    ],

    "gear.eyebrow": "Setup",
    "gear.title.a": "Cinema-grade —",
    "gear.title.b": "because the day deserves it.",
    "gear.lead": "I use top-tier gear and post-production knowledge you only get from working on real films — not from workshops.",
    "gear.items": [
      { t: "Canon EOS R5 Mark II", b: "Cinema-grade, 8K-RAW capable, premium glass." },
      { t: "DJI Mavic 4 Pro", b: "Drone for establishing shots and cinematic reveals up to 6K – when the location calls for it." },
      { t: "Edit & VFX", b: "Worked on a professional feature film. Visual & special effects in my own edit – almost no wedding filmmaker does this." },
      { t: "Audio · Sennheiser", b: "Lavaliers on the groom and officiant, plus a recorder at the mixer. Vows, speeches, laughter – all captured cleanly." },
    ],

    "process.giant": "Cinematic",
    "process.eyebrow": "The process",
    "process.title.a": "Four steps. From the first email",
    "process.title.b": "to the film.",
    "process.lead": "I like clear processes — they make everything calmer. Here's what happens when you write me.",
    "process.steps": [
      { n: "01", t: "Getting to know each other", b: "A call or coffee. I want to know who you are and how the day should feel — before we talk packages." },
      { n: "02", t: "Planning", b: "Four weeks before: timeline, locations, family lists. I coordinate with planners, DJs, caterers — quietly." },
      { n: "03", t: "The day", b: "10 – 14 hours with you. Unobtrusive, in dark clothing, two cameras at all times. Rare direction, no posing." },
      { n: "04", t: "Delivery", b: "Preview usually within about two weeks. Full gallery after around six weeks. Cinematic film typically after roughly three months." },
    ],

    "testi.eyebrow": "What couples say",
    "testi.via": "via Google",
    "testi.cta": "Review us on Google",

    "cta.eyebrow": "Let's talk",
    "cta.title.a": "Tell me about",
    "cta.title.b": "the day.",
    "cta.sub": "Even without a date, a venue, or a plan — a first call takes twenty minutes. Everything else can come after.",
    "cta.btn1": "Send an enquiry",
    "cta.btn2": "View portfolio",

    "pf.eyebrow": "Portfolio",
    "pf.title.a": "Selected",
    "pf.title.b": "work.",
    "pf.lead": "A selection from 13 years — weddings, civil ceremonies, a festival film. I only show what the couples have approved.",
    "pf.tab.all": "All",
    "pf.tab.photo": "Photo",
    "pf.tab.video": "Film",
    "pf.view.dock": "Dock",
    "pf.view.grid": "Tiles",
    "pf.dock.hint": "Move your cursor over the strip",
    "pf.dock.hint.touch": "Swipe across the strip — tap to open",
    "pf.more.title.a": "The full",
    "pf.more.title.b": "archive.",
    "pf.more.eyebrow": "More work",
    "pf.more.sub": "Click any image for a large view. Use arrow keys to navigate.",
    "pf.more.sub.touch": "Tap any image for a large view. Swipe to browse.",
    "pf.cta.title.a": "One weekend. One couple.",
    "pf.cta.title.b": "Full focus.",
    "pf.cta.sub": "I only take on weddings where I can give myself two quiet days afterwards — to breathe, and to prep the edit. Summer weekends go first.",
    "pf.cta.btn": "Check your date",

    "ct.eyebrow": "Let's talk · 2026 booking",
    "ct.title.a": "Tell me about",
    "ct.title.b": "the day.",
    "ct.lead": "I reply within two working days — always personally, never automated. If I'm not the right fit, I'll say so and recommend someone who is.",
    "ct.info.mail": "Write directly",
    "ct.info.phone": "Callback · Mon–Fri 10–18",
    "ct.info.studio": "Location",
    "ct.info.studio.value": "Bruchsal · Karlsruhe + Heidelberg area",
    "ct.info.ig": "On Instagram",
    "ct.form.eyebrow": "Enquiry form",
    "ct.form.title": "A few details — and I'll be in touch.",
    "ct.form.sub": "Required fields are marked. Everything else only if you already know.",
    "ct.form.pkg": "Package",
    "ct.form.names": "Your names",
    "ct.form.email": "Email",
    "ct.form.date": "Wedding date",
    "ct.form.loc": "Location",
    "ct.form.loc.opt": "(if known)",
    "ct.form.guests": "Guest count",
    "ct.form.source": "How did you find me?",
    "ct.form.story": "Tell me about the day",
    "ct.form.story.ph": "What should the day feel like? Which part matters most? What are you looking forward to?",
    "ct.form.send": "Send enquiry",
    "ct.form.consent": "I have read the privacy notice.",
    "ct.sent.eyebrow": "Received · Thank you",
    "ct.sent.title": "Got your message.",
    "ct.sent.body": "Within two working days you'll get a reply — from me personally, with a concrete next step. If urgent, just call.",
    "ct.sent.btn1": "Mail directly",
    "ct.sent.btn2": "Send another",
    "ct.faq.eyebrow": "Frequently asked",
    "ct.faq.title.a": "What most couples",
    "ct.faq.title.b": "want to know.",

    "pkg.photo": "Photo only",
    "pkg.film": "Film only",
    "pkg.both": "Photo + Film",
    "pkg.unsure": "Not decided yet",
  },
};

const I18nContext = React.createContext({ lang: "de", t: (k) => k, setLang: () => {} });
const useI18n = () => React.useContext(I18nContext);

const I18nProvider = ({ children, initial = "de" }) => {
  const [lang, setLang] = React.useState(() => {
    try { return localStorage.getItem("dentertain.lang") || initial; }
    catch { return initial; }
  });
  React.useEffect(() => {
    try { localStorage.setItem("dentertain.lang", lang); } catch {}
    document.documentElement.lang = lang;
  }, [lang]);
  const t = React.useCallback((k) => {
    const dict = STRINGS[lang] || STRINGS.de;
    return dict[k] !== undefined ? dict[k] : (STRINGS.de[k] !== undefined ? STRINGS.de[k] : k);
  }, [lang]);
  return (
    <I18nContext.Provider value={{ lang, setLang, t }}>
      {children}
    </I18nContext.Provider>
  );
};

const LangSwitch = () => {
  const { lang, setLang } = useI18n();
  return (
    <div className="lang-switch">
      <button className={lang === "de" ? "active" : ""} onClick={() => setLang("de")}>DE</button>
      <span>/</span>
      <button className={lang === "en" ? "active" : ""} onClick={() => setLang("en")}>EN</button>
    </div>
  );
};

Object.assign(window, { I18nProvider, useI18n, LangSwitch, STRINGS });
