// content.jsx — Maison Gifts
// Bilingual content (EN / ID), language context, and shared UI atoms.

// ─────────────────────────────────────────────────────────────
// LANGUAGE CONTEXT
// ─────────────────────────────────────────────────────────────
const LangContext = React.createContext({ lang: 'en', setLang: () => {} });
const useLang = () => React.useContext(LangContext);
const useContent = () => {
  const { lang } = useLang();
  return CONTENT[lang] || CONTENT.en;
};

// ─────────────────────────────────────────────────────────────
// CONTENT — EN
// ─────────────────────────────────────────────────────────────
const CONTENT = {
  en: {
    nav: {
      links: [
        { id: 'top', label: 'Home' },
        { id: 'about', label: 'About' },
        { id: 'products', label: 'Products' },
        { id: 'process', label: 'Custom Gifts' },
        { id: 'corporate', label: 'Corporate & Event' },
        { id: 'gallery', label: 'Gallery' },
        { id: 'contact', label: 'Contact' },
      ],
      quote: 'Request a Quotation',
    },

    hero: {
      overline: '',
      titleA: 'Premium Gifts for Meaningful Moments',
      titleB: '',
      titleC: '',
      sub: 'Maison Gifts creates premium-quality souvenirs, corporate gifts, and custom merchandise for brands, events, destinations, institutions, and loved ones.',
      cta1: 'Request a Quotation',
      cta2: 'View Product Categories',
      photo: 'Signature gift set photography',
      trust: [
        { v: 'Indonesia', l: 'Based in Jakarta' },
        { v: 'Custom', l: 'Design & Branding' },
        { v: 'Premium', l: 'Quality, Fair Pricing' },
        { v: 'Bulk-ready', l: 'Corporate & Events' },
      ],
    },

    about: {
      overline: 'About Maison Gifts',
      title: 'Curated Gifts for Every Occasion',
      body: [
        'Maison Gifts helps clients create meaningful and well-presented gifts through thoughtful product selection, customizable design, and reliable sourcing.',
        'From corporate hampers and event merchandise to destination souvenirs and personal gifts, we deliver products that balance premium quality, affordability, and practical value.',
      ],
      points: [
        'Thoughtful product selection',
        'Customizable design & branding',
        'Reliable sourcing & production',
      ],
      photo: 'Atelier & packaging detail',
    },

    categories: {
      overline: 'What We Make',
      title: 'Product Categories',
      sub: 'Custom gifts, souvenirs, and branded merchandise — produced to a premium standard across Indonesia.',
      items: [
        { icon: 'gift', name: 'Corporate Gifts', desc: 'Premium gift sets for companies, clients, employees, and business events.' },
        { icon: 'landmark', name: 'Custom Souvenirs', desc: 'Place-based souvenirs for tourism, museums, cities, and institutions.' },
        { icon: 'megaphone', name: 'Event Merchandise', desc: 'Custom products for conferences, campaigns, launches, and government events.' },
        { icon: 'heart-handshake', name: 'Personalized Gifts', desc: 'Custom gifts for loved ones, special occasions, and memorable moments.' },
        { icon: 'package', name: 'Premium Hampers', desc: 'Curated gift boxes with elegant packaging and flexible product combinations.' },
        { icon: 'box', name: 'Packaging & Branding', desc: 'Custom boxes, bags, sleeves, cards, labels, and branded presentation.' },
      ],
    },

    why: {
      overline: 'Why Maison Gifts',
      title: 'Premium Look, Practical Value',
      sub: 'Elegant gifting that works as hard as your budget does.',
      items: [
        { icon: 'sliders-horizontal', name: 'Customizable Products', desc: 'Tailored designs, branding, packaging, and product combinations.' },
        { icon: 'gem', name: 'Affordable Premium Quality', desc: 'Elegant products designed to look premium while staying cost-efficient.' },
        { icon: 'building-2', name: 'Corporate-Ready Service', desc: 'Suitable for companies, institutions, government events, and bulk orders.' },
        { icon: 'sparkles', name: 'Curated Presentation', desc: 'Every item is selected and arranged to create a thoughtful gifting experience.' },
      ],
    },

    corporate: {
      overline: 'Corporate & Event Solutions',
      title: 'Trusted for companies, institutions & government events',
      body: 'From corporate gifts in Jakarta to custom merchandise and event kits nationwide, Maison Gifts is built for organisations that need premium presentation, dependable production, and fair pricing at scale.',
      audiences: [
        'Corporations & brands',
        'Government & institutions',
        'Tourism & destinations',
        'Conferences & launches',
        'Universities & schools',
        'Event organisers',
      ],
      cta: 'Discuss a corporate order',
    },

    process: {
      overline: 'How It Works',
      title: 'A Simple, Guided Process',
      sub: 'From first brief to professional delivery — we handle the details.',
      steps: [
        { name: 'Share Your Brief', desc: 'Tell us your event, quantity, budget, timeline, and design needs.' },
        { name: 'Product Recommendation', desc: 'We suggest suitable gift and merchandise options.' },
        { name: 'Design & Customization', desc: 'We prepare branding, packaging, and visual direction.' },
        { name: 'Sampling & Production', desc: 'We coordinate samples, production, and quality checking.' },
        { name: 'Delivery', desc: 'Your finished gifts are packed and delivered professionally.' },
      ],
    },

    collections: {
      overline: 'Gallery',
      title: 'Our Past Project',
      sub: 'A selection of signature kits — every collection is fully customizable to your brand.',
      filters: [
        { id: 'all', label: 'All' },
        { id: 'corporate', label: 'Corporate' },
        { id: 'souvenir', label: 'Souvenir' },
        { id: 'event', label: 'Event' },
        { id: 'personal', label: 'Personal' },
      ],
      items: [
        { name: 'Jakarta Heritage Gift Set', tag: 'Souvenir', cat: 'souvenir', img: 'maison/img/plate.png', desc: 'Locally-inspired keepsakes celebrating the capital — ideal for guests and delegations.' },
        { name: 'T-Shirt Merchandise', tag: 'Merchandise', cat: 'corporate', img: 'maison/img/tshirt-jakarta.png', desc: 'Custom-printed apparel and city tees for campaigns, teams, and destination merchandise.' },
        { name: 'Exclusive Gift', tag: 'Corporate', cat: 'corporate', img: 'maison/img/passport-holder.png', desc: 'A refined gift for stakeholders, executives, and valued accounts.' },
        { name: 'Event and MICE Souvenirs', tag: 'Event', cat: 'event', img: 'maison/img/tumbler-bamboo.png', desc: 'Sustainable, reusable pieces for conferences, exhibitions, and MICE programs.' },
        { name: 'Travel & Tourism Souvenir Kit', tag: 'Souvenir', cat: 'souvenir', img: 'maison/img/luggage-tag.png', desc: 'Destination merchandise for tourism boards, hotels, and attractions.' },
        { name: 'Iconic Personalized Gift', tag: 'Personal', cat: 'personal', img: 'maison/img/usb.png', desc: 'A made-to-order keepsake for birthdays, weddings, and milestone moments.' },
      ],
    },

    ctaBand: {
      title: 'Need custom gifts for your next event?',
      body: 'Send us your brief and we will help you create a suitable gift solution based on your budget, quantity, and timeline.',
      button: 'Contact Maison Gifts',
    },

    contact: {
      overline: 'Get in Touch',
      title: 'Request a Quotation',
      sub: 'Tell us about your gift. Our team typically responds within one business day.',
      channels: {
        whatsappLabel: 'WhatsApp',
        whatsapp: '+62 812 8288 0550',
        emailLabel: 'Email',
        email: 'maisongifts.id@gmail.com',
        instagramLabel: 'Instagram',
        instagram: '@maisongifts.id',
        locationLabel: 'Office',
        location: 'West Jakarta, Indonesia',
      },
      steps: ['Your Details', 'Your Project', 'Your Brief'],
      stepHint: ['Tell us who to reach.', 'Help us scope your order.', 'Anything else we should know?'],
      fields: {
        name: 'Full name', company: 'Company / Organisation', email: 'Email address', phone: 'Phone / WhatsApp',
        productType: 'Product type', quantity: 'Estimated quantity', budget: 'Budget range', timeline: 'Timeline',
        message: 'Your brief',
      },
      placeholders: {
        name: 'e.g. Andi Pratama', company: 'e.g. PT Nusantara Jaya', email: 'name@company.co.id', phone: '+62 812 0000 0000',
        message: 'Describe your event, theme, and any product ideas…',
      },
      options: {
        productType: ['Corporate Gifts', 'Custom Souvenirs', 'Event Merchandise', 'Personalized Gifts', 'Premium Hampers', 'Packaging & Branding', 'Not sure yet'],
        quantity: ['Under 50', '50 – 200', '200 – 500', '500 – 1,000', '1,000+'],
        budget: ['Under Rp 10 million', 'Rp 10 – 50 million', 'Rp 50 – 150 million', 'Rp 150 million +', 'Flexible'],
        timeline: ['Within 2 weeks', '2 – 4 weeks', '1 – 2 months', 'Flexible'],
      },
      back: 'Back',
      next: 'Continue',
      submit: 'Submit Request',
      required: 'Please complete the highlighted fields.',
      review: 'Review',
      success: {
        title: 'Request received',
        body: 'WhatsApp should now be opening with your brief ready to send. If it did not, use the button below. Our team typically responds within one business day.',
        again: 'Send another request',
        open: 'Open WhatsApp',
      },
    },

    footer: {
      tagline: 'Premium Gifts for Meaningful Moments',
      blurb: 'Premium souvenirs, corporate gifts, and custom merchandise — designed and produced in Jakarta, Indonesia.',
      colExplore: 'Explore',
      colCategories: 'Categories',
      colContact: 'Contact',
      rights: '© 2026 Maison Gifts. All rights reserved.',
      keywords: 'Custom gifts Indonesia · Corporate gifts Jakarta · Souvenir Indonesia · Premium hampers · Branded merchandise',
    },
  },

  // ─────────────────────────────────────────────────────────────
  // CONTENT — ID (Bahasa Indonesia)
  // ─────────────────────────────────────────────────────────────
  id: {
    nav: {
      links: [
        { id: 'top', label: 'Beranda' },
        { id: 'about', label: 'Tentang' },
        { id: 'products', label: 'Produk' },
        { id: 'process', label: 'Custom Gift' },
        { id: 'corporate', label: 'Korporat & Acara' },
        { id: 'gallery', label: 'Galeri' },
        { id: 'contact', label: 'Kontak' },
      ],
      quote: 'Minta Penawaran',
    },

    hero: {
      overline: 'Hadiah Premium · Merchandise Custom · Jakarta, Indonesia',
      titleA: 'Hadiah Bermakna.',
      titleB: 'Solusi Custom.',
      titleC: 'Kesan Mendalam.',
      sub: 'Maison Gifts menghadirkan souvenir berkualitas premium, hadiah korporat, dan merchandise custom untuk brand, acara, destinasi, institusi, dan orang terkasih.',
      cta1: 'Minta Penawaran',
      cta2: 'Lihat Kategori Produk',
      photo: 'Foto gift set unggulan',
      trust: [
        { v: 'Jakarta', l: 'Berbasis di Indonesia' },
        { v: 'Custom', l: 'Desain & branding' },
        { v: 'Premium', l: 'Kualitas, harga wajar' },
        { v: 'Partai', l: 'Korporat & acara' },
      ],
    },

    about: {
      overline: 'Tentang Maison Gifts',
      title: 'Hadiah Terkurasi untuk Setiap Momen',
      body: [
        'Maison Gifts membantu klien menciptakan hadiah yang bermakna dan tersaji rapi melalui pemilihan produk yang cermat, desain yang dapat dikustomisasi, dan sumber produksi yang andal.',
        'Mulai dari hamper korporat dan merchandise acara hingga souvenir destinasi dan hadiah personal, kami menghadirkan produk yang menyeimbangkan kualitas premium, harga terjangkau, dan nilai guna.',
      ],
      points: [
        'Pemilihan produk yang cermat',
        'Desain & branding custom',
        'Sumber & produksi yang andal',
      ],
      photo: 'Detail atelier & kemasan',
    },

    categories: {
      overline: 'Yang Kami Buat',
      title: 'Kategori Produk',
      sub: 'Hadiah custom, souvenir, dan merchandise ber-brand — diproduksi dengan standar premium di seluruh Indonesia.',
      items: [
        { icon: 'gift', name: 'Hadiah Korporat', desc: 'Gift set premium untuk perusahaan, klien, karyawan, dan acara bisnis.' },
        { icon: 'landmark', name: 'Souvenir Custom', desc: 'Souvenir bertema lokal untuk pariwisata, museum, kota, dan institusi.' },
        { icon: 'megaphone', name: 'Merchandise Acara', desc: 'Produk custom untuk konferensi, kampanye, peluncuran, dan acara pemerintah.' },
        { icon: 'heart-handshake', name: 'Hadiah Personal', desc: 'Hadiah custom untuk orang terkasih, momen spesial, dan kenangan berharga.' },
        { icon: 'package', name: 'Hamper Premium', desc: 'Gift box terkurasi dengan kemasan elegan dan kombinasi produk yang fleksibel.' },
        { icon: 'box', name: 'Kemasan & Branding', desc: 'Box, tas, sleeve, kartu, label custom, dan penyajian ber-brand.' },
      ],
    },

    why: {
      overline: 'Mengapa Maison Gifts',
      title: 'Tampil Premium, Nilai Praktis',
      sub: 'Gifting elegan yang bekerja sekeras anggaran Anda.',
      items: [
        { icon: 'sliders-horizontal', name: 'Produk Dapat Dikustom', desc: 'Desain, branding, kemasan, dan kombinasi produk yang disesuaikan.' },
        { icon: 'gem', name: 'Premium yang Terjangkau', desc: 'Produk elegan yang tampak premium namun tetap efisien biaya.' },
        { icon: 'building-2', name: 'Siap untuk Korporat', desc: 'Cocok untuk perusahaan, institusi, acara pemerintah, dan order partai besar.' },
        { icon: 'sparkles', name: 'Penyajian Terkurasi', desc: 'Setiap item dipilih dan ditata untuk menciptakan pengalaman gifting yang berkesan.' },
      ],
    },

    corporate: {
      overline: 'Solusi Korporat & Acara',
      title: 'Dipercaya perusahaan, institusi & acara pemerintah',
      body: 'Dari hadiah korporat di Jakarta hingga merchandise custom dan kit acara di seluruh Indonesia, Maison Gifts dirancang untuk organisasi yang membutuhkan penyajian premium, produksi andal, dan harga wajar dalam skala besar.',
      audiences: [
        'Korporasi & brand',
        'Pemerintah & institusi',
        'Pariwisata & destinasi',
        'Konferensi & peluncuran',
        'Universitas & sekolah',
        'Event organizer',
      ],
      cta: 'Diskusikan order korporat',
    },

    process: {
      overline: 'Cara Kerja',
      title: 'Proses yang Sederhana & Terpandu',
      sub: 'Dari brief awal hingga pengiriman profesional — detailnya kami tangani.',
      steps: [
        { name: 'Bagikan Brief Anda', desc: 'Ceritakan acara, jumlah, anggaran, tenggat, dan kebutuhan desain Anda.' },
        { name: 'Rekomendasi Produk', desc: 'Kami menyarankan opsi hadiah dan merchandise yang sesuai.' },
        { name: 'Desain & Kustomisasi', desc: 'Kami menyiapkan branding, kemasan, dan arah visual.' },
        { name: 'Sampling & Produksi', desc: 'Kami mengoordinasikan sampel, produksi, dan pengecekan kualitas.' },
        { name: 'Pengiriman', desc: 'Hadiah Anda dikemas dan dikirim secara profesional.' },
      ],
    },

    collections: {
      overline: 'Galeri',
      title: 'Proyek Kami Sebelumnya',
      sub: 'Pilihan kit andalan — setiap koleksi sepenuhnya dapat dikustom sesuai brand Anda.',
      filters: [
        { id: 'all', label: 'Semua' },
        { id: 'corporate', label: 'Korporat' },
        { id: 'souvenir', label: 'Souvenir' },
        { id: 'event', label: 'Acara' },
        { id: 'personal', label: 'Personal' },
      ],
      items: [
        { name: 'Jakarta Heritage Gift Set', tag: 'Souvenir', cat: 'souvenir', img: 'maison/img/plate.png', desc: 'Cinderamata bernuansa lokal yang merayakan ibu kota — ideal untuk tamu dan delegasi.' },
        { name: 'T-Shirt Merchandise', tag: 'Merchandise', cat: 'corporate', img: 'maison/img/tshirt-jakarta.png', desc: 'Apparel cetak custom dan kaos kota untuk kampanye, tim, dan merchandise destinasi.' },
        { name: 'Exclusive Gift', tag: 'Korporat', cat: 'corporate', img: 'maison/img/passport-holder.png', desc: 'Hadiah elegan untuk pemangku kepentingan, eksekutif, dan akun penting.' },
        { name: 'Event and MICE Souvenirs', tag: 'Acara', cat: 'event', img: 'maison/img/tumbler-bamboo.png', desc: 'Item berkelanjutan dan guna ulang untuk konferensi, pameran, dan program MICE.' },
        { name: 'Travel & Tourism Souvenir Kit', tag: 'Souvenir', cat: 'souvenir', img: 'maison/img/luggage-tag.png', desc: 'Merchandise destinasi untuk dinas pariwisata, hotel, dan atraksi.' },
        { name: 'Iconic Personalized Gift', tag: 'Personal', cat: 'personal', img: 'maison/img/usb.png', desc: 'Cinderamata pesanan khusus untuk ulang tahun, pernikahan, dan momen istimewa.' },
      ],
    },

    ctaBand: {
      title: 'Butuh hadiah custom untuk acara Anda berikutnya?',
      body: 'Kirimkan brief Anda dan kami akan membantu menyusun solusi hadiah yang sesuai dengan anggaran, jumlah, dan tenggat Anda.',
      button: 'Hubungi Maison Gifts',
    },

    contact: {
      overline: 'Hubungi Kami',
      title: 'Minta Penawaran',
      sub: 'Ceritakan kebutuhan hadiah Anda. Tim kami biasanya merespons dalam satu hari kerja.',
      channels: {
        whatsappLabel: 'WhatsApp',
        whatsapp: '+62 812 8288 0550',
        emailLabel: 'Email',
        email: 'maisongifts.id@gmail.com',
        instagramLabel: 'Instagram',
        instagram: '@maisongifts.id',
        locationLabel: 'Kantor',
        location: 'Jakarta Barat, Indonesia',
      },
      steps: ['Data Anda', 'Proyek Anda', 'Brief Anda'],
      stepHint: ['Beri tahu kami kontak Anda.', 'Bantu kami memahami order Anda.', 'Ada hal lain yang perlu kami tahu?'],
      fields: {
        name: 'Nama lengkap', company: 'Perusahaan / Organisasi', email: 'Alamat email', phone: 'Telepon / WhatsApp',
        productType: 'Jenis produk', quantity: 'Perkiraan jumlah', budget: 'Rentang anggaran', timeline: 'Tenggat waktu',
        message: 'Brief Anda',
      },
      placeholders: {
        name: 'mis. Andi Pratama', company: 'mis. PT Nusantara Jaya', email: 'nama@perusahaan.co.id', phone: '+62 812 0000 0000',
        message: 'Jelaskan acara, tema, dan ide produk Anda…',
      },
      options: {
        productType: ['Hadiah Korporat', 'Souvenir Custom', 'Merchandise Acara', 'Hadiah Personal', 'Hamper Premium', 'Kemasan & Branding', 'Belum yakin'],
        quantity: ['Di bawah 50', '50 – 200', '200 – 500', '500 – 1.000', '1.000+'],
        budget: ['Di bawah Rp 10 juta', 'Rp 10 – 50 juta', 'Rp 50 – 150 juta', 'Rp 150 juta +', 'Fleksibel'],
        timeline: ['Dalam 2 minggu', '2 – 4 minggu', '1 – 2 bulan', 'Fleksibel'],
      },
      back: 'Kembali',
      next: 'Lanjut',
      submit: 'Kirim Permintaan',
      required: 'Mohon lengkapi kolom yang ditandai.',
      review: 'Ringkasan',
      success: {
        title: 'Permintaan diterima',
        body: 'WhatsApp akan terbuka dengan brief Anda yang siap dikirim. Jika tidak, gunakan tombol di bawah. Tim kami biasanya merespons dalam satu hari kerja.',
        again: 'Kirim permintaan lain',
        open: 'Buka WhatsApp',
      },
    },

    footer: {
      tagline: 'Hadiah Bermakna. Solusi Custom. Kesan Mendalam.',
      blurb: 'Souvenir premium, hadiah korporat, dan merchandise custom — dirancang dan diproduksi di Jakarta, Indonesia.',
      colExplore: 'Jelajahi',
      colCategories: 'Kategori',
      colContact: 'Kontak',
      rights: '© 2026 Maison Gifts. Hak cipta dilindungi.',
      keywords: 'Custom gifts Indonesia · Corporate gifts Jakarta · Souvenir Indonesia · Hamper premium · Merchandise ber-brand',
    },
  },
};

// ─────────────────────────────────────────────────────────────
// SHARED ATOMS
// ─────────────────────────────────────────────────────────────

// Smooth-scroll helper
const scrollToId = (id) => {
  if (id === 'top') { window.scrollTo({ top: 0, behavior: 'smooth' }); return; }
  const el = document.getElementById(id);
  if (el) {
    const y = el.getBoundingClientRect().top + window.pageYOffset - 76;
    window.scrollTo({ top: y, behavior: 'smooth' });
  }
};

// Section overline label
const Overline = ({ children, tone = 'burgundy', center }) => (
  <div style={{
    fontFamily: 'var(--font-sans)', fontSize: 12, fontWeight: 500,
    letterSpacing: '0.22em', textTransform: 'uppercase',
    color: tone === 'cream' ? 'rgba(246,241,230,0.62)' : 'var(--burgundy)',
    display: 'flex', alignItems: 'center', gap: 12,
    justifyContent: center ? 'center' : 'flex-start',
  }}>
    <span style={{ width: 26, height: 1, background: tone === 'cream' ? 'rgba(246,241,230,0.4)' : 'var(--burgundy)', display: 'inline-block' }}></span>
    {children}
  </div>
);

// Lucide icon (renders <i data-lucide> then App calls lucide.createIcons)
const Icon = ({ name, size = 22, color = 'currentColor', stroke = 1.5, style }) => (
  <i data-lucide={name} style={{ width: size, height: size, color, strokeWidth: stroke, display: 'inline-flex', ...style }}></i>
);

// Elegant labeled photo placeholder (user swaps in real photography later)
const PhotoSlot = ({ label, ratio = '4 / 3', dark = false, radius = 'var(--radius-lg)', style }) => (
  <div style={{
    position: 'relative', aspectRatio: ratio, width: '100%',
    background: dark ? 'var(--navy-900)' : 'var(--cream-deep)',
    border: dark ? '1px solid rgba(246,241,230,0.12)' : '1px solid var(--grey-line)',
    borderRadius: radius, overflow: 'hidden',
    display: 'flex', alignItems: 'center', justifyContent: 'center',
    ...style,
  }}>
    {/* monogram watermark */}
    <span style={{
      position: 'absolute', fontFamily: 'var(--font-display)', fontWeight: 600,
      fontSize: 'clamp(120px, 22vw, 240px)', lineHeight: 1,
      color: dark ? 'rgba(246,241,230,0.05)' : 'rgba(122,42,56,0.06)',
      userSelect: 'none', pointerEvents: 'none',
    }}>M</span>
    <div style={{ position: 'relative', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10 }}>
      <span style={{
        display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
        width: 44, height: 44, borderRadius: 'var(--radius-full)',
        border: dark ? '1px solid rgba(246,241,230,0.25)' : '1px solid var(--burgundy)',
        color: dark ? 'rgba(246,241,230,0.7)' : 'var(--burgundy)',
      }}>
        <i data-lucide="image" style={{ width: 18, height: 18, strokeWidth: 1.5 }}></i>
      </span>
      <span style={{
        fontFamily: 'var(--font-sans)', fontSize: 11, fontWeight: 500,
        letterSpacing: '0.16em', textTransform: 'uppercase',
        color: dark ? 'rgba(246,241,230,0.5)' : 'var(--grey)',
      }}>{label}</span>
    </div>
  </div>
);

// Real-photo frame — shows uploaded photography, falls back to PhotoSlot if no src.
const Img = ({ src, label, ratio = '4 / 3', dark = false, radius = 'var(--radius-lg)', objectPosition = 'center', style }) => {
  if (!src) return <PhotoSlot label={label} ratio={ratio} dark={dark} radius={radius} style={style} />;
  return (
    <div style={{
      position: 'relative', aspectRatio: ratio, width: '100%',
      borderRadius: radius, overflow: 'hidden',
      border: dark ? '1px solid rgba(246,241,230,0.12)' : '1px solid var(--grey-line)',
      background: dark ? 'var(--navy-900)' : 'var(--cream-deep)',
      ...style,
    }}>
      <img src={src} alt={label || ''} style={{
        position: 'absolute', inset: 0, width: '100%', height: '100%',
        objectFit: 'cover', objectPosition, display: 'block',
      }} />
    </div>
  );
};

// Image map (language-independent)
const IMG = {
  hero:        'maison/img/hero-heritage.png',
  heroInset:   'maison/img/tumbler-betawi.png',
  about:       'maison/img/about-banner.png',
  corporate:   'maison/img/umbrella.png',
  logo:        'maison/img/logo.png',
};

// Reveal-on-scroll wrapper
const Reveal = ({ children, delay = 0, as = 'div', style, ...rest }) => {
  const ref = React.useRef(null);
  const [shown, setShown] = React.useState(false);
  React.useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach(e => { if (e.isIntersecting) { setShown(true); io.disconnect(); } });
    }, { threshold: 0.12, rootMargin: '0px 0px -40px 0px' });
    io.observe(el);
    return () => io.disconnect();
  }, []);
  const Tag = as;
  return (
    <Tag ref={ref} style={{
      opacity: shown ? 1 : 0,
      transform: shown ? 'none' : 'translateY(18px)',
      transition: `opacity 0.7s ease ${delay}ms, transform 0.7s cubic-bezier(0.16,1,0.3,1) ${delay}ms`,
      ...style,
    }} {...rest}>{children}</Tag>
  );
};

Object.assign(window, {
  CONTENT, LangContext, useLang, useContent,
  scrollToId, Overline, Icon, PhotoSlot, Img, IMG, Reveal,
});
