/* ========================================================= Sections — Fran Ruiz portfolio Pulls from window.T (i18n) + window.PROJECTS + window.CLIENTS ========================================================= */ const { useEffect, useRef, useState } = React; /* PREVIEW vs PRODUCTION url helpers. ------------------------------------------------------------------ In production (Hostinger, LiteSpeed + .htaccess) the clean URLs /contact /legal /services/ /projects/ are rewritten to their backing static files. In the design tool preview there is no Apache, so those clean URLs 404 — which is why project / service / contact pages "don't load" when navigating from the home page in preview. We detect the preview environment by hostname (the design tool serves from *.claudeusercontent.com) and route links to the raw files (project.html?slug=…) there, while keeping clean URLs in production. The target pages already accept ?slug= as fallback, so no per-page change is required. */ const IS_PREVIEW = typeof location !== "undefined" && /claudeusercontent\.com$/i.test(location.hostname); const routeProject = (slug) => IS_PREVIEW ? `project.html?slug=${encodeURIComponent(slug)}` : `/projects/${slug}`; const routeService = (slug) => IS_PREVIEW ? `service.html?slug=${encodeURIComponent(slug)}` : `/services/${slug}`; const routeContact = () => IS_PREVIEW ? "contact.html" : "/contact"; const routeLegal = () => IS_PREVIEW ? "legal.html" : "/legal"; // Expose to other Babel-compiled files (e.g. project-app.jsx) — each //