/* global React */ /* PHASE 1 (Brand Kit V2) — nav + hero + footer + yakujihō dev banner. Taglines + body copy in this file are CLIENT-CONFIRMED and pending yakujihō (pharmacist/legal) review. Do not auto-soften. */ // Resolve asset path: products/*.html are one level deeper than root pages. const MM_ASSET_PREFIX = (typeof window !== 'undefined' && window.location.pathname.indexOf('/products/') !== -1) ? '../assets/' : 'assets/'; const { useState } = React; // ============= Yakujihō dev banner — removed per client request ============= function YakujihouFlag() { return null; } // Resolve home page path: products/*.html are one level deeper than root pages. const MM_HOME_HREF = (typeof window !== 'undefined' && window.location.pathname.indexOf('/products/') !== -1) ? '../index.html' : 'index.html'; // True when we're currently on the home page (so anchor links can smooth-scroll // in-place instead of triggering a navigation). function mmIsHomePage() { if (typeof window === 'undefined') return false; var p = window.location.pathname; if (p.indexOf('/products/') !== -1) return false; if (/\/shop\.html$/.test(p)) return false; if (/\/intro(\.backup-[\w-]+)?\.html$/.test(p)) return false; return true; } function mmNavLinkClick(e, anchor) { if (!mmIsHomePage()) return; // let browser navigate to home + hash var el = document.getElementById(anchor); if (!el) return; e.preventDefault(); el.scrollIntoView({ behavior: 'smooth', block: 'start' }); history.replaceState(null, '', '#' + anchor); } // ============= FloatingNav ============= function FloatingNav({ onShop }) { // Order: WORLD / MONSTERS / COLLAB / CONTACT const links = ['WORLD', 'MONSTERS', 'COLLAB', 'CONTACT']; return ( ); } // ============= Hero (Brand Kit V2) ============= // Confirmed tagline: EAT YOUR PAIN. (brand red) / 悩みを食い尽くせ。 (ink) // REMOVED: FUEL THE FUTURE. / 未来に、燃料を。 // // Opening overlay video: plays ONCE on page load, covers the hero, // then fades out → the existing hero (title/actions/scrollhint) fades in. // The video has the same headline burned into it; the existing hero // is hidden (opacity:0) during playback so the two never co-exist. // // After the initial play, clicking the hero background replays the // intro. Clicks on inner / READ THE WORLD ↘ {hideOverlay ? null : ( )} ); } // ============= Footer (Brand Kit V2) ============= function Footer() { // Footer nav: WORLD/MONSTERS/COLLAB/HOME sections live only on the home page, // so on inner pages (shop / products) prefix them with the home-page path. // CONTACT (#contact) is the footer itself — present on every page — so it // stays a local anchor. SHOP points at shop.html with the right depth. const mmFootHomePrefix = mmIsHomePage() ? '' : MM_HOME_HREF; const mmFootShopHref = (typeof window !== 'undefined' && window.location.pathname.indexOf('/products/') !== -1) ? '../shop.html' : 'shop.html'; const cols = [ { l: 'HOME', h: mmFootHomePrefix + '#top' }, { l: 'MONSTERS', h: mmFootHomePrefix + '#monsters' }, { l: 'WORLD', h: mmFootHomePrefix + '#world' }, { l: 'COLLAB', h: mmFootHomePrefix + '#collab' }, { l: 'CONTACT', h: '#contact' }, { l: 'SHOP', h: mmFootShopHref }, ]; return ( ); } Object.assign(window, { YakujihouFlag, FloatingNav, Hero, Footer });