/* global React */ const { useState, useEffect, useRef } = React; // ─────────── Hooks ─────────── function useReveal() { useEffect(() => { const els = document.querySelectorAll(".reveal:not(.in)"); const io = new IntersectionObserver((entries) => { entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } }); }, { threshold: 0.12, rootMargin: "0px 0px -40px 0px" }); els.forEach((el) => io.observe(el)); return () => io.disconnect(); }); } // ─────────── Inline SVGs ─────────── const ArchOrnament = ({ stroke = "currentColor", width = 160 }) => ( ); const OliveBranch = ({ width = 90, color = "currentColor" }) => ( ); const Arrow = () => ( ); // ─────────── Nav ─────────── function Nav({ t, lang, setLang, paletteName }) { const [scrolled, setScrolled] = useState(false); const [menuOpen, setMenuOpen] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 30); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); useEffect(() => { document.body.style.overflow = menuOpen ? "hidden" : ""; }, [menuOpen]); const links = [ { href: "#about", label: t.nav.about }, { href: "#process", label: t.nav.process }, { href: "#regions", label: t.nav.regions }, { href: "#contact", label: t.nav.contact }, { href: "#faqs", label: t.nav.faqs } ]; return (
{links.map(l => ( setMenuOpen(false)}>{l.label} ))}
{["en", "es", "ar"].map((code) => ( ))}
setMenuOpen(false)} style={{padding: "0.7rem 1.1rem", fontSize: "0.72rem"}}> {t.nav.cta}
); } // ─────────── Hero ─────────── function Hero({ t }) { return (
Paisaje rural español al atardecer
{t.hero.arch}Valencia · UAE

{t.hero.title_a} {t.hero.title_em}{t.hero.title_b}

{t.hero.tagline}

{t.hero.meta1} {t.hero.meta2}
); } // ─────────── Marquee ─────────── function Marquee({ items }) { const list = [...items, ...items]; return ( ); } // ─────────── Section Head ─────────── function SectionHead({ eyebrow, num, title_a, title_em, title_b }) { return (
{eyebrow}

{title_a} {title_em}{title_b}

); } // ─────────── About ─────────── function About({ t }) { return (

{t.about.p1}

{t.about.p2}

{t.about.p3}

{t.about.signature}
Cava de afinado con quesos artesanos de corteza enmohecida sobre estantería de madera
{t.about.values.map((v, i) => (
{v.num}

{v.title}

{v.text}

))}
); } // ─────────── Process ─────────── function Process({ t }) { return (
{t.process.steps.map((s, i) => (
0{i+1}

{s.title}

{s.text}

))}
); } // ─────────── Regions ─────────── function Regions({ t }) { const imgs = [ "https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=900&q=80&auto=format&fit=crop", // País Vasco — green mountain pasture (Aralar feel) "assets/region-extremadura.jpg", // Extremadura — dehesa con encinas y ganado pastando "assets/region-la-mancha.jpg", // La Mancha — molinos de Consuegra "assets/region-picos-europa.jpg", // Picos de Europa — vaca pastando, cumbres calizas y lago de fondo (Covadonga) "assets/region-albarracin.jpg" // Sierra de Albarracín — castillo de Peracense, piedra rojiza ]; return (

{t.regions.lead}

{t.regions.cards.map((c, i) => (
{c.do}
{`Paisaje

{c.name}

{c.text}

{c.cheeses.map((ch, j) => {ch})}
))}
); } // ─────────── FAQs ─────────── function FAQs({ t }) { const [open, setOpen] = useState(0); return (
{t.faqs.items.map((item, i) => (
{item.a}
))}
); } // ─────────── Contact ─────────── function Contact({ t, lang }) { const [status, setStatus] = useState(null); // null | 'sending' | 'thanks' | 'error' const formRef = useRef(null); const handleSubmit = async (e) => { e.preventDefault(); setStatus("sending"); const data = new FormData(formRef.current); try { // Envío vía Web3Forms (https://web3forms.com). // La access_key viaja como input hidden dentro del
. const resp = await fetch("https://api.web3forms.com/submit", { method: "POST", body: data }); const json = await resp.json().catch(() => ({})); if (resp.ok && json.success) { setStatus("thanks"); formRef.current.reset(); } else { setStatus("error"); } } catch (err) { setStatus("error"); } }; return (

{t.contact.lead}

{/* Web3Forms — endpoint: https://api.web3forms.com/submit */} {/* Honeypot anti-spam (Web3Forms ignora envíos con este campo relleno) */}
{status === "thanks" &&
{t.contact.form.thanks}
} {status === "error" &&
{t.contact.form.error}
}
{t.contact.labels.email}
spanishheritagefood@gmail.com
{t.contact.labels.based}
{t.contact.based_val}
{t.contact.labels.phone}
{t.contact.phone_val}
); } // ─────────── Footer ─────────── function Footer({ t }) { return ( ); } Object.assign(window, { Nav, Hero, Marquee, About, Process, Regions, FAQs, Contact, Footer, ArchOrnament, OliveBranch, useReveal });