// i18n + theme preferences — language (EN/NL) and theme (bright/dark) toggles.
// Translation works on the rendered DOM: every text node / attribute whose
// trimmed content matches a dictionary key is swapped. A MutationObserver
// keeps newly rendered content translated while Dutch is active.

const NL_DICT = {
  // ---------- Nav / footer ----------
  "Home": "Home",
  "About": "Over ons",
  "Services": "Diensten",
  "Testimonials": "Ervaringen",
  "Apply": "Aanmelden",
  "Open menu": "Menu openen",
  "Close menu": "Menu sluiten",
  "Health performance coaching, built on Movement, Discipline, Mindset, and Spiritual Growth.": "Health-performance coaching, gebouwd op Beweging, Discipline, Mindset en Spirituele Groei.",
  "Pages": "Pagina's",
  "40-Day Reset Challenge": "40-daagse Reset Challenge",
  "Book a session": "Plan een sessie",
  "Resources": "Bronnen",
  "Method": "Methode",
  "© 2026 7ARAKA. Based in the Netherlands.": "© 2026 7ARAKA. Gevestigd in Nederland.",
  "ح ⸱ movement": "ح ⸱ beweging",
  "Bright": "Licht",
  "Dark": "Donker",
  // ---------- CTA band ----------
  "Train smarter, recover stronger, and live with intent.": "Train slimmer, herstel sterker en leef met intentie.",
  "Book a call": "Plan een gesprek",
  "Start your program": "Start je programma",
  // ---------- Stats ----------
  "Coached athletes": "Gecoachte atleten",
  "Clinical practice": "Klinische praktijk",
  "Return-to-sport rate": "Return-to-sport percentage",
  "Reset Programs": "Reset-programma's",
  "8 yrs": "8 jr",
  "40 days": "40 dagen",
  "2,000+": "2.000+",
  // ---------- Pillars ----------
  "Pillar 01": "Pijler 01",
  "Pillar 02": "Pijler 02",
  "Pillar 03": "Pijler 03",
  "Pillar 04": "Pijler 04",
  "Movement": "Beweging",
  "Spiritual Growth": "Spirituele Groei",
  "Pain-free, then full potential. Rehab and performance, spoken in the same language.": "Eerst pijnvrij, dan vol potentieel. Rehab en performance, gesproken in dezelfde taal.",
  "Structure that holds. Change that lasts. The 7ARAKA method builds the habit underneath the goal.": "Structuur die standhoudt. Verandering die blijft. De 7ARAKA-methode bouwt de gewoonte onder het doel.",
  "Composure under load. We work on the story you tell yourself when training gets hard.": "Kalmte onder belasting. We werken aan het verhaal dat je jezelf vertelt wanneer trainen zwaar wordt.",
  "Train the body in service of the life around it. Faith, stillness, and intention sit at the centre.": "Train het lichaam in dienst van het leven eromheen. Geloof, stilte en intentie staan centraal.",
  // ---------- Home: hero ----------
  "Movement is the medicine.": "Beweging is het medicijn.",
  "Discipline is the dose.": "Discipline is de dosis.",
  "Performance coaching for the body you actually have, and the life you actually live. Rehab-led. Strength-driven. Honest from the first moment.": "Performance coaching voor het lichaam dat je echt hebt, en het leven dat je echt leidt. Rehab-gestuurd. Krachtgedreven. Eerlijk vanaf het eerste moment.",
  "Apply now": "Meld je aan",
  "See services": "Bekijk diensten",
  "Based in Amsterdam & Haarlem · In-person & online · Dutch / English": "Gevestigd in Amsterdam & Haarlem · Op locatie & online · Nederlands / Engels",
  "7ARAKA Method": "7ARAKA-methode",
  "Coaching system:": "Coachingsysteem:",
  "movement, recovery,": "beweging, herstel,",
  "discipline, intention.": "discipline, intentie.",
  "· Rehab-led training": "· Rehab-gestuurde training",
  "· Structured 40-day cycles": "· Gestructureerde 40-daagse cycli",
  "· Measured progress. Real results.": "· Gemeten voortgang. Echte resultaten.",
  "In-person sessions · Amsterdam & Haarlem": "Sessies op locatie · Amsterdam & Haarlem",
  // ---------- Home: daily check-ins ----------
  "Practice · What to expect": "Praktijk · Wat je kunt verwachten",
  "Daily check-ins.": "Dagelijkse check-ins.",
  "Feedback that actually moves you.": "Feedback die je echt vooruit helpt.",
  "Start a program": "Start een programma",
  "Expert-guided sessions": "Sessies onder deskundige begeleiding",
  "Live · in-studio session": "Live · sessie in de studio",
  "Nutrition that works": "Voeding die werkt",
  "Recovery protocols": "Herstelprotocollen",
  "Progress tracking": "Voortgangsregistratie",
  "Visual weekly insights": "Wekelijkse visuele inzichten",
  // ---------- Home: testimonial carousel ----------
  "Marathon runner": "Marathonloper",
  "Tech founder · Rotterdam": "Tech-oprichter · Rotterdam",
  "Cyclist · Eindhoven": "Wielrenner · Eindhoven",
  "“Finally, a coach who treats the injury": "“Eindelijk een coach die de blessure",
  "and": "én",
  "the goal as the same problem. I've trained pain-free for the first time in years.”": "het doel als hetzelfde probleem behandelt. Ik train voor het eerst in jaren pijnvrij.”",
  "“A year in and I'm stronger than I was at 25. The back pain hasn't come back, and the discipline has carried over into every part of work.”": "“Een jaar verder en ik ben sterker dan op mijn 25e. De rugpijn is niet teruggekomen en de discipline werkt door in elk deel van mijn werk.”",
  "“Six PTs and one surgery recommendation, and none of it worked. Two months at 7ARAKA and I was back on the bike. Real diagnosis, real load.”": "“Zes fysio's en één operatie-advies, en niets werkte. Twee maanden bij 7ARAKA en ik zat weer op de fiets. Echte diagnose, echte belasting.”",
  // ---------- Home: goal band ----------
  "The 7ARAKA Method": "De 7ARAKA-methode",
  "Because every goal": "Omdat elk doel",
  "deserves a real plan.": "een echt plan verdient.",
  "We redefine fitness through rehab-informed coaching, structured discipline cycles, and progress tracking, all aligned with your life.": "Wij herdefiniëren fitness met rehab-geïnformeerde coaching, gestructureerde disciplinecycli en voortgangsregistratie, afgestemd op jouw leven.",
  "View services": "Bekijk diensten",
  "FEATURED": "UITGELICHT",
  "Targeted coaching. Train pain-free.": "Gerichte coaching. Train pijnvrij.",
  "clients helped": "klanten geholpen",
  // ---------- Home: intake promo ----------
  "Intake call": "Intakegesprek",
  "30-minute video call": "Videogesprek van 30 minuten",
  "Movement & history review": "Beweging & historie doorgenomen",
  "Honest assessment of fit": "Eerlijke inschatting of het past",
  "Free": "Gratis",
  "Limited slots this month": "Beperkt aantal plekken deze maand",
  "Book now": "Boek nu",
  "Simple. Direct. Effective.": "Simpel. Direct. Effectief.",
  "Tracking · Recovery · Coach feedback": "Tracking · Herstel · Coachfeedback",
  // ---------- Home: programs band ----------
  "Programs & Services": "Programma's & Diensten",
  "Through": "Via",
  "rehab-informed coaching and structured discipline.": "rehab-geïnformeerde coaching en gestructureerde discipline.",
  "See all": "Bekijk alles",
  "Explore": "Ontdek",
  "Strength": "Kracht",
  "40 Day": "40 dagen",
  "Physiotherapy-grade recovery, built to make you stronger than before.": "Herstel op fysiotherapie-niveau, gebouwd om je sterker te maken dan ooit.",
  "1-on-1 in-person coaching. Programs that fit your body, your goals, your life.": "1-op-1 coaching op locatie. Programma's die passen bij jouw lichaam, doelen en leven.",
  "Remote check-ins and adaptive programming for clients training independently.": "Check-ins op afstand en adaptieve programmering voor klanten die zelfstandig trainen.",
  "A structured 40-day reset built on discipline, recovery, and intention.": "Een gestructureerde 40-daagse reset gebouwd op discipline, herstel en intentie.",
  "Movement, Discipline, Mindset, Spiritual Growth. Applied daily.": "Beweging, Discipline, Mindset, Spirituele Groei. Dagelijks toegepast.",
  // ---------- About ----------
  "About 7ARAKA": "Over 7ARAKA",
  "We coach the body": "Wij coachen het lichaam",
  "so the human can grow.": "zodat de mens kan groeien.",
  "7ARAKA, from the Arabic": "7ARAKA, van het Arabische",
  "for": "voor",
  "movement": "beweging",
  ", is a health-performance coaching practice based in the Netherlands. We work in clinics, gyms, and online with people who are done with generic fitness and want something honest.": ", is een health-performance coachingpraktijk in Nederland. We werken in klinieken, sportscholen en online met mensen die klaar zijn met generieke fitness en iets eerlijks willen.",
  "The practice": "De praktijk",
  "Built at the intersection of rehab, performance, and lifestyle.": "Gebouwd op het snijvlak van rehab, performance en lifestyle.",
  "Most coaches understand training. Most therapists understand recovery. Very few work in both languages at the same time. That gap is exactly where 7ARAKA was built.": "De meeste coaches begrijpen training. De meeste therapeuten begrijpen herstel. Weinigen spreken beide talen tegelijk. Precies in dat gat is 7ARAKA gebouwd.",
  "We coach professionals, athletes, and ambitious individuals through injuries, plateaus, and life seasons that demand more than a generic gym program. Every plan is rehab-informed, performance-driven, and tuned to the body in front of us, for Dutch and English speakers, in person and remote.": "We coachen professionals, atleten en ambitieuze mensen door blessures, plateaus en levensfasen die meer vragen dan een generiek sportschoolprogramma. Elk plan is rehab-geïnformeerd, performance-gedreven en afgestemd op het lichaam voor ons — voor Nederlands- en Engelstaligen, op locatie en op afstand.",
  "We take the work seriously and the person in front of us even more so. Programming is evidence-based, progress is measured, and reviews are honest. It's the kind of work that compounds over years, not weeks.": "We nemen het werk serieus en de persoon tegenover ons nog serieuzer. Programmering is evidence-based, voortgang wordt gemeten en evaluaties zijn eerlijk. Het is werk dat zich over jaren opbouwt, niet over weken.",
  "Four pillars": "Vier pijlers",
  "The 7ARAKA Method,": "De 7ARAKA-methode,",
  "in four parts.": "in vier delen.",
  "Every program we run sits on the same four pillars, whether it's rehab, personal coaching, online, or the 40-day reset. And the order matters.": "Elk programma rust op dezelfde vier pijlers, of het nu rehab, personal coaching, online of de 40-daagse reset is. En de volgorde doet ertoe.",
  "What makes us different": "Wat ons anders maakt",
  "Honest coaching. Measured progress. Results that compound.": "Eerlijke coaching. Gemeten voortgang. Resultaten die zich opstapelen.",
  "Rehab-informed by default": "Standaard rehab-geïnformeerd",
  "Every program is screened through a physiotherapy lens. If something hurts, we fix it instead of avoiding it.": "Elk programma wordt gescreend door een fysiotherapeutische bril. Doet iets pijn, dan lossen we het op in plaats van het te vermijden.",
  "Science over slogans": "Wetenschap boven slogans",
  "Programming follows evidence-based progression: load, recover, adapt, repeat. Every block has a reason you can ask about.": "Programmering volgt evidence-based progressie: belasten, herstellen, aanpassen, herhalen. Elk blok heeft een reden waar je naar mag vragen.",
  "Built for real lives": "Gebouwd voor echte levens",
  "Sessions fit around work, family, prayer, travel. The program is yours; we just keep it honest.": "Sessies passen rond werk, gezin, gebed en reizen. Het programma is van jou; wij houden het eerlijk.",
  "Founder": "Oprichter",
  "Bido started as a sport coach at CIOS, became a physiotherapist at Hogeschool Leiden, and never stopped studying. Along the way he worked with practices like Performance Guys, treating Eredivisie footballers, top-flight rugby players, national-level swimmers, and high performers across many sports.": "Bido begon als sportcoach aan het CIOS, werd fysiotherapeut aan de Hogeschool Leiden en is nooit gestopt met studeren. Onderweg werkte hij met praktijken als Performance Guys en behandelde hij Eredivisie-voetballers, rugbyspelers op het hoogste niveau, zwemmers van nationaal niveau en high performers in vele sporten.",
  "In every setting he saw the same gap: rehab gets people out of pain, coaching makes them perform, but almost nobody holds both jobs at once. So he built the practice that does. 7ARAKA takes you from recovery to performance under one method, with discipline and intention holding it together.": "In elke omgeving zag hij hetzelfde gat: rehab haalt mensen uit de pijn, coaching laat ze presteren, maar bijna niemand doet beide tegelijk. Dus bouwde hij de praktijk die dat wél doet. 7ARAKA brengt je van herstel naar performance onder één methode, met discipline en intentie als bindmiddel.",
  "BSc Physiotherapy": "BSc Fysiotherapie",
  "Book an intake": "Plan een intake",
  "See programs": "Bekijk programma's",
  // ---------- Services ----------
  "Three ways to train with us.": "Drie manieren om met ons te trainen.",
  "One method underneath.": "Eén methode eronder.",
  "Whether you're rebuilding from injury, training for a peak, or working with us remotely, every program runs on the same four pillars: movement, discipline, mindset, spiritual growth.": "Of je nu herstelt van een blessure, traint naar een piek of op afstand met ons werkt: elk programma draait op dezelfde vier pijlers — beweging, discipline, mindset, spirituele groei.",
  "Online worldwide": "Online wereldwijd",
  "48-hour response": "Reactie binnen 48 uur",
  "Most requested": "Meest gevraagd",
  "01 / Physiotherapy": "01 / Fysiotherapie",
  "02 / Strength": "02 / Kracht",
  "03 / Anywhere": "03 / Overal",
  "1-on-1 in-person sessions to recover from pain or injury, then rebuild stronger, smarter movement.": "1-op-1 sessies op locatie om te herstellen van pijn of blessure, en daarna sterker en slimmer te bewegen.",
  "In-person strength and conditioning, built around your body, goals, and lifestyle. To change your life, not just your physique.": "Kracht en conditie op locatie, gebouwd rond jouw lichaam, doelen en leefstijl. Om je leven te veranderen, niet alleen je lijf.",
  "Remote training and recovery programs with structured check-ins. For clients training independently or outside the Netherlands.": "Trainings- en herstelprogramma's op afstand met gestructureerde check-ins. Voor klanten die zelfstandig of buiten Nederland trainen.",
  "What's included": "Wat is inbegrepen",
  "Movement & pain assessment": "Bewegings- & pijnanalyse",
  "Manual therapy + dry needling (if indicated)": "Manuele therapie + dry needling (indien geïndiceerd)",
  "Loaded rehab progression": "Belaste rehab-progressie",
  "Direct WhatsApp access between sessions": "Direct WhatsApp-contact tussen sessies",
  "Individualised strength programming": "Geïndividualiseerde krachtprogrammering",
  "Conditioning & energy-system training": "Conditie- & energiesysteemtraining",
  "Recovery & sleep coaching": "Herstel- & slaapcoaching",
  "Nutrition guidance (referred to dietitian if needed)": "Voedingsadvies (doorverwijzing naar diëtist indien nodig)",
  "Monthly progress reviews": "Maandelijkse voortgangsevaluaties",
  "Custom training program, updated every 4 weeks": "Trainingsprogramma op maat, elke 4 weken vernieuwd",
  "Weekly video check-ins": "Wekelijkse video-check-ins",
  "Form video review (48-hr feedback)": "Techniekvideo-review (feedback binnen 48 uur)",
  "Recovery & mobility protocols": "Herstel- & mobiliteitsprotocollen",
  "Adaptive deload weeks built in": "Adaptieve deload-weken ingebouwd",
  "In-person · Amsterdam & Haarlem": "Op locatie · Amsterdam & Haarlem",
  "Ongoing": "Doorlopend",
  "Remote · Worldwide": "Op afstand · Wereldwijd",
  "Bundle of 6: €660 (–8%)": "Bundel van 6: €660 (–8%)",
  "Bundle of 10: €820 (–9%)": "Bundel van 10: €820 (–9%)",
  "3-month commitment · cancel anytime after": "3 maanden commitment · daarna maandelijks opzegbaar",
  "/ session": "/ sessie",
  "/ month": "/ maand",
  "Ask a question": "Stel een vraag",
  "Apply for": "Aanmelden voor",
  "Best for:": "Voor wie:",
  "Pain, post-injury, chronic stiffness, athletes returning to load.": "Pijn, na een blessure, chronische stijfheid, atleten die terugkeren naar belasting.",
  "Professionals who want long-term physical capability and disciplined training.": "Professionals die langdurige fysieke capaciteit en gedisciplineerde training willen.",
  "Self-driven trainees, expats, and athletes who need expert eyes from anywhere.": "Zelfstandige sporters, expats en atleten die overal deskundige ogen nodig hebben.",
  "Specialty cohort": "Specialistische cohort",
  "The 40-Day": "De 40-daagse",
  "Reset Challenge.": "Reset Challenge.",
  "A structured 40-day reset built on discipline, intentional recovery, and a deliberate return to movement. Four cohorts a year. Applications open six weeks before each intake.": "Een gestructureerde 40-daagse reset, gebouwd op discipline, bewust herstel en een doelbewuste terugkeer naar beweging. Vier cohorten per jaar. Aanmeldingen openen zes weken voor elke intake.",
  "40 days · cohort-based": "40 dagen · in cohortvorm",
  "32 spots / cohort": "32 plekken / cohort",
  "Worldwide · online": "Wereldwijd · online",
  "Next intake · September 2026": "Volgende intake · september 2026",
  "Disciplined training blocks": "Gedisciplineerde trainingsblokken",
  "Recovery, sleep & hydration protocols": "Herstel-, slaap- & hydratatieprotocollen",
  "Daily reflection prompts": "Dagelijkse reflectievragen",
  "Group accountability + final 1:1": "Groepsverantwoording + afsluitende 1:1",
  "How it works": "Hoe het werkt",
  "From application to first session.": "Van aanmelding tot eerste sessie.",
  "5 minute form. Tell us your goal, constraints, and history.": "Formulier van 5 minuten. Vertel ons je doel, beperkingen en historie.",
  "Free 30-min video. Honest assessment of fit and recommended program.": "Gratis videogesprek van 30 min. Eerlijke inschatting en programma-advies.",
  "Movement screen": "Bewegingsscreening",
  "First in-person session is diagnostic. We map the body before we load it.": "De eerste sessie op locatie is diagnostisch. We brengen het lichaam in kaart voordat we het belasten.",
  "Train & track": "Trainen & meten",
  "Structured weekly blocks. Continuous coach feedback. Honest progress reviews.": "Gestructureerde weekblokken. Doorlopende coachfeedback. Eerlijke voortgangsevaluaties.",
  "The questions we get most often.": "De vragen die we het vaakst krijgen.",
  "Don't see yours? Email": "Staat jouw vraag er niet bij? Mail",
  "and we'll reply within 48 hours.": "en we antwoorden binnen 48 uur.",
  "Do I need a referral or a diagnosis to start rehab coaching?": "Heb ik een verwijzing of diagnose nodig om met rehab-coaching te starten?",
  "No. We screen movement and pain history during intake and refer out for imaging or medical opinions when needed. Most clients arrive without a referral.": "Nee. We screenen beweging en pijnhistorie tijdens de intake en verwijzen door voor beeldvorming of medisch advies wanneer nodig. De meeste klanten komen zonder verwijzing.",
  "I live outside the Netherlands. Can I still work with you?": "Ik woon buiten Nederland. Kan ik toch met jullie werken?",
  "Yes, that's exactly what Online Coaching is for. We've coached clients across the EU, UK, US, and the Gulf. The check-in cadence is weekly and the programming adapts every four weeks.": "Ja, daar is Online Coaching precies voor. We hebben klanten gecoacht in de EU, het VK, de VS en de Golfregio. De check-ins zijn wekelijks en de programmering past zich elke vier weken aan.",
  "Can I switch between in-person and online?": "Kan ik wisselen tussen op locatie en online?",
  "Often. Many clients start with a few in-person sessions (especially for rehab) and transition to online once we've mapped the body. We'll suggest the right path on the intake call.": "Vaak wel. Veel klanten starten met een paar sessies op locatie (zeker bij rehab) en gaan over naar online zodra we het lichaam in kaart hebben. We adviseren de juiste route in het intakegesprek.",
  "What does the 40-Day Reset Challenge actually look like?": "Hoe ziet de 40-daagse Reset Challenge er eigenlijk uit?",
  "A structured 40-day cycle: progressive training blocks, recovery and sleep protocols, daily reflection prompts, and group accountability with a closing 1:1. We run four cohorts a year, and applications open six weeks before each intake.": "Een gestructureerde cyclus van 40 dagen: progressieve trainingsblokken, herstel- en slaapprotocollen, dagelijkse reflectievragen en groepsverantwoording met een afsluitende 1:1. We draaien vier cohorten per jaar en aanmeldingen openen zes weken voor elke intake.",
  "Do you take insurance?": "Werken jullie met verzekeringen?",
  "We can issue invoices for Dutch supplementary insurance reimbursement on physiotherapy sessions. We don't bill insurance directly.": "We kunnen facturen uitschrijven voor vergoeding vanuit de Nederlandse aanvullende verzekering voor fysiotherapiesessies. We declareren niet rechtstreeks bij de verzekeraar.",
  // ---------- Contact ----------
  "Let's talk.": "Laten we praten.",
  "No pressure, no pitch.": "Geen druk, geen verkooppraatje.",
  "Tell us where you're at. We'll reply within 48 hours with honest next steps, even if 7ARAKA isn't the right fit.": "Vertel ons waar je staat. We antwoorden binnen 48 uur met eerlijke vervolgstappen, ook als 7ARAKA niet de juiste match is.",
  "Message received.": "Bericht ontvangen.",
  "Thanks": "Bedankt",
  ". We'll reply to": ". We antwoorden naar",
  "within 48 hours.": "binnen 48 uur.",
  "Send another": "Verstuur nog een",
  "Browse services": "Bekijk diensten",
  "Send a message.": "Stuur een bericht.",
  "Full name": "Volledige naam",
  "Your name": "Jouw naam",
  "Email": "E-mail",
  "you@example.com": "jij@voorbeeld.nl",
  "Phone (optional)": "Telefoon (optioneel)",
  "What's this about?": "Waar gaat het over?",
  "Speaking / collaboration": "Spreken / samenwerking",
  "Press / media": "Pers / media",
  "Something else": "Iets anders",
  "Message": "Bericht",
  "Tell us about your goal, any pain or injury history, and what you've tried so far…": "Vertel over je doel, eventuele pijn- of blessurehistorie en wat je tot nu toe hebt geprobeerd…",
  "Reply within 48 hours.": "Antwoord binnen 48 uur.",
  "Send message": "Verstuur bericht",
  "Please share your name.": "Deel alsjeblieft je naam.",
  "Email is required.": "E-mail is verplicht.",
  "Hmm, that doesn't look right.": "Hmm, dat ziet er niet goed uit.",
  "A short message helps us reply usefully.": "Een kort bericht helpt ons zinvol te antwoorden.",
  "A little more detail, please.": "Iets meer detail, graag.",
  "Book a free intake call": "Plan een gratis intakegesprek",
  "30 minutes · honest assessment of fit.": "30 minuten · eerlijke inschatting of het past.",
  "Open calendar": "Open agenda",
  "Phone / WhatsApp": "Telefoon / WhatsApp",
  "Locations": "Locaties",
  "Studios across Amsterdam & Haarlem": "Studio's in Amsterdam & Haarlem",
  "Hours": "Openingstijden",
  "Mon – Thu": "Ma – Do",
  "Friday": "Vrijdag",
  "Saturday": "Zaterdag",
  "Sunday": "Zondag",
  "Closed": "Gesloten",
  "Follow the practice": "Volg de praktijk",
  "Daily training, recovery, and discipline lessons on Instagram and TikTok. Long-form on LinkedIn.": "Dagelijkse lessen over training, herstel en discipline op Instagram en TikTok. Lange vorm op LinkedIn.",
  "Locations · Amsterdam & Haarlem": "Locaties · Amsterdam & Haarlem",
  "Private sessions only · By appointment": "Alleen privésessies · Op afspraak",
  // ---------- Testimonials ----------
  "The work,": "Het werk,",
  "in their own words.": "in hun eigen woorden.",
  "We don't run before-and-after photo campaigns. The work that matters is harder to photograph: pain that left, habits that stayed, lives that quietly changed shape.": "We doen niet aan voor-en-na-fotocampagnes. Het werk dat ertoe doet is moeilijker te fotograferen: pijn die verdween, gewoontes die bleven, levens die stilletjes van vorm veranderden.",
  "Finally, a coach who treats the injury and the goal as the same problem. I've trained pain-free for the first time in years, and ran a PB at Berlin six months in.": "Eindelijk een coach die de blessure en het doel als hetzelfde probleem behandelt. Ik train voor het eerst in jaren pijnvrij en liep na zes maanden een PR in Berlijn.",
  "I came in tired and stiff. A year later I'm stronger than I was at 25 and the back pain hasn't come back. The discipline carries over into every part of work.": "Ik kwam binnen moe en stijf. Een jaar later ben ik sterker dan op mijn 25e en de rugpijn is niet teruggekomen. De discipline werkt door in elk deel van mijn werk.",
  "I travel constantly. The weekly check-ins keep me honest and the programming adapts in a way no template app ever could.": "Ik reis constant. De wekelijkse check-ins houden me eerlijk en de programmering past zich aan op een manier die geen standaard-app ooit zou kunnen.",
  "The Reset cohort changed how I think about training around discipline cycles. Three years later I still run the same protocols whenever I need to find my edge again.": "De Reset-cohort veranderde hoe ik denk over trainen rond disciplinecycli. Drie jaar later gebruik ik nog steeds dezelfde protocollen wanneer ik mijn scherpte terug moet vinden.",
  "Six PTs, two MRIs, one surgery recommendation, and none of it worked. Two months at 7ARAKA and I was back on the bike. No nonsense, just real diagnosis and load.": "Zes fysio's, twee MRI's, één operatie-advies, en niets werkte. Twee maanden bij 7ARAKA en ik zat weer op de fiets. Geen onzin, gewoon echte diagnose en belasting.",
  "I'd given up on 'fitness people' before I found 7ARAKA. The tone is grounded. The plans actually fit a real life. The progress is undeniable.": "Ik had 'fitnessmensen' opgegeven voordat ik 7ARAKA vond. De toon is geaard. De plannen passen echt in een echt leven. De vooruitgang is onmiskenbaar.",
  "Marathon runner · Amsterdam": "Marathonloper · Amsterdam",
  "Lawyer · The Hague": "Advocaat · Den Haag",
  "Surgical resident · Utrecht": "Chirurg in opleiding · Utrecht",
  "Educator · Brussels": "Docent · Brussel",
  "Average client rating · 280+ reviews": "Gemiddelde klantbeoordeling · 280+ reviews",
  "Of clients renew after first 3 months": "Van de klanten verlengt na de eerste 3 maanden",
  "Median client tenure": "Mediane klantduur",
  "Return-to-sport rate (rehab clients)": "Return-to-sport percentage (rehab-klanten)",
  "12 mo": "12 mnd",
  "Featured story": "Uitgelicht verhaal",
  "Video stories": "Videoverhalen",
  "Watch the work, not the marketing.": "Bekijk het werk, niet de marketing.",
  "Long-form conversations with clients about what changed physically, mentally, and spiritually, and what they wish they'd known earlier.": "Lange gesprekken met klanten over wat er fysiek, mentaal en spiritueel veranderde, en wat ze eerder hadden willen weten.",
  "Watch the latest": "Bekijk de nieuwste",
  "Read the method": "Lees de methode",
  "Karim · 8 months in": "Karim · 8 maanden bezig",
  "Experience with": "Ervaring met",
  "EREDIVISIE FOOTBALL": "EREDIVISIE-VOETBAL",
  "DUTCH TOP-FLIGHT RUGBY": "NEDERLANDSE TOP-RUGBY",
  "NATIONAL SWIMMING": "NATIONAAL ZWEMMEN",
  "POST-SURGICAL REHAB": "POSTOPERATIEVE REHAB",
  "2,000+ CLIENTS": "2.000+ KLANTEN",
  // ---------- Apply modal ----------
  "1-on-1, in-person · Netherlands": "1-op-1, op locatie · Nederland",
  "In-person · Strength & conditioning": "Op locatie · Kracht & conditie",
  "Remote · Worldwide check-ins": "Op afstand · Wereldwijde check-ins",
  "Discipline · Movement · Mindset": "Discipline · Beweging · Mindset",
  "Application received.": "Aanmelding ontvangen.",
  "We'll be in touch within 48 hours to schedule your intake call. Check your inbox at": "We nemen binnen 48 uur contact op om je intakegesprek in te plannen. Check je inbox op",
  "Close": "Sluiten",
  "Choose your program": "Kies je programma",
  "Location": "Locatie",
  "Netherlands": "Nederland",
  "Belgium": "België",
  "Germany": "Duitsland",
  "UK": "VK",
  "Elsewhere (online only)": "Elders (alleen online)",
  "What's the goal?": "Wat is het doel?",
  "Recover from a lower-back injury, build strength, run a half-marathon…": "Herstellen van een lage-rugblessure, kracht opbouwen, een halve marathon lopen…",
  "Training experience": "Trainingservaring",
  "New to training": "Nieuw met trainen",
  "Some training experience": "Enige trainingservaring",
  "Trained consistently for 1–3 years": "1–3 jaar consequent getraind",
  "3+ years, intermediate / advanced": "3+ jaar, gemiddeld / gevorderd",
  "Ideal start": "Ideale start",
  "This week": "Deze week",
  "Within 2 weeks": "Binnen 2 weken",
  "Within a month": "Binnen een maand",
  "Just exploring": "Gewoon verkennen",
  "Anything we should know?": "Iets wat we moeten weten?",
  "Past injuries, schedule constraints, what you've tried before…": "Eerdere blessures, agenda-beperkingen, wat je eerder hebt geprobeerd…",
  "We reply within 48 hours.": "We antwoorden binnen 48 uur.",
  "Cancel": "Annuleren",
  "Submit application": "Verstuur aanmelding",
  "Your name, please.": "Je naam, graag.",
  "That email looks off.": "Die e-mail klopt niet helemaal.",
  "Tell us the goal in a sentence.": "Vertel het doel in één zin.",
};

const NL_REV = {};
Object.keys(NL_DICT).forEach((k) => { if (NL_DICT[k] !== k) NL_REV[NL_DICT[k]] = k; });

const SITE_TITLES = {
  en: "7ARAKA — Movement. Discipline. Mindset. Spiritual Growth.",
  nl: "7ARAKA — Beweging. Discipline. Mindset. Spirituele Groei.",
};

function prefGet(k, d) { try { return localStorage.getItem(k) || d; } catch (e) { return d; } }
function prefSet(k, v) { try { localStorage.setItem(k, v); } catch (e) {} }

let SITE_LANG = prefGet("site-lang", "en");
let SITE_THEME = prefGet("site-theme", "light");
document.documentElement.setAttribute("data-theme", SITE_THEME);
document.documentElement.lang = SITE_LANG;
if (SITE_LANG === "nl") document.title = SITE_TITLES.nl;

const I18N_SKIP = { SCRIPT: 1, STYLE: 1, NOSCRIPT: 1, TEXTAREA: 1 };
const I18N_ATTRS = ["placeholder", "aria-label", "alt", "title"];

function i18nTextNode(node, dict, toNl) {
  const raw = node.nodeValue;
  if (!raw) return;
  const p = node.parentNode;
  if (p && I18N_SKIP[p.nodeName]) return;
  const t = raw.trim();
  if (!t) return;
  const out = dict[t];
  if (out === undefined || out === t) return;
  // Keep <option> values stable (English) so React's controlled selects keep matching
  if (toNl && p && p.nodeName === "OPTION" && !p.hasAttribute("value")) p.setAttribute("value", t);
  const lead = raw.match(/^\s*/)[0];
  const tail = raw.match(/\s*$/)[0];
  node.nodeValue = lead + out + tail;
}

function i18nElement(el, dict) {
  for (let i = 0; i < I18N_ATTRS.length; i++) {
    const a = I18N_ATTRS[i];
    const v = el.getAttribute && el.getAttribute(a);
    if (!v) continue;
    const out = dict[v.trim()];
    if (out && out !== v.trim()) el.setAttribute(a, out);
  }
}

function i18nTree(root, dict, toNl) {
  if (!root) return;
  if (root.nodeType === 3) { i18nTextNode(root, dict, toNl); return; }
  if (root.nodeType !== 1 && root.nodeType !== 9 && root.nodeType !== 11) return;
  if (root.nodeType === 1) {
    if (I18N_SKIP[root.nodeName]) return;
    i18nElement(root, dict);
  }
  const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, {
    acceptNode: (n) => {
      if (n.nodeType === 1 && I18N_SKIP[n.nodeName]) return NodeFilter.FILTER_REJECT;
      return NodeFilter.FILTER_ACCEPT;
    },
  });
  let n;
  while ((n = walker.nextNode())) {
    if (n.nodeType === 3) i18nTextNode(n, dict, toNl);
    else i18nElement(n, dict);
  }
}

function applySiteLang() {
  const toNl = SITE_LANG === "nl";
  i18nTree(document.body, toNl ? NL_DICT : NL_REV, toNl);
  document.documentElement.lang = SITE_LANG;
  document.title = SITE_TITLES[SITE_LANG] || SITE_TITLES.en;
}

// Keep newly rendered content translated while Dutch is active.
const i18nObserver = new MutationObserver((muts) => {
  if (SITE_LANG !== "nl") return;
  for (let i = 0; i < muts.length; i++) {
    const m = muts[i];
    if (m.type === "characterData") i18nTextNode(m.target, NL_DICT, true);
    if (m.addedNodes) {
      for (let j = 0; j < m.addedNodes.length; j++) i18nTree(m.addedNodes[j], NL_DICT, true);
    }
  }
});
i18nObserver.observe(document.body, { childList: true, subtree: true, characterData: true });

// ---------- Footer controls: language + theme ----------
const SitePrefsControls = () => {
  const [, force] = React.useReducer((x) => x + 1, 0);

  const setLang = (l) => {
    if (l === SITE_LANG) return;
    SITE_LANG = l;
    prefSet("site-lang", l);
    applySiteLang();
    force();
  };
  const setTheme = (th) => {
    if (th === SITE_THEME) return;
    SITE_THEME = th;
    prefSet("site-theme", th);
    document.documentElement.setAttribute("data-theme", th);
    force();
  };

  return (
    <div className="site-prefs">
      <div className="pref-group" role="group" aria-label="Language">
        <button type="button" className={`pref-btn ${SITE_LANG === "en" ? "active" : ""}`} onClick={() => setLang("en")} aria-pressed={SITE_LANG === "en"}>EN</button>
        <button type="button" className={`pref-btn ${SITE_LANG === "nl" ? "active" : ""}`} onClick={() => setLang("nl")} aria-pressed={SITE_LANG === "nl"}>NL</button>
      </div>
      <div className="pref-group" role="group" aria-label="Theme">
        <button type="button" className={`pref-btn ${SITE_THEME === "light" ? "active" : ""}`} onClick={() => setTheme("light")} aria-pressed={SITE_THEME === "light"}>Bright</button>
        <button type="button" className={`pref-btn ${SITE_THEME === "dark" ? "active" : ""}`} onClick={() => setTheme("dark")} aria-pressed={SITE_THEME === "dark"}>Dark</button>
      </div>
    </div>
  );
};

Object.assign(window, { SitePrefsControls, applySiteLang });
