/* Floating Flows — bilingual (German default, English on demand).
   German lives in the HTML (data-i18n keys). English overrides live here.
   On switch to EN we capture the original German into data-de and swap; back to DE restores it. */
(function () {
  var EN = {
    // ---- nav / shared ----
    "nav.courses": "Courses",
    "nav.practice": "The Practice",
    "nav.location": "Location",
    "nav.about": "About",
    "nav.contact": "Contact",
    "nav.book": "Book a class",
    "drawer.book": "Book a class →",
    "drawer.where": "Seepark Glashaus · Freiburg",

    // ---- hero ----
    "hero.eyebrow": "AcroYoga · Freiburg",
    "hero.h1": "Learn to <em>float</em>, together.",
    "hero.sub": "The joyful art of flying together — AcroYoga, taught with care by Luciana. For every body, every level. No partner needed.",
    "hero.book": "Book a class",
    "hero.explore": "Explore classes",
    "hero.quote": "“I arrived nervous and left flying. The most welcoming room I’ve ever practised in.”",
    "hero.quoteCite": "Mara K. · ★★★★★",
    "hero.scroll": "Scroll",

    // ---- ethos ----
    "ethos.eyebrow": "Welcome to Floating Flows",
    "ethos.h2": "A practice built on <span class=\"accent\">trust, breath and play.</span>",
    "ethos.p1": "AcroYoga blends the wisdom of yoga, the dynamics of acrobatics and the care of therapeutic touch. You’ll learn to give weight, to receive it, and to move as one — held by a community that has your back.",
    "ethos.p2": "No experience and no partner required. We work in rotating teams, so everyone finds a base, a flyer and a spotter. Beginners and seasoned flyers share the same mat, the same breath, the same quiet thrill of letting go.",

    // ---- offerings ----
    "offer.eyebrow": "Classes & Courses",
    "offer.h2": "Find your place in the flow.",
    "offer.lede": "Term courses, beginner workshops and private training — all taught in small, attentive groups at the Seepark Glashaus in Freiburg.",
    "offer.c1.badge": "Starts 12 Jun 2026",
    "offer.c1.kicker": "01 / Term Course",
    "offer.c1.title": "Beginner Flows",
    "offer.c1.desc": "Seven sessions building four short beginner flows step by step — positions, transitions and the interplay of base, flyer and spotter, plus fall training and breath.",
    "offer.c1.m1": "All levels", "offer.c1.m2": "7 × 90 min", "offer.c1.m3": "No partner needed",
    "offer.c1.link": "Course details",
    "offer.c2.badge": "Starts 18 Jun 2026",
    "offer.c2.kicker": "02 / Term Course",
    "offer.c2.title": "Classic Washing Machines 1",
    "offer.c2.desc": "The next step after beginner flows. Link figures into continuous “washing machine” rotations, deepening trust and timing between base and flyer over seven weeks.",
    "offer.c2.m1": "Improver", "offer.c2.m2": "7 × 90 min", "offer.c2.m3": "Rotating teams",
    "offer.c2.link": "Course details",
    "offer.c3.badge": "28 Jun 2026 · Outdoor",
    "offer.c3.price": "Workshop",
    "offer.c3.kicker": "03 / Beginner Workshop",
    "offer.c3.title": "Absolute Beginner 1",
    "offer.c3.desc": "A gentle full-day introduction for complete beginners — two mindful sessions, a shared vegetarian potluck, and a guided Thai massage to close. Bring a friend.",
    "offer.c3.m1": "Complete beginners", "offer.c3.m2": "10:00–16:00", "offer.c3.m3": "Freiburg outdoor",
    "offer.c3.link": "Workshop details",
    "offer.c4.badge": "By arrangement",
    "offer.c4.price": "Hansefit +€16",
    "offer.c4.kicker": "04 / Private",
    "offer.c4.title": "Personal Training · 90 min",
    "offer.c4.desc": "One-to-one (for two people) in the comfort of your home anywhere in Freiburg. I bring 4 cm safety mats and we work directly on your AcroYoga goals.",
    "offer.c4.m1": "For 2 people", "offer.c4.m2": "90 min", "offer.c4.m3": "At your home",
    "offer.c4.link": "How it works",

    // ---- experience ----
    "exp.eyebrow": "Your first flight",
    "exp.h2": "What an evening with us feels like.",
    "exp.s1.t": "Arrive & land",
    "exp.s1.p": "We open every session with breath and a gentle warm-up. Bare feet, a warm welcome, and the day left at the door.",
    "exp.s2.t": "Build trust",
    "exp.s2.p": "Guided, spotted and never rushed. You’ll learn to base, fly and catch with partners of every level — and how to fall safely.",
    "exp.s3.t": "Take flight",
    "exp.s3.p": "The moment it clicks. Float, invert and flow — then unwind with a partner Thai-massage cool-down before you go.",

    // ---- location ----
    "loc.eyebrow": "Our home",
    "loc.h2": "The Glashaus, in the Seepark.",
    "loc.lede": "We practise in one of Freiburg’s most beautiful settings — a soaring timber-and-glass pavilion in the Seepark, looking out over the lake to the green hillside beyond.",
    "loc.n1": "Simply stunning to look at and endlessly photogenic — especially under a starry sky.",
    "loc.n2": "A fantastic view of the water, open air, and space to simply relax. The perfect place to fly.",
    "loc.dir": "Get directions",
    "loc.addr": "Brandensteinstraße 24, 79110 Freiburg",

    // ---- ambient ----
    "amb.eyebrow": "Outdoors, in the open air",
    "amb.h2": "Arrive heavy. Leave light.",
    "amb.p": "Under a glass roof and an open sky, in the green heart of the Seepark — a place to breathe, to trust, and to fly.",

    // ---- reviews ----
    "rev.eyebrow": "Stories from the studio",
    "rev.h2": "Words from our community.",
    "rev.r1": "“Every time I step into class I feel a lightness that helps me set down the stress of the week. Truly special.”",
    "rev.r1c": "— Amelie R.",
    "rev.r2": "“Inspiring, knowledgeable teaching and a genuinely warm room. I came alone and left with a community.”",
    "rev.r2c": "— Simon T.",
    "rev.r3": "“I never imagined I’d be upside down on someone’s feet and laughing. Luciana made the impossible feel safe.”",
    "rev.r3c": "— Priya N.",
    "rev.r4": "“My partner and I come every term. It’s become the best evening of our week.”",
    "rev.r4c": "— Jonas & Lena",

    // ---- booking ----
    "book.eyebrow": "Book your place",
    "book.h2": "Ready to fly?",
    "book.lede": "Reserve through our booking system, then message me so I can add you to the course Signal group. New here? The Absolute Beginner workshop is the softest landing.",
    "book.p1.name": "Term Course", "book.p1.sub": "7 sessions",
    "book.p2.name": "Drop-In", "book.p2.sub": "via Hansefit", "book.p2.price": "Hansefit",
    "book.p3.name": "Personal Training", "book.p3.sub": "90 min · 2 people",
    "book.p4.name": "Absolute Beginner", "book.p4.sub": "Full-day workshop", "book.p4.price": "Enquire",
    "book.cta1": "Open booking & schedule",
    "book.cta2": "Register or ask a question",
    "book.note": "Live availability and registration are managed in the existing booking system. Drop-in is possible via Hansefit — please get in touch.",

    // ---- contact ----
    "contact.eyebrow": "Say hello",
    "contact.h2": "Come find us.",
    "contact.intro": "A glimpse of life at Floating Flows — come fly with us in the Seepark.",
    "contact.lblEmail": "Email", "contact.lblPhone": "Phone", "contact.lblInsta": "Instagram", "contact.lblStudio": "Studio",
    "contact.book": "Book a class →",

    // ---- footer ----
    "footer.tagline": "Premium AcroYoga in Freiburg — trust, breath and the quiet joy of flight. For every body, every level.",
    "footer.exploreH": "Explore", "footer.visitH": "Visit", "footer.connectH": "Connect",
    "footer.book": "Book", "footer.copy": "© 2026 Floating Flows · Luciana · Freiburg", "footer.made": "Made for movement.",

    // ---- courses page ----
    "courses.eyebrow": "Courses & Workshops",
    "courses.h1": "Term courses, <span class=\"accent\">workshops</span> & private training.",
    "courses.lede": "All courses are taught by Luciana in small, attentive groups. You never need to bring a partner — we work in rotating teams.",
    "lbl.starts": "Starts", "lbl.schedule": "Schedule", "lbl.location": "Location", "lbl.energy": "Energy exchange",
    "lbl.date": "Date", "lbl.time": "Time", "lbl.includes": "Includes", "lbl.format": "Format", "lbl.where": "Where", "lbl.booking": "Booking", "lbl.toArrange": "To arrange",
    "lbl.goodToKnow": "Good to know", "lbl.repertoire": "My repertoire",

    "bf.kicker": "01 / Term Course", "bf.title": "Beginner Flows",
    "bf.lede": "A continuation of the Absolute Beginner 1 & 2 workshops — seven sessions to solidify the basics and grow into confident, flowing movement.",
    "bf.starts": "12 June 2026",
    "bf.sched": "Thursdays, 18:30–20:00", "bf.schedSub": "18 & 25 Jun · 2, 9, 16, 23 Jul · +1 by arrangement",
    "bf.loc": "Seepark Glashaus", "bf.locSub": "Brandensteinstraße 24, 79110 Freiburg",
    "bf.price": "€126", "bf.priceSub": "full course · 7 sessions",
    "bf.p1": "In seven sessions (six fixed dates plus one by arrangement) we review the basics from Absolute Beginner 1 & 2 to create a solid foundation for more complex flows.",
    "bf.p2": "The core of the course is four short beginner flows, which you’ll learn step by step and practise together as a group. Over the weeks we build confidence in the individual positions, the transitions between them, and the interplay between base, flyer and spotter.",
    "bf.p3": "Alongside figures and transitions, we focus on fall training, breathing, and the foundations of a safe AcroYoga practice. It’s the ideal preparation for the Washing Machine 1 course.",
    "bf.li1": "No partner required — we work in rotating teams. Couples are very welcome too.",
    "bf.li2": "Drop-in via Hansefit is possible — please get in touch first.",
    "bf.li3": "The content builds week to week, so attending as many sessions as possible is recommended.",
    "bf.callout": "After registering, please message Luciana so she can add you to the course Signal group.",
    "bf.cta": "Book this course",

    "wm.kicker": "02 / Term Course", "wm.title": "Classic Washing Machines 1",
    "wm.lede": "The natural next step after Beginner Flows — review the basics and link figures into continuous, flowing “washing machine” rotations.",
    "wm.starts": "18 June 2026",
    "wm.sched": "Thursdays, 18:30–20:00", "wm.schedSub": "18 & 25 Jun · 2, 9, 16, 23 Jul · +1 by arrangement",
    "wm.loc": "Seepark Glashaus", "wm.locSub": "Brandensteinstraße 24, 79110 Freiburg",
    "wm.price": "€126", "wm.priceSub": "full course · 7 sessions",
    "wm.p1": "Over seven sessions (six fixed dates plus one by arrangement) we review the basics to create a strong foundation for more complex flows, then begin to connect figures into smooth, continuous transitions.",
    "wm.p2": "We develop confidence in the individual positions, the transitions between them, and the interplay between base, flyer and spotter — supported throughout by fall training, breathing and safe practice.",
    "wm.p3": "This course is perfect if you want to consolidate your figures and transitions and gain more experience applying them in flowing movement.",
    "wm.li1": "No partner required — we work in rotating teams. Couples are welcome.",
    "wm.li2": "Drop-in via Hansefit is possible — please get in touch first.",
    "wm.li3": "The content builds on itself, so regular attendance is recommended.",
    "wm.callout": "After registering, please message Luciana so she can add you to the course Signal group.",
    "wm.cta": "Book this course",

    "ab.kicker": "03 / Beginner Workshop", "ab.title": "Absolute Beginner 1 · Freiburg Outdoor",
    "ab.lede": "A warm, mindful introduction for complete beginners — and the perfect way to bring a friend, partner or family member into the world of AcroYoga.",
    "ab.date": "28 June 2026",
    "ab.time": "10:00–16:00", "ab.timeSub": "two 2.5-hour sessions",
    "ab.loc": "Seepark Glashaus — outdoor", "ab.locSub": "Brandensteinstraße 24, 79110 Freiburg",
    "ab.incl": "Potluck & Thai massage", "ab.inclSub": "shared vegetarian break + guided relaxation",
    "ab.p1": "This workshop is for complete beginners of any age — and for anyone who would like to introduce their loved ones, friends or relatives to AcroYoga with support.",
    "ab.p2": "Across two 2.5-hour sessions, Luciana mindfully teaches you the basics. During the break in between we share a vegetarian potluck. To close, you can look forward to a guided Thai massage for deep relaxation.",
    "ab.callout": "Please bring something to share for the potluck, and warm clothes for the Thai massage.",
    "ab.cta": "Reserve a place",

    "pt.kicker": "04 / Private", "pt.title": "Personal Training · 90 minutes",
    "pt.lede": "Prefer to train at home, can’t make the course dates, or want to work on something specific? Private sessions come to you.",
    "pt.format": "90 minutes", "pt.formatSub": "for 2 people",
    "pt.where": "Your home", "pt.whereSub": "anywhere within Freiburg · 4 cm safety mats provided",
    "pt.booking": "via Hansefit", "pt.bookingSub": "plus €16 surcharge",
    "pt.arrange": "0176 35708720", "pt.arrangeSub": "call to discuss goals & a date",
    "pt.p1": "Ninety minutes of personal training for two people, bookable via Hansefit (plus a €16 surcharge). I’ll come to your home anywhere within Freiburg and bring 4 cm thick puzzle mats for your safety, and together we’ll work individually on your AcroYoga goals.",
    "pt.li1": "All AcroYoga poses and flows — except Icarians (pops and throws with brief loss of contact).",
    "pt.li2": "Standing acrobatics is not currently offered.",
    "pt.p2": "We always discuss your goals and a suitable date beforehand. Feel free to call me — I look forward to hearing from you.",
    "pt.cta": "Call 0176 35708720",

    // ---- about page ----
    "about.eyebrow": "Our story",
    "about.h1": "We teach people to <span class=\"accent\">trust</span> — and then to fly.",
    "about.lede": "Floating Flows began with a simple belief: that connection is a practice, and everyone deserves the feeling of being held.",
    "about.p1": "Floating Flows is premium AcroYoga in Freiburg — a calm, light-filled practice where partner acrobatics, breath and therapeutic touch come together. We are a place to arrive, to let go, and to discover what your body can do with another’s support.",
    "about.p2": "Classes are led by <strong>Luciana</strong> — mindful, patient and endlessly encouraging. Groups are kept small so no one is rushed and no one is left behind, whether it’s your first time giving weight or your hundredth flight.",
    "about.p3": "More than a studio, we’re a community. The kind where you arrive a stranger and leave knowing names — where a shared potluck or a cup of tea is as much the practice as the poses themselves.",
    "about.valuesEyebrow": "What we hold to",
    "about.valuesH2": "Three things we never compromise.",
    "about.v1t": "Safety, always",
    "about.v1p": "Every flight is spotted, every progression earned. We practise fall training and build confidence slowly, so trust is a foundation — never a leap of faith.",
    "about.v2t": "Everyone belongs",
    "about.v2p": "No partner, no experience and no particular body required. We work in rotating teams, so our room is for beginners and flyers alike, exactly as they are.",
    "about.v3t": "Joy is the point",
    "about.v3p": "Beneath the skill is something simpler: play. We protect the laughter, the lightness and the delight of moving together.",
    "about.ctaEyebrow": "Begin",
    "about.ctaH2": "Your first flight is waiting.",
    "about.ctaLede": "Come as you are. We’ll handle the rest.",
    "about.cta1": "Book a class"
  };

  var STORE = "ff-lang";

  function apply(lang) {
    var root = document.documentElement;
    root.setAttribute("data-lang", lang);
    root.setAttribute("lang", lang);
    var nodes = document.querySelectorAll("[data-i18n]");
    for (var i = 0; i < nodes.length; i++) {
      var el = nodes[i], key = el.getAttribute("data-i18n");
      if (lang === "en") {
        if (el.getAttribute("data-de") === null) el.setAttribute("data-de", el.innerHTML);
        if (EN[key] != null) el.innerHTML = EN[key];
      } else if (el.getAttribute("data-de") !== null) {
        el.innerHTML = el.getAttribute("data-de");
      }
    }
    var btns = document.querySelectorAll("[data-setlang]");
    for (var j = 0; j < btns.length; j++) {
      var b = btns[j];
      b.setAttribute("aria-pressed", b.getAttribute("data-setlang") === lang ? "true" : "false");
    }
    try { localStorage.setItem(STORE, lang); } catch (e) {}
  }

  function init() {
    var saved = "de";
    try { saved = localStorage.getItem(STORE) || "de"; } catch (e) {}
    if (saved === "en") apply("en");
    document.addEventListener("click", function (e) {
      var t = e.target.closest("[data-setlang]");
      if (!t) return;
      e.preventDefault();
      apply(t.getAttribute("data-setlang"));
    });
  }

  if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", init);
  else init();
})();
