/* Shared helpers: Nav, Reveal wrapper, Footer */ const { useEffect, useRef, useState } = React; function useReveal() { useEffect(() => { const els = document.querySelectorAll('.reveal'); const io = new IntersectionObserver((entries) => { entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add('visible'); io.unobserve(e.target); } }); }, { threshold: 0.12, rootMargin: '0px 0px -60px 0px' }); els.forEach((el) => io.observe(el)); return () => io.disconnect(); }, []); } function Nav({ brandKanji = "誇", brandEn = "HOKORI KIMONO", links, ctaLabel = "オーダー相談", accent = "gold", current = "product", variant = "men" }) { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 60); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const productHref = variant === "women" ? "HOKORI KIMONO - Women.html" : "HOKORI KIMONO - Men.html"; const defaultLinks = links || [ { label: "PRODUCT", href: productHref, key: "product" }, { label: "ABOUT", href: "about.html", key: "about" }, { label: "ESTIMATE", href: "estimate.html", key: "estimate" }, { label: "CONTACT", href: "contact.html", key: "contact" }, ]; const ctaHref = current === "product" ? "#order" : "contact.html#form"; return ( ); } function Footer({ brandKanji = "誇", brandEn = "HOKORI KIMONO", tagline = "誇りを、身に纏う。", variant = "men" }) { const productHref = variant === "women" ? "HOKORI KIMONO - Women.html" : "HOKORI KIMONO - Men.html"; const otherProductHref = variant === "women" ? "HOKORI KIMONO - Men.html" : "HOKORI KIMONO - Women.html"; const otherProductLabel = variant === "women" ? "紳士の和装 — Men" : "大和撫子の装い — Women"; return ( ); } /* Inline SVGs — simple line icons, gold stroke via currentColor */ const IconClock = () => ( ); const IconSparkle = () => ( ); const IconCoin = () => ( ); const IconLeaf = () => ( ); Object.assign(window, { useReveal, Nav, Footer, IconClock, IconSparkle, IconCoin, IconLeaf });