// Variation WARM — 温かみのある和風エディトリアル
// アースカラー × 明朝体 × 手書き感 × フルレスポンシブ

/* ─── Design tokens ─── */
const W = {
  cream:   '#faf6f0',
  paper:   '#fffdf9',
  ink:     '#2d2218',
  inkMid:  '#5a3e2b',
  inkSoft: '#7a5d45',
  terra:   '#b85c38',
  terraL:  '#e8c4ae',
  sage:    '#4a6741',
  sageL:   '#ccdfc8',
  rule:    '#e8ddd0',
  serif:   '"Shippori Mincho", "Times New Roman", serif',
  hand:    '"Caveat", cursive',
  sans:    '"Noto Sans JP", sans-serif',
  latin:   '"Cormorant Garamond", serif',
};

/* ─── Global CSS ─── */
function WarmStyles() {
  return (
    <style>{`
      @keyframes warm-fade-up {
        from { opacity:0; transform:translateY(28px); }
        to   { opacity:1; transform:translateY(0); }
      }
      @keyframes warm-marquee {
        from { transform:translateX(0); }
        to   { transform:translateX(-50%); }
      }
      @keyframes warm-float {
        0%,100% { transform:translateY(0); }
        50%      { transform:translateY(-8px); }
      }
      .w-reveal {
        opacity:0;
        transform:translateY(28px);
        transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
      }
      .w-reveal.vis { opacity:1; transform:translateY(0); }
      .w-d1{transition-delay:.08s!important}
      .w-d2{transition-delay:.18s!important}
      .w-d3{transition-delay:.28s!important}
      .w-d4{transition-delay:.38s!important}
      .w-d5{transition-delay:.48s!important}

      .w-nav {
        position:sticky; top:0; z-index:200;
        backdrop-filter:blur(20px);
        -webkit-backdrop-filter:blur(20px);
        background:rgba(250,246,240,.92);
        border-bottom:1px solid ${W.rule};
        transition:box-shadow .3s ease;
      }
      .w-nav.scrolled { box-shadow:0 4px 32px rgba(45,34,24,.09); }

      .w-card {
        transition:transform .35s ease, box-shadow .35s ease;
      }
      .w-card:hover {
        transform:translateY(-6px);
        box-shadow:0 20px 48px rgba(45,34,24,.12)!important;
      }

      .w-btn {
        display:inline-block;
        transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
      }
      .w-btn:hover {
        transform:translateY(-2px);
        box-shadow:0 8px 24px rgba(184,92,56,.3);
      }
      .w-btn-outline:hover {
        background:${W.ink}!important;
        color:${W.paper}!important;
        box-shadow:0 8px 24px rgba(45,34,24,.2);
      }

      .w-marquee-track {
        display:flex;
        white-space:nowrap;
        animation:warm-marquee 26s linear infinite;
      }
      .w-marquee-track:hover { animation-play-state:paused; }

      .w-img-zoom img {
        transition:transform .6s cubic-bezier(.16,1,.3,1);
      }
      .w-img-zoom:hover img { transform:scale(1.06); }

      .w-process-row {
        transition:background .3s ease, border-color .3s ease;
      }
      .w-process-row:hover {
        background:rgba(184,92,56,.04)!important;
      }

      .w-faq-item summary {
        cursor:pointer;
        list-style:none;
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding:20px 0;
      }
      .w-faq-item summary::-webkit-details-marker { display:none; }
      .w-faq-item[open] .w-faq-arrow { transform:rotate(180deg); }
      .w-faq-arrow { transition:transform .3s ease; }

      .w-plan-best {
        position:relative;
        background:${W.terra}!important;
        color:${W.paper}!important;
      }
      .w-plan-best .w-plan-price { color:${W.paper}!important; }
      .w-plan-best .w-plan-sub   { color:rgba(255,255,255,.7)!important; }
      .w-plan-best .w-plan-feat  { color:rgba(255,255,255,.85)!important; }
      .w-plan-best .w-plan-dot   { color:rgba(255,255,255,.6)!important; }
      .w-plan-best .w-plan-div   { border-color:rgba(255,255,255,.2)!important; }

      /* ── Responsive ── */
      .w-nav-hamburger { display:none; }
      @media (max-width:768px) {
        .w-nav-inner  { padding:18px 20px!important; }
        .w-nav-links  { display:none!important; }
        .w-nav-cta    { display:none!important; }
        .w-nav-hamburger { display:flex!important; }
        .w-hero-inner { padding:40px 20px 0!important; flex-direction:column!important; gap:28px!important; }
        .w-hero-text  { text-align:center!important; flex:1 1 auto!important; }
        .w-hero-eyebrow { font-size:13px!important; }
        .w-hero-h1    { font-size:42px!important; }
        .w-hero-monitor span { justify-content:center!important; }
        .w-hero-badges{ justify-content:center!important; }
        .w-hero-stats img { max-width:380px!important; margin:0 auto; }
        .w-hero-btns  { flex-direction:column!important; align-items:center!important; }
        .w-hero-img img { max-width:320px!important; }
        .w-section    { padding:64px 20px!important; }
        .w-grid-2     { grid-template-columns:1fr!important; }
        .w-grid-3     { grid-template-columns:1fr!important; }
        .w-grid-2c    { grid-template-columns:1fr!important; gap:40px!important; }
        .w-about-img  { width:180px!important; height:220px!important; }
        .w-stat-row   { gap:24px!important; flex-wrap:wrap!important; }
        .w-process-grid { grid-template-columns:60px 1fr!important; gap:16px!important; }
        .w-process-body { font-size:15px!important; grid-column:1/-1!important; margin-top:-8px!important; }
        .w-plans      { grid-template-columns:1fr!important; }
        .w-contact-grid { grid-template-columns:1fr!important; }
        .w-footer     { flex-direction:column!important; gap:10px!important; text-align:center!important; padding:28px 20px!important; }
        .w-pricing-grid { grid-template-columns:1fr!important; }
        .w-plan-grid    { grid-template-columns:1fr!important; }
        .w-h2         { font-size:38px!important; }
        .w-nav-cta    { padding:8px 14px!important; font-size:14px!important; }
      }
      @media (max-width:480px) {
        .w-hero-h1 { font-size:42px!important; }
        .w-plans   { grid-template-columns:1fr!important; }
        .w-plan-grid { grid-template-columns:1fr!important; }
      }
    `}</style>
  );
}

/* ─── Hooks ─── */
function useReveal() {
  React.useEffect(() => {
    const els = document.querySelectorAll('.w-reveal');
    const obs = new IntersectionObserver(
      (entries) => entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add('vis'); obs.unobserve(e.target); } }),
      { threshold: 0.1 }
    );
    els.forEach((el) => obs.observe(el));
    return () => obs.disconnect();
  }, []);
}

function useStickyNav() {
  React.useEffect(() => {
    const nav = document.querySelector('.w-nav');
    if (!nav) return;
    const fn = () => nav.classList.toggle('scrolled', window.scrollY > 10);
    window.addEventListener('scroll', fn, { passive: true });
    return () => window.removeEventListener('scroll', fn);
  }, []);
}

/* ─── Tiny bits ─── */
function SectionLabel({ text, light }) {
  return (
    <div style={{
      fontFamily: W.latin, fontStyle: 'italic',
      fontSize: 13, letterSpacing: '.32em',
      color: light ? 'rgba(255,255,255,.5)' : W.inkSoft,
      marginBottom: 14
    }}>
      {text}
    </div>
  );
}

function WarmPhoto({ id, alt, h = 220, focal = '50% 50%' }) {
  return (
    <div style={{ height: h, overflow: 'hidden', background: W.terraL, position: 'relative', flexShrink: 0 }}>
      <img
        src={`https://images.unsplash.com/photo-${id}?w=1600&q=80&auto=format&fit=crop`}
        alt={alt}
        loading="lazy"
        style={{ width: '100%', height: '100%', objectFit: 'cover', objectPosition: focal, display: 'block' }}
      />
    </div>
  );
}

/* ─── Paper texture SVG ─── */
function PaperTexture() {
  return (
    <svg style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', pointerEvents: 'none', opacity: 0.25, mixBlendMode: 'multiply' }}>
      <filter id="wg">
        <feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" seed="5" />
        <feColorMatrix values="0 0 0 0 0.22  0 0 0 0 0.16  0 0 0 0 0.09  0 0 0 0.06 0" />
      </filter>
      <rect width="100%" height="100%" filter="url(#wg)" />
    </svg>
  );
}

/* ─── Marquee ─── */
function WarmMarquee() {
  const items = ['LP制作', 'ホームページ制作', 'SEO基本設定', '保守・ドメイン管理', 'スマホ最適化', 'LINE・メール完結', '全国対応', '24時間返信', '完全オンライン'];
  const chunk = items.map((t) => (
    <span key={t} style={{
      display: 'inline-flex', alignItems: 'center', gap: 16, paddingRight: 36,
      fontFamily: W.serif, fontSize: 16, color: W.paper
    }}>
      <span style={{ width: 4, height: 4, borderRadius: '50%', background: 'rgba(255,255,255,.4)', display: 'inline-block', flexShrink: 0 }} />
      {t}
    </span>
  ));
  return (
    <div style={{ overflow: 'hidden', background: W.terra, padding: '14px 0', borderTop: `1px solid rgba(255,255,255,.1)` }}>
      <div className="w-marquee-track">
        <span style={{ display: 'inline-flex' }}>{chunk}</span>
        <span style={{ display: 'inline-flex' }}>{chunk}</span>
      </div>
    </div>
  );
}

/* ─── News (Notion-driven) ─── */
function WarmNews() {
  const [items, setItems] = React.useState(null);
  React.useEffect(() => {
    let cancelled = false;
    fetch('/api/news')
      .then(r => r.ok ? r.json() : { items: [] })
      .then(d => { if (!cancelled) setItems(d.items || []); })
      .catch(() => { if (!cancelled) setItems([]); });
    return () => { cancelled = true; };
  }, []);

  // 配列が無い or 空ならセクション自体を出さない
  if (!items || items.length === 0) return null;

  const splitDate = (iso) => {
    if (!iso) return null;
    const d = new Date(iso);
    if (isNaN(d)) return null;
    return {
      year: d.getFullYear(),
      month: String(d.getMonth() + 1).padStart(2, '0'),
      day: String(d.getDate()).padStart(2, '0'),
    };
  };

  return (
    <section id="news" className="w-news" style={{ position: 'relative', padding: '90px 48px 100px', background: W.paper, borderTop: `1px solid ${W.rule}`, overflow: 'hidden' }}>
      <PaperTexture />
      {/* 装飾円 */}
      <div style={{ position: 'absolute', top: 40, left: -80, width: 220, height: 220, borderRadius: '50%', background: W.sageL, opacity: 0.35, pointerEvents: 'none' }} />
      <div style={{ position: 'absolute', bottom: -60, right: -60, width: 280, height: 280, borderRadius: '50%', background: W.terraL, opacity: 0.22, pointerEvents: 'none' }} />

      <div style={{ maxWidth: 960, margin: '0 auto', position: 'relative', zIndex: 1 }}>
        {/* セクションヘッダ */}
        <div style={{ textAlign: 'center', marginBottom: 56 }}>
          <SectionLabel text="Journal" />
          <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 40, fontWeight: 600, margin: '0 0 10px', color: W.ink, letterSpacing: '.04em' }}>お知らせ</h2>
          <div style={{ display: 'inline-block' }}><Squiggle w={92} color={W.terra} /></div>
          <p style={{ marginTop: 18, fontFamily: W.sans, fontSize: 15, color: W.inkSoft, lineHeight: 1.85 }}>
            最新の更新は <span style={{ fontFamily: W.latin, fontStyle: 'italic', color: W.terra, fontWeight: 600 }}>Notion</span> から自動で取得しています
          </p>
        </div>

        {/* 投稿カード一覧 */}
        <div style={{ display: 'grid', gap: 22 }}>
          {items.slice(0, 5).map((it, i) => {
            const dt = splitDate(it.date);
            const isLatest = i === 0;
            return (
              <article
                key={it.id}
                className="w-news-card"
                style={{
                  position: 'relative',
                  display: 'grid',
                  gridTemplateColumns: '110px 1fr',
                  gap: 28,
                  alignItems: 'start',
                  background: isLatest ? W.cream : W.paper,
                  padding: '28px 32px',
                  borderRadius: 14,
                  border: `1px solid ${isLatest ? W.terraL : W.rule}`,
                  boxShadow: isLatest ? '0 8px 28px rgba(184,92,56,.08)' : '0 2px 14px rgba(45,34,24,.04)',
                  transition: 'transform .3s ease, box-shadow .3s ease',
                }}
              >
                {/* 左アクセントライン */}
                <div style={{ position: 'absolute', left: 0, top: 20, bottom: 20, width: 3, background: isLatest ? W.terra : W.sage, borderRadius: '0 2px 2px 0' }} />

                {/* NEW バッジ */}
                {isLatest && (
                  <span style={{
                    position: 'absolute', top: -10, right: 20,
                    fontFamily: W.latin, fontStyle: 'italic', fontSize: 13, letterSpacing: '.22em',
                    background: W.terra, color: W.paper, padding: '4px 12px', borderRadius: 999,
                    textTransform: 'uppercase', boxShadow: '0 2px 8px rgba(184,92,56,.25)'
                  }}>★ New</span>
                )}

                {/* 日付スタンプ */}
                <div style={{
                  textAlign: 'center',
                  padding: '12px 6px',
                  borderRight: `1px dashed ${isLatest ? W.terraL : W.rule}`,
                }}>
                  {dt ? (
                    <>
                      <div style={{ fontFamily: W.latin, fontStyle: 'italic', fontSize: 15, color: W.inkSoft, letterSpacing: '.16em', marginBottom: 4 }}>
                        {dt.year}
                      </div>
                      <div style={{ fontFamily: W.serif, fontSize: 28, fontWeight: 600, color: isLatest ? W.terra : W.ink, lineHeight: 1, letterSpacing: '.02em' }}>
                        {dt.month}<span style={{ color: W.inkSoft, fontWeight: 400, margin: '0 2px' }}>/</span>{dt.day}
                      </div>
                      <div style={{ marginTop: 8, fontFamily: W.hand, fontSize: 14, color: W.sage, transform: 'rotate(-2deg)', display: 'inline-block' }}>
                        posted
                      </div>
                    </>
                  ) : (
                    <div style={{ fontFamily: W.serif, fontSize: 18, color: W.inkSoft }}>—</div>
                  )}
                </div>

                {/* 本文 */}
                <div style={{ paddingTop: 4 }}>
                  <h3 style={{
                    fontFamily: W.serif, fontSize: isLatest ? 22 : 18, fontWeight: 600,
                    margin: '0 0 10px', color: W.ink, lineHeight: 1.45, letterSpacing: '.02em'
                  }}>
                    {it.title}
                  </h3>
                  {it.body && (
                    <p style={{
                      margin: 0, fontFamily: W.sans, fontSize: 16, color: W.inkMid, lineHeight: 1.95
                    }}>
                      {it.body}
                    </p>
                  )}
                </div>
              </article>
            );
          })}
        </div>

        {/* フッタ装飾 */}
        <div style={{ textAlign: 'center', marginTop: 32, fontFamily: W.hand, fontSize: 16, color: W.inkSoft }}>
          ✎ お知らせは Notion で更新されると、約10分以内にサイトへ反映されます
        </div>
      </div>
    </section>
  );
}

/* ─── Decorative hand-drawn underline ─── */
function Squiggle({ color = W.terra, w = 120 }) {
  return (
    <svg width={w} height="12" viewBox={`0 0 ${w} 12`} style={{ display: 'block', marginTop: 6 }}>
      <path d={`M2 8 Q${w*0.25} 2 ${w*0.5} 8 T${w-2} 8`} stroke={color} strokeWidth="2" fill="none" strokeLinecap="round" />
    </svg>
  );
}

/* ─── Hero trust-stat icons ─── */
function StatIcon({ name }) {
  const c = W.terra;
  const p = { fill: 'none', stroke: c, strokeWidth: 1.7, strokeLinecap: 'round', strokeLinejoin: 'round' };
  const wrap = (kids) => (
    <svg width="19" height="19" viewBox="0 0 24 24" aria-hidden="true" style={{ display: 'block' }}>{kids}</svg>
  );
  if (name === 'hand') {
    // 「丸投げOK」＝おまかせ → チェック付きハート/手のひら（シンプルなチェック丸）
    return wrap(<>
      <path {...p} d="M5 13l4 4 10-10" />
    </>);
  }
  if (name === 'clock') {
    return wrap(<>
      <circle {...p} cx="12" cy="12" r="8" />
      <path {...p} d="M12 8v4l3 2" />
    </>);
  }
  // pin
  return wrap(<>
    <path {...p} d="M12 21s6-5.3 6-10a6 6 0 1 0-12 0c0 4.7 6 10 6 10z" />
    <circle {...p} cx="12" cy="11" r="2.2" />
  </>);
}

/* ─── LINE consultation button ─── */
function LineButton({ size = 'md', full = false }) {
  const big = size === 'lg';
  return (
    <a href="https://lin.ee/V5YFhDJ" target="_blank" rel="noopener" className="w-btn" style={{
      display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 8,
      background: '#06C755', color: '#fff',
      padding: big ? '18px 38px' : '14px 30px',
      borderRadius: 999, fontFamily: W.serif, fontWeight: 600,
      fontSize: big ? 16 : 14, letterSpacing: '.04em', whiteSpace: 'nowrap',
      width: full ? '100%' : 'auto',
      boxShadow: '0 4px 12px rgba(6,199,85,.28)'
    }}>
      <span style={{ fontFamily: W.latin, fontWeight: 700, fontSize: big ? 18 : 16 }}>LINE</span>
      <span>で無料相談する</span>
    </a>
  );
}

/* ─── Field ─── */
function Field({ label, placeholder, area, name, required, type }) {
  const base = {
    display: 'block', width: '100%', marginTop: 6,
    background: W.cream, border: `1.5px solid ${W.rule}`,
    borderRadius: 8, padding: '12px 14px',
    fontFamily: W.sans, fontSize: 16, color: W.ink,
    boxSizing: 'border-box', outline: 'none',
    transition: 'border-color .2s ease',
  };
  return (
    <label style={{ display: 'block', fontSize: 14, color: W.inkSoft, fontFamily: W.sans }}>
      {label}{required && <span style={{ color: W.terra, marginLeft: 4 }}>*</span>}
      {area
        ? <textarea name={name} placeholder={placeholder} rows={4} required={required} style={{ ...base, resize: 'none' }} />
        : <input name={name} type={type || 'text'} placeholder={placeholder} required={required} style={base} />
      }
    </label>
  );
}

/* ─── Contact Form with Formspree ─── */
function ContactForm() {
  const FORM_ID = 'xgoqzrvw';
  const [status, setStatus] = React.useState('idle'); // idle | sending | success | error

  const handleSubmit = async (e) => {
    e.preventDefault();
    setStatus('sending');
    const data = new FormData(e.target);
    try {
      const res = await fetch(`https://formspree.io/f/${FORM_ID}`, {
        method: 'POST',
        body: data,
        headers: { Accept: 'application/json' },
      });
      if (res.ok) {
        setStatus('success');
        e.target.reset();
      } else {
        setStatus('error');
      }
    } catch {
      setStatus('error');
    }
  };

  const inputBase = {
    display: 'block', width: '100%', marginTop: 6,
    background: W.cream, border: `1.5px solid ${W.rule}`,
    borderRadius: 8, padding: '12px 14px',
    fontFamily: W.sans, fontSize: 16, color: W.ink,
    boxSizing: 'border-box', outline: 'none',
    transition: 'border-color .2s ease',
  };

  if (status === 'success') {
    return (
      <div style={{
        background: W.paper, padding: '56px 36px',
        borderRadius: 14, border: `1px solid ${W.sageL}`,
        boxShadow: '0 4px 24px rgba(45,34,24,.07)',
        textAlign: 'center'
      }}>
        <div style={{ fontSize: 48, marginBottom: 16 }}>✉️</div>
        <div style={{ fontFamily: W.serif, fontSize: 22, fontWeight: 600, color: W.sage, marginBottom: 12 }}>
          送信しました！
        </div>
        <p style={{ color: W.inkMid, fontSize: 16, lineHeight: 1.85 }}>
          ありがとうございます。<br />
          24時間以内にご返信いたします。
        </p>
        <button onClick={() => setStatus('idle')} style={{
          marginTop: 24, background: 'transparent',
          border: `1.5px solid ${W.rule}`, borderRadius: 6,
          padding: '10px 24px', fontFamily: W.serif, fontSize: 15,
          color: W.inkSoft, cursor: 'pointer'
        }}>別の内容を送る</button>
      </div>
    );
  }

  return (
    <form onSubmit={handleSubmit} style={{
      background: W.paper, padding: '40px 36px',
      borderRadius: 14, border: `1px solid ${W.rule}`,
      boxShadow: '0 4px 24px rgba(45,34,24,.07)',
      display: 'grid', gap: 18
    }}>
      <Field label="お名前" name="name" placeholder="例：田中 さくら" required />
      <Field label="メールアドレス" name="email" type="email" placeholder="hello@example.com" required />
      <Field label="ご相談内容" name="message" placeholder="LP制作を検討しています。商品はハンドメイドアクセサリーで…" area required />

      {status === 'error' && (
        <p style={{ margin: 0, color: W.terra, fontSize: 15 }}>
          ⚠️ 送信に失敗しました。時間をおいて再度お試しください。
        </p>
      )}

      <button type="submit" disabled={status === 'sending'} className="w-btn" style={{
        marginTop: 8, background: status === 'sending' ? W.inkSoft : W.terra,
        color: W.paper, padding: '16px 24px', fontFamily: W.serif, fontSize: 15,
        letterSpacing: '.1em', borderRadius: 6, textAlign: 'center',
        border: 'none', cursor: status === 'sending' ? 'not-allowed' : 'pointer',
        width: '100%', transition: 'background .2s ease'
      }}>
        {status === 'sending' ? '送信中…' : '無料で相談してみる →'}
      </button>
    </form>
  );
}

/* ─── Inline Price Estimator ─── */
function PriceEstimator() {
  const S = window.SITE;
  const [planName, setPlanName] = React.useState(S.plans[0].name);
  const plan = S.plans.find(p => p.name === planName) || S.plans[0];
  const base = parseInt(plan.price.replace(/,/g, ''), 10);
  const MAKE_OPTS = [
    { key:'page',    label:'ページ追加（1ページごと）',                       price: 9800 },
    { key:'igfeed',  label:'Instagramフィード自動表示（SnapWidget・最新6件）', price: 9800 },
    { key:'booking', label:'予約システム連携（STORES予約／決済等）',           price:19800 },
    { key:'notion',  label:'お知らせ更新機能（Notion連携）',                   price:19800 },
    { key:'wp',      label:'WordPress化（自分で更新できる）',                  price:30000 },
  ];
  const selectedPlan = S.plans.find(p => p.name === planName) || S.plans[0];
  const [checked, setChecked] = React.useState([]);
  const toggle = (key) => setChecked(prev =>
    prev.includes(key) ? prev.filter(k => k !== key) : [...prev, key]
  );
  const oneTime = MAKE_OPTS.filter(o => checked.includes(o.key)).reduce((s,o) => s + o.price, 0);
  const monthly = selectedPlan.maintenancePrice || 2000;
  const total   = base + oneTime;

  const Row = ({ opt, isMonthly }) => (
    <label key={opt.key} style={{
      display:'flex', alignItems:'center', justifyContent:'space-between',
      padding:'11px 0', borderBottom:`1px solid ${W.rule}`,
      cursor:'pointer', gap:12, userSelect:'none'
    }}>
      <div style={{display:'flex', alignItems:'center', gap:10}}>
        <input
          type="checkbox"
          checked={checked.includes(opt.key)}
          onChange={() => toggle(opt.key)}
          style={{width:16, height:16, accentColor:W.terra, cursor:'pointer', flexShrink:0}}
        />
        <span style={{fontFamily:W.serif, fontSize:16, color:W.ink, lineHeight:1.4}}>{opt.label}</span>
      </div>
      <span style={{fontFamily:W.serif, fontSize:15, fontWeight:600, color: isMonthly ? W.sage : W.terra, whiteSpace:'nowrap', flexShrink:0}}>
        +¥{opt.price.toLocaleString()}{isMonthly ? '/月' : ''}
      </span>
    </label>
  );

  return (
    <div style={{background:W.paper, borderRadius:16, padding:'36px 32px', border:`1px solid ${W.rule}`, boxShadow:'0 2px 16px rgba(45,34,24,.06)'}}>
      <div style={{fontFamily:W.serif, fontSize:18, fontWeight:600, color:W.ink, marginBottom:6}}>概算を出してみる</div>
      <p style={{fontFamily:W.sans, fontSize:15, color:W.inkSoft, marginBottom:22, lineHeight:1.7, margin:'0 0 22px'}}>
        追加したいオプションにチェックを入れると、制作費の目安がわかります。
      </p>

      <div style={{fontSize:13, fontFamily:W.latin, fontStyle:'italic', letterSpacing:'.22em', color:W.inkSoft, marginBottom:8}}>BASE PLAN — 基本プラン</div>
      <div style={{display:'grid', gridTemplateColumns:'1fr 1fr', gap:8, marginBottom:22}}>
        {S.plans.map(p => (
          <button key={p.name} type="button" onClick={() => setPlanName(p.name)} style={{
            cursor:'pointer', textAlign:'left', padding:'12px 11px', borderRadius:6,
            border:`1.5px solid ${planName === p.name ? W.terra : W.rule}`,
            background:planName === p.name ? 'rgba(184,92,56,.06)' : W.paper,
            color:W.ink, fontFamily:W.serif
          }}>
            <span style={{display:'block', fontSize:15, fontWeight:600}}>{p.name}</span>
            <span style={{display:'block', fontSize:14, color:W.terra, marginTop:3}}>¥{p.price}〜</span>
          </button>
        ))}
      </div>

      <div style={{fontSize:13, fontFamily:W.latin, fontStyle:'italic', letterSpacing:'.22em', color:W.inkSoft, marginBottom:4}}>OPTION — 制作オプション</div>
      {MAKE_OPTS.map(o => <Row key={o.key} opt={o} isMonthly={false} />)}

      <div style={{marginTop:24, padding:'20px 22px', borderRadius:10, background:`rgba(184,92,56,.05)`, border:`1.5px solid ${W.terraL}`}}>
        <div style={{display:'flex', justifyContent:'space-between', alignItems:'baseline', marginBottom:10}}>
          <span style={{fontFamily:W.serif, fontSize:16, color:W.inkMid}}>制作費（概算）</span>
          <span style={{fontFamily:W.serif, fontSize:28, fontWeight:600, color:W.terra, lineHeight:1}}>
            ¥{total.toLocaleString()}<span style={{fontSize:15, color:W.inkSoft, fontWeight:400}}>〜</span>
          </span>
        </div>
        <div style={{display:'flex', justifyContent:'space-between', alignItems:'baseline'}}>
          <span style={{fontFamily:W.serif, fontSize:15, color:W.inkMid}}>おまかせ保守（全プラン込み）</span>
          <span style={{fontFamily:W.serif, fontSize:20, fontWeight:600, color:W.sage, lineHeight:1}}>
            ¥{monthly.toLocaleString()}<span style={{fontSize:14, color:W.inkSoft, fontWeight:400}}>/月</span>
          </span>
        </div>
      </div>

      <div style={{display:'flex', flexDirection:'column', gap:10, marginTop:18}}>
        <a href="#contact" className="w-btn" style={{
          display:'block', textAlign:'center', padding:'14px',
          background:W.terra, color:W.paper,
          fontFamily:W.serif, fontSize:16, letterSpacing:'.06em', borderRadius:3
        }}>この内容で相談する →</a>
        <a href="customize.html" className="w-btn w-btn-outline" style={{
          display:'block', textAlign:'center', padding:'12px',
          background:'transparent', color:W.inkMid,
          fontFamily:W.serif, fontSize:15, letterSpacing:'.04em', borderRadius:3,
          border:`1.5px solid ${W.rule}`
        }}>全オプションで詳しく見積もる →</a>
      </div>
    </div>
  );
}

function PricingPlanCard({ plan }) {
  return (
    <div style={{
      background: W.cream, borderRadius: 16, padding: '34px 28px 0',
      border: `1.5px solid ${plan.best ? W.terraL : W.rule}`,
      boxShadow: plan.best ? '0 8px 32px rgba(184,92,56,.1)' : '0 4px 20px rgba(45,34,24,.06)',
      position: 'relative', overflow: 'hidden'
    }}>
      <div style={{
        position: 'absolute', top: -1, left: 0, right: 0, height: 3,
        background: `linear-gradient(90deg, ${W.terra}, ${W.sage})`
      }} />
      <div style={{ textAlign: 'center', paddingBottom: 22, borderBottom: `1px solid ${W.rule}`, marginBottom: 20 }}>
        <div style={{ fontSize: 30, marginBottom: 8 }}>{plan.emoji}</div>
        <div style={{ fontFamily: W.serif, fontSize: 19, fontWeight: 600, color: W.ink, marginBottom: 4 }}>
          {plan.name}プラン
        </div>
        <div style={{ fontFamily: W.sans, fontSize: 14, color: W.inkSoft, marginBottom: 14 }}>
          {plan.sub}
        </div>
        {plan.limited && (
          <div style={{
            display: 'inline-block', background: W.terra, color: W.paper,
            fontFamily: W.serif, fontWeight: 700, fontSize: 13,
            padding: '4px 14px', borderRadius: 999, marginBottom: 10, letterSpacing: '.02em'
          }}>🎯 {plan.limited}</div>
        )}
        <div>
          {plan.originalPrice && (
            <span style={{ fontFamily: W.serif, fontSize: 18, color: W.inkSoft, marginRight: 8, textDecoration: 'line-through' }}>¥{plan.originalPrice}</span>
          )}
          <span style={{ fontFamily: W.serif, fontSize: 38, fontWeight: 600, color: W.terra, lineHeight: 1 }}>¥{plan.price}</span>
          <span style={{ fontSize: 15, color: W.inkSoft, marginLeft: 4 }}>〜（税込）</span>
        </div>
      </div>
      <ul style={{ listStyle: 'none', padding: 0, margin: '0 0 24px', display: 'flex', flexDirection: 'column', gap: 9 }}>
        {plan.features.filter(f => !f.startsWith('保守プラン')).map((f) => (
          <li key={f} style={{ display: 'flex', gap: 9, alignItems: 'flex-start', color: W.inkMid, fontSize: 15 }}>
            <span style={{ color: W.terra, flexShrink: 0, marginTop: 2 }}>•</span>
            <span>{f.split(/(\d+[回週ヶ月]+)/g).map((part, idx) =>
              idx % 2 === 1
                ? <strong key={idx} style={{ color: W.terra }}>{part}</strong>
                : part
            )}</span>
          </li>
        ))}
      </ul>
      {plan.demo && (
        <div style={{ margin: '0 -28px 0', borderTop: `1px solid ${W.rule}` }}>
          <a href={plan.demo.url} target="_blank" rel="noopener noreferrer"
            style={{ display: 'block', position: 'relative', textDecoration: 'none', overflow: 'hidden' }}>
            <img src={plan.demo.image} alt="制作デモ"
              style={{ width: '100%', height: 160, objectFit: 'cover', objectPosition: '50% 45%', display: 'block' }} />
            <div style={{
              position: 'absolute', inset: 0,
              background: 'linear-gradient(160deg, rgba(17,14,12,.55), rgba(107,78,61,.7))',
              display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: 6
            }}>
              <span style={{ color: 'rgba(255,255,255,.6)', fontSize: 10, letterSpacing: '0.18em', textTransform: 'uppercase' }}>Demo Site</span>
              {plan.demo.label && (
                <span style={{ color: '#fff', fontFamily: W.serif, fontSize: 17, fontWeight: 600, letterSpacing: '0.04em' }}>{plan.demo.label}</span>
              )}
              <span style={{ color: '#e8d9b8', fontSize: 15, fontWeight: 500, letterSpacing: '0.06em' }}>このレベルの制作が可能です →</span>
            </div>
          </a>
        </div>
      )}
      <div style={{
        margin: '0 -28px', padding: '16px 28px 18px',
        background: `rgba(74,103,65,.06)`,
        borderTop: `1px solid ${W.sageL}`
      }}>
        <div style={{ display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 10, marginBottom: 12 }}>
          <div>
            <div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
              <span style={{ fontFamily: W.serif, fontSize: 14, fontWeight: 600, color: W.sage, letterSpacing: '.08em' }}>全プラン込み・月額</span>
              <span style={{ display: 'inline-block', background: W.terra, color: '#fff', fontSize: 11, fontWeight: 700, letterSpacing: '.06em', padding: '2px 10px', borderRadius: 999, whiteSpace: 'nowrap' }}>初月無料</span>
            </div>
            <div style={{ fontFamily: W.serif, fontSize: 16, fontWeight: 600, color: W.sage, marginTop: 4 }}>おまかせ保守</div>
          </div>
          <div style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>
            <div style={{ fontFamily: W.serif, fontSize: 18, fontWeight: 600, color: W.sage }}>
              ¥{(plan.maintenancePrice || 2000).toLocaleString()}<span style={{ fontSize: 13, color: W.inkSoft, fontWeight: 400 }}>/月</span>
            </div>
            <div style={{ fontSize: 11, color: W.terra, fontWeight: 600, marginTop: 2 }}>公開月は無料・翌月から</div>
          </div>
        </div>
        <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 6 }}>
          {[
            'サイトに不具合 → 48h以内に調査・復旧',
            '修正 月2回まで（土日含む48h以内）',
            '月次 動作確認・フォーム送信テスト',
            '月次 アクセスレポート送付',
            '年1回 バックアップ取得',
            'ドメイン代・サーバー代・SSL 弊社負担で込み',
          ].map((line) => (
            <li key={line} style={{ display: 'flex', gap: 6, alignItems: 'flex-start', color: W.inkMid, fontSize: 13, lineHeight: 1.5 }}>
              <span style={{ color: W.sage, flexShrink: 0, marginTop: 1, fontWeight: 600 }}>✓</span>
              <span>{line}</span>
            </li>
          ))}
        </ul>
      </div>
    </div>
  );
}

/* ─── Main LP ─── */
function WarmLP() {
  const S = window.SITE;
  const [menuOpen, setMenuOpen] = React.useState(false);
  useReveal();
  useStickyNav();

  const navItems = [
    { label: '料金',        href: '#pricing' },
    { label: '料金ガイド',  href: '/pricing-guide.html' },
    { label: '流れ',        href: '#process' },
    { label: '実績',        href: '#works' },
    { label: 'お問い合わせ', href: '#contact' },
  ];

  return (
    <div style={{ background: W.cream, color: W.ink, fontFamily: W.sans, fontSize: 17, lineHeight: 1.85, overflowX: 'hidden', position: 'relative', maxWidth: '100%' }}>
      <WarmStyles />

      {/* ── Nav ── */}
      <header className="w-nav">
        <div className="w-nav-inner" style={{ padding: '20px 48px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', maxWidth: 1280, margin: '0 auto' }}>
          {/* Logo */}
          <div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
            <img src="/sue-logo.png" alt="スマートウェブ制作 SUE" width="131" height="42" style={{ display: 'block', height: 42, width: 'auto' }} />
            <div>
              <div style={{ fontFamily: W.serif, fontSize: 17, fontWeight: 600, lineHeight: 1.1, color: W.ink }}>スマートウェブ制作</div>
              <div style={{ fontFamily: W.latin, fontStyle: 'italic', fontSize: 10, color: W.inkSoft, letterSpacing: '.22em', marginTop: 2 }}>est. 2026</div>
            </div>
          </div>

          <nav className="w-nav-links" style={{ display: 'flex', gap: 28, fontSize: 15, fontFamily: W.serif }}>
            {navItems.map((n) => (
              <a key={n.label} href={n.href} style={{ color: W.inkMid, position: 'relative', paddingBottom: 2 }}>{n.label}</a>
            ))}
          </nav>

          <div className="w-nav-cta" style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
            <a href="https://lin.ee/V5YFhDJ" target="_blank" rel="noopener" className="w-btn" style={{
              display: 'inline-flex', alignItems: 'center', gap: 7,
              background: '#06C755', color: '#fff', padding: '10px 18px',
              fontSize: 15, fontFamily: W.serif, fontWeight: 600, borderRadius: 999,
              letterSpacing: '.04em', border: 'none', whiteSpace: 'nowrap',
              boxShadow: '0 4px 12px rgba(6,199,85,.28)'
            }}>
              <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" style={{ flexShrink: 0 }}>
                <path d="M12 2C6.48 2 2 5.64 2 10.12c0 4.02 3.55 7.39 8.35 8.03.32.07.77.21.88.49.1.25.07.64.03.9l-.14.85c-.04.25-.2.98.86.54 1.06-.45 5.72-3.37 7.8-5.77C21.36 13.6 22 11.93 22 10.12 22 5.64 17.52 2 12 2zM7.78 12.7H5.79c-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.44h1.46c.29 0 .52.24.52.52 0 .29-.23.53-.53.53zm2.03-.52c0 .29-.24.52-.52.52-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.97zm4.78 0c0 .22-.14.42-.36.49-.05.02-.11.03-.16.03-.16 0-.31-.08-.41-.21l-2.04-2.78v2.47c0 .29-.24.52-.52.52-.29 0-.52-.24-.52-.52V8.21c0-.22.14-.42.36-.49.05-.02.11-.03.16-.03.16 0 .31.08.41.21l2.04 2.78V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.97zm3.2-2.51c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.46v.95h1.46c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.99c-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52h1.99c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.46v.95h1.46z"/>
              </svg>
              LINEで相談
            </a>
            <a href="customize.html" className="w-btn" style={{
              background: W.terra, color: W.paper, padding: '10px 20px',
              fontSize: 15, fontFamily: W.serif, borderRadius: 999,
              letterSpacing: '.04em', border: 'none', whiteSpace: 'nowrap'
            }}>無料見積もり</a>
          </div>

          <button
            className="w-nav-hamburger"
            aria-label={menuOpen ? 'メニューを閉じる' : 'メニューを開く'}
            aria-expanded={menuOpen}
            onClick={() => setMenuOpen(o => !o)}
            style={{
              display: 'none', background: 'transparent', border: 'none',
              padding: 8, cursor: 'pointer', color: W.ink,
              flexDirection: 'column', gap: 5, alignItems: 'center', justifyContent: 'center',
              width: 40, height: 40
            }}
          >
            <span style={{ display: 'block', width: 22, height: 2, background: W.ink, transition: 'transform .25s ease, opacity .25s ease', transform: menuOpen ? 'translateY(7px) rotate(45deg)' : 'none' }} />
            <span style={{ display: 'block', width: 22, height: 2, background: W.ink, transition: 'opacity .2s ease', opacity: menuOpen ? 0 : 1 }} />
            <span style={{ display: 'block', width: 22, height: 2, background: W.ink, transition: 'transform .25s ease', transform: menuOpen ? 'translateY(-7px) rotate(-45deg)' : 'none' }} />
          </button>
        </div>
      </header>

      {/* Mobile menu overlay — sibling of header to escape backdrop-filter containing block */}
      <div
        className="w-nav-mobile-menu"
        style={{
          display: menuOpen ? 'flex' : 'none',
          position: 'fixed', top: 0, left: 0, right: 0, bottom: 0,
          background: 'rgba(250,246,240,.98)', zIndex: 999,
          flexDirection: 'column', alignItems: 'center', justifyContent: 'center',
          gap: 32, fontFamily: W.serif
        }}
        onClick={() => setMenuOpen(false)}
      >
        {navItems.map((n) => (
          <a key={n.label} href={n.href} onClick={() => setMenuOpen(false)} style={{ color: W.ink, fontSize: 22, fontWeight: 600, letterSpacing: '.06em' }}>{n.label}</a>
        ))}
        <a href="https://lin.ee/V5YFhDJ" target="_blank" rel="noopener" onClick={() => setMenuOpen(false)} style={{ display: 'inline-flex', alignItems: 'center', gap: 8, background: '#06C755', color: '#fff', padding: '14px 32px', fontSize: 16, fontWeight: 600, borderRadius: 999, letterSpacing: '.04em', marginTop: 12, boxShadow: '0 4px 12px rgba(6,199,85,.28)' }}>
          <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" style={{ flexShrink: 0 }}>
            <path d="M12 2C6.48 2 2 5.64 2 10.12c0 4.02 3.55 7.39 8.35 8.03.32.07.77.21.88.49.1.25.07.64.03.9l-.14.85c-.04.25-.2.98.86.54 1.06-.45 5.72-3.37 7.8-5.77C21.36 13.6 22 11.93 22 10.12 22 5.64 17.52 2 12 2zM7.78 12.7H5.79c-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.44h1.46c.29 0 .52.24.52.52 0 .29-.23.53-.53.53zm2.03-.52c0 .29-.24.52-.52.52-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.97zm4.78 0c0 .22-.14.42-.36.49-.05.02-.11.03-.16.03-.16 0-.31-.08-.41-.21l-2.04-2.78v2.47c0 .29-.24.52-.52.52-.29 0-.52-.24-.52-.52V8.21c0-.22.14-.42.36-.49.05-.02.11-.03.16-.03.16 0 .31.08.41.21l2.04 2.78V8.21c0-.29.24-.52.52-.52.29 0 .52.24.52.52v3.97zm3.2-2.51c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.46v.95h1.46c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.99c-.29 0-.52-.24-.52-.52V8.21c0-.29.24-.52.52-.52h1.99c.29 0 .52.24.52.52 0 .29-.24.52-.52.52h-1.46v.95h1.46z"/>
          </svg>
          LINEで相談
        </a>
        <a href="customize.html" onClick={() => setMenuOpen(false)} style={{ background: W.terra, color: W.paper, padding: '14px 32px', fontSize: 16, borderRadius: 999, letterSpacing: '.04em' }}>無料見積もり</a>
      </div>

      {/* ── Hero ── */}
      <section className="w-hero-inner" style={{ position: 'relative', zIndex: 1, padding: '64px 48px 40px', maxWidth: 1280, margin: '0 auto', display: 'flex', alignItems: 'center', gap: 56 }}>
        {/* Left: text */}
        <div className="w-hero-text" style={{ flex: '0 0 54%' }}>
          {/* Eyebrow: ひと目で「誰向けの何のサービスか」 */}
          <div className="w-reveal w-hero-eyebrow" style={{
            display: 'inline-flex', alignItems: 'center', gap: 7, marginBottom: 18,
            background: W.terraL, color: W.inkMid, fontFamily: W.sans, fontWeight: 600,
            fontSize: 14, padding: '7px 16px', borderRadius: 999, letterSpacing: '.04em'
          }}>
            <span style={{ color: W.terra, fontWeight: 700 }}>●</span>個人事業主・クリエイター専門
          </div>

          <h1 className="w-reveal w-d1 w-hero-h1" style={{
            fontFamily: W.serif, fontSize: 62, fontWeight: 700,
            lineHeight: 1.25, color: W.ink, letterSpacing: '.01em',
            margin: 0
          }}>
            ホームページ制作、<br />
            <span style={{ color: W.terra, position: 'relative', display: 'inline-block' }}>
              丸投げでいい。
              <Squiggle w={200} />
            </span>
          </h1>

          <p className="w-reveal w-d2" style={{ marginTop: 24, fontSize: 19, color: W.inkMid, maxWidth: 480, lineHeight: 1.95 }}>
            むずかしい準備も設定も、<span style={{
              fontWeight: 600, color: W.ink,
              background: 'linear-gradient(transparent 62%, rgba(245,200,110,.6) 62%)',
              padding: '0 2px'
            }}>ぜんぶおまかせ</span>。<br />
            あなたは本業に集中するだけ。
          </p>

          {/* Monitor price banner */}
          <div className="w-reveal w-d2 w-hero-monitor" style={{ marginTop: 28, marginBottom: 14 }}>
            <span style={{
              display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
              flexWrap: 'wrap', gap: '8px 12px',
              background: W.terra, color: W.paper, fontFamily: W.serif, fontWeight: 700,
              fontSize: 17, padding: '12px 22px', borderRadius: 28, letterSpacing: '.02em',
              boxShadow: '0 6px 18px rgba(184,92,56,.32)'
            }}>
              <span style={{ whiteSpace: 'nowrap' }}>🎯 モニター価格</span>
              <span style={{
                fontSize: 15, fontWeight: 700, padding: '2px 12px', whiteSpace: 'nowrap',
                border: '1.5px solid rgba(255,255,255,.7)', borderRadius: 999, letterSpacing: '.04em'
              }}>先着3社限定</span>
              <span style={{ fontSize: 19, fontWeight: 700, whiteSpace: 'nowrap' }}>¥33,000〜</span>
            </span>
            <div style={{ marginTop: 7, fontFamily: W.sans, fontSize: 13, color: W.inkSoft }}>
              ※ 通常 55,000円〜のところ、先着3社・予定数に達し次第終了します
            </div>
          </div>

          {/* Supporting tags (complementary to laurel stats below) */}
          <div className="w-reveal w-d3 w-hero-badges" style={{ display: 'flex', flexWrap: 'wrap', gap: 10 }}>
            {['ドメイン・サーバー代も込み', 'LINE・メール完結・来社ゼロ'].map((t) => (
              <span key={t} style={{
                display: 'inline-flex', alignItems: 'center', gap: 6,
                background: W.paper, color: W.inkMid, fontFamily: W.serif, fontWeight: 600,
                fontSize: 15, padding: '7px 16px', borderRadius: 999,
                border: `1.5px solid ${W.terraL}`, letterSpacing: '.02em'
              }}>
                <span style={{ color: W.terra, fontWeight: 700 }}>✓</span>{t}
              </span>
            ))}
          </div>

          {/* Trust stats */}
          <div className="w-reveal w-d3 w-hero-stats" style={{
            display: 'flex', marginTop: 32, maxWidth: 520,
            background: W.paper, border: `1px solid ${W.rule}`,
            borderRadius: 18, overflow: 'hidden',
            boxShadow: '0 14px 30px -22px rgba(45,34,24,.4)',
          }}>
            {[
              { label: '制作は', value: '丸投げOK', icon: 'hand' },
              { label: '公開まで', value: '最短2週間', icon: 'clock' },
              { label: '対応エリア', value: '全国対応', icon: 'pin' },
            ].map((s, i) => (
              <div key={i} className="w-stat-cell" style={{
                flex: 1, textAlign: 'center', padding: '18px 10px',
                borderLeft: i ? `1px solid ${W.rule}` : 'none',
                position: 'relative',
              }}>
                <div aria-hidden="true" style={{
                  width: 34, height: 34, margin: '0 auto 8px',
                  borderRadius: '50%', background: W.terraL,
                  display: 'flex', alignItems: 'center', justifyContent: 'center',
                }}>
                  <StatIcon name={s.icon} />
                </div>
                <div style={{ fontFamily: W.sans, fontSize: 11.5, color: W.inkSoft, letterSpacing: '.04em', marginBottom: 1 }}>{s.label}</div>
                <div style={{ fontFamily: W.serif, fontWeight: 700, fontSize: 18, color: W.terra, lineHeight: 1.2, whiteSpace: 'nowrap' }}>{s.value}</div>
              </div>
            ))}
          </div>

          {/* Dual CTA */}
          <div className="w-reveal w-d4 w-hero-btns" style={{ display: 'flex', flexWrap: 'wrap', gap: 14, marginTop: 38 }}>
            <LineButton size="lg" />
            <a href="#contact" className="w-btn" style={{
              display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 8,
              background: W.terra, color: W.paper,
              padding: '18px 42px', fontSize: 16,
              fontFamily: W.serif, fontWeight: 600, letterSpacing: '.04em',
              borderRadius: 999, boxShadow: '0 4px 14px rgba(184,92,56,.28)'
            }}>メールで無料相談する</a>
            <button
              type="button"
              className="w-btn"
              onClick={() => window.openSueChat && window.openSueChat()}
              style={{
                display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 8,
                background: W.paper, color: W.terra,
                border: `2px solid ${W.terra}`, cursor: 'pointer',
                padding: '16px 36px', fontSize: 16,
                fontFamily: W.serif, fontWeight: 600, letterSpacing: '.04em',
                borderRadius: 999,
              }}
            >
              <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
                <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
              </svg>
              AIチャットで今すぐ質問
            </button>
          </div>
        </div>

        {/* Right: line-art illustration */}
        <div className="w-reveal w-d4 w-hero-img" style={{ flex: 1, position: 'relative', textAlign: 'center' }}>
          <img
            src="/hero-lineart.png"
            alt="ウェブサイトを丁寧にデザインするイラスト"
            style={{ width: '100%', height: 'auto', maxWidth: 560, display: 'block', margin: '0 auto' }}
          />
        </div>
      </section>

      <WarmMarquee />

      {/* ── News (Notion-driven) ── */}
      <WarmNews />

      {/* ── Pain Points ── */}
      <section id="pain" style={{ position: 'relative', padding: '100px 48px', background: W.cream, overflow: 'hidden' }}>
        {/* 背景の装飾 */}
        <div style={{ position: 'absolute', top: -60, right: -60, width: 320, height: 320, borderRadius: '50%', background: W.terraL, opacity: 0.18, pointerEvents: 'none' }} />
        <div style={{ position: 'absolute', bottom: -40, left: -40, width: 200, height: 200, borderRadius: '50%', background: W.sageL, opacity: 0.2, pointerEvents: 'none' }} />

        <div style={{ maxWidth: 1000, margin: '0 auto', position: 'relative', zIndex: 1 }}>
          {/* 見出し */}
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 64 }}>
            <SectionLabel text="Does this sound familiar?" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 46, fontWeight: 600, lineHeight: 1.3, margin: '0 0 16px' }}>
              こんな
              <span style={{ color: W.terra, position: 'relative', display: 'inline-block' }}>
                お悩み
                <Squiggle w={88} />
              </span>
              はありませんか？
            </h2>
            <p style={{ color: W.inkMid, fontSize: 15, lineHeight: 1.9, marginTop: 24 }}>
              「なんとかしたい」と思いつつ、なかなか動けない——<br />
              ひとつでも当てはまったら、お気軽にご相談ください。
            </p>
          </div>

          {/* 3つのカード */}
          <div className="w-grid-3" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 24 }}>
            {[
              {
                num: '01',
                emoji: '🏗️',
                title: 'HPを作りたいけど、\n外注は高くて頼めない',
                body: '制作会社に出すと数十万円。かと言って自分でつくると、なんだか垢抜けない仕上がりに……。',
                color: W.terra,
                bg: 'rgba(184,92,56,.06)',
              },
              {
                num: '02',
                emoji: '📱',
                title: '自分で作ってみたけど、\nなんか素人感が抜けない',
                body: 'Wixやペライチで頑張ってみたけど、思った通りにならない。名刺代わりにするには少し恥ずかしい……。',
                color: W.sage,
                bg: 'rgba(74,103,65,.06)',
              },
              {
                num: '03',
                emoji: '💬',
                title: '制作の打ち合わせが面倒、\n忙しくて時間が取れない',
                body: '来社や電話を何度もするのは無理。本業の合間に、自分のペースで進めたい。',
                color: '#5a6fa8',
                bg: 'rgba(90,111,168,.06)',
              },
            ].map((item, i) => (
              <div key={item.num} className={`w-reveal w-d${i + 1}`} style={{
                background: W.paper,
                border: `1px solid ${W.rule}`,
                borderRadius: 16,
                padding: '36px 28px 32px',
                position: 'relative',
                overflow: 'hidden',
              }}>
                {/* 背景色アクセント */}
                <div style={{ position: 'absolute', inset: 0, background: item.bg, pointerEvents: 'none' }} />
                <div style={{ position: 'relative', zIndex: 1 }}>
                  {/* 番号 */}
                  <div style={{
                    fontFamily: W.latin, fontStyle: 'italic',
                    fontSize: 52, color: item.color, opacity: 0.18,
                    lineHeight: 1, marginBottom: 4, fontWeight: 400,
                  }}>{item.num}</div>
                  {/* アイコン */}
                  <div style={{ fontSize: 32, marginBottom: 16 }}>{item.emoji}</div>
                  {/* タイトル */}
                  <h3 style={{
                    fontFamily: W.serif, fontSize: 17, fontWeight: 600,
                    color: W.ink, margin: '0 0 14px', lineHeight: 1.6,
                    whiteSpace: 'pre-line',
                  }}>{item.title}</h3>
                  {/* 本文 */}
                  <p style={{
                    margin: 0, color: W.inkMid, fontSize: 16,
                    lineHeight: 1.9,
                  }}>{item.body}</p>
                </div>
              </div>
            ))}
          </div>

          {/* 寄り添いメッセージ */}
          <div className="w-reveal" style={{
            marginTop: 56, textAlign: 'center',
            background: W.paper,
            border: `1.5px solid ${W.terraL}`,
            borderRadius: 12, padding: '36px 48px',
            position: 'relative', overflow: 'hidden',
          }}>
            <div style={{
              position: 'absolute', top: 0, left: 0, right: 0, height: 3,
              background: `linear-gradient(90deg, ${W.terra}, ${W.sage})`,
            }} />
            <p style={{
              fontFamily: W.serif, fontSize: 20, fontWeight: 600,
              color: W.ink, margin: '0 0 12px', lineHeight: 1.7,
            }}>
              大丈夫。<span style={{ color: W.terra }}>スマートウェブ制作</span>にお任せください。
            </p>
            <p style={{ margin: 0, color: W.inkMid, fontSize: 16, lineHeight: 1.9 }}>
              難しいことは全部こちらで引き受けます。<br />
              「なんとなく、こうしたい」から気軽に話しかけてください。
            </p>
            <a href="#contact" className="w-btn" style={{
              display: 'inline-block', marginTop: 20, background: W.terra, color: W.paper,
              padding: '12px 32px', fontSize: 16, fontFamily: W.serif,
              letterSpacing: '.06em', borderRadius: 3
            }}>まずは気軽に相談する</a>
          </div>
        </div>
      </section>

      {/* ── Pricing ── */}
      <section id="pricing" className="w-section" style={{ position: 'relative', padding: '100px 48px', background: W.cream, borderTop: `1px solid ${W.rule}` }}>
        <div style={{ maxWidth: 1100, margin: '0 auto' }}>
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 52 }}>
            <SectionLabel text="Pricing" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 46, fontWeight: 600, margin: '0 0 12px' }}>料金プラン</h2>
            <p style={{ color: W.inkMid, fontSize: 15 }}>制作費（一度きり）＋ 毎月のおまかせ保守。ドメイン代・サーバー代はこちら負担、ぜんぶ込みでおまかせ。</p>
            <p style={{ fontSize: 15, marginTop: 10 }}>
              <a href="/pricing-guide.html" style={{ color: W.terra, borderBottom: `1px solid ${W.terra}`, paddingBottom: 2 }}>
                料金のしくみ・プランの選び方・カスタマイズを詳しく見る →
              </a>
            </p>
          </div>

          {/* ── プランカード 3列 ── */}
          <div className="w-reveal w-plan-grid" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 20, marginBottom: 40, alignItems: 'start' }}>
            {S.plans.map(plan => <PricingPlanCard key={plan.name} plan={plan} />)}
          </div>

          {/* ── 概算ツール 全幅 ── */}
          <div className="w-reveal">
            <PriceEstimator />
          </div>

          <p style={{ textAlign: 'center', marginTop: 24, fontSize: 14, color: W.inkSoft, lineHeight: 1.9 }}>
            ※ 表示金額はすべて税込。内容により変動します。<br />
            おまかせ保守は全プランに含まれます。独自ドメインは弊社がお客様名義で取得し、取得費・年間更新費・SSL・サーバー利用料はすべて弊社が負担します（保守料金に込み・追加請求なし）。お客様名義なので囲い込みの心配もありません。<br />
            アクセス解析は Google Analytics（GA4）を標準搭載。月間PV・流入元・人気ページなどを計測し、月次レポートでご報告します。
          </p>
        </div>
      </section>

      {/* ── Process ── */}
      <section id="process" className="w-section" style={{ position: 'relative', padding: '90px 48px 100px', background: W.paper }}>
        <PaperTexture />
        <div style={{ maxWidth: 1200, margin: '0 auto', position: 'relative', zIndex: 1 }}>
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 64 }}>
            <SectionLabel text="Process" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 46, fontWeight: 600 }}>制作の流れ</h2>
            <div style={{ display: 'flex', justifyContent: 'center' }}><Squiggle w={100} color={W.terra} /></div>
          </div>

          <div style={{ display: 'flex', flexDirection: 'column', gap: 0 }}>
            {S.process.map((p, i) => (
              <div key={p.n} className={`w-process-row w-reveal w-d${i + 1}`} style={{
                display: 'grid', gridTemplateColumns: '100px 1fr 1fr',
                gap: 40, padding: '28px 0',
                borderTop: `1px solid ${W.rule}`,
                borderBottom: i === S.process.length - 1 ? `1px solid ${W.rule}` : 'none',
                alignItems: 'center', borderRadius: 8
              }}>
                <div style={{ fontFamily: W.latin, fontStyle: 'italic', fontSize: 56, color: W.terra, lineHeight: 1, opacity: 0.35, fontWeight: 400 }}>{p.n}</div>
                <div>
                  <h3 style={{ fontFamily: W.serif, fontSize: 22, fontWeight: 600, margin: '0 0 8px', color: W.ink }}>{p.title}</h3>
                  {p.n === '02' && (
                    <span style={{
                      display: 'inline-flex', alignItems: 'center', gap: 6,
                      background: W.sage, color: W.paper, fontSize: 13,
                      padding: '4px 14px', borderRadius: 999, fontFamily: W.serif
                    }}>
                      💬 LINE・メール完結
                    </span>
                  )}
                </div>
                <p className="w-process-body" style={{ margin: 0, color: W.inkMid, fontSize: 15, lineHeight: 1.9 }}>{p.body}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* ── Works ── */}
      <section id="works" className="w-section" style={{ position: 'relative', padding: '90px 48px 100px', background: W.cream }}>
        <div style={{ maxWidth: 1200, margin: '0 auto' }}>
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 60 }}>
            <SectionLabel text="Works" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 46, fontWeight: 600, margin: '0 0 8px' }}>制作実績</h2>
            <p style={{ color: W.inkSoft, fontSize: 15 }}>※ こんな佇まいのサイトをお作りします（表記はデモ）</p>
          </div>

          <div className="w-grid-3" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 28 }}>
            {S.works.map((w, i) => {
              const photos = [
                { id: '1509440159596-0249088772ff', focal: '50% 50%', alt: '焼き立てパン' },
                { id: '1545205597-3d9d02c29597', focal: '50% 45%', alt: 'ヨガマットと窓辺' },
                { id: '1535632066927-ab7c9ab60908', focal: '50% 50%', alt: 'ハンドメイドの作業風景' },
              ];
              const photo = photos[i];
              const imageSrc = w.image || `https://images.unsplash.com/photo-${photo.id}?w=1200&q=80&auto=format&fit=crop`;
              const imageAlt = w.alt || photo.alt;
              const imageFocal = w.focal || photo.focal;
              const Card = w.url ? 'a' : 'div';
              return (
                <Card key={w.name} href={w.url || undefined} target={w.url ? '_blank' : undefined} rel={w.url ? 'noopener noreferrer' : undefined} className={`w-card w-reveal w-d${i + 1} w-img-zoom`} style={{
                  display: 'block', color: 'inherit',
                  background: W.paper, borderRadius: 14, overflow: 'hidden',
                  border: `1px solid ${W.rule}`, position: 'relative',
                  boxShadow: '0 3px 16px rgba(45,34,24,.06)'
                }} aria-label={w.url ? `${w.name}のサイトを見る` : undefined}>
                  <div style={{ position: 'relative', overflow: 'hidden', height: 230 }}>
                    <img
                      src={imageSrc}
                      alt={imageAlt}
                      loading="lazy"
                      style={{ width: '100%', height: '100%', objectFit: 'cover', objectPosition: imageFocal, display: 'block' }}
                    />
                    <div style={{
                      position: 'absolute', inset: 0,
                      background: 'rgba(45,34,24,.72)',
                      display: 'flex', flexDirection: 'column',
                      alignItems: 'center', justifyContent: 'center',
                      opacity: 0, transition: 'opacity .35s ease',
                      color: '#fff', padding: 20, textAlign: 'center'
                    }} className="w-work-overlay">
                      <div style={{ fontFamily: W.serif, fontSize: 17, marginBottom: 8 }}>{w.name}</div>
                      <div style={{ fontSize: 15, opacity: 0.85 }}>{w.desc}</div>
                      {w.url && (
                        <div style={{ marginTop: 14, fontSize: 14, letterSpacing: '.12em', color: W.terraL }}>サイトを見る</div>
                      )}
                    </div>
                  </div>
                  <div style={{ padding: '22px 24px' }}>
                    <div style={{ fontFamily: W.latin, fontStyle: 'italic', fontSize: 13, color: W.sage, letterSpacing: '.2em', marginBottom: 8 }}>{w.kind.toUpperCase()}</div>
                    <h3 style={{ fontFamily: W.serif, fontSize: 19, fontWeight: 600, margin: '0 0 10px', color: W.ink }}>{w.name}</h3>
                    <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', fontSize: 13 }}>
                      {w.tags.map((t) => (
                        <span key={t} style={{ background: W.terraL, color: W.terra, padding: '2px 10px', borderRadius: 999 }}>#{t}</span>
                      ))}
                    </div>
                  </div>
                </Card>
              );
            })}
          </div>
        </div>
      </section>

      {/* ── About ── */}
      <section id="about" className="w-section" style={{ padding: '90px 48px 100px', background: W.paper }}>
        <div style={{ maxWidth: 900, margin: '0 auto' }}>
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 52 }}>
            <SectionLabel text="About" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 46, fontWeight: 600, margin: '0 0 20px' }}>
              はじめまして、SUEOKA です。
            </h2>
            <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', justifyContent: 'center' }}>
              {['広島市安佐南区在住', 'AI活用', '個人フリーランス', '会社員×副業'].map(tag => (
                <span key={tag} style={{ background: W.terraL, color: W.terra, fontSize: 14, padding: '4px 14px', borderRadius: 999, fontFamily: W.sans }}>{tag}</span>
              ))}
            </div>
          </div>

          <div className="w-grid-2c w-reveal w-d1" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 56, alignItems: 'start' }}>
            {/* 左: 自己紹介 */}
            <div>
              <h3 style={{ fontFamily: W.serif, fontSize: 18, fontWeight: 600, color: W.ink, marginBottom: 14 }}>自己紹介</h3>
              <p style={{ fontFamily: W.sans, fontSize: 15, color: W.inkMid, lineHeight: 1.95, marginBottom: 16 }}>
                広島市安佐南区を拠点に、個人事業主・クリエイター向けのウェブ制作をしています。一度に受ける案件数を絞り、一件一件に集中して向き合うスタイルを大切にしています。
              </p>
              <p style={{ fontFamily: W.sans, fontSize: 15, color: W.inkMid, lineHeight: 1.95 }}>
                きっかけは、身近な個人事業主さんが「HPを持ちたいけど、どこに頼めばいいかわからない」と困っているのを見たこと。専門家に頼むには高すぎる、自分でやるには難しい——そのあいだを埋めたくて、動き出しました。
              </p>
              <div style={{ marginTop: 20, padding: '14px 18px', background: W.cream, borderRadius: 10, border: `1px solid ${W.rule}`, fontFamily: W.sans, fontSize: 15, color: W.inkSoft, lineHeight: 1.75 }}>
                打ち合わせはLINE・メールで完結します。全国どこからでもご依頼いただけます。
              </div>
            </div>

            {/* 右: AIと個人だから安い理由 */}
            <div>
              <h3 style={{ fontFamily: W.serif, fontSize: 18, fontWeight: 600, color: W.ink, marginBottom: 14 }}>なぜこの価格で届けられるのか</h3>
              <p style={{ fontFamily: W.sans, fontSize: 15, color: W.inkMid, lineHeight: 1.95, marginBottom: 20 }}>
                「安すぎない？」と感じるかもしれません。その理由は、<strong style={{ color: W.terra }}>AIツールを積極的に活用</strong>しているから。
              </p>
              <div style={{ display: 'flex', flexDirection: 'column', gap: 12, marginBottom: 20 }}>
                {[
                  { icon: '🤖', label: 'AI活用', text: 'デザイン・コーディング・文章整理にAIを活用し、作業時間を大幅短縮' },
                  { icon: '🏠', label: '個人運営', text: '事務所なし・大人数不要。オーバーヘッドを最小限に抑えた構造' },
                  { icon: '💬', label: 'LINE・メール完結', text: '移動・会議ゼロ。その分を制作の丁寧さに還元しています' },
                ].map(({ icon, label, text }) => (
                  <div key={label} style={{ display: 'flex', gap: 12, alignItems: 'flex-start', padding: '12px 16px', background: W.cream, borderRadius: 10, border: `1px solid ${W.rule}` }}>
                    <span style={{ fontSize: 20, flexShrink: 0, lineHeight: 1.5 }}>{icon}</span>
                    <div>
                      <div style={{ fontFamily: W.serif, fontSize: 15, fontWeight: 600, color: W.terra, marginBottom: 2 }}>{label}</div>
                      <div style={{ fontFamily: W.sans, fontSize: 15, color: W.inkMid, lineHeight: 1.7 }}>{text}</div>
                    </div>
                  </div>
                ))}
              </div>
              <p style={{ fontFamily: W.sans, fontSize: 16, color: W.inkSoft, lineHeight: 1.75, fontStyle: 'italic' }}>
                削れるのはコスト。削らないのは、あなたへの向き合い方です。
              </p>
            </div>
          </div>
        </div>
      </section>

      {/* ── Customize CTA ── */}
      <section style={{ position: 'relative', padding: '72px 48px', background: W.ink, overflow: 'hidden' }}>
        {/* 装飾円 */}
        <div style={{ position: 'absolute', top: -60, right: -60, width: 280, height: 280, borderRadius: '50%', border: '1px solid rgba(255,255,255,.06)', pointerEvents: 'none' }} />
        <div style={{ position: 'absolute', bottom: -40, left: -40, width: 200, height: 200, borderRadius: '50%', background: `rgba(184,92,56,.08)`, pointerEvents: 'none' }} />

        <div className="w-reveal" style={{ maxWidth: 860, margin: '0 auto', display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexWrap: 'wrap', gap: 36, position: 'relative', zIndex: 1 }}>
          <div>
            <div style={{ fontFamily: W.latin, fontStyle: 'italic', fontSize: 14, letterSpacing: '.36em', color: 'rgba(250,246,240,.45)', marginBottom: 14 }}>— Step by Step —</div>
            <h2 style={{ fontFamily: W.serif, fontSize: 34, fontWeight: 600, color: W.paper, margin: '0 0 14px', lineHeight: 1.35 }}>
              プラン・構成・デザインを<br />
              <span style={{ color: W.terraL }}>自分で選んでみる</span>
            </h2>
            <p style={{ color: 'rgba(250,246,240,.65)', fontSize: 15, lineHeight: 1.9, maxWidth: 420, margin: 0 }}>
              3ステップで希望を整理するだけで、<br />
              概算金額とお問い合わせまで完結できます。
            </p>
            <div style={{ display: 'flex', gap: 20, marginTop: 22, flexWrap: 'wrap', fontSize: 15, color: 'rgba(250,246,240,.5)', fontFamily: W.serif }}>
              {['プランを選ぶ', '追加オプション', '確認・送信'].map((s, i) => (
                <span key={s} style={{ display: 'flex', alignItems: 'center', gap: 7 }}>
                  <span style={{ width: 20, height: 20, borderRadius: '50%', background: 'rgba(184,92,56,.4)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 10, color: W.terraL, fontFamily: W.latin, flexShrink: 0 }}>{i + 1}</span>
                  {s}
                </span>
              ))}
            </div>
          </div>

          <a href="customize.html" className="w-btn" style={{
            display: 'inline-flex', alignItems: 'center', gap: 10,
            background: W.terra, color: W.paper,
            padding: '18px 40px', fontFamily: W.serif, fontSize: 16,
            fontWeight: 600, letterSpacing: '.06em', borderRadius: 4,
            textDecoration: 'none', whiteSpace: 'nowrap', flexShrink: 0,
          }}>
            カスタマイズする
            <svg width="18" height="18" viewBox="0 0 18 18" fill="none">
              <path d="M4 9h10M10 5l4 4-4 4" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
            </svg>
          </a>
        </div>
      </section>

      {/* ── FAQ ── */}
      <section className="w-section" style={{ position: 'relative', padding: '80px 48px', background: W.paper, borderTop: `1px solid ${W.rule}` }}>
        <PaperTexture />
        <div style={{ maxWidth: 720, margin: '0 auto', position: 'relative', zIndex: 1 }}>
          <div className="w-reveal" style={{ textAlign: 'center', marginBottom: 48 }}>
            <SectionLabel text="FAQ" />
            <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 40, fontWeight: 600 }}>よくある質問</h2>
          </div>

          {S.faq.map((item, i) => (
            <details key={i} className={`w-faq-item w-reveal w-d${i + 1}`} style={{ borderBottom: `1px solid ${W.rule}` }}>
              <summary style={{ padding: '22px 0' }}>
                <span style={{ fontFamily: W.serif, fontSize: 16, fontWeight: 600, color: W.ink }}>{item.q}</span>
                <svg className="w-faq-arrow" width="18" height="18" viewBox="0 0 18 18" fill="none">
                  <path d="M4 7l5 5 5-5" stroke={W.terra} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
                </svg>
              </summary>
              <p style={{ margin: '0 0 20px', color: W.inkMid, fontSize: 16, lineHeight: 1.85 }}>{item.a}</p>
            </details>
          ))}
        </div>
      </section>

      {/* ── Contact ── */}
      <section id="contact" className="w-section" style={{ position: 'relative', padding: '110px 48px', background: W.cream, borderTop: `1px solid ${W.rule}` }}>
        <div style={{ maxWidth: 1200, margin: '0 auto' }}>
          <div className="w-contact-grid" style={{ display: 'grid', gridTemplateColumns: '1fr 1.1fr', gap: 80, alignItems: 'start' }}>
            <div className="w-reveal">
              <SectionLabel text="Contact" />
              <h2 className="w-h2" style={{ fontFamily: W.serif, fontSize: 42, fontWeight: 600, margin: '0 0 24px', lineHeight: 1.3 }}>
                {S.contact.title}
              </h2>
              <Squiggle w={100} />
              <p style={{ marginTop: 20, color: W.inkMid, fontSize: 15, lineHeight: 1.9 }}>{S.contact.sub}</p>

              <div style={{ marginTop: 40, fontSize: 16, color: W.inkMid, lineHeight: 2.6, paddingTop: 28, borderTop: `1px solid ${W.rule}` }}>
                {[
                  { k: 'Email', v: 'kazuya.s.web@gmail.com', href: 'mailto:kazuya.s.web@gmail.com' },
                  { k: 'Hours', v: '24時間対応（LINE・メール）', href: null },
                  { k: 'Area',  v: '広島県 / オンライン全国対応', href: null },
                ].map((row) => (
                  <div key={row.k} style={{ display: 'flex', justifyContent: 'space-between', borderBottom: `1px solid ${W.rule}`, paddingBottom: 4 }}>
                    <span style={{ fontFamily: W.latin, fontStyle: 'italic', color: W.inkSoft, fontSize: 15 }}>{row.k}</span>
                    {row.href
                      ? <a href={row.href} style={{ fontFamily: W.serif, color: W.terra, textDecoration: 'none' }}>{row.v}</a>
                      : <span style={{ fontFamily: W.serif }}>{row.v}</span>
                    }
                  </div>
                ))}
              </div>

              <div style={{ marginTop: 32 }}>
                <p style={{ fontFamily: W.sans, fontSize: 15, color: W.inkSoft, margin: '0 0 12px' }}>
                  フォームが手間な方は、LINEからお気軽にどうぞ。
                </p>
                <LineButton size="lg" />
              </div>

              <div style={{ marginTop: 26, display: 'flex', gap: 14, alignItems: 'center' }}>
                <span style={{ fontFamily: W.latin, fontStyle: 'italic', color: W.inkSoft, fontSize: 15, marginRight: 2 }}>Follow</span>
                {[
                  {
                    label: 'Instagram',
                    href: 'https://www.instagram.com/smartwebstudio_sue',
                    icon: (
                      <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
                        <rect x="2" y="2" width="20" height="20" rx="5.5" ry="5.5" />
                        <circle cx="12" cy="12" r="4.2" />
                        <circle cx="17.4" cy="6.6" r="1.1" fill="currentColor" stroke="none" />
                      </svg>
                    ),
                  },
                ].map((s) => (
                  <a key={s.label} href={s.href} target="_blank" rel="noopener noreferrer" aria-label={s.label}
                    style={{ width: 46, height: 46, borderRadius: '50%', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', background: W.terra, color: W.cream, textDecoration: 'none', transition: 'transform .2s, opacity .2s' }}
                    onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.opacity = '.88'; }}
                    onMouseLeave={e => { e.currentTarget.style.transform = 'none'; e.currentTarget.style.opacity = '1'; }}
                  >{s.icon}</a>
                ))}
              </div>
            </div>

            <div className="w-reveal w-d1">
              <ContactForm />
            </div>
          </div>
        </div>
      </section>

      {/* ── Footer ── */}
      <footer className="w-footer" style={{
        padding: '36px 48px', display: 'flex',
        justifyContent: 'space-between', alignItems: 'center',
        fontSize: 14, color: W.inkSoft,
        borderTop: `1px solid ${W.rule}`, background: W.paper
      }}>
        <div style={{ fontFamily: W.sans }}>© 2026 スマートウェブ制作 SUEOKA</div>
        <div style={{ display: 'flex', gap: 24, fontFamily: W.serif }}>
          {[
            { t: '料金・カスタマイズガイド', h: '/pricing-guide.html' },
            { t: 'プライバシーポリシー', h: '/privacy.html' },
            { t: '特定商取引法', h: '/tokushoho.html' },
          ].map((item) => (
            <a key={item.t} href={item.h} style={{ color: W.inkSoft, fontSize: 14, transition: 'color .2s' }}
              onMouseEnter={e => e.target.style.color = W.terra}
              onMouseLeave={e => e.target.style.color = W.inkSoft}
            >{item.t}</a>
          ))}
        </div>
        <div style={{ fontFamily: W.latin, fontStyle: 'italic', letterSpacing: '.2em' }}>SUEOKA — Freelance Web</div>
      </footer>
    </div>
  );
}

/* workaround for work overlay CSS */
(function injectWorkOverlayCSS() {
  if (typeof document === 'undefined') return;
  const s = document.createElement('style');
  s.textContent = `.w-img-zoom:hover .w-work-overlay { opacity: 1 !important; }`;
  document.head.appendChild(s);
})();

Object.assign(window, { WarmLP });
