const { useState, useEffect, useCallback, useContext, createContext, useRef } = React;

// ─── ROUTER ─────────────────────────────────────────────────────────────────
const RouterCtx = createContext({ path: '/', navigate: () => {} });
const useRouter = () => useContext(RouterCtx);

const RouterProvider = ({ children }) => {
  const [path, setPath] = useState(window.location.pathname);
  const navigate = useCallback((to) => {
    history.pushState(null, '', to);
    setPath(to);
    window.scrollTo(0, 0);
  }, []);
  useEffect(() => {
    const onPop = () => { setPath(window.location.pathname); window.scrollTo(0, 0); };
    window.addEventListener('popstate', onPop);
    return () => window.removeEventListener('popstate', onPop);
  }, []);
  return <RouterCtx.Provider value={{ path, navigate }}>{children}</RouterCtx.Provider>;
};

// ─── HOOKS ──────────────────────────────────────────────────────────────────
const PAGE_TITLES = {
  '/': '株式会社隼 / HAYABUSA Inc.',
  '/service/sns': 'SNS PRODUCTION | 株式会社隼',
  '/service/entertainment': 'ENTERTAINMENT | 株式会社隼',
  '/about': '会社概要 | 株式会社隼',
  '/contact': 'お問い合わせ | 株式会社隼',
  '/contact/thanks': 'お問い合わせ完了 | 株式会社隼',
  '/privacy': 'プライバシーポリシー | 株式会社隼',
};

const 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 });
    els.forEach(el => io.observe(el));
    return () => io.disconnect();
  }, []);
};

const useCountUp = (target, duration, trigger) => {
  const [count, setCount] = useState(0);
  useEffect(() => {
    if (!trigger) return;
    let startTs = null;
    const tick = (ts) => {
      if (!startTs) startTs = ts;
      const p = Math.min((ts - startTs) / duration, 1);
      const ease = 1 - Math.pow(1 - p, 3);
      setCount(Math.round(ease * target));
      if (p < 1) requestAnimationFrame(tick);
    };
    requestAnimationFrame(tick);
  }, [trigger, target, duration]);
  return count;
};

const useIsMobile = () => {
  const [v, setV] = useState(window.innerWidth < 820);
  useEffect(() => {
    const fn = () => setV(window.innerWidth < 820);
    window.addEventListener('resize', fn);
    return () => window.removeEventListener('resize', fn);
  }, []);
  return v;
};

// ─── LOADING SCREEN ──────────────────────────────────────────────────────────
const LoadingScreen = ({ onDone }) => {
  const [pct, setPct] = useState(0);
  const [out, setOut] = useState(false);
  useEffect(() => {
    let startTs = null;
    const dur = 1900;
    const tick = (ts) => {
      if (!startTs) startTs = ts;
      const t = Math.min((ts - startTs) / dur, 1);
      const ease = t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
      setPct(Math.floor(ease * 100));
      if (t < 1) requestAnimationFrame(tick);
      else setTimeout(() => { setOut(true); setTimeout(onDone, 780); }, 140);
    };
    const id = requestAnimationFrame(tick);
    return () => cancelAnimationFrame(id);
  }, []);
  return (
    <div style={{
      position: 'fixed', inset: 0, zIndex: 9999, background: 'var(--ink)',
      display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center',
      opacity: out ? 0 : 1,
      transform: out ? 'translateY(-10px)' : 'translateY(0)',
      transition: out ? 'opacity 0.78s cubic-bezier(0.4,0,0.2,1),transform 0.78s cubic-bezier(0.4,0,0.2,1)' : 'none',
      pointerEvents: out ? 'none' : 'auto',
    }}>
      {/* Grid */}
      <div aria-hidden="true" style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(27,93,230,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(27,93,230,0.04) 1px,transparent 1px)', backgroundSize: '48px 48px', pointerEvents: 'none' }} />
      {/* Scan line */}
      <div aria-hidden="true" style={{ position: 'absolute', inset: 0, overflow: 'hidden', pointerEvents: 'none' }}>
        <div style={{ position: 'absolute', left: 0, right: 0, height: 1, background: 'linear-gradient(90deg,transparent 0%,rgba(27,93,230,0.5) 30%,rgba(91,163,212,0.7) 50%,rgba(27,93,230,0.5) 70%,transparent 100%)', animation: 'scanLine 2.8s ease-in-out infinite' }} />
      </div>
      {/* Logo */}
      <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12, marginBottom: 60, animation: 'fadeInUp 0.9s cubic-bezier(0.16,1,0.3,1) both' }}>
        <img src="assets/hayabusa_logo_transparent.png?v=6" alt="HAYABUSA" style={{ height: 54, filter: 'invert(1)', opacity: 0.88 }} />
        <div style={{ fontFamily: 'var(--font-en)', fontSize: 24, letterSpacing: '0.32em', color: 'rgba(255,255,255,0.92)', fontWeight: 700 }}>HAYABUSA Inc.</div>
        <div style={{ fontFamily: 'var(--font-en)', fontSize: 10, letterSpacing: '0.48em', color: 'rgba(255,255,255,0.28)', fontWeight: 700 }}>SNS PRODUCTION</div>
      </div>
      {/* Progress */}
      <div style={{ width: 200, position: 'relative' }}>
        <div style={{ height: 1, background: 'rgba(255,255,255,0.08)' }}>
          <div style={{ position: 'absolute', top: 0, left: 0, height: '100%', width: pct + '%', background: 'linear-gradient(90deg,var(--blue),#5BA3D4)', boxShadow: '0 0 12px rgba(27,93,230,0.8)', transition: 'width 0.05s linear' }} />
        </div>
        <div style={{ marginTop: 16, display: 'flex', justifyContent: 'space-between' }}>
          <div style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.38em', color: 'rgba(255,255,255,0.32)', fontWeight: 700 }}>{String(pct).padStart(3, '0')}</div>
          <div style={{ fontFamily: 'var(--font-en)', fontSize: 10, letterSpacing: '0.18em', color: 'rgba(255,255,255,0.16)' }}>LOADING</div>
        </div>
      </div>
    </div>
  );
};

// ─── MARQUEE BAND ────────────────────────────────────────────────────────────
const MarqueeBand = ({ dark = false }) => {
  const items = ['SNS PRODUCTION', 'YOUTUBE', 'TIKTOK', 'LINE', 'HAYABUSA INC.', 'SNS STRATEGY', 'ENTERTAINMENT', 'CONTENT CREATION', 'BRAND GROWTH', 'FUKUOKA JAPAN'];
  const all = [...items, ...items];
  return (
    <div style={{ overflow: 'hidden', background: dark ? 'var(--ink-2)' : 'var(--blue)', padding: '13px 0', userSelect: 'none' }} aria-hidden="true">
      <div className="marquee-track" style={{ display: 'flex', width: 'max-content', animation: 'marqueeLTR 28s linear infinite' }}>
        {all.map((item, i) => (
          <React.Fragment key={i}>
            <span style={{ fontFamily: 'var(--font-en)', fontSize: 12, letterSpacing: '0.28em', fontWeight: 700, color: dark ? 'rgba(255,255,255,0.26)' : 'rgba(255,255,255,0.92)', padding: '0 22px', whiteSpace: 'nowrap' }}>{item}</span>
            <span style={{ color: dark ? 'rgba(255,255,255,0.12)' : 'rgba(255,255,255,0.4)', fontSize: 9, display: 'flex', alignItems: 'center' }}>✦</span>
          </React.Fragment>
        ))}
      </div>
    </div>
  );
};

// ─── PARTICLE CANVAS ─────────────────────────────────────────────────────────
const ParticleCanvas = ({ isMobile }) => {
  useEffect(() => {
    const canvas = document.getElementById('hayabusa-hero-canvas');
    if (!canvas) return;
    const ctx = canvas.getContext('2d');
    let raf;
    const resize = () => { canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; };
    resize();
    window.addEventListener('resize', resize);
    const N = isMobile ? 20 : 48;
    const MAX_D = isMobile ? 85 : 125;
    const pts = Array.from({ length: N }, () => ({
      x: Math.random() * canvas.width, y: Math.random() * canvas.height,
      vx: (Math.random() - 0.5) * 0.2, vy: (Math.random() - 0.5) * 0.2,
      r: Math.random() * 1.5 + 0.7,
    }));
    const draw = () => {
      ctx.clearRect(0, 0, canvas.width, canvas.height);
      for (let i = 0; i < N; i++) {
        for (let j = i + 1; j < N; j++) {
          const dx = pts[i].x - pts[j].x, dy = pts[i].y - pts[j].y;
          const d = Math.hypot(dx, dy);
          if (d < MAX_D) {
            ctx.beginPath(); ctx.moveTo(pts[i].x, pts[i].y); ctx.lineTo(pts[j].x, pts[j].y);
            ctx.strokeStyle = `rgba(27,93,230,${(1 - d / MAX_D) * 0.15})`; ctx.lineWidth = 1; ctx.stroke();
          }
        }
        const p = pts[i];
        ctx.beginPath(); ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2);
        ctx.fillStyle = 'rgba(27,93,230,0.2)'; ctx.fill();
        p.x += p.vx; p.y += p.vy;
        if (p.x < 0 || p.x > canvas.width) p.vx *= -1;
        if (p.y < 0 || p.y > canvas.height) p.vy *= -1;
      }
      raf = requestAnimationFrame(draw);
    };
    draw();
    return () => { cancelAnimationFrame(raf); window.removeEventListener('resize', resize); };
  }, [isMobile]);
  return <canvas id="hayabusa-hero-canvas" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', zIndex: 1, pointerEvents: 'none' }} />;
};

// ─── SCRAMBLE TEXT ───────────────────────────────────────────────────────────
const ScrambleText = ({ text, style }) => {
  const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
  const rand = () => CHARS[Math.floor(Math.random() * CHARS.length)];
  const [disp, setDisp] = useState(() => text.split('').map(c => c === ' ' ? ' ' : rand()));
  useEffect(() => {
    const handles = [];
    text.split('').forEach((char, i) => {
      if (char === ' ') return;
      const steps = 5 + i + Math.floor(Math.random() * 4);
      let n = 0;
      const t = setTimeout(() => {
        const iv = setInterval(() => {
          n++;
          if (n >= steps) { setDisp(p => { const a = [...p]; a[i] = char; return a; }); clearInterval(iv); }
          else setDisp(p => { const a = [...p]; a[i] = rand(); return a; });
        }, 52);
        handles.push(iv);
      }, i * 42 + 60);
      handles.push(t);
    });
    return () => handles.forEach(h => { clearInterval(h); clearTimeout(h); });
  }, [text]);
  return <span style={style}>{disp.join('')}</span>;
};

// ─── STATS BAND (count-up) ───────────────────────────────────────────────────
const StatsBand = ({ isMobile }) => {
  const [visible, setVisible] = useState(false);
  useEffect(() => {
    const el = document.getElementById('stats-trigger');
    if (!el) return;
    const io = new IntersectionObserver(([e]) => { if (e.isIntersecting) { setVisible(true); io.disconnect(); } }, { threshold: 0.25 });
    io.observe(el);
    return () => io.disconnect();
  }, []);
  const n1 = useCountUp(32000, 1800, visible);
  const n2 = useCountUp(6, 1200, visible);
  const n3 = useCountUp(5, 1100, visible);
  const n4 = useCountUp(763, 1700, visible);
  const stats = [
    { num: n1.toLocaleString(), unit: '人', label: '登録者数成長', sub: 'YouTubeチャンネル1年間' },
    { num: n2, unit: 'ヶ月', label: '収益化最速期間', sub: '保険営業チャンネル' },
    { num: n3, unit: '件/月', label: 'LINE経由面談数', sub: '医療キャリア支援' },
    { num: n4, unit: '万回', label: '最高動画再生数', sub: 'TikTok / Instagram' },
  ];
  return (
    <div id="stats-trigger" style={{ display: 'grid', gridTemplateColumns: isMobile ? 'repeat(2,1fr)' : 'repeat(4,1fr)', gap: 1, background: 'var(--line)', borderRadius: 16, overflow: 'hidden', marginBottom: 56, boxShadow: '0 4px 24px rgba(14,27,44,0.06)' }}>
      {stats.map((s, i) => (
        <div key={i} style={{ background: 'var(--white)', padding: isMobile ? '26px 14px' : '36px 28px', textAlign: 'center', animation: visible ? `statPop 0.6s cubic-bezier(0.16,1,0.3,1) ${i * 0.1}s both` : 'none' }}>
          <div style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 'clamp(28px,7vw,42px)' : 'clamp(38px,4vw,58px)', fontWeight: 700, color: 'var(--blue)', lineHeight: 1, letterSpacing: '-0.01em', marginBottom: 4 }}>
            {s.num}<span style={{ fontSize: '0.42em', letterSpacing: 0, marginLeft: '0.08em', color: 'var(--ink-3)', fontFamily: 'var(--font-jp)', fontWeight: 700 }}>{s.unit}</span>
          </div>
          <div style={{ fontSize: isMobile ? 11 : 13, fontWeight: 700, color: 'var(--ink)', marginBottom: 4 }}>{s.label}</div>
          <div style={{ fontSize: 11, color: 'var(--ink-4)' }}>{s.sub}</div>
        </div>
      ))}
    </div>
  );
};

// ─── DECORATIONS ────────────────────────────────────────────────────────────
const CircuitTrace = ({ style, variant = 'a' }) => {
  const paths = {
    a: (
      <g stroke="#1B5DE6" strokeWidth="1" fill="none" strokeLinecap="round">
        <path d="M0 30 L80 30 L100 18 L200 18 L220 30 L340 30 L360 14 L500 14 L520 24 L640 24" />
        <path d="M0 56 L60 56 L80 44 L180 44 L200 56 L300 56" strokeOpacity="0.6" />
        <circle cx="80" cy="30" r="2.4" fill="#1B5DE6" />
        <circle cx="220" cy="30" r="2.4" fill="#1B5DE6" />
        <circle cx="360" cy="14" r="2.4" fill="#1B5DE6" />
        <circle cx="520" cy="24" r="2.4" fill="#1B5DE6" />
        <circle cx="640" cy="24" r="3" fill="#fff" stroke="#1B5DE6" strokeWidth="1.5" />
        <circle cx="200" cy="56" r="2.2" fill="#1B5DE6" opacity="0.6" />
      </g>
    ),
    b: (
      <g stroke="#1B5DE6" strokeWidth="1" fill="none" strokeLinecap="round" opacity="0.5">
        <path d="M0 20 L120 20 L140 8 L260 8 L280 20 L420 20" />
        <circle cx="140" cy="8" r="2" fill="#1B5DE6" />
        <circle cx="280" cy="20" r="2" fill="#1B5DE6" />
        <circle cx="420" cy="20" r="2.6" fill="#fff" stroke="#1B5DE6" strokeWidth="1.4" />
      </g>
    ),
  };
  return (
    <svg className="circuit-trace" style={style} viewBox="0 0 640 70" preserveAspectRatio="none" aria-hidden="true">
      {paths[variant]}
    </svg>
  );
};

// ─── ICONS ──────────────────────────────────────────────────────────────────
const IconTarget = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <circle cx="24" cy="24" r="18" /><circle cx="24" cy="24" r="11" /><circle cx="24" cy="24" r="3.5" fill="currentColor" />
    <line x1="24" y1="2" x2="24" y2="9" /><line x1="24" y1="39" x2="24" y2="46" />
    <line x1="2" y1="24" x2="9" y2="24" /><line x1="39" y1="24" x2="46" y2="24" />
  </svg>
);
const IconPen = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <rect x="8" y="6" width="26" height="36" rx="2" />
    <line x1="14" y1="16" x2="28" y2="16" /><line x1="14" y1="22" x2="28" y2="22" /><line x1="14" y1="28" x2="22" y2="28" />
    <path d="M30 30 L40 20 L36 16 L26 26 L24 32 Z" fill="white" stroke="currentColor" />
  </svg>
);
const IconPlay = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <circle cx="24" cy="24" r="20" />
    <polygon points="20,16 20,32 34,24" fill="currentColor" stroke="none" />
  </svg>
);
const IconChat = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <path d="M6 10 L30 10 L30 28 L18 28 L12 34 L12 28 L6 28 Z" />
    <path d="M18 18 L42 18 L42 36 L38 36 L32 42 L32 36 L24 36 L24 30" />
    <circle cx="34" cy="27" r="1.5" fill="currentColor" />
    <circle cx="38" cy="27" r="1.5" fill="currentColor" />
  </svg>
);
const IconRoute = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <circle cx="10" cy="38" r="4" /><circle cx="38" cy="10" r="4" />
    <path d="M10 34 Q10 24 24 24 Q38 24 38 14" />
    <path d="M34 6 L42 10 L34 14" fill="currentColor" stroke="currentColor" strokeWidth="1" />
  </svg>
);
const IconStar = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <polygon points="24,4 29,18 44,18 32,27 37,42 24,33 11,42 16,27 4,18 19,18" />
  </svg>
);
const IconUsers = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <circle cx="18" cy="16" r="8" />
    <path d="M4 42 C4 32 10 28 18 28 C26 28 32 32 32 42" />
    <circle cx="34" cy="14" r="6" />
    <path d="M34 26 C40 26 44 30 44 40" />
  </svg>
);
const IconMusic = () => (
  <svg viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
    <path d="M18 38 L18 16 L40 10 L40 32" />
    <circle cx="14" cy="38" r="4" /><circle cx="36" cy="32" r="4" />
    <line x1="18" y1="22" x2="40" y2="16" />
  </svg>
);

// ─── SNS PLATFORM ICONS ──────────────────────────────────────────────────────
const IconYouTube = ({ size = 24 }) => (
  <svg width={size} height={size * 0.71} viewBox="0 0 24 17" fill="#FF0000" aria-label="YouTube">
    <rect width="24" height="17" rx="4" />
    <polygon points="9.5,4.5 9.5,12.5 16.5,8.5" fill="white" />
  </svg>
);
const IconTikTok = ({ size = 22, color = '#000' }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill={color} aria-label="TikTok">
    <path d="M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.27 6.27 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.16 8.16 0 004.77 1.52V6.76a4.85 4.85 0 01-1-.07z" />
  </svg>
);
const IconLINE = ({ size = 24 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="#06C755" aria-label="LINE">
    <path d="M24 10.304c0-5.369-5.383-9.738-12-9.738-6.617 0-12 4.369-12 9.738 0 4.814 4.269 8.846 10.036 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.304z" />
  </svg>
);
const IconInstagram = ({ size = 22 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" aria-label="Instagram">
    <defs>
      <linearGradient id="ig-grad" x1="0%" y1="100%" x2="100%" y2="0%">
        <stop offset="0%" stopColor="#F58529" />
        <stop offset="50%" stopColor="#DD2A7B" />
        <stop offset="100%" stopColor="#8134AF" />
      </linearGradient>
    </defs>
    <path fill="url(#ig-grad)" d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" />
  </svg>
);
const IconXTwitter = ({ size = 20, color = '#000' }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill={color} aria-label="X">
    <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.748l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
  </svg>
);

// ─── PLATFORM BAR ────────────────────────────────────────────────────────────
const PlatformBar = ({ isMobile }) => (
  <div style={{ display: 'flex', alignItems: 'center', gap: isMobile ? 14 : 20, flexWrap: 'wrap', animation: 'fadeIn 1.2s ease 1.1s both' }}>
    <span style={{ fontFamily: 'var(--font-en)', fontSize: 10, letterSpacing: '0.22em', color: 'var(--ink-4)', fontWeight: 700, whiteSpace: 'nowrap' }}>PLATFORMS</span>
    <div style={{ width: 1, height: 14, background: 'var(--line)' }} />
    {[
      { icon: <IconYouTube size={20} />, label: 'YouTube' },
      { icon: <IconTikTok size={18} color="#000" />, label: 'TikTok' },
      { icon: <IconLINE size={18} />, label: 'LINE' },
      { icon: <IconInstagram size={18} />, label: 'Instagram' },
      { icon: <IconXTwitter size={16} color="#000" />, label: 'X' },
    ].map(({ icon, label }) => (
      <div key={label} title={label} style={{ display: 'flex', alignItems: 'center', opacity: 0.7, transition: 'opacity 0.2s' }}
        onMouseEnter={e => e.currentTarget.style.opacity = 1}
        onMouseLeave={e => e.currentTarget.style.opacity = 0.7}
      >{icon}</div>
    ))}
  </div>
);

// ─── PHONE MOCKUP ────────────────────────────────────────────────────────────
const PhoneMockup = ({ children, tilt = 0 }) => (
  <div style={{
    width: 160, height: 320, flexShrink: 0,
    background: 'linear-gradient(145deg,#2e2e2e,#1a1a1a)',
    borderRadius: 30, padding: '8px 5px',
    boxShadow: '0 28px 56px rgba(0,0,0,0.35),0 0 0 1.5px rgba(255,255,255,0.07),inset 0 1px 0 rgba(255,255,255,0.1)',
    transform: `rotate(${tilt}deg)`, transition: 'transform 0.4s ease',
  }}>
    <div style={{ position: 'relative', width: '100%', height: '100%', borderRadius: 24, overflow: 'hidden', background: '#fff' }}>
      {/* Dynamic island */}
      <div style={{ position: 'absolute', top: 6, left: '50%', transform: 'translateX(-50%)', width: 40, height: 10, background: '#1a1a1a', borderRadius: 10, zIndex: 5 }} />
      {children}
    </div>
  </div>
);

const YouTubeScreenMock = () => (
  <div style={{ width: '100%', height: '100%', background: '#fff', display: 'flex', flexDirection: 'column', paddingTop: 20 }}>
    {/* YT Header */}
    <div style={{ padding: '8px 10px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
        <IconYouTube size={16} />
        <span style={{ fontFamily: 'sans-serif', fontSize: 8, fontWeight: 700, color: '#000' }}>YouTube</span>
      </div>
    </div>
    {/* Video thumbnails */}
    {[
      { label: '50代の資産運用…', views: '42.3万回視聴', color: 'linear-gradient(135deg,#1B5DE6,#5BA3D4)' },
      { label: '保険営業チャンネル', views: '15万回視聴', color: 'linear-gradient(135deg,#0A3FB8,#1B5DE6)' },
    ].map((v, i) => (
      <div key={i} style={{ display: 'flex', gap: 6, padding: '6px 8px', borderBottom: '1px solid #f5f5f5' }}>
        <div style={{ width: 72, height: 44, background: v.color, borderRadius: 4, flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
          <div style={{ width: 16, height: 16, borderRadius: 8, background: 'rgba(255,255,255,0.25)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            <div style={{ width: 0, height: 0, borderTop: '4px solid transparent', borderBottom: '4px solid transparent', borderLeft: '8px solid white', marginLeft: 2 }} />
          </div>
        </div>
        <div style={{ flex: 1 }}>
          <div style={{ height: 5, background: '#e8e8e8', borderRadius: 3, marginBottom: 3, width: '90%' }} />
          <div style={{ height: 5, background: '#e8e8e8', borderRadius: 3, marginBottom: 5, width: '70%' }} />
          <div style={{ fontSize: 7, color: '#1B5DE6', fontWeight: 700, fontFamily: 'sans-serif' }}>{v.views}</div>
          <div style={{ fontSize: 6, color: '#888', fontFamily: 'sans-serif' }}>{v.label}</div>
        </div>
      </div>
    ))}
    {/* Subscriber highlight */}
    <div style={{ margin: '8px 8px 0', padding: '8px 10px', background: 'linear-gradient(135deg,rgba(27,93,230,0.06),rgba(91,163,212,0.1))', borderRadius: 8, border: '1px solid rgba(27,93,230,0.12)' }}>
      <div style={{ fontSize: 7, color: '#888', fontFamily: 'sans-serif', marginBottom: 2 }}>登録者数</div>
      <div style={{ fontFamily: 'sans-serif', fontWeight: 900, fontSize: 18, color: '#1B5DE6', lineHeight: 1 }}>35,500<span style={{ fontSize: 8, fontWeight: 400 }}>人</span></div>
      <div style={{ fontSize: 7, color: '#06C755', fontFamily: 'sans-serif', marginTop: 2, fontWeight: 700 }}>↑ 3.55万人（1年間）</div>
    </div>
  </div>
);

const TikTokScreenMock = () => (
  <div style={{ width: '100%', height: '100%', background: '#000', display: 'flex', flexDirection: 'column', paddingTop: 20 }}>
    {/* Full-screen style video */}
    <div style={{ flex: 1, background: 'linear-gradient(180deg,#1B5DE6 0%,#0A3FB8 100%)', position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 0 2px 0' }}>
      {/* Play indicator */}
      <div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
        <div style={{ width: 32, height: 32, borderRadius: 16, background: 'rgba(255,255,255,0.2)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
          <div style={{ width: 0, height: 0, borderTop: '7px solid transparent', borderBottom: '7px solid transparent', borderLeft: '13px solid white', marginLeft: 3 }} />
        </div>
      </div>
      {/* Right side actions */}
      <div style={{ position: 'absolute', right: 6, bottom: 20, display: 'flex', flexDirection: 'column', gap: 10, alignItems: 'center' }}>
        {['❤️','💬','↗️'].map((em, i) => (
          <div key={i} style={{ textAlign: 'center' }}>
            <div style={{ fontSize: 14 }}>{em}</div>
            <div style={{ fontSize: 6, color: 'rgba(255,255,255,0.8)', fontFamily: 'sans-serif' }}>{['763万','4.2万','8.1万'][i]}</div>
          </div>
        ))}
      </div>
      {/* Bottom info */}
      <div style={{ position: 'absolute', bottom: 10, left: 8, right: 30 }}>
        <div style={{ fontSize: 7, color: 'rgba(255,255,255,0.9)', fontFamily: 'sans-serif', fontWeight: 700, marginBottom: 2 }}>@healthcare_store</div>
        <div style={{ fontSize: 6, color: 'rgba(255,255,255,0.7)', fontFamily: 'sans-serif' }}>最高763万回再生バズ動画 🔥</div>
      </div>
    </div>
    {/* TikTok bottom nav */}
    <div style={{ padding: '6px 0', display: 'flex', justifyContent: 'space-around', background: '#111' }}>
      {['🏠','🔍','➕','📩','👤'].map((ic, i) => (
        <span key={i} style={{ fontSize: i === 2 ? 18 : 12, opacity: i === 0 ? 1 : 0.5 }}>{ic}</span>
      ))}
    </div>
  </div>
);

// ─── CHARTS ─────────────────────────────────────────────────────────────────
const ChartGrowth = ({ beforeLabel, afterLabel }) => (
  <div style={{ display: 'flex', alignItems: 'center', gap: 12, paddingTop: 8 }}>
    {[
      { pct: 5, label: beforeLabel, start: '開始', bg: 'var(--ink-5)', tc: 'var(--ink-2)' },
      { pct: 100, label: afterLabel, start: '1年後', bg: 'linear-gradient(90deg,#5BA3D4,#1B5DE6)', tc: 'var(--blue)' },
    ].map((bar, i) => (
      <React.Fragment key={i}>
        {i === 1 && <span style={{ color: 'var(--blue)', fontSize: 18 }}>→</span>}
        <div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 6 }}>
          <div style={{ height: 14, background: 'var(--line)', borderRadius: 999, position: 'relative', overflow: 'hidden' }}>
            <span style={{ position: 'absolute', left: 0, top: 0, height: '100%', width: bar.pct + '%', background: bar.bg, borderRadius: 999 }} />
          </div>
          <div style={{ display: 'flex', justifyContent: 'space-between' }}>
            <span style={{ fontSize: 11, color: 'var(--ink-4)' }}>{bar.start}</span>
            <span style={{ fontSize: 11, color: bar.tc, fontWeight: 700 }}>{bar.label}</span>
          </div>
        </div>
      </React.Fragment>
    ))}
  </div>
);

const ChartProgression = ({ steps, finalLabel, footnote }) => (
  <div style={{ paddingTop: 8 }}>
    <div style={{ display: 'flex', alignItems: 'center', gap: 6, justifyContent: 'space-between' }}>
      {steps.map((s, i) => (
        <React.Fragment key={i}>
          <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 4 }}>
            <span style={{ width: 10, height: 10, borderRadius: 999, background: s.active ? 'var(--blue)' : 'var(--line-strong)' }} />
            <span style={{ fontSize: 10, fontWeight: s.active ? 700 : 400, color: s.active ? 'var(--blue)' : 'var(--ink-4)' }}>{s.label}</span>
          </div>
          {i < steps.length - 1 && <span style={{ flex: 1, height: 1, borderTop: '1px dashed var(--line-strong)' }} />}
        </React.Fragment>
      ))}
    </div>
    <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 14, fontSize: 11, color: 'var(--ink-4)' }}>
      <span>{footnote}</span>
      <span style={{ color: 'var(--blue)', fontWeight: 700 }}>{finalLabel}</span>
    </div>
  </div>
);

const ChartTop5 = ({ values }) => {
  const max = Math.max(...values.map(v => v.num));
  return (
    <div style={{ paddingTop: 8 }}>
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 6, alignItems: 'flex-end', height: 100 }}>
        {values.map((v, i) => (
          <div key={i} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 4, height: '100%', justifyContent: 'flex-end' }}>
            <div style={{
              width: '100%', height: ((v.num / max) * 80) + '%',
              backgroundColor: i === 0 ? 'var(--blue)' : i === 1 ? 'rgba(27,93,230,0.45)' : i === 2 ? 'rgba(27,93,230,0.32)' : i === 3 ? 'rgba(27,93,230,0.22)' : 'rgba(27,93,230,0.14)',
              borderRadius: 4,
            }} />
            <span style={{ fontSize: 11, fontWeight: 700, color: i === 0 ? 'var(--blue)' : 'var(--ink-3)' }}>{v.label}</span>
          </div>
        ))}
      </div>
      <div style={{ marginTop: 10, display: 'flex', justifyContent: 'space-between', fontSize: 10, color: 'var(--ink-4)', letterSpacing: '0.06em' }}>
        <span>バズ動画トップ5</span>
        <span style={{ fontFamily: 'var(--font-en)', fontWeight: 700 }}>TOTAL HITS</span>
      </div>
    </div>
  );
};

// ─── NAV ────────────────────────────────────────────────────────────────────
const Nav = ({ scrolled, isMobile, menuOpen, setMenuOpen }) => {
  const { path, navigate } = useRouter();
  const navLinks = [
    { label: 'HOME', href: '/' },
    { label: 'SNS', href: '/service/sns' },
    { label: 'ENTERTAINMENT', href: '/service/entertainment' },
    { label: 'ABOUT', href: '/about' },
  ];
  const isActive = (href) => href === '/' ? path === '/' : path.startsWith(href);
  const go = (href) => { navigate(href); setMenuOpen(false); };

  return (
    <>
      <nav style={{
        position: 'fixed', top: 0, left: 0, right: 0, zIndex: 100,
        padding: isMobile ? '12px 20px' : (scrolled ? '12px 32px' : '18px 40px'),
        transition: 'all 0.35s ease',
        background: scrolled || (isMobile && menuOpen) ? 'rgba(255,255,255,0.92)' : 'transparent',
        backdropFilter: scrolled ? 'blur(14px) saturate(140%)' : 'none',
        borderBottom: scrolled ? '1px solid var(--line)' : '1px solid transparent',
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
      }}>
        <a href="/" onClick={(e) => { e.preventDefault(); go('/'); }}
          style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
          <img src="assets/hayabusa_logo_transparent.png?v=6" alt="HAYABUSA Inc." style={{ height: isMobile ? 28 : 36 }} />
          <span style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 16 : 22, letterSpacing: '0.16em', color: 'var(--ink)', lineHeight: 1, fontWeight: 700 }}>HAYABUSA Inc.</span>
        </a>

        {isMobile ? (
          <button onClick={() => setMenuOpen(!menuOpen)}
            style={{ width: 32, height: 32, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 5 }} aria-label="Menu">
            <span style={{ width: 22, height: 2, background: 'var(--ink)', transition: 'transform 0.3s', transform: menuOpen ? 'rotate(45deg) translate(5px,5px)' : 'none' }} />
            <span style={{ width: 22, height: 2, background: 'var(--ink)', opacity: menuOpen ? 0 : 1, transition: 'opacity 0.3s' }} />
            <span style={{ width: 22, height: 2, background: 'var(--ink)', transition: 'transform 0.3s', transform: menuOpen ? 'rotate(-45deg) translate(5px,-5px)' : 'none' }} />
          </button>
        ) : (
          <div style={{ display: 'flex', gap: 26, alignItems: 'center' }}>
            {navLinks.map(({ label, href }) => {
              const active = isActive(href);
              return (
                <a key={label} href={href} onClick={(e) => { e.preventDefault(); go(href); }}
                  style={{ fontFamily: 'var(--font-en)', fontSize: 13, letterSpacing: '0.22em', color: active ? 'var(--blue)' : 'var(--ink-2)', fontWeight: active ? 700 : 500, padding: '6px 0', position: 'relative', transition: 'color 0.2s' }}
                  onMouseEnter={e => { if (!active) e.currentTarget.style.color = 'var(--blue)'; }}
                  onMouseLeave={e => { if (!active) e.currentTarget.style.color = 'var(--ink-2)'; }}>
                  {label}
                  {active && <span style={{ position: 'absolute', left: 0, right: 0, bottom: -4, height: 2, background: 'var(--blue)' }} />}
                </a>
              );
            })}
            <a href="/contact" onClick={(e) => { e.preventDefault(); go('/contact'); }}
              style={{ fontFamily: 'var(--font-en)', fontSize: 13, letterSpacing: '0.22em', padding: '10px 22px', border: '1.5px solid var(--blue)', color: 'var(--blue)', borderRadius: 999, transition: 'all 0.3s', marginLeft: 6, display: 'inline-flex', gap: 8, alignItems: 'center', fontWeight: 700 }}
              onMouseEnter={e => { e.currentTarget.style.background = 'var(--blue)'; e.currentTarget.style.color = 'var(--white)'; }}
              onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = 'var(--blue)'; }}
            >CONTACT <span>→</span></a>
          </div>
        )}
      </nav>

      {isMobile && menuOpen && (
        <div style={{ position: 'fixed', top: 56, left: 0, right: 0, bottom: 0, zIndex: 99, background: 'var(--white)', padding: '32px 28px', display: 'flex', flexDirection: 'column', gap: 4, overflowY: 'auto' }}>
          {navLinks.map(({ label, href }) => (
            <a key={label} href={href} onClick={(e) => { e.preventDefault(); go(href); }}
              style={{ padding: '20px 4px', fontFamily: 'var(--font-en)', fontSize: 26, letterSpacing: '0.18em', borderBottom: '1px solid var(--line)', color: isActive(href) ? 'var(--blue)' : 'var(--ink)' }}>
              {label}
            </a>
          ))}
          <a href="/contact" onClick={(e) => { e.preventDefault(); go('/contact'); }}
            style={{ marginTop: 28, padding: 18, background: 'var(--blue)', color: 'var(--white)', textAlign: 'center', fontFamily: 'var(--font-en)', fontSize: 14, letterSpacing: '0.22em', borderRadius: 999 }}>
            CONTACT US →
          </a>
        </div>
      )}
    </>
  );
};

// ─── FOOTER ─────────────────────────────────────────────────────────────────
const Footer = ({ isMobile }) => {
  const { navigate } = useRouter();
  const go = (href) => (e) => { e.preventDefault(); navigate(href); };
  const linkStyle = { fontSize: 13, color: 'rgba(255,255,255,0.55)', transition: 'color 0.2s', display: 'block', marginBottom: 10 };
  const hoverOn = e => e.currentTarget.style.color = '#fff';
  const hoverOff = e => e.currentTarget.style.color = 'rgba(255,255,255,0.55)';
  return (
    <footer style={{ background: 'var(--ink)', color: 'var(--white)', padding: isMobile ? '48px 20px 32px' : '64px 0 36px' }}>
      <div className="container">
        {/* Top row: brand + nav columns + SNS */}
        <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr 1fr auto', gap: isMobile ? 36 : 48, marginBottom: 40 }}>
          {/* Brand */}
          <div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 10 }}>
              <img src="assets/hayabusa_logo_transparent.png?v=6" alt="HAYABUSA" style={{ height: 30, filter: 'invert(1)' }} />
              <span style={{ fontFamily: 'var(--font-en)', fontSize: 18, letterSpacing: '0.16em', fontWeight: 700 }}>HAYABUSA Inc.</span>
            </div>
            <p style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.35)', fontWeight: 700, marginBottom: 16 }}>SNS PRODUCTION</p>
            <p style={{ fontSize: 12, color: 'rgba(255,255,255,0.35)', lineHeight: 1.8 }}>福岡県福岡市<br />info@hayabusa-inc.com</p>
          </div>
          {/* SERVICE */}
          <div>
            <p style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.35)', fontWeight: 700, marginBottom: 16 }}>SERVICE</p>
            <a href="/service/sns" onClick={go('/service/sns')} style={linkStyle} onMouseEnter={hoverOn} onMouseLeave={hoverOff}>SNS プロダクション</a>
            <a href="/service/entertainment" onClick={go('/service/entertainment')} style={linkStyle} onMouseEnter={hoverOn} onMouseLeave={hoverOff}>エンターテインメント</a>
          </div>
          {/* COMPANY */}
          <div>
            <p style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.35)', fontWeight: 700, marginBottom: 16 }}>COMPANY</p>
            <a href="/about" onClick={go('/about')} style={linkStyle} onMouseEnter={hoverOn} onMouseLeave={hoverOff}>会社概要</a>
            <a href="/contact" onClick={go('/contact')} style={linkStyle} onMouseEnter={hoverOn} onMouseLeave={hoverOff}>お問い合わせ</a>
            <a href="/privacy" onClick={go('/privacy')} style={linkStyle} onMouseEnter={hoverOn} onMouseLeave={hoverOff}>プライバシーポリシー</a>
          </div>
          {/* SNS icons */}
          <div>
            <p style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.35)', fontWeight: 700, marginBottom: 16 }}>FOLLOW US</p>
            <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>
              {[
                { name: 'YouTube', icon: <IconYouTube size={16} /> },
                { name: 'TikTok', icon: <IconTikTok size={16} color="#fff" /> },
                { name: 'LINE', icon: <IconLINE size={16} /> },
                { name: 'Instagram', icon: <IconInstagram size={16} /> },
                { name: 'X', icon: <IconXTwitter size={14} color="#fff" /> },
              ].map(({ name, icon }) => (
                <a key={name} href="#" aria-label={name} style={{ width: 36, height: 36, borderRadius: 999, border: '1px solid rgba(255,255,255,0.18)', display: 'flex', alignItems: 'center', justifyContent: 'center', transition: 'all 0.25s' }}
                  onMouseEnter={e => { e.currentTarget.style.background = 'var(--blue)'; e.currentTarget.style.borderColor = 'var(--blue)'; e.currentTarget.style.transform = 'translateY(-2px)'; }}
                  onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.18)'; e.currentTarget.style.transform = 'translateY(0)'; }}
                >{icon}</a>
              ))}
            </div>
          </div>
        </div>
        {/* Bottom bar */}
        <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', paddingTop: 20, borderTop: '1px solid rgba(255,255,255,0.1)' }}>
          <p style={{ fontSize: 11, color: 'rgba(255,255,255,0.28)', letterSpacing: '0.04em' }}>© {new Date().getFullYear()} HAYABUSA Inc. All Rights Reserved.</p>
        </div>
      </div>
    </footer>
  );
};

// ─── CTA SECTION ────────────────────────────────────────────────────────────
const CTASection = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <section style={{ position: 'relative', overflow: 'hidden' }}>
      <div style={{ position: 'absolute', inset: 0, zIndex: 0, backgroundImage: 'url(mockups/bg_06_contact_footer.png)', backgroundSize: 'cover', backgroundPosition: 'center' }} />
      <div className="container reveal" style={{ position: 'relative', zIndex: 2, textAlign: 'center', padding: isMobile ? '80px 20px' : '120px 56px' }}>
        <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(24px,6vw,32px)' : 'clamp(40px,4.4vw,64px)', marginBottom: 18 }}>
          <span style={{ fontSize: '1.05em' }}>共</span><span style={{ fontSize: '0.78em' }}>に</span>
          <span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span>
          <span className="h-blue">
            <span style={{ fontSize: '1.0em' }}>本気</span><span style={{ fontSize: '0.7em' }}>で</span>
            <span style={{ fontSize: '1.15em' }}>羽ばたく</span>
          </span>
          <span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span>
        </h2>
        <p style={{ fontSize: isMobile ? 13 : 15, color: 'var(--ink-3)', marginBottom: 36, lineHeight: 1.95 }}>
          ご相談・ご質問・お見積りなど、お気軽にお問い合わせください。
        </p>
        <a href="/contact" onClick={(e) => { e.preventDefault(); navigate('/contact'); }}
          className="glow-cta"
          style={{ display: 'inline-flex', alignItems: 'center', gap: 12, padding: '16px 40px', background: 'var(--blue)', color: 'var(--white)', fontWeight: 700, fontSize: 15, borderRadius: 999, transition: 'all 0.3s' }}
          onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-3px)'; e.currentTarget.style.animationPlayState = 'paused'; e.currentTarget.style.boxShadow = '0 18px 40px rgba(27,93,230,0.48)'; }}
          onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.animationPlayState = 'running'; e.currentTarget.style.boxShadow = ''; }}
        >無料相談をする <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
      </div>
    </section>
  );
};

// ─── PAGE HERO (inner pages) ─────────────────────────────────────────────────
const PageHero = ({ label, title, subtitle, isMobile }) => (
  <section style={{ minHeight: isMobile ? 260 : 340, paddingTop: isMobile ? 120 : 160, paddingBottom: isMobile ? 56 : 72, position: 'relative', overflow: 'hidden', display: 'flex', alignItems: 'center', background: 'linear-gradient(180deg,#FFFFFF 0%,#E8F1FA 100%)' }}>
    <div style={{ position: 'absolute', inset: 0, zIndex: 0, backgroundImage: 'url(mockups/bg_01_hero.png)', backgroundSize: 'cover', backgroundPosition: 'center right', opacity: 0.35 }} />
    {!isMobile && <>
      <CircuitTrace style={{ top: '22%', left: '4%', width: '36%', height: 70 }} variant="a" />
      <CircuitTrace style={{ bottom: '18%', right: '4%', width: '26%', height: 50 }} variant="b" />
    </>}
    <div className="container" style={{ position: 'relative', zIndex: 2 }}>
      <span className="label-line">{label}</span>
      <h1 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,13vw,76px)' : 'clamp(90px,9.5vw,148px)', marginBottom: 16, letterSpacing: '0.02em' }}>{title}</h1>
      <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)', maxWidth: 580, lineHeight: 1.85 }}>{subtitle}</p>
    </div>
  </section>
);

// ═══════════════════════════════════════════════════════════════════
// HOME PAGE
// ═══════════════════════════════════════════════════════════════════
const Hero = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <section id="top" style={{ minHeight: '100vh', position: 'relative', overflow: 'hidden', paddingTop: isMobile ? 100 : 120, paddingBottom: 60, display: 'flex', alignItems: 'center', background: 'linear-gradient(180deg,#FFFFFF 0%,#E8F1FA 100%)' }}>
      <div style={{ position: 'absolute', inset: 0, zIndex: 0, backgroundImage: 'url(mockups/bg_01_hero.png)', backgroundSize: 'cover', backgroundPosition: 'center right' }} />
      <ParticleCanvas isMobile={isMobile} />
      <div aria-hidden="true" style={{ position: 'absolute', zIndex: 2, pointerEvents: 'none', top: '50%', right: isMobile ? '-18%' : '-3%', transform: 'translateY(-50%)', fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 'clamp(280px,75vw,440px)' : 'clamp(560px,52vw,880px)', lineHeight: 0.85, letterSpacing: '-0.04em', color: 'rgba(27,93,230,0.05)', userSelect: 'none', animation: 'fadeIn 1.6s ease 0.4s both' }}>隼</div>
      {!isMobile && <CircuitTrace style={{ top: '14%', left: '4%', width: '38%', height: 70 }} variant="a" />}
      {!isMobile && <CircuitTrace style={{ top: '70%', right: '3%', width: '34%', height: 50 }} variant="b" />}
      {!isMobile && <CircuitTrace style={{ top: '32%', right: '8%', width: '20%', height: 40, transform: 'scaleX(-1)' }} variant="b" />}
      <div className="container" style={{ position: 'relative', zIndex: 3 }}>
        <div style={{ maxWidth: isMobile ? '100%' : '64%' }}>
          <h1 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(26px,7.5vw,36px)' : 'clamp(36px,3.6vw,56px)', marginBottom: isMobile ? 24 : 30, animation: 'heroSlam 1s cubic-bezier(0.16,1,0.3,1) both', lineHeight: 1.5, whiteSpace: isMobile ? 'normal' : 'nowrap' }}>
            <span style={{ display: 'block' }}>
              <span style={{ fontSize: '1.05em' }}>一度</span><span style={{ fontSize: '0.78em' }}>きりの</span>
              <span style={{ fontSize: '1.05em' }}>人生</span><span style={{ fontSize: '0.78em' }}>に</span>
              <span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span>
            </span>
            <span style={{ display: 'block' }}>
              <span style={{ fontSize: '0.92em' }}>本気</span><span style={{ fontSize: '0.7em' }}>で</span>
              <span className="h-blue" style={{ fontSize: '1.12em' }}>羽ばたく</span>
              <span style={{ fontSize: '0.92em' }}>機会</span><span style={{ fontSize: '0.7em' }}>を</span>
              <span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span>
            </span>
          </h1>
          <div style={{ marginBottom: 22, animation: 'fadeIn 1.2s ease 0.5s both' }}>
            <p style={{ fontSize: isMobile ? 14 : 16, fontWeight: 500, color: 'var(--ink-2)', marginBottom: 4 }}>株式会社隼 / HAYABUSA Inc.</p>
            <ScrambleText text="SNS PRODUCTION" style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 13 : 15, letterSpacing: '0.28em', color: 'var(--blue)', fontWeight: 700 }} />
          </div>
          <p style={{ fontSize: isMobile ? 13 : 14, color: 'var(--ink-3)', lineHeight: 1.95, marginBottom: 36, maxWidth: 480, animation: 'fadeIn 1.2s ease 0.7s both' }}>
            株式会社隼は、YouTube・TikTok・LINEを横断する戦略型SNSプロデュースで、あなたの事業を加速させます。
          </p>
          <div style={{ display: 'flex', gap: 12, flexWrap: 'wrap', animation: 'fadeIn 1.2s ease 0.9s both' }}>
            <a href="/contact" onClick={(e) => { e.preventDefault(); navigate('/contact'); }}
              className="glow-cta"
              style={{ padding: '14px 28px', background: 'var(--blue)', color: 'var(--white)', fontWeight: 700, fontSize: 14, borderRadius: 999, display: 'inline-flex', alignItems: 'center', gap: 12, transition: 'all 0.3s' }}
              onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-3px)'; e.currentTarget.style.animationPlayState = 'paused'; e.currentTarget.style.boxShadow = '0 18px 40px rgba(27,93,230,0.48)'; }}
              onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.animationPlayState = 'running'; e.currentTarget.style.boxShadow = ''; }}
            >お問い合わせ <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
            <a href="/service/sns" onClick={(e) => { e.preventDefault(); navigate('/service/sns'); }}
              style={{ padding: '14px 28px', background: 'var(--white)', color: 'var(--ink)', fontWeight: 700, fontSize: 14, borderRadius: 999, border: '1.5px solid var(--ink)', display: 'inline-flex', alignItems: 'center', gap: 12, transition: 'all 0.3s' }}
              onMouseEnter={e => { e.currentTarget.style.background = 'var(--ink)'; e.currentTarget.style.color = 'var(--white)'; }}
              onMouseLeave={e => { e.currentTarget.style.background = 'var(--white)'; e.currentTarget.style.color = 'var(--ink)'; }}
            >事業を見る <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
          </div>
          <div style={{ marginTop: 28 }}>
            <PlatformBar isMobile={isMobile} />
          </div>
        </div>
      </div>
      {!isMobile && (
        <div style={{ position: 'absolute', bottom: 36, left: '50%', transform: 'translateX(-50%)', zIndex: 3, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 6 }}>
          <span style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.32em', color: 'var(--ink-4)', fontWeight: 700 }}>SCROLL ↓</span>
          <div style={{ width: 1, height: 32, background: 'var(--line)', position: 'relative', overflow: 'hidden' }}>
            <span style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: 8, background: 'var(--blue)', animation: 'scrollDot 1.6s ease-in-out infinite' }} />
          </div>
        </div>
      )}
    </section>
  );
};

const ServiceCard = ({ icon, en, jp, body, delay, href }) => {
  const { navigate } = useRouter();
  return (
    <div className="reveal" style={{ background: 'var(--white)', borderRadius: 14, padding: '32px 24px', boxShadow: '0 4px 20px rgba(14,27,44,0.05),0 1px 3px rgba(14,27,44,0.04)', border: '1px solid var(--line)', display: 'flex', flexDirection: 'column', gap: 16, transition: 'transform 0.3s,box-shadow 0.3s', cursor: 'pointer', transitionDelay: delay, textAlign: 'center' }}
      onClick={() => navigate(href)}
      onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-6px)'; e.currentTarget.style.boxShadow = '0 14px 40px rgba(27,93,230,0.16)'; }}
      onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = '0 4px 20px rgba(14,27,44,0.05),0 1px 3px rgba(14,27,44,0.04)'; }}
    >
      <div style={{ width: 72, height: 72, borderRadius: 20, background: 'linear-gradient(135deg,rgba(27,93,230,0.08),rgba(91,163,212,0.16))', border: '1.5px solid rgba(27,93,230,0.12)', color: 'var(--blue)', alignSelf: 'center', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 14 }}>{icon}</div>
      <div>
        <h3 style={{ fontFamily: 'var(--font-en-2)', fontSize: 19, fontWeight: 700, color: 'var(--ink)', marginBottom: 6, lineHeight: 1.3 }}>{en}</h3>
        <p style={{ fontSize: 12, color: 'var(--blue)', fontWeight: 700 }}>{jp}</p>
      </div>
      <p style={{ fontSize: 12, color: 'var(--ink-3)', lineHeight: 1.95, flex: 1 }}>{body}</p>
      <div style={{ color: 'var(--blue)', fontSize: 18, fontFamily: 'var(--font-en)' }}>→</div>
    </div>
  );
};

const Service = ({ isMobile }) => (
  <section id="service" style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden', background: 'linear-gradient(180deg,#E8F1FA 0%,#FFFFFF 50%,#F4F8FD 100%)' }}>
    <div style={{ position: 'absolute', top: 0, right: 0, width: '45%', height: 320, backgroundImage: 'url(mockups/bg_05_company.png)', backgroundSize: 'cover', backgroundPosition: 'right top', opacity: 0.5, zIndex: 0, pointerEvents: 'none' }} />
    <div className="container" style={{ position: 'relative', zIndex: 3, paddingTop: 40 }}>
      <div className="reveal" style={{ marginBottom: 56 }}>
        <span className="label-line">SERVICE</span>
        <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(60px,16vw,100px)' : 'clamp(120px,12vw,160px)', marginBottom: 16 }}>SERVICE</h2>
        <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)' }}>SNSの力で、ブランドと人をつなぐ。</p>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(4,1fr)', gap: 18 }}>
        <ServiceCard icon={<IconTarget />} en="SNS Strategy" jp="SNS戦略設計" delay="0.05s" body="データ分析と戦略設計で、成果直結するSNS戦略を構築します。" href="/service/sns" />
        <ServiceCard icon={<IconPen />} en="Creative Production" jp="クリエイティブ制作" delay="0.15s" body="ファンの心を動かす、クリエイティブの企画と制作力を発揮します。" href="/service/sns" />
        <ServiceCard icon={<IconPlay />} en="Video / Short-form" jp="動画 / ショートコンテンツ制作" delay="0.25s" body="短尺動画を中心に、拡散力のあるコンテンツを制作します。" href="/service/sns" />
        <ServiceCard icon={<IconChat />} en="Brand Communication" jp="ブランドコミュニケーション" delay="0.35s" body="ファンとの接点を生み、ブランド価値を最大化します。" href="/service/sns" />
      </div>
      {/* Platform showcase */}
      <div className="reveal" style={{ marginTop: isMobile ? 36 : 48, display: 'grid', gridTemplateColumns: isMobile ? 'repeat(2,1fr)' : 'repeat(4,1fr)', gap: 12 }}>
        {[
          { icon: <IconYouTube size={28} />, name: 'YouTube', color: '#FF0000', bg: 'rgba(255,0,0,0.04)', border: 'rgba(255,0,0,0.14)', desc: '動画 / ショート / 収益化' },
          { icon: <IconTikTok size={24} color="#010101" />, name: 'TikTok', color: '#010101', bg: 'rgba(0,0,0,0.03)', border: 'rgba(0,0,0,0.1)', desc: 'ショート / バイラル拡散' },
          { icon: <IconLINE size={26} />, name: 'LINE', color: '#06C755', bg: 'rgba(6,199,85,0.04)', border: 'rgba(6,199,85,0.16)', desc: '公式 / 集客導線設計' },
          { icon: <IconInstagram size={24} />, name: 'Instagram', color: '#DD2A7B', bg: 'rgba(221,42,123,0.04)', border: 'rgba(221,42,123,0.14)', desc: 'リール / フィード / ストーリー' },
        ].map(({ icon, name, color, bg, border, desc }) => (
          <div key={name} style={{ background: bg, border: `1px solid ${border}`, borderRadius: 12, padding: isMobile ? '16px 14px' : '20px 18px', display: 'flex', flexDirection: 'column', gap: 10, alignItems: 'flex-start' }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
              {icon}
              <span style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: 14, color: 'var(--ink)', letterSpacing: '0.04em' }}>{name}</span>
            </div>
            <span style={{ fontSize: 11, color: 'var(--ink-4)', lineHeight: 1.6 }}>{desc}</span>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const MissionVision = ({ isMobile }) => (
  <section style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden', background: 'linear-gradient(180deg,#F4F8FD 0%,#FFFFFF 100%)' }}>
    {!isMobile && <div style={{ position: 'absolute', top: 0, right: 0, width: '40%', height: 280, backgroundImage: 'url(mockups/bg_03_vision_mission.png)', backgroundSize: 'cover', backgroundPosition: 'top right', opacity: 0.6, zIndex: 0, pointerEvents: 'none' }} />}
    <div className="container" style={{ position: 'relative', zIndex: 3 }}>
      <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: isMobile ? 70 : 80, alignItems: 'start', position: 'relative' }}>
        {!isMobile && (
          <div aria-hidden="true" style={{ position: 'absolute', left: '50%', top: -20, bottom: -20, width: 1, background: 'var(--blue-light)', opacity: 0.4, transform: 'translateX(-0.5px)' }}>
            <span style={{ position: 'absolute', top: 0, left: '50%', transform: 'translateX(-50%)', width: 8, height: 8, borderRadius: 999, background: 'var(--blue)' }} />
            <span style={{ position: 'absolute', bottom: 0, left: '50%', transform: 'translateX(-50%)', width: 8, height: 8, borderRadius: 999, background: 'var(--blue)' }} />
          </div>
        )}
        <div className="reveal">
          <span className="label-line">MISSION</span>
          <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(22px,5.6vw,30px)' : 'clamp(34px,3.6vw,52px)', marginBottom: 18, lineHeight: isMobile ? 1.45 : 1.18 }}>
            <span style={{ display: 'block' }}><span style={{ fontSize: '1.05em' }}>一度</span><span style={{ fontSize: '0.78em' }}>きりの</span><span style={{ fontSize: '1.05em' }}>人生</span><span style={{ fontSize: '0.78em' }}>に</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span></span>
            <span style={{ display: 'block' }}><span style={{ fontSize: '0.92em' }}>本気</span><span style={{ fontSize: '0.7em' }}>で</span><span className="h-blue" style={{ fontSize: '1.12em' }}>羽ばたく</span></span>
            <span style={{ display: 'block' }}><span style={{ fontSize: '1.05em' }}>機会</span><span style={{ fontSize: '0.7em' }}>を</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span></span>
          </h2>
          <div style={{ height: 3, width: 80, background: 'var(--blue)', marginBottom: 22 }} />
          <p style={{ fontSize: isMobile ? 13 : 14, color: 'var(--ink-3)', lineHeight: 2 }}>株式会社隼は、YouTube・TikTok・LINEを横断する戦略型SNSプロデュースで、挑戦するすべての人の事業を加速させます。</p>
        </div>
        <div className="reveal" style={{ transitionDelay: '0.15s' }}>
          <span className="label-line">VISION</span>
          <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(22px,5.6vw,30px)' : 'clamp(34px,3.6vw,52px)', marginBottom: 18, lineHeight: isMobile ? 1.45 : 1.18 }}>
            <span style={{ display: 'block' }}><span style={{ fontSize: '1.05em' }}>誰</span><span style={{ fontSize: '0.78em' }}>もが</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span></span>
            <span style={{ display: 'block' }}><span style={{ fontSize: '0.92em' }}>本気</span><span style={{ fontSize: '0.7em' }}>で</span><span className="h-blue" style={{ fontSize: '1.12em' }}>羽ばたける</span></span>
            <span style={{ display: 'block' }}><span style={{ fontSize: '1.05em' }}>場所</span><span style={{ fontSize: '0.78em' }}>であり</span><span style={{ fontSize: '1.0em' }}>続ける</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span></span>
          </h2>
          <div style={{ height: 3, width: 80, background: 'var(--blue)', marginBottom: 22 }} />
          <p style={{ fontSize: isMobile ? 13 : 14, color: 'var(--ink-3)', lineHeight: 2 }}>関わるすべての人が、本気を出せる環境を。隼という場所そのものが、人を羽ばたかせる存在であり続けます。</p>
        </div>
      </div>
    </div>
  </section>
);

const ValueRow = ({ num, en, jpHtml, body, delay, isMobile }) => {
  const [hover, setHover] = useState(false);
  return (
    <div className="reveal"
      onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}
      style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '110px 240px 1fr 1.4fr', gap: isMobile ? 12 : 32, padding: isMobile ? '28px 8px' : '36px 16px', borderTop: '1px solid var(--line)', alignItems: 'center', transition: 'transform 0.35s ease', transform: hover ? 'translateX(6px)' : 'translateX(0)', transitionDelay: delay }}>
      <div style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: isMobile ? 56 : 86, lineHeight: 1, color: hover ? 'var(--blue)' : 'rgba(91,163,212,0.45)', transition: 'color 0.35s ease', letterSpacing: '0.02em', transform: 'skewX(-10deg)', transformOrigin: 'center' }}>{num}</div>
      <div style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: isMobile ? 24 : 34, color: 'var(--ink)', letterSpacing: '0.02em', lineHeight: 1, fontStyle: 'italic', transform: 'skewX(-10deg)', transformOrigin: 'left center', whiteSpace: 'nowrap', paddingRight: '0.4em' }}>{en}</div>
      <div style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 16 : 19, color: 'var(--ink-2)', letterSpacing: '-0.01em', lineHeight: 1.5 }} dangerouslySetInnerHTML={{ __html: jpHtml }} />
      <div style={{ fontSize: isMobile ? 12 : 13, lineHeight: 1.95, color: 'var(--ink-3)' }}>{body}</div>
    </div>
  );
};

const Values = ({ isMobile }) => (
  <section id="values" style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden' }}>
    {!isMobile && <>
      <span aria-hidden="true" className="mega-en" style={{ right: '-3%', top: '14%', fontSize: 'clamp(280px,30vw,460px)' }}>VALUES</span>
      <CircuitTrace style={{ top: 40, left: '32%', width: '46%', height: 70 }} variant="a" />
      <CircuitTrace style={{ top: 110, right: '4%', width: '28%', height: 50 }} variant="b" />
      <CircuitTrace style={{ bottom: 80, left: '6%', width: '24%', height: 40, transform: 'scaleX(-1)' }} variant="b" />
      <div style={{ position: 'absolute', right: 0, bottom: 0, width: '50%', height: 280, backgroundImage: 'url(mockups/bg_05_company.png)', backgroundSize: 'cover', backgroundPosition: 'right bottom', opacity: 0.4, zIndex: 1, pointerEvents: 'none' }} />
    </>}
    <div className="container" style={{ position: 'relative', zIndex: 3 }}>
      <div className="reveal" style={{ marginBottom: 48 }}>
        <span className="label-line">VALUES</span>
        <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(26px,6.2vw,34px)' : 'clamp(40px,4.4vw,64px)', marginBottom: 14, lineHeight: isMobile ? 1.5 : 1.18 }}>
          <span style={{ fontSize: '1.05em' }}>行動</span><span style={{ fontSize: '0.9em' }}>指針</span>
          <span style={{ color: 'var(--blue)', fontSize: '0.7em', margin: '0 0.15em' }}>─</span>
          <span className="h-blue"><span style={{ fontSize: '1.0em' }}>三つ</span><span style={{ fontSize: '0.78em' }}>の</span><span style={{ fontSize: '1.1em' }}>原則</span></span>
        </h2>
        <p style={{ fontSize: isMobile ? 14 : 15, color: 'var(--ink-3)' }}>私たちが大切にする3つの原則。</p>
      </div>
      <div>
        <ValueRow num="01" en="OWN IT" jpHtml='自分の人生に、<span class="h-blue">責任</span>を持つ。' delay="0.05s" isMobile={isMobile} body="他人任せにしない。指示待ちにしない。自分の役割は自分で決める。相談する前に、まず考える。" />
        <ValueRow num="02" en="SPEED IS RESPECT" jpHtml='速さは、<span class="h-blue">誠意</span>である。' delay="0.15s" isMobile={isMobile} body='判断・連携・実行のスピードこそ信頼の源泉。「明日やる」は、機会損失の言い換えである。' />
        <ValueRow num="03" en="KEEP THE VIBE UP" jpHtml='場のエネルギーを、<span class="h-blue">上げ続ける</span>。' delay="0.25s" isMobile={isMobile} body="機嫌の管理は、リーダーの規律である。自分の機嫌は、自分で整える。" />
      </div>
      <div className="reveal" style={{ marginTop: 48, paddingTop: 32, borderTop: '3px solid var(--ink)' }}>
        <p style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontStyle: 'italic', fontSize: isMobile ? 15 : 22, lineHeight: isMobile ? 1.9 : 1.85, color: 'var(--ink)', letterSpacing: '-0.01em', textAlign: 'center' }}>
          {isMobile ? (
            <><span style={{ display: 'block' }}>自分の人生は自分で背負う。</span><span style={{ display: 'block' }}>だから、誰よりも速く動く。</span><span style={{ display: 'block' }}>場のエネルギーは自分が作る。</span></>
          ) : (
            <><span style={{ display: 'inline-block' }}>自分の人生は自分で背負う。</span><span style={{ color: 'var(--blue)', margin: '0 12px', fontStyle: 'normal' }}>／</span><span style={{ display: 'inline-block' }}>だから、誰よりも速く動く。</span><span style={{ color: 'var(--blue)', margin: '0 12px', fontStyle: 'normal' }}>／</span><span style={{ display: 'inline-block' }}>場のエネルギーは自分が作る。</span></>
          )}
        </p>
      </div>
    </div>
  </section>
);

// ─── KAZU CHANNEL CASE STUDY ─────────────────────────────────────────────────
const KazuCaseStudy = ({ isMobile }) => (
  <div className="reveal" style={{ marginBottom: 48, background: 'var(--ink)', borderRadius: 20, overflow: 'hidden', boxShadow: '0 16px 56px rgba(14,27,44,0.22)', border: '1px solid rgba(255,255,255,0.05)' }}>
    {/* Header */}
    <div style={{ padding: isMobile ? '24px 20px 20px' : '32px 40px 28px', borderBottom: '1px solid rgba(255,255,255,0.07)', display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 172px', gap: 28, alignItems: 'start' }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 14, flexWrap: 'wrap' }}>
        <span style={{ display: 'inline-flex', alignItems: 'center', gap: 5, background: '#FF0000', borderRadius: 6, padding: '4px 10px' }}>
          <IconYouTube size={13} />
          <span style={{ fontFamily: 'var(--font-en)', fontSize: 10, letterSpacing: '0.22em', color: '#fff', fontWeight: 700 }}>YOUTUBE</span>
        </span>
        <span style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.22em', color: 'rgba(255,255,255,0.35)', fontWeight: 700 }}>FEATURED CASE STUDY</span>
      </div>
      <div style={{ fontSize: isMobile ? 13 : 15, color: 'rgba(255,255,255,0.42)', marginBottom: 10, fontWeight: 500 }}>かず【資産運用・経済チャンネル】</div>
      <h3 style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 'clamp(22px,5.6vw,30px)' : 'clamp(30px,3.2vw,46px)', color: '#fff', lineHeight: 1.2, letterSpacing: '-0.01em' }}>
        ゼロから<span style={{ color: '#5BA3D4' }}>3.55万人</span>のチャンネルへ。<br style={{ display: isMobile ? 'none' : 'block' }} />
        <span style={{ fontSize: '0.66em', color: 'rgba(255,255,255,0.55)', fontStyle: 'italic' }}>1本の動画が、42万回超えを叩き出した。</span>
      </h3>
      {!isMobile && (
        <div style={{ borderRadius: 10, overflow: 'hidden', boxShadow: '0 10px 28px rgba(0,0,0,0.5)', border: '1px solid rgba(255,255,255,0.07)', flexShrink: 0 }}>
          <div style={{ position: 'relative' }}>
            <img src="assets/kazu_ch_02.jpg" alt="バズ動画サムネイル"
              style={{ width: '100%', height: 96, objectFit: 'cover', display: 'block' }} />
            <div style={{ position: 'absolute', inset: 0, background: 'rgba(0,0,0,0.22)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
              <div style={{ width: 28, height: 28, background: 'rgba(255,0,0,0.92)', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                <div style={{ width: 0, height: 0, borderTop: '5px solid transparent', borderBottom: '5px solid transparent', borderLeft: '10px solid #fff', marginLeft: 2 }} />
              </div>
            </div>
            <div style={{ position: 'absolute', bottom: 5, right: 6, background: 'rgba(0,0,0,0.82)', borderRadius: 3, padding: '1px 5px', fontFamily: 'sans-serif', fontSize: 9, color: '#fff', fontWeight: 700 }}>18:21</div>
          </div>
          <div style={{ padding: '8px 10px', background: 'rgba(255,255,255,0.04)', borderTop: '1px solid rgba(255,255,255,0.06)' }}>
            <div style={{ fontSize: 10, color: 'rgba(255,255,255,0.72)', fontWeight: 700, lineHeight: 1.4, marginBottom: 4 }}>50代の資産運用 この金額あれば勝ち組です</div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 5 }}>
              <IconYouTube size={12} />
              <span style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: 11, color: '#4178EE' }}>42.3万<span style={{ fontSize: 9, fontFamily: 'var(--font-jp)', fontWeight: 400, color: 'rgba(255,255,255,0.38)', marginLeft: 2 }}>回視聴</span></span>
            </div>
          </div>
        </div>
      )}
    </div>
    {/* Stats row */}
    <div style={{ display: 'grid', gridTemplateColumns: isMobile ? 'repeat(2,1fr)' : 'repeat(4,1fr)', borderBottom: '1px solid rgba(255,255,255,0.07)' }}>
      {[
        { num: '3.55万', unit: '人', label: 'チャンネル登録者数' },
        { num: '42.3万', unit: '回', label: 'バズ動画の視聴回数' },
        { num: '+2,469', unit: '人', label: '1本の動画で獲得した新規登録者' },
        { num: '84.3', unit: '%', label: 'ブラウジング経由の流入率' },
      ].map((s, i) => (
        <div key={i} style={{ padding: isMobile ? '18px 14px' : '24px 28px', borderRight: !isMobile && i < 3 ? '1px solid rgba(255,255,255,0.06)' : 'none', borderBottom: isMobile && i < 2 ? '1px solid rgba(255,255,255,0.06)' : 'none' }}>
          <div style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 22 : 28, fontWeight: 700, color: '#4178EE', lineHeight: 1, letterSpacing: '-0.01em', marginBottom: 5 }}>
            {s.num}<span style={{ fontSize: '0.5em', fontFamily: 'var(--font-jp)', fontWeight: 700, color: 'rgba(255,255,255,0.5)', marginLeft: '0.1em' }}>{s.unit}</span>
          </div>
          <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.3)', fontWeight: 500 }}>{s.label}</div>
        </div>
      ))}
    </div>
    {/* Bullets + Custom Data Viz */}
    <div style={{ display: isMobile ? 'flex' : 'grid', flexDirection: 'column', gridTemplateColumns: '1fr 1.55fr' }}>
      {/* Left: achievements */}
      <div style={{ padding: isMobile ? '20px 20px 24px' : '32px 40px', display: 'flex', flexDirection: 'column', gap: 11, justifyContent: 'center', order: isMobile ? 2 : 1 }}>
        <div style={{ fontFamily: 'var(--font-en)', fontSize: 10, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.24)', fontWeight: 700, marginBottom: 3 }}>ACHIEVEMENTS</div>
        {[
          '月20〜30件のアポイント獲得を実現',
          'ブラウジング流入84.3%を生む戦略的コンテンツ設計',
          '1本の動画でチャンネル登録者を約7%増加',
          '資産運用・経済ジャンルで複数のバズ動画を輩出',
        ].map((t, i) => (
          <div key={i} style={{ display: 'flex', gap: 10, alignItems: 'flex-start' }}>
            <span style={{ color: '#4178EE', fontWeight: 700, fontSize: 14, lineHeight: 1.5, flexShrink: 0 }}>✓</span>
            <span style={{ fontSize: isMobile ? 12 : 13, color: 'rgba(255,255,255,0.58)', lineHeight: 1.65 }}>{t}</span>
          </div>
        ))}
      </div>
      {/* Right: Growth chart + analytics */}
      <div style={{ order: isMobile ? 1 : 2, borderLeft: !isMobile ? '1px solid rgba(255,255,255,0.06)' : 'none', borderTop: isMobile ? '1px solid rgba(255,255,255,0.06)' : 'none', padding: isMobile ? '20px 18px 22px' : '28px 32px', display: 'flex', flexDirection: 'column', gap: 18 }}>
        {/* Chart header */}
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' }}>
          <div>
            <div style={{ fontFamily: 'var(--font-en)', fontSize: 9, letterSpacing: '0.28em', color: 'rgba(255,255,255,0.22)', fontWeight: 700, marginBottom: 5 }}>SUBSCRIBER GROWTH / 1 YEAR</div>
            <div style={{ display: 'flex', alignItems: 'baseline', gap: 6 }}>
              <span style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: isMobile ? 26 : 32, color: '#4178EE', lineHeight: 1, letterSpacing: '-0.02em' }}>35,500</span>
              <span style={{ fontSize: 12, color: 'rgba(255,255,255,0.4)', fontWeight: 700 }}>人</span>
            </div>
          </div>
          <div style={{ textAlign: 'right' }}>
            <div style={{ fontSize: 10, color: 'rgba(255,255,255,0.22)', marginBottom: 3 }}>スタート時</div>
            <div style={{ fontFamily: 'var(--font-en)', fontWeight: 700, fontSize: 16, color: 'rgba(255,255,255,0.35)', letterSpacing: '-0.01em' }}>500人</div>
          </div>
        </div>
        {/* SVG Growth Curve */}
        {(() => {
          const W = 400, H = 96;
          const raw = [[0,500],[1,820],[2,1300],[3,2200],[4,3800],[5,6200],[6,9800],[7,15000],[8,22000],[9,28000],[10,31500],[11,33800],[12,35500]];
          const toSvg = ([x,y]) => [(x/12)*W, H - ((y-500)/(35500-500))*H*0.9 - 4];
          const pts = raw.map(toSvg);
          const lineD = pts.map((p,i)=>i===0?`M${p[0].toFixed(1)} ${p[1].toFixed(1)}`:`L${p[0].toFixed(1)} ${p[1].toFixed(1)}`).join(' ');
          const areaD = lineD + ` L${W} ${H+2} L0 ${H+2}Z`;
          // Viral spike annotation — at month 7 where the jump accelerates
          const vx = pts[7][0], vy = pts[7][1];
          const ex = pts[12][0], ey = pts[12][1];
          return (
            <div style={{ position: 'relative' }}>
              <svg viewBox={`0 0 ${W} ${H+6}`} style={{ width:'100%', height: isMobile ? 86 : 106, display:'block', overflow:'visible' }} aria-hidden="true">
                <defs>
                  <linearGradient id="kazu-area" x1="0" y1="0" x2="0" y2="1">
                    <stop offset="0%" stopColor="#4178EE" stopOpacity="0.22"/>
                    <stop offset="100%" stopColor="#4178EE" stopOpacity="0.01"/>
                  </linearGradient>
                </defs>
                {/* Horizontal grid */}
                {[0.25,0.5,0.75].map(t=>(
                  <line key={t} x1={0} y1={H-t*H*0.9} x2={W} y2={H-t*H*0.9} stroke="rgba(255,255,255,0.04)" strokeWidth="1"/>
                ))}
                {/* Area */}
                <path d={areaD} fill="url(#kazu-area)"/>
                {/* Line */}
                <path d={lineD} fill="none" stroke="#4178EE" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
                {/* Viral annotation vertical line */}
                <line x1={vx} y1={vy-6} x2={vx} y2={H+2} stroke="rgba(91,163,212,0.18)" strokeWidth="1" strokeDasharray="3,3"/>
                {/* Viral dot */}
                <circle cx={vx} cy={vy} r="4" fill="#1B5DE6" stroke="rgba(91,163,212,0.5)" strokeWidth="1.5"/>
                {/* End dot */}
                <circle cx={ex} cy={ey} r="5" fill="#fff" stroke="#4178EE" strokeWidth="2"/>
              </svg>
              {/* Viral label */}
              <div style={{ position:'absolute', left: `${(vx/W)*100}%`, top: -2, transform:'translateX(-44%)', background:'rgba(27,93,230,0.85)', backdropFilter:'blur(6px)', borderRadius:5, padding:'3px 8px', whiteSpace:'nowrap', border:'1px solid rgba(91,163,212,0.2)' }}>
                <span style={{ fontFamily:'var(--font-en)', fontSize:9, color:'#fff', fontWeight:700, letterSpacing:'0.08em' }}>42.3万回再生</span>
              </div>
              {/* Axis labels */}
              <div style={{ display:'flex', justifyContent:'space-between', marginTop:5 }}>
                <span style={{ fontFamily:'var(--font-en)', fontSize:9, color:'rgba(255,255,255,0.18)', letterSpacing:'0.06em' }}>START</span>
                <span style={{ fontFamily:'var(--font-en)', fontSize:9, color:'rgba(255,255,255,0.18)', letterSpacing:'0.06em' }}>12 MONTHS</span>
              </div>
            </div>
          );
        })()}
        {/* Divider */}
        <div style={{ height:1, background:'rgba(255,255,255,0.06)' }}/>
        {/* Traffic */}
        <div style={{ display:'flex', flexDirection:'column', gap:12 }}>
          <div>
            <div style={{ fontFamily:'var(--font-en)', fontSize:9, letterSpacing:'0.26em', color:'rgba(255,255,255,0.18)', fontWeight:700, marginBottom:8 }}>TRAFFIC SOURCE</div>
            {[
              { label:'ブラウジング機能', pct:84.3 },
              { label:'関連動画',         pct:9.8 },
              { label:'YouTube検索',      pct:2.3 },
            ].map((s,i)=>(
              <div key={i} style={{ marginBottom: i<2 ? 7 : 0 }}>
                <div style={{ display:'flex', justifyContent:'space-between', marginBottom:3 }}>
                  <span style={{ fontSize:10, color:'rgba(255,255,255,0.36)' }}>{s.label}</span>
                  <span style={{ fontSize:10, fontWeight:700, color: i===0?'#4178EE':'rgba(255,255,255,0.28)', fontFamily:'var(--font-en)' }}>{s.pct}%</span>
                </div>
                <div style={{ height:3, background:'rgba(255,255,255,0.05)', borderRadius:2 }}>
                  <div style={{ height:'100%', width:`${s.pct}%`, background: i===0?'linear-gradient(90deg,#1B5DE6,#4178EE)':'rgba(65,120,238,0.22)', borderRadius:2 }}/>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </div>
  </div>
);

const ResultCard = ({ tag, channel, headline, sub, points, chart, delay }) => {
  const isYT = tag.includes('YOUTUBE');
  const isTT = tag.includes('TIKTOK');
  const accentColor = isYT ? '#FF0000' : isTT ? '#010101' : 'var(--blue)';
  return (
  <div className="reveal" style={{ background: 'var(--white)', borderRadius: 14, overflow: 'hidden', boxShadow: '0 6px 28px rgba(14,27,44,0.06),0 1px 3px rgba(14,27,44,0.04)', border: '1px solid var(--line)', display: 'flex', flexDirection: 'column', transitionDelay: delay }}>
    <div style={{ height: 3, background: accentColor, flexShrink: 0 }} />
    <div style={{ padding: '28px 28px 32px', display: 'flex', flexDirection: 'column', gap: 18, flex: 1 }}>
    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 7 }}>
        {isYT && <IconYouTube size={16} />}
        {isTT && <><IconTikTok size={14} color="#010101" /><IconInstagram size={13} /></>}
        <span style={{ fontFamily: 'var(--font-en)', fontSize: 11, letterSpacing: '0.2em', color: 'var(--ink-3)', fontWeight: 700 }}>{tag}</span>
      </div>
      <span style={{ fontSize: 12, color: 'var(--ink-4)' }}>{channel}</span>
    </div>
    <div style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: 30, color: 'var(--blue)', letterSpacing: '-0.01em', lineHeight: 1.2 }} dangerouslySetInnerHTML={{ __html: headline }} />
    <div style={{ fontSize: 14, color: 'var(--ink-2)', fontWeight: 700, marginTop: -6 }}>{sub}</div>
    <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 6 }}>
      {points.map((p, i) => (
        <li key={i} style={{ fontSize: 13, color: 'var(--ink-3)', display: 'flex', gap: 8, alignItems: 'flex-start' }}>
          <span style={{ color: 'var(--blue)', fontWeight: 700 }}>●</span><span>{p}</span>
        </li>
      ))}
    </ul>
    <div style={{ marginTop: 'auto' }}>{chart}</div>
    </div>
  </div>
  );
};

const Results = ({ isMobile }) => (
  <section id="results" style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden', background: 'linear-gradient(180deg,#FFFFFF 0%,#F4F8FD 100%)' }}>
    <div style={{ position: 'absolute', top: 0, right: 0, width: '50%', height: 360, backgroundImage: 'url(mockups/bg_05_company.png)', backgroundSize: 'cover', backgroundPosition: 'right top', opacity: 0.45, zIndex: 0, pointerEvents: 'none' }} />
    <div className="container" style={{ position: 'relative', zIndex: 3 }}>
      <div className="reveal" style={{ marginBottom: 48 }}>
        <span className="label-line">RESULTS</span>
        <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(26px,6.4vw,36px)' : 'clamp(48px,5.4vw,84px)', marginBottom: 14, lineHeight: isMobile ? 1.5 : 1.2 }}>
          <span style={{ fontSize: '1.05em' }}>数字</span><span style={{ fontSize: '0.7em' }}>が</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span>
          <span className="h-blue" style={{ fontSize: '1.15em' }}>実力</span><span style={{ fontSize: '0.7em' }}>を</span><span style={{ fontSize: '1.0em' }}>証明</span><span style={{ fontSize: '0.78em' }}>する</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span>
        </h2>
      </div>
      <StatsBand isMobile={isMobile} />
      <KazuCaseStudy isMobile={isMobile} />
      <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(2,1fr)', gap: 22 }}>
        <ResultCard tag="YOUTUBE" channel="資産運用チャンネル" headline='500人  <span style="color:var(--ink-4)">→</span>  32,000人' sub="登録者数 64倍成長（1年間）" points={['月20〜30件のアポイント獲得','最高42.3万回再生（1本の動画）']} chart={<ChartGrowth beforeLabel="500人" afterLabel="32,000人" />} delay="0.05s" />
        <ResultCard tag="YOUTUBE" channel="保険営業チャンネル" headline="最短6ヶ月" sub="YouTube収益化達成（23本）" points={['保険営業という高難度ジャンル','短期での収益化を実現']} chart={<ChartProgression steps={[{label:'1本',active:true},{label:'5本',active:true},{label:'10本',active:true},{label:'15本',active:true},{label:'20本',active:true},{label:'23本',active:true}]} finalLabel="23本達成！" footnote="月1〜本ペースで投稿" />} delay="0.15s" />
        <ResultCard tag="YOUTUBE" channel="医療キャリア支援チャンネル" headline="月5件" sub="月間面談実施数を確立（1年半）" points={['看護師向けキャリア支援チャンネル','YouTube → LINE → 相談の導線設計']} chart={<ChartGrowth beforeLabel="月0〜1件" afterLabel="月5件" />} delay="0.25s" />
        <ResultCard tag="TIKTOK / INSTAGRAM" channel="ヘルスケア店舗アカウント" headline="最高763万回再生" sub="累計再生回数（2年間）" points={['100万回超バズ動画 5本以上','ローカルビジネスSNS成功モデル']} chart={<ChartTop5 values={[{num:763,label:'763万'},{num:312,label:'312万'},{num:245,label:'245万'},{num:196,label:'196万'},{num:145,label:'145万'}]} />} delay="0.35s" />
      </div>
    </div>
  </section>
);

const Company = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <section id="company" style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden', background: 'linear-gradient(180deg,#FFFFFF 0%,#F4F8FD 100%)' }}>
      <div style={{ position: 'absolute', right: 0, top: 0, bottom: 0, width: '55%', backgroundImage: 'url(mockups/bg_05_company.png)', backgroundSize: 'cover', backgroundPosition: 'center right', opacity: 0.7, zIndex: 0, pointerEvents: 'none' }} />
      <div className="container" style={{ position: 'relative', zIndex: 3 }}>
        <div className="reveal" style={{ marginBottom: 32 }}>
          <span className="label-line">COMPANY</span>
          <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(60px,16vw,100px)' : 'clamp(120px,12vw,160px)', marginBottom: 12 }}>COMPANY</h2>
          <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)' }}>会社情報</p>
        </div>
        <div className="reveal" style={{ maxWidth: 720, background: 'rgba(255,255,255,0.7)', backdropFilter: 'blur(8px)', borderRadius: 12, padding: isMobile ? '24px 16px' : '8px', marginBottom: 28 }}>
          {[
            ['会社名','株式会社隼（HAYABUSA Inc.）'],
            ['代表取締役','副島 大典 / 岩下 和也'],
            ['設立','2026年4月'],
            ['所在地','福岡県福岡市'],
            ['資本金','100万円'],
            ['事業内容','SNSプロデュース事業 / エンタテインメント事業（準備中）'],
          ].map(([k,v], i, arr) => (
            <div key={k} style={{ display: 'grid', gridTemplateColumns: isMobile ? '92px 1fr' : '160px 1fr', padding: isMobile ? '12px 8px' : '18px 24px', borderBottom: i < arr.length - 1 ? '1px solid var(--line)' : 'none', alignItems: 'baseline' }}>
              <span style={{ fontFamily: 'var(--font-jp)', fontSize: isMobile ? 12 : 13, color: 'var(--ink-2)', fontWeight: 700, letterSpacing: '0.05em' }}>{k}</span>
              <span style={{ fontFamily: 'var(--font-jp)', fontSize: isMobile ? 13 : 15, color: 'var(--ink)', fontWeight: 500 }}>{v}</span>
            </div>
          ))}
        </div>
        <a href="/about" onClick={(e) => { e.preventDefault(); navigate('/about'); }}
          style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '12px 28px', border: '1.5px solid var(--ink)', borderRadius: 999, fontWeight: 700, fontSize: 14, transition: 'all 0.3s' }}
          onMouseEnter={e => { e.currentTarget.style.background = 'var(--ink)'; e.currentTarget.style.color = 'var(--white)'; }}
          onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = 'var(--ink)'; }}
        >会社概要を詳しく見る <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
      </div>
    </section>
  );
};

const EntertainmentTeaser = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <section style={{ padding: isMobile ? '90px 0' : '140px 0', position: 'relative', overflow: 'hidden', background: 'linear-gradient(180deg,#FFFFFF 0%,#E8F1FA 60%,#DCE9F6 100%)' }}>
      <div aria-hidden="true" style={{ position: 'absolute', top: '50%', right: '-4%', transform: 'translateY(-50%)', fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 'clamp(280px,80vw,460px)' : 'clamp(480px,44vw,760px)', lineHeight: 0.85, letterSpacing: '-0.04em', color: 'rgba(27,93,230,0.05)', userSelect: 'none', pointerEvents: 'none' }}>隼</div>
      <div aria-hidden="true" style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(27,93,230,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(27,93,230,0.04) 1px,transparent 1px)', backgroundSize: '64px 64px', pointerEvents: 'none' }} />
      {/* Floating decoration SVGs */}
      {!isMobile && <>
        <svg aria-hidden="true" style={{ position: 'absolute', right: '6%', top: '18%', opacity: 0.12, pointerEvents: 'none', animation: 'logoFloat 4s ease-in-out infinite' }} width="56" height="56" viewBox="0 0 48 48" fill="none" stroke="var(--blue)" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <polygon points="24,4 29,18 44,18 32,27 37,42 24,33 11,42 16,27 4,18 19,18" />
        </svg>
        <svg aria-hidden="true" style={{ position: 'absolute', right: '16%', top: '62%', opacity: 0.09, pointerEvents: 'none', animation: 'logoFloat 5.5s ease-in-out infinite 1s' }} width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="var(--blue)" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <path d="M18 38 L18 16 L40 10 L40 32" /><circle cx="14" cy="38" r="4" /><circle cx="36" cy="32" r="4" /><line x1="18" y1="22" x2="40" y2="16" />
        </svg>
        <svg aria-hidden="true" style={{ position: 'absolute', right: '8%', bottom: '20%', opacity: 0.08, pointerEvents: 'none', animation: 'logoFloat 3.8s ease-in-out infinite 0.5s' }} width="32" height="32" viewBox="0 0 48 48" fill="none" stroke="var(--blue)" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <polygon points="24,4 29,18 44,18 32,27 37,42 24,33 11,42 16,27 4,18 19,18" />
        </svg>
        <svg aria-hidden="true" style={{ position: 'absolute', right: '28%', top: '14%', opacity: 0.07, pointerEvents: 'none' }} width="24" height="24" viewBox="0 0 48 48" fill="none" stroke="var(--blue)" strokeWidth="2">
          <polygon points="24,4 29,18 44,18 32,27 37,42 24,33 11,42 16,27 4,18 19,18" />
        </svg>
      </>}
      <div className="container" style={{ position: 'relative', zIndex: 2 }}>
        <div className="reveal" style={{ maxWidth: isMobile ? '100%' : '76%' }}>
          <div style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 'clamp(60px,18vw,100px)' : 'clamp(120px,14vw,200px)', fontWeight: 700, lineHeight: 0.85, color: 'rgba(27,93,230,0.10)', letterSpacing: '0.01em', marginBottom: isMobile ? -16 : -32 }}>ENTERTAINMENT</div>
          <span className="label-line" style={{ marginTop: 0 }}>NEW BUSINESS</span>
          <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(22px,5.5vw,30px)' : 'clamp(32px,3.2vw,48px)', marginBottom: 20, lineHeight: 1.5 }}>
            <span style={{ fontSize: '1.05em' }}>アイドル</span><span style={{ fontSize: '0.7em' }}>・</span><span style={{ fontSize: '1.05em' }}>タレント</span>・<span style={{ fontSize: '0.95em' }}>エンタメ</span><span style={{ fontSize: '0.85em' }}>コンテンツ</span>事業
            <span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>、</span>
            <span className="h-blue" style={{ fontSize: '1.15em' }}>始動</span><span style={{ fontSize: '0.55em', verticalAlign: '0.1em' }}>。</span>
          </h2>
          <div style={{ width: 80, height: 3, background: 'var(--blue)', marginBottom: 24 }} />
          <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)', lineHeight: 1.95, maxWidth: 560, marginBottom: 32 }}>SNSで培った影響力と熱量を、次のステージへ。次世代を担うアイドル・タレントを本気でプロデュースします。</p>
          <a href="/service/entertainment" onClick={(e) => { e.preventDefault(); navigate('/service/entertainment'); }}
            style={{ display: 'inline-flex', alignItems: 'center', gap: 10, padding: '14px 32px', border: '1.5px solid var(--ink)', borderRadius: 999, fontWeight: 700, fontSize: 14, transition: 'all 0.3s' }}
            onMouseEnter={e => { e.currentTarget.style.background = 'var(--ink)'; e.currentTarget.style.color = 'var(--white)'; }}
            onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = 'var(--ink)'; }}
          >詳しく見る <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
        </div>
      </div>
    </section>
  );
};

const HomePage = ({ isMobile }) => {
  useReveal();
  return (
    <>
      <Hero isMobile={isMobile} />
      <MarqueeBand />
      <Service isMobile={isMobile} />
      <MissionVision isMobile={isMobile} />
      <Values isMobile={isMobile} />
      <EntertainmentTeaser isMobile={isMobile} />
      <Results isMobile={isMobile} />
      <Company isMobile={isMobile} />
      <MarqueeBand dark />
      <CTASection isMobile={isMobile} />
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// SNS PRODUCTION PAGE
// ═══════════════════════════════════════════════════════════════════
const SNSPage = ({ isMobile }) => {
  useReveal();
  const { navigate } = useRouter();
  const services = [
    { icon: <IconTarget />, title: '企画', sub: 'SNS戦略設計・コンテンツ企画・ターゲット設定', body: '事業目標から逆算したSNS戦略を設計。ターゲット像の明確化から、チャンネルコンセプト・投稿テーマまで、成果に直結する企画を提供します。' },
    { icon: <IconPlay />, title: '撮影・編集', sub: 'プロクオリティの動画制作', body: '企画に沿ったロケ・スタジオ撮影から編集・サムネイル制作まで一貫対応。視聴維持率と再生数を最大化するプロ制作を実現します。' },
    { icon: <IconChat />, title: '投稿管理', sub: '運用代行・スケジュール管理・効果測定', body: '投稿スケジュールの管理から、再生数・登録者数・インプレッション等の効果測定・分析レポートまで、運用業務を丸ごと代行します。' },
    { icon: <IconRoute />, title: '導線設計', sub: 'YouTube→LINE構築までの集客導線設計', body: 'SNSで集めた視聴者をLINE登録・面談予約・購買へと導く仕組みを構築。SNSを「集客装置」として機能させます。' },
  ];
  const steps = [
    { num: '01', title: 'ヒアリング', body: '事業課題・目標・現状をヒアリングし、最適なSNS活用方針を定めます。' },
    { num: '02', title: '戦略設計', body: 'ターゲット・チャンネルコンセプト・KPI・投稿計画を設計します。' },
    { num: '03', title: '制作', body: '撮影・編集・サムネイル制作を一貫して行います。' },
    { num: '04', title: '運用開始', body: '投稿・効果測定・コメント管理などの運用を開始します。' },
    { num: '05', title: '改善・レポート', body: 'データをもとに改善策を実行し、月次レポートで成果を共有します。' },
  ];
  return (
    <>
      <PageHero label="SERVICE" title="SNS PRODUCTION" subtitle="戦略設計から運用まで、貴社のSNSを一気通貫でプロデュースします。" isMobile={isMobile} />

      {/* Phone Mockup Showcase */}
      <section style={{ padding: isMobile ? '70px 0' : '100px 0', background: 'var(--ink)', overflow: 'hidden', position: 'relative' }}>
        {/* Channel page image - subtle faded background */}
        <div aria-hidden="true" style={{ position: 'absolute', right: 0, top: 0, bottom: 0, width: isMobile ? '100%' : '55%', backgroundImage: 'url(assets/kazu_ch_01.jpg)', backgroundSize: 'cover', backgroundPosition: 'top center', opacity: 0.07, zIndex: 0, pointerEvents: 'none', filter: 'blur(1px)' }} />
        <div aria-hidden="true" style={{ position: 'absolute', inset: 0, background: 'linear-gradient(90deg, var(--ink) 35%, rgba(14,27,44,0.7) 70%, var(--ink) 100%)', zIndex: 0, pointerEvents: 'none' }} />
        <div aria-hidden="true" style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(27,93,230,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(27,93,230,0.05) 1px,transparent 1px)', backgroundSize: '56px 56px', pointerEvents: 'none' }} />
        <div className="container" style={{ position: 'relative', zIndex: 2 }}>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr auto', gap: isMobile ? 40 : 80, alignItems: 'center' }}>
            <div className="reveal">
              <span className="label-line" style={{ color: 'rgba(255,255,255,0.5)' }}>REAL RESULTS</span>
              <h2 style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 'clamp(22px,5.5vw,30px)' : 'clamp(32px,3.2vw,48px)', color: '#fff', marginBottom: 20, lineHeight: 1.55 }}>
                YouTube・TikTokで<br />
                <span style={{ background: 'linear-gradient(90deg,#4FA8FF,#1B5DE6)', WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent', backgroundClip: 'text' }}>実証済みの成果</span>を<br />
                あなたのチャンネルへ。
              </h2>
              <div style={{ height: 2, width: 60, background: 'var(--blue)', marginBottom: 24 }} />
              <p style={{ fontSize: isMobile ? 13 : 15, color: 'rgba(255,255,255,0.6)', lineHeight: 2, marginBottom: 32, maxWidth: 420 }}>
                登録者数64倍・最高763万再生・最短6ヶ月収益化。数字が証明する、隼のプロデュース力。
              </p>
              <div style={{ display: 'flex', gap: 20, flexWrap: 'wrap' }}>
                {[['YouTube', <IconYouTube size={18} />, '#FF0000'], ['TikTok', <IconTikTok size={16} color="#fff" />, '#fff'], ['LINE', <IconLINE size={18} />, '#06C755'], ['Instagram', <IconInstagram size={16} />, 'url(#ig-grad)']].map(([name, icon, color]) => (
                  <div key={name} style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '8px 14px', background: 'rgba(255,255,255,0.06)', borderRadius: 999, border: '1px solid rgba(255,255,255,0.1)' }}>
                    {icon}
                    <span style={{ fontFamily: 'var(--font-en)', fontSize: 12, color: 'rgba(255,255,255,0.8)', letterSpacing: '0.1em', fontWeight: 700 }}>{name}</span>
                  </div>
                ))}
              </div>
            </div>
            {!isMobile && (
              <div className="reveal" style={{ display: 'flex', gap: 20, alignItems: 'center', transitionDelay: '0.15s' }}>
                <PhoneMockup tilt={-4}>
                  <YouTubeScreenMock />
                </PhoneMockup>
                <div style={{ marginTop: 40 }}>
                  <PhoneMockup tilt={4}>
                    <TikTokScreenMock />
                  </PhoneMockup>
                </div>
              </div>
            )}
          </div>
        </div>
      </section>

      {/* Services */}
      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'var(--white)' }}>
        <div className="container">
          <div className="reveal" style={{ marginBottom: 56 }}>
            <span className="label-line">SERVICE DETAIL</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 12 }}>WHAT WE DO</h2>
            <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)' }}>SNSプロダクションの4つのサービス領域</p>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(2,1fr)', gap: 24 }}>
            {services.map((s, i) => (
              <div key={i} className="reveal" style={{ display: 'flex', gap: 20, padding: '28px', background: 'var(--blue-tint)', borderRadius: 14, border: '1px solid var(--line)', transitionDelay: (i * 0.1) + 's' }}>
                <div style={{ width: 56, height: 56, borderRadius: 14, background: 'linear-gradient(135deg,rgba(27,93,230,0.1),rgba(91,163,212,0.18))', border: '1.5px solid rgba(27,93,230,0.14)', color: 'var(--blue)', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 10 }}>{s.icon}</div>
                <div>
                  <h3 style={{ fontFamily: 'var(--font-jp)', fontWeight: 700, fontSize: 18, color: 'var(--ink)', marginBottom: 4 }}>{s.title}</h3>
                  <p style={{ fontSize: 12, color: 'var(--blue)', fontWeight: 700, marginBottom: 10 }}>{s.sub}</p>
                  <p style={{ fontSize: 13, color: 'var(--ink-3)', lineHeight: 1.9 }}>{s.body}</p>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Flow */}
      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'linear-gradient(180deg,#F4F8FD 0%,#FFFFFF 100%)', position: 'relative', overflow: 'hidden' }}>
        {!isMobile && <CircuitTrace style={{ top: 40, left: '4%', width: '40%', height: 70 }} variant="a" />}
        <div className="container" style={{ position: 'relative', zIndex: 2 }}>
          <div className="reveal" style={{ marginBottom: 56 }}>
            <span className="label-line">PROCESS</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 12 }}>FLOW</h2>
            <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)' }}>ご依頼から運用開始まで、5つのステップで進めます。</p>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(5,1fr)', gap: isMobile ? 16 : 12, position: 'relative' }}>
            {steps.map((s, i) => (
              <div key={i} className="reveal" style={{ position: 'relative', transitionDelay: (i * 0.1) + 's' }}>
                <div style={{ background: 'var(--white)', borderRadius: 12, padding: '24px 20px', border: '1px solid var(--line)', boxShadow: '0 2px 12px rgba(14,27,44,0.04)', height: '100%' }}>
                  <div style={{ fontFamily: 'var(--font-en)', fontSize: 36, fontWeight: 700, color: 'rgba(27,93,230,0.15)', lineHeight: 1, marginBottom: 12 }}>STEP{s.num}</div>
                  <h3 style={{ fontFamily: 'var(--font-jp)', fontWeight: 700, fontSize: 16, color: 'var(--ink)', marginBottom: 10 }}>{s.title}</h3>
                  <p style={{ fontSize: 12, color: 'var(--ink-3)', lineHeight: 1.85 }}>{s.body}</p>
                </div>
                {!isMobile && i < steps.length - 1 && (
                  <div style={{ position: 'absolute', top: '50%', right: -14, transform: 'translateY(-50%)', color: 'var(--blue)', fontSize: 20, zIndex: 2, fontFamily: 'var(--font-en)' }}>→</div>
                )}
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Results */}
      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'var(--white)' }}>
        <div className="container">
          <div className="reveal" style={{ marginBottom: 56 }}>
            <span className="label-line">RESULTS</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 12 }}>NUMBERS</h2>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? 'repeat(2,1fr)' : 'repeat(4,1fr)', gap: 16 }}>
            {[
              { num: '500 → 32,000人', label: '登録者数成長事例', sub: '1年間でYouTube登録者64倍' },
              { num: '最短8ヶ月', label: 'チャンネル成長スピード', sub: '月20〜30件アポイント獲得' },
              { num: '月5件', label: 'YouTube経由の面談数', sub: '看護師キャリア支援チャンネル' },
              { num: '最高763万回', label: '動画再生回数', sub: 'TikTok/Instagramバズ事例' },
            ].map((item, i) => (
              <div key={i} className="reveal" style={{ background: 'var(--blue-tint)', borderRadius: 14, padding: isMobile ? '20px 16px' : '28px 24px', border: '1px solid var(--line)', transitionDelay: (i * 0.1) + 's' }}>
                <div style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 18 : 22, color: 'var(--blue)', lineHeight: 1.3, marginBottom: 8 }}>{item.num}</div>
                <div style={{ fontWeight: 700, fontSize: isMobile ? 12 : 13, color: 'var(--ink)', marginBottom: 6 }}>{item.label}</div>
                <div style={{ fontSize: 11, color: 'var(--ink-4)', lineHeight: 1.7 }}>{item.sub}</div>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Price */}
      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'linear-gradient(180deg,#F4F8FD 0%,#FFFFFF 100%)' }}>
        <div className="container">
          <div className="reveal" style={{ maxWidth: 680, margin: '0 auto', textAlign: 'center' }}>
            <span className="label-line" style={{ justifyContent: 'center' }}>PRICE</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 24 }}>PRICE</h2>
            <p style={{ fontSize: isMobile ? 15 : 18, color: 'var(--ink-2)', lineHeight: 2, marginBottom: 36, fontWeight: 500 }}>ご支援内容・規模に応じてご提案いたします。<br />まずはお気軽にご相談ください。</p>
            <a href="/contact" onClick={(e) => { e.preventDefault(); navigate('/contact'); }}
              style={{ display: 'inline-flex', alignItems: 'center', gap: 12, padding: '16px 40px', background: 'var(--blue)', color: 'var(--white)', fontWeight: 700, fontSize: 15, borderRadius: 999, boxShadow: '0 10px 28px rgba(27,93,230,0.28)', transition: 'all 0.3s' }}
              onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.boxShadow = '0 16px 36px rgba(27,93,230,0.42)'; }}
              onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = '0 10px 28px rgba(27,93,230,0.28)'; }}
            >無料相談をする <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
          </div>
        </div>
      </section>

      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// ENTERTAINMENT PAGE
// ═══════════════════════════════════════════════════════════════════
const EntertainmentPage = ({ isMobile }) => {
  useReveal();
  const { navigate } = useRouter();
  return (
    <>
      <PageHero label="BUSINESS" title="ENTERTAINMENT" subtitle="次世代のアイドル・タレントを本気で育て、届ける。" isMobile={isMobile} />

      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'var(--white)', position: 'relative', overflow: 'hidden' }}>
        <div aria-hidden="true" style={{ position: 'absolute', top: '50%', right: '-4%', transform: 'translateY(-50%)', fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 'clamp(240px,70vw,400px)' : 'clamp(400px,38vw,640px)', lineHeight: 0.85, letterSpacing: '-0.04em', color: 'rgba(27,93,230,0.04)', userSelect: 'none', pointerEvents: 'none' }}>隼</div>
        <div aria-hidden="true" style={{ position: 'absolute', inset: 0, backgroundImage: 'linear-gradient(rgba(27,93,230,0.03) 1px,transparent 1px),linear-gradient(90deg,rgba(27,93,230,0.03) 1px,transparent 1px)', backgroundSize: '64px 64px', pointerEvents: 'none' }} />
        <div className="container" style={{ position: 'relative', zIndex: 2 }}>
          <div className="reveal" style={{ marginBottom: 56 }}>
            <span className="label-line">ABOUT</span>
            <h2 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(24px,5.8vw,32px)' : 'clamp(36px,3.8vw,56px)', marginBottom: 20, lineHeight: 1.5 }}>
              <span style={{ fontSize: '1.05em' }}>アイドル</span><span style={{ fontSize: '0.7em' }}>・</span><span style={{ fontSize: '1.05em' }}>タレント</span>の<br />
              <span className="h-blue" style={{ fontSize: '1.1em' }}>マネジメント</span>・<span className="h-blue" style={{ fontSize: '1.1em' }}>プロデュース</span>
            </h2>
            <div style={{ height: 3, width: 80, background: 'var(--blue)', marginBottom: 24 }} />
            <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)', lineHeight: 2, maxWidth: 640 }}>
              株式会社隼のエンターテインメント事業は、次世代を担うアイドルユニット・タレントのマネジメントとプロデュースを行います。SNSで培った影響力と熱量を、ライブ・イベント・コンテンツ制作へと展開します。
            </p>
          </div>

          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(2,1fr)', gap: 20, marginBottom: 60 }}>
            {[
              { icon: <IconStar />, title: 'アイドルユニット マネジメント', body: '所属ユニットの活動計画・スケジュール管理・スタッフィング・ブッキングまで一貫してサポートします。' },
              { icon: <IconMusic />, title: 'コンテンツ制作', body: 'ライブ映像・MV・YouTube・SNS向けコンテンツの企画制作を手がけます。' },
              { icon: <IconPlay />, title: 'ライブ・イベント', body: '単独公演から合同イベントまで、企画から当日運営までを総合プロデュースします。' },
              { icon: <IconUsers />, title: 'ファンコミュニティ設計', body: 'LINE・YouTube・各種SNSを活用したファンとのコミュニケーション設計を行います。' },
            ].map((item, i) => (
              <div key={i} className="reveal" style={{ display: 'flex', gap: 18, padding: '24px', background: 'var(--blue-tint)', borderRadius: 12, border: '1px solid var(--line)', transitionDelay: (i * 0.1) + 's' }}>
                <div style={{ width: 40, height: 40, color: 'var(--blue)', flexShrink: 0 }}>{item.icon}</div>
                <div>
                  <h3 style={{ fontWeight: 700, fontSize: 16, color: 'var(--ink)', marginBottom: 8 }}>{item.title}</h3>
                  <p style={{ fontSize: 13, color: 'var(--ink-3)', lineHeight: 1.85 }}>{item.body}</p>
                </div>
              </div>
            ))}
          </div>

          <div className="reveal" style={{ background: 'linear-gradient(135deg,var(--blue) 0%,#0A3FB8 100%)', borderRadius: 16, padding: isMobile ? '40px 24px' : '56px 56px', textAlign: 'center' }}>
            <h3 style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 20 : 26, color: '#fff', marginBottom: 14, lineHeight: 1.6 }}>スポンサー・コラボレーションのご相談</h3>
            <p style={{ fontSize: isMobile ? 13 : 15, color: 'rgba(255,255,255,0.8)', marginBottom: 32, lineHeight: 1.95 }}>ライブスポンサー・コラボ企画・タイアップ等、お気軽にご連絡ください。</p>
            <a href="/contact" onClick={(e) => { e.preventDefault(); navigate('/contact'); }}
              style={{ display: 'inline-flex', alignItems: 'center', gap: 10, padding: '14px 36px', background: '#fff', color: 'var(--blue)', fontWeight: 700, fontSize: 14, borderRadius: 999, transition: 'all 0.3s' }}
              onMouseEnter={e => { e.currentTarget.style.background = 'rgba(255,255,255,0.85)'; }}
              onMouseLeave={e => { e.currentTarget.style.background = '#fff'; }}
            >スポンサー・コラボのご相談 <span style={{ fontFamily: 'var(--font-en)' }}>→</span></a>
          </div>
        </div>
      </section>

      <CTASection isMobile={isMobile} />
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// ABOUT PAGE
// ═══════════════════════════════════════════════════════════════════
const AboutPage = ({ isMobile }) => {
  useReveal();
  return (
    <>
      <PageHero label="COMPANY" title="ABOUT" subtitle="株式会社隼 / HAYABUSA Inc. の会社概要" isMobile={isMobile} />

      {/* MVV */}
      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'var(--white)' }}>
        <div className="container">
          <div className="reveal" style={{ marginBottom: 56 }}>
            <span className="label-line">OUR IDENTITY</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 12 }}>MVV</h2>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : 'repeat(3,1fr)', gap: 24, marginBottom: 64 }}>
            {[
              { label: 'MISSION', jp: '一度きりの人生に、本気で羽ばたく機会を。', body: '株式会社隼は、YouTube・TikTok・LINEを横断する戦略型SNSプロデュースで、挑戦するすべての人の事業を加速させます。' },
              { label: 'VISION', jp: '誰もが、本気で羽ばたける場所であり続ける。', body: '関わるすべての人が、本気を出せる環境を。隼という場所そのものが、人を羽ばたかせる存在であり続けます。' },
              { label: 'VALUES', jp: 'OWN IT / SPEED IS RESPECT / KEEP THE VIBE UP', body: '自分の人生は自分で背負う。だから、誰よりも速く動く。場のエネルギーは自分が作る。' },
            ].map((item, i) => (
              <div key={i} className="reveal" style={{ padding: '36px 28px', background: i === 1 ? 'var(--blue)' : 'var(--blue-tint)', borderRadius: 14, border: '1px solid var(--line)', transitionDelay: (i * 0.1) + 's' }}>
                <span style={{ fontFamily: 'var(--font-en)', fontSize: 12, letterSpacing: '0.32em', fontWeight: 700, color: i === 1 ? 'rgba(255,255,255,0.7)' : 'var(--blue)', display: 'block', marginBottom: 16 }}>{item.label}</span>
                <p style={{ fontFamily: 'var(--font-jp-serif)', fontWeight: 900, fontSize: isMobile ? 16 : 18, color: i === 1 ? '#fff' : 'var(--ink)', lineHeight: 1.65, marginBottom: 16 }}>{item.jp}</p>
                <p style={{ fontSize: 13, color: i === 1 ? 'rgba(255,255,255,0.8)' : 'var(--ink-3)', lineHeight: 1.9 }}>{item.body}</p>
              </div>
            ))}
          </div>

          {/* Message */}
          <div className="reveal" style={{ marginBottom: 64 }}>
            <span className="label-line">MESSAGE</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 40 }}>MESSAGE</h2>
            <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: 24 }}>
              {[1, 2].map((n) => (
                <div key={n} style={{ background: 'var(--blue-tint)', borderRadius: 14, padding: '36px 28px', border: '1px solid var(--line)', display: 'flex', flexDirection: 'column', gap: 20 }}>
                  <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
                    <div style={{ width: 72, height: 72, borderRadius: 999, background: 'var(--sky)', border: '2px dashed var(--blue)', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
                      <span style={{ fontSize: 28 }}>👤</span>
                    </div>
                    <div>
                      <p style={{ fontSize: 11, color: 'var(--blue)', fontWeight: 700, letterSpacing: '0.1em', marginBottom: 4 }}>代表取締役</p>
                      <p style={{ fontSize: 14, color: 'var(--ink-4)' }}>氏名・写真・メッセージは後日追記予定</p>
                    </div>
                  </div>
                  <div style={{ padding: '20px', background: 'var(--white)', borderRadius: 10, border: '1px dashed var(--line)' }}>
                    <p style={{ fontSize: 13, color: 'var(--ink-4)', lineHeight: 2, textAlign: 'center' }}>代表メッセージを準備中です。<br />しばらくお待ちください。</p>
                  </div>
                </div>
              ))}
            </div>
          </div>

          {/* Company Table */}
          <div className="reveal">
            <span className="label-line">COMPANY INFO</span>
            <h2 className="h-en-display" style={{ fontSize: isMobile ? 'clamp(48px,12vw,72px)' : 'clamp(80px,8vw,120px)', marginBottom: 32 }}>COMPANY</h2>
            <div style={{ background: 'var(--blue-tint)', borderRadius: 14, overflow: 'hidden', border: '1px solid var(--line)' }}>
              {[
                ['会社名','株式会社隼（HAYABUSA Inc.）'],
                ['設立','2026年4月'],
                ['資本金','100万円'],
                ['所在地','福岡県福岡市'],
                ['代表者','代表取締役（2名）'],
                ['事業内容','SNSプロダクション事業 / エンターテインメント事業'],
              ].map(([k,v], i, arr) => (
                <div key={k} style={{ display: 'grid', gridTemplateColumns: isMobile ? '100px 1fr' : '200px 1fr', padding: isMobile ? '16px 20px' : '20px 32px', borderBottom: i < arr.length - 1 ? '1px solid var(--line)' : 'none', alignItems: 'baseline', background: i % 2 === 0 ? 'transparent' : 'rgba(255,255,255,0.5)' }}>
                  <span style={{ fontSize: isMobile ? 12 : 13, color: 'var(--ink-2)', fontWeight: 700, letterSpacing: '0.05em' }}>{k}</span>
                  <span style={{ fontSize: isMobile ? 13 : 15, color: 'var(--ink)', fontWeight: 500 }}>{v}</span>
                </div>
              ))}
            </div>
          </div>
        </div>
      </section>

      <CTASection isMobile={isMobile} />
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// CONTACT PAGE
// ═══════════════════════════════════════════════════════════════════
const CONTACT_EMAIL = 'info@hayabusa-inc.com';

const ContactPage = ({ isMobile }) => {
  useReveal();
  const { navigate } = useRouter();
  const [form, setForm] = useState({ name: '', company: '', email: '', subject: '一般お問い合わせ', message: '' });
  const update = (k) => (e) => setForm({ ...form, [k]: e.target.value });

  const onSubmit = (e) => {
    e.preventDefault();
    const subject = `【お問い合わせ】${form.subject}${form.company ? ` / ${form.company}` : ''}`;
    const body = [`お名前: ${form.name}`, `会社名: ${form.company}`, `メール: ${form.email}`, `お問い合わせ種別: ${form.subject}`, '', '--- ご相談内容 ---', form.message].join('\n');
    const a = document.createElement('a');
    a.href = `mailto:${CONTACT_EMAIL}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
    a.click();
    navigate('/contact/thanks');
  };

  const inputStyle = { width: '100%', padding: '14px 16px', fontSize: 14, fontFamily: 'inherit', color: 'var(--ink)', background: 'rgba(255,255,255,0.92)', border: '1px solid var(--line)', borderRadius: 10, transition: 'border-color 0.2s,box-shadow 0.2s', outline: 'none' };
  const labelStyle = { display: 'block', textAlign: 'left', fontSize: 12, fontWeight: 700, color: 'var(--ink-2)', marginBottom: 6, letterSpacing: '0.05em' };
  const onFocus = (e) => { e.currentTarget.style.borderColor = 'var(--blue)'; e.currentTarget.style.boxShadow = '0 0 0 3px rgba(27,93,230,0.12)'; };
  const onBlur = (e) => { e.currentTarget.style.borderColor = 'var(--line)'; e.currentTarget.style.boxShadow = 'none'; };

  return (
    <>
      <PageHero label="CONTACT" title="CONTACT" subtitle="ご相談・ご質問・お見積りなど、お気軽にお問い合わせください。" isMobile={isMobile} />

      <section style={{ padding: isMobile ? '80px 0' : '120px 0', background: 'linear-gradient(180deg,#F4F8FD 0%,#FFFFFF 100%)', position: 'relative', overflow: 'hidden' }}>
        <div style={{ position: 'absolute', inset: 0, zIndex: 0, backgroundImage: 'url(mockups/bg_06_contact_footer.png)', backgroundSize: 'cover', backgroundPosition: 'center', opacity: 0.25 }} />
        <div className="container reveal" style={{ position: 'relative', zIndex: 2 }}>
          <form onSubmit={onSubmit} style={{ maxWidth: 640, margin: '0 auto', textAlign: 'left', display: 'grid', gap: 16 }}>
            <div style={{ display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr', gap: 16 }}>
              <div>
                <label style={labelStyle}>お名前 <span style={{ color: 'var(--blue)' }}>*</span></label>
                <input required type="text" value={form.name} onChange={update('name')} style={inputStyle} onFocus={onFocus} onBlur={onBlur} placeholder="山田 太郎" />
              </div>
              <div>
                <label style={labelStyle}>会社名</label>
                <input type="text" value={form.company} onChange={update('company')} style={inputStyle} onFocus={onFocus} onBlur={onBlur} placeholder="株式会社○○" />
              </div>
            </div>
            <div>
              <label style={labelStyle}>メールアドレス <span style={{ color: 'var(--blue)' }}>*</span></label>
              <input required type="email" value={form.email} onChange={update('email')} style={inputStyle} onFocus={onFocus} onBlur={onBlur} placeholder="example@company.com" />
            </div>
            <div>
              <label style={labelStyle}>お問い合わせ種別</label>
              <select value={form.subject} onChange={update('subject')} style={{ ...inputStyle, appearance: 'none', backgroundImage: 'linear-gradient(45deg,transparent 50%,var(--ink-3) 50%),linear-gradient(135deg,var(--ink-3) 50%,transparent 50%)', backgroundPosition: 'calc(100% - 20px) 50%,calc(100% - 14px) 50%', backgroundSize: '6px 6px,6px 6px', backgroundRepeat: 'no-repeat' }} onFocus={onFocus} onBlur={onBlur}>
                <option>一般お問い合わせ</option>
                <option>SNSプロデュースのご相談</option>
                <option>YouTube運用のご相談</option>
                <option>TikTok運用のご相談</option>
                <option>LINE構築のご相談</option>
                <option>採用・パートナーシップ</option>
                <option>取材・メディアの方</option>
                <option>その他</option>
              </select>
            </div>
            <div>
              <label style={labelStyle}>ご相談内容 <span style={{ color: 'var(--blue)' }}>*</span></label>
              <textarea required value={form.message} onChange={update('message')} rows={6} style={{ ...inputStyle, resize: 'vertical', minHeight: 140 }} onFocus={onFocus} onBlur={onBlur} placeholder="お気軽にご記入ください" />
            </div>
            <button type="submit" style={{ marginTop: 8, padding: '18px 40px', background: 'var(--blue)', color: 'var(--white)', fontWeight: 700, fontSize: 15, borderRadius: 999, boxShadow: '0 8px 20px rgba(27,93,230,0.28)', cursor: 'pointer', fontFamily: 'var(--font-en)', letterSpacing: '0.18em', border: 'none', transition: 'transform 0.2s,box-shadow 0.2s' }}
              onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.boxShadow = '0 12px 24px rgba(27,93,230,0.36)'; }}
              onMouseLeave={(e) => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = '0 8px 20px rgba(27,93,230,0.28)'; }}
            >送信する</button>
            <p style={{ fontSize: 11, color: 'var(--ink-4)', textAlign: 'center', marginTop: 4 }}>送信ボタンを押すとお使いのメールアプリが起動します</p>
          </form>
        </div>
      </section>

      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// CONTACT THANKS PAGE
// ═══════════════════════════════════════════════════════════════════
const ThanksPage = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <>
      <section style={{ minHeight: '80vh', display: 'flex', alignItems: 'center', justifyContent: 'center', background: 'linear-gradient(180deg,#FFFFFF 0%,#E8F1FA 100%)', paddingTop: 100, paddingBottom: 80, textAlign: 'center' }}>
        <div className="container">
          <div style={{ width: 64, height: 64, borderRadius: 999, background: 'var(--blue)', display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 28px', boxShadow: '0 8px 24px rgba(27,93,230,0.28)' }}>
            <svg viewBox="0 0 32 32" fill="none" stroke="#fff" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" style={{ width: 32, height: 32 }}>
              <polyline points="5,16 13,24 27,8" />
            </svg>
          </div>
          <h1 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(24px,6vw,32px)' : 'clamp(32px,3.6vw,48px)', marginBottom: 16 }}>お問い合わせありがとうございます</h1>
          <p style={{ fontSize: isMobile ? 14 : 16, color: 'var(--ink-3)', lineHeight: 2, marginBottom: 40 }}>3営業日以内にご連絡いたします。<br />しばらくお待ちください。</p>
          <a href="/" onClick={(e) => { e.preventDefault(); navigate('/'); }}
            style={{ display: 'inline-flex', alignItems: 'center', gap: 10, padding: '14px 32px', border: '1.5px solid var(--ink)', borderRadius: 999, fontWeight: 700, fontSize: 14, transition: 'all 0.3s' }}
            onMouseEnter={e => { e.currentTarget.style.background = 'var(--ink)'; e.currentTarget.style.color = 'var(--white)'; }}
            onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = 'var(--ink)'; }}
          ><span style={{ fontFamily: 'var(--font-en)' }}>←</span> トップへ戻る</a>
        </div>
      </section>
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// PRIVACY PAGE
// ═══════════════════════════════════════════════════════════════════
const PrivacyPage = ({ isMobile }) => {
  useReveal();
  const h3Style = { fontSize: 16, fontWeight: 700, color: 'var(--ink)', marginBottom: 8, marginTop: 32 };
  const pStyle = { fontSize: 14, color: 'var(--ink-3)', lineHeight: 2 };
  return (
    <>
      <PageHero label="LEGAL" title="PRIVACY" subtitle="プライバシーポリシー" isMobile={isMobile} />
      <section style={{ padding: isMobile ? '60px 0 80px' : '80px 0 120px', background: 'var(--white)' }}>
        <div className="container">
          <div style={{ maxWidth: 800, margin: '0 auto' }}>
            <p style={{ ...pStyle, marginBottom: 24 }}>株式会社隼（以下「当社」といいます）は、お客様の個人情報の取扱いについて、以下のとおりプライバシーポリシーを定めます。</p>
            <h3 style={h3Style}>1. 収集する情報</h3>
            <p style={pStyle}>当社は、お問い合わせフォーム等を通じて、お名前、会社名、メールアドレス、お問い合わせ内容等の情報を取得することがあります。</p>
            <h3 style={h3Style}>2. 利用目的</h3>
            <p style={pStyle}>取得した個人情報は、お問い合わせへの回答、サービスのご案内、契約の履行、その他正当な業務遂行のために利用します。</p>
            <h3 style={h3Style}>3. 第三者提供</h3>
            <p style={pStyle}>法令に基づく場合またはお客様の同意がある場合を除き、個人情報を第三者に提供することはありません。</p>
            <h3 style={h3Style}>4. 安全管理</h3>
            <p style={pStyle}>個人情報の漏えい・滅失・毀損を防止するため、適切な安全管理措置を講じます。</p>
            <h3 style={h3Style}>5. 開示・訂正・削除</h3>
            <p style={pStyle}>ご本人からの個人情報の開示、訂正、削除等のご請求があった場合、合理的な範囲で速やかに対応します。</p>
            <h3 style={h3Style}>6. Cookieの使用</h3>
            <p style={pStyle}>当サイトでは、サービス向上のためCookieを使用する場合があります。Cookieの使用を希望されない場合は、ブラウザの設定にてCookieを無効にしてください。</p>
            <h3 style={h3Style}>7. アクセス解析</h3>
            <p style={pStyle}>当サイトでは、サービス改善を目的としてアクセス解析ツールを使用する場合があります。収集されるデータは匿名であり、個人を特定するものではありません。</p>
            <h3 style={h3Style}>8. お問い合わせ窓口</h3>
            <p style={pStyle}>本ポリシーに関するお問い合わせは、当社お問い合わせフォームよりご連絡ください。<br />運営者：株式会社隼（HAYABUSA Inc.）<br />所在地：福岡県福岡市<br />メール：info@hayabusa-inc.com</p>
            <h3 style={h3Style}>9. 改定</h3>
            <p style={pStyle}>本ポリシーの内容は、必要に応じて改定する場合があります。改定後の内容は本サイトに掲載した時点で効力を生じます。</p>
            <p style={{ ...pStyle, marginTop: 40, color: 'var(--ink-4)', fontSize: 12 }}>制定日：2026年4月<br />株式会社隼（HAYABUSA Inc.）</p>
          </div>
        </div>
      </section>
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// 404 PAGE
// ═══════════════════════════════════════════════════════════════════
const NotFoundPage = ({ isMobile }) => {
  const { navigate } = useRouter();
  return (
    <>
      <section style={{ minHeight: '80vh', display: 'flex', alignItems: 'center', justifyContent: 'center', background: 'linear-gradient(180deg,#FFFFFF 0%,#E8F1FA 100%)', paddingTop: 100, textAlign: 'center' }}>
        <div className="container">
          <div style={{ fontFamily: 'var(--font-en)', fontSize: isMobile ? 100 : 180, fontWeight: 700, color: 'rgba(27,93,230,0.08)', lineHeight: 1, marginBottom: -16 }}>404</div>
          <h1 className="h-jp-bold" style={{ fontSize: isMobile ? 'clamp(20px,5vw,26px)' : 'clamp(28px,3vw,40px)', marginBottom: 16 }}>ページが見つかりません</h1>
          <p style={{ fontSize: isMobile ? 13 : 15, color: 'var(--ink-3)', lineHeight: 2, marginBottom: 40 }}>お探しのページは移動または削除された可能性があります。</p>
          <a href="/" onClick={(e) => { e.preventDefault(); navigate('/'); }}
            style={{ display: 'inline-flex', alignItems: 'center', gap: 10, padding: '14px 32px', background: 'var(--blue)', color: '#fff', borderRadius: 999, fontWeight: 700, fontSize: 14, boxShadow: '0 8px 20px rgba(27,93,230,0.28)', transition: 'all 0.3s' }}
            onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-2px)'; }}
            onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; }}
          ><span style={{ fontFamily: 'var(--font-en)' }}>←</span> トップへ戻る</a>
        </div>
      </section>
      <Footer isMobile={isMobile} />
    </>
  );
};

// ═══════════════════════════════════════════════════════════════════
// APP
// ═══════════════════════════════════════════════════════════════════
const ScrollToTop = ({ visible }) => (
  visible ? (
    <button
      onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}
      aria-label="ページトップへ"
      style={{ position: 'fixed', bottom: 28, right: 28, zIndex: 90, width: 44, height: 44, borderRadius: 999, background: 'var(--blue)', color: '#fff', border: 'none', cursor: 'pointer', boxShadow: '0 4px 18px rgba(27,93,230,0.38)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 18, transition: 'all 0.3s', animation: 'fadeIn 0.3s ease' }}
      onMouseEnter={e => e.currentTarget.style.transform = 'translateY(-3px)'}
      onMouseLeave={e => e.currentTarget.style.transform = 'translateY(0)'}
    >↑</button>
  ) : null
);

const KNOWN_PATHS = ['/', '/service/sns', '/service/entertainment', '/about', '/contact', '/contact/thanks', '/privacy'];

const AppInner = () => {
  const { path } = useRouter();
  const [scrolled, setScrolled] = useState(false);
  const [menuOpen, setMenuOpen] = useState(false);
  const [displayPath, setDisplayPath] = useState(path);
  const [opacity, setOpacity] = useState(1);
  const isMobile = useIsMobile();
  const [loaded, setLoaded] = useState(() => !!sessionStorage.getItem('hayabusa_loaded'));
  const handleLoadDone = useCallback(() => { sessionStorage.setItem('hayabusa_loaded', '1'); setLoaded(true); }, []);

  // Update page title
  useEffect(() => {
    document.title = PAGE_TITLES[path] || '株式会社隼 / HAYABUSA Inc.';
  }, [path]);

  // Page fade transition
  useEffect(() => {
    if (path === displayPath) return;
    setOpacity(0);
    const t = setTimeout(() => { setDisplayPath(path); setOpacity(1); }, 180);
    return () => clearTimeout(t);
  }, [path]);

  useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 40);
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  useEffect(() => { setMenuOpen(false); }, [path]);

  const is404 = !KNOWN_PATHS.includes(displayPath);

  const getPage = () => {
    if (displayPath === '/') return <HomePage isMobile={isMobile} />;
    if (displayPath === '/service/sns') return <SNSPage isMobile={isMobile} />;
    if (displayPath === '/service/entertainment') return <EntertainmentPage isMobile={isMobile} />;
    if (displayPath === '/about') return <AboutPage isMobile={isMobile} />;
    if (displayPath === '/contact') return <ContactPage isMobile={isMobile} />;
    if (displayPath === '/contact/thanks') return <ThanksPage isMobile={isMobile} />;
    if (displayPath === '/privacy') return <PrivacyPage isMobile={isMobile} />;
    return <NotFoundPage isMobile={isMobile} />;
  };

  return (
    <>
      {!loaded && <LoadingScreen onDone={handleLoadDone} />}
      <Nav scrolled={scrolled} isMobile={isMobile} menuOpen={menuOpen} setMenuOpen={setMenuOpen} />
      <div style={{ opacity, transition: 'opacity 0.18s ease' }}>
        {getPage()}
      </div>
      <ScrollToTop visible={scrolled} />
    </>
  );
};

const App = () => (
  <RouterProvider>
    <AppInner />
  </RouterProvider>
);

ReactDOM.createRoot(document.getElementById('root')).render(<App />);
