/* global React */
const { useState, useEffect } = React;

/* ──────────────────────────────────────────────────────────
   Scroll reveal — IntersectionObserver
   ────────────────────────────────────────────────────────── */
function useReveal() {
  useEffect(() => {
    const els = document.querySelectorAll(".reveal");
    if (!("IntersectionObserver" in window)) {
      els.forEach((el) => el.classList.add("in"));
      return;
    }
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => {
        if (e.isIntersecting) {
          e.target.classList.add("in");
          io.unobserve(e.target);
        }
      });
    }, { threshold: 0.12, rootMargin: "0px 0px -8% 0px" });
    els.forEach((el) => io.observe(el));
    return () => io.disconnect();
  }, []);
}

/* ──────────────────────────────────────────────────────────
   Tiny icon set (stroke = currentColor)
   ────────────────────────────────────────────────────────── */
const Ico = {
  arrow: () => <svg width="14" height="14" viewBox="0 0 24 24" fill="none"><path d="M5 12h14M13 5l7 7-7 7" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  search: () => <svg width="14" height="14" viewBox="0 0 24 24" fill="none"><circle cx="11" cy="11" r="7" stroke="currentColor" strokeWidth="1.8"/><path d="m20 20-3-3" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/></svg>,
  pin: () => <svg width="12" height="12" viewBox="0 0 24 24" fill="none"><path d="M12 21s7-6.5 7-12a7 7 0 1 0-14 0c0 5.5 7 12 7 12Z" stroke="currentColor" strokeWidth="1.8" strokeLinejoin="round"/><circle cx="12" cy="9" r="2.5" stroke="currentColor" strokeWidth="1.8"/></svg>,
  bell: () => <svg width="14" height="14" viewBox="0 0 24 24" fill="none"><path d="M6 8a6 6 0 1 1 12 0c0 7 3 7 3 9H3c0-2 3-2 3-9ZM10 19a2 2 0 0 0 4 0" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  check: () => <svg width="11" height="11" viewBox="0 0 24 24" fill="none"><path d="m5 12 5 5 9-11" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  shield: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/><path d="m9 12 2 2 4-4" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  users: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><circle cx="9" cy="8" r="3.2" stroke="currentColor" strokeWidth="1.7"/><circle cx="17" cy="9" r="2.6" stroke="currentColor" strokeWidth="1.7"/><path d="M3 19c0-3 2.5-5 6-5s6 2 6 5M15 18c0-2.5 2-4 4.5-4S22 15 22 17" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round"/></svg>,
  star: () => <svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><path d="m12 2 2.9 6.3 6.8.7-5.1 4.7 1.5 6.8L12 17l-6.1 3.5 1.5-6.8L2.3 9l6.8-.7L12 2Z"/></svg>,
  filter: () => <svg width="14" height="14" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M6 12h12M10 18h4" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/></svg>,
  compass: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="9" stroke="currentColor" strokeWidth="1.7"/><path d="m9 15 2-6 6-2-2 6-6 2Z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/></svg>,
  message: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M21 12a8 8 0 1 1-3.5-6.6L21 4l-1 3.5A8 8 0 0 1 21 12Z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/></svg>,
  grid: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><rect x="3" y="3" width="7" height="7" rx="1.2" stroke="currentColor" strokeWidth="1.7"/><rect x="14" y="3" width="7" height="7" rx="1.2" stroke="currentColor" strokeWidth="1.7"/><rect x="3" y="14" width="7" height="7" rx="1.2" stroke="currentColor" strokeWidth="1.7"/><rect x="14" y="14" width="7" height="7" rx="1.2" stroke="currentColor" strokeWidth="1.7"/></svg>,
  link: () => <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  home: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M4 11 12 4l8 7v9a1 1 0 0 1-1 1h-4v-6h-6v6H5a1 1 0 0 1-1-1v-9Z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/></svg>,
  heart: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M12 20s-7-4.5-7-10a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 19 10c0 5.5-7 10-7 10Z" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/></svg>,
  user: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="8" r="4" stroke="currentColor" strokeWidth="1.7"/><path d="M4 21c0-4 3.5-7 8-7s8 3 8 7" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round"/></svg>,
  tennis: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="9" stroke="currentColor" strokeWidth="1.7"/><path d="M3.5 8.5C7 10 10 13 12 18M20.5 8.5C17 10 14 13 12 6" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round"/></svg>,
  golf: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M12 3v15M12 4l6 2-6 2" stroke="currentColor" strokeWidth="1.7" strokeLinejoin="round"/><ellipse cx="12" cy="20" rx="6" ry="1.5" stroke="currentColor" strokeWidth="1.7"/></svg>,
  hockey: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M3 18h13l5-12M16 18v3M16 18l-3-7" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"/></svg>,
  figure: () => <svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M5 19 19 5M5 5l14 14M12 5v14M5 12h14" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/></svg>,
};

/* ──────────────────────────────────────────────────────────
   Tweaks defaults
   ────────────────────────────────────────────────────────── */
const TWEAKS_DEFAULTS = /*EDITMODE-BEGIN*/{
  "accent": "violet",
  "ctaCopy": "우리 동네 학원 찾기",
  "showTrust": true,
  "showBA": true,
  "darkTrust": true
}/*EDITMODE-END*/;

const ACCENTS = {
  violet:    { name: "Vivid Violet",  c400: "oklch(0.66 0.20 295)", c500: "oklch(0.56 0.235 295)", c600: "oklch(0.48 0.235 293)", c700: "oklch(0.38 0.215 290)" },
  indigo:    { name: "Deep Indigo",   c400: "oklch(0.66 0.18 268)", c500: "oklch(0.55 0.20 265)",  c600: "oklch(0.47 0.20 262)",  c700: "oklch(0.38 0.18 258)" },
  magenta:   { name: "Neon Magenta",  c400: "oklch(0.68 0.22 330)", c500: "oklch(0.58 0.24 325)",  c600: "oklch(0.50 0.24 322)",  c700: "oklch(0.40 0.22 318)" },
};

/* ──────────────────────────────────────────────────────────
   NAV
   ────────────────────────────────────────────────────────── */
function Nav({ ctaCopy }) {
  return (
    <nav className="nav">
      <div className="wrap nav-inner">
        <a className="logo" href="#" aria-label="맹모즈">
          <img src="assets/mengmoz-logo.png" alt="맹모즈"/>
        </a>
        <div className="nav-links">
          <a href="#brand">회사소개</a>
          <a href="#service">둘러보기</a>
          <a href="http://pf.kakao.com/_RxkTsX/chat" target="_blank" rel="noopener">문의하기</a>
        </div>
        <a className="btn btn-primary btn-sm" href="https://app.maengmoz.com" target="_blank" rel="noopener">
          둘러보기 <Ico.arrow/>
        </a>
      </div>
    </nav>
  );
}

/* ──────────────────────────────────────────────────────────
   HERO
   ────────────────────────────────────────────────────────── */
function Hero({ ctaCopy }) {
  return (
    <section className="hero" data-screen-label="01 Hero">
      <div className="hero-bg"/>
      <div className="wrap">
        <div className="hero-grid">
          <div className="hero-left">
            <div className="hero-kicker reveal">
              <span className="hero-kicker-badge">FOR PARENTS</span>
              <span>학군지 엄마들의 스포츠 교육 커뮤니티</span>
            </div>
            <h1 className="h-display reveal d1">
              우리 아이 스포츠 학원,<br className="bk"/>
              결국 <span className="accent">먼저 보내본 엄마들의</span><br className="bk"/>
              이야기를 찾게 됩니다.
            </h1>
            <p className="lead reveal d2">
              테니스 · 골프 · 하키 · 피겨까지.
              실제 학부모 후기와 검증된 아카데미 정보를 한곳에서.
            </p>
            <div className="hero-ctas reveal d3">
              <a className="btn btn-primary btn-lg" href="https://app.maengmoz.com/academies" target="_blank" rel="noopener">
                <span className="btn-ic"><Ico.pin/></span>
                우리 동네 학원 찾기 <Ico.arrow/>
              </a>
              <a className="btn btn-ghost btn-lg" href="https://app.maengmoz.com/community" target="_blank" rel="noopener">
                <span className="btn-ic"><Ico.message/></span>
                교육 정보 찾기 <Ico.arrow/>
              </a>
            </div>
          </div>

          <div className="hero-visual reveal d2">
            <div className="hv-glow"/>
            <div className="hv-stack">
              <div className="hv-phone">
                <div className="hv-phone-notch"/>
                <div className="hv-phone-screen">
                  <img src="assets/screen-home.png" alt="맹모즈 앱 홈 화면" loading="lazy"/>
                </div>
              </div>
              <HeroReviewCard/>
              <HeroVerifiedCard/>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

function HeroAppCard() {
  // unused now
  return null;
}

function HeroReviewCard() {
  return (
    <div className="hv-card review">
      <div className="review-head">
        <div className="review-avatar">권</div>
        <div>
          <div className="review-name">권나래 · 자녀 10세</div>
          <div className="review-sub">컴피던스스키 · 2월 19일</div>
        </div>
      </div>
      <div className="review-stars">★★★★★</div>
      <div className="review-body">
        다른 스키 교실도 여러 군데 다녕봤는데 단연 최고예요. <strong>아이뿐만 아니라 부모 초보 강습까지 연계</strong>가 가능해서 온 가족이 같이 즐겼습니다.
      </div>
      <div className="review-tags">
        <span className="review-tag">맞춤 코칭</span>
        <span className="review-tag">가족 친화</span>
      </div>
    </div>
  );
}

function HeroVerifiedCard() {
  return (
    <div className="hv-card verified">
      <div className="verified-head">
        <div className="verified-icon"><Ico.shield/></div>
        <div>
          <div className="verified-title">검증된 아카데미</div>
          <div className="verified-sub">3단계 입점 심사 통과</div>
        </div>
      </div>
      <div className="verified-bar">
        <div className="verified-bar-item"><span className="verified-check"><Ico.check/></span> 운영</div>
        <div className="verified-bar-item"><span className="verified-check"><Ico.check/></span> 수업</div>
        <div className="verified-bar-item"><span className="verified-check"><Ico.check/></span> 환경</div>
      </div>
    </div>
  );
}

/* ──────────────────────────────────────────────────────────
   BRAND STORY
   ────────────────────────────────────────────────────────── */
function BrandStory() {
  return (
    <section className="brand-story" id="brand" data-screen-label="02 Brand Story">
      <div className="wrap-narrow reveal">
        <div className="bs-mark">“</div>
        <div className="eyebrow bs-eyebrow">Brand Story</div>
        <div className="bs-body">
          <p>
            맹자의 어머니가<br className="br-md"/>
            자식의 교육 환경을 위해 <em>세 번 이사</em>했던 것처럼,
          </p>
          <p>
            오늘날의 엄마들도<br className="br-md"/>
            더 좋은 환경과 경험을 찾기 위해<br className="br-md"/>
            끊임없이 정보를 찾고 환경을 만들고 있습니다.
          </p>
          <p>
            맹모즈는<br className="br-md"/>
            <em>아이 교육에 진심인 학부모들</em>의<br className="br-md"/>
            정보와 경험이 연결되는 공간입니다.
          </p>
        </div>
        <div className="bs-rule"/>
      </div>
    </section>
  );
}

/* ──────────────────────────────────────────────────────────
   WHY MENGMOZ
   ────────────────────────────────────────────────────────── */
function WhyMengmoz() {
  return (
    <section className="why" data-screen-label="03 Why Mengmoz">
      <div className="wrap">
        <div className="why-head">
          <div className="reveal">
            <div className="eyebrow" style={{ marginBottom: 20 }}>Why Mengmoz</div>
            <h2 className="h-section">
              왜 엄마들은<br className="br-md"/>맹모즈를 찾을까요?
            </h2>
          </div>
          <p className="lead reveal d1" style={{ maxWidth: 520 }}>
            검색 한 번에 정보는 넘쳐나지만, 정작 <strong style={{ color: "var(--ink-900)", fontWeight: 600 }}>“우리 아이에게 맞을지”</strong>를 알기는 어렵습니다. 맹모즈는 그 거리를 좁히는 세 가지 방법을 만듭니다.
          </p>
        </div>

        <div className="why-grid">
          <Pillar1/>
          <Pillar2/>
          <Pillar3/>
        </div>
      </div>
    </section>
  );
}

function Pillar1() {
  return (
    <article className="pillar reveal d1">
      <div className="pillar-num">PILLAR 01</div>
      <div className="pillar-visual">
        <div className="p1-msg a">
          <span className="role">서연맘 · 대치초</span>
          코치님이 아이마다 다르게 봐주세요
        </div>
        <div className="p1-msg b">
          <span className="role">은우맘 · 대치초</span>
          저희도 8개월째예요, 적응 빨라요
        </div>
        <div className="p1-msg c">
          <span className="role">하준맘 · 도곡초</span>
          그룹 4인이라 집중도 좋아요
        </div>
      </div>
      <h3>직접 보내본 부모들의 이야기</h3>
      <p>
        같은 지역 · 같은 학교 · 같은 종목 학부모의 경험으로 수업 분위기부터 코치 스타일까지 더 현실적으로 확인해보세요.
      </p>
    </article>
  );
}

function Pillar2() {
  return (
    <article className="pillar reveal d2">
      <div className="pillar-num">PILLAR 02</div>
      <div className="pillar-visual">
        <div className="p2-stack">
          <div className="p2-badge">
            <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
              <path d="M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Z" stroke="currentColor" strokeWidth="1.8" strokeLinejoin="round"/>
              <path d="m9 12 2 2 4-4" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
            </svg>
          </div>
        </div>
        <div className="p2-checks">
          <div className="p2-check">운영 정보</div>
          <div className="p2-check">수업 환경</div>
          <div className="p2-check">코치 이력</div>
        </div>
      </div>
      <h3>검증된 아카데미만 소개합니다</h3>
      <p>
        운영 정보와 수업 환경을 확인한 뒤, 기준에 맞는 아카데미만 소개합니다. 아이를 보내는 일이니까, 더 신중하게.
      </p>
    </article>
  );
}

function Pillar3() {
  return (
    <article className="pillar reveal d3">
      <div className="pillar-num">PILLAR 03</div>
      <div className="pillar-visual">
        <svg className="p3-svg" viewBox="0 0 300 160" preserveAspectRatio="none">
          <line x1="150" y1="80" x2="72"  y2="32"  stroke="oklch(0.85 0.06 295)" strokeWidth="1" strokeDasharray="3 4"/>
          <line x1="150" y1="80" x2="228" y2="40"  stroke="oklch(0.85 0.06 295)" strokeWidth="1" strokeDasharray="3 4"/>
          <line x1="150" y1="80" x2="80"  y2="130" stroke="oklch(0.85 0.06 295)" strokeWidth="1" strokeDasharray="3 4"/>
          <line x1="150" y1="80" x2="220" y2="132" stroke="oklch(0.85 0.06 295)" strokeWidth="1" strokeDasharray="3 4"/>
        </svg>
        <div className="p3-net">
          <div className="p3-node center"><img src="assets/mengmoz-logo.png" alt="맹모즈"/></div>
          <div className="p3-node a">테니스맘</div>
          <div className="p3-node b">하키맘</div>
          <div className="p3-node c">골프맘</div>
          <div className="p3-node d">피겨맘</div>
        </div>
      </div>
      <h3>같은 관심사 부모들과 연결됩니다</h3>
      <p>
        테니스맘 · 하키맘 · 골프맘까지. 같은 종목을 보내는 부모들과 정보와 경험을 나눠보세요.
      </p>
    </article>
  );
}

/* ──────────────────────────────────────────────────────────
   SERVICE
   ────────────────────────────────────────────────────────── */
function Service() {
  const [active, setActive] = useState(0);
  const items = [
    { roman: "i",   title: "동네 · 종목별 탐색",      desc: "지역과 종목을 동시에 좁혀서 우리 동네 옵션부터 살펴봅니다." },
    { roman: "ii",  title: "후기와 분위기 비교",      desc: "수업 분위기, 코치 스타일, 학년 구성을 한 화면에서 비교합니다." },
    { roman: "iii", title: "흩어진 정보 한곳에",      desc: "맘카페 · 블로그 · SNS에 흩어진 정보를 정돈된 카드로 모읍니다." },
    { roman: "iv",  title: "같은 관심사 학부모 연결", desc: "같은 종목 학부모 모임과 비공개 채팅으로 자연스럽게 이어집니다." },
  ];

  return (
    <section className="service" id="service" data-screen-label="04 Service">
      <div className="wrap">
        <div className="service-grid">
          <div className="reveal">
            <div className="eyebrow" style={{ marginBottom: 20 }}>Service</div>
            <h2 className="h-section">
              우리 아이에게 맞는 곳,<br className="br-md"/>
              더 쉽게 찾을 수 있도록.
            </h2>
            <p className="lead" style={{ maxWidth: 480, marginTop: 24 }}>
              네 가지 방식으로 학원 탐색을 정돈했습니다.
              한 화면에서 비교하고, 한 번의 검색으로 마무리하세요.
            </p>

            <div className="service-items">
              {items.map((it, i) => (
                <div
                  key={i}
                  className={"service-item" + (active === i ? " active" : "")}
                  onMouseEnter={() => setActive(i)}
                >
                  <div className="service-item-num">{it.roman}</div>
                  <div>
                    <div className="service-item-title">{it.title}</div>
                    <div className="service-item-desc">{it.desc}</div>
                  </div>
                  <div className="service-item-icon"><Ico.arrow/></div>
                </div>
              ))}
            </div>
          </div>

          <div className="phone-stage reveal d2">
            <div className="phone-glow"/>
            <Phone active={active}/>
            <FloatF1/>
            <FloatF2/>
          </div>
        </div>
      </div>
    </section>
  );
}

function Phone({ active }) {
  // Switch screenshot based on active service item
  const src = active >= 2 ? "assets/screen-home.png" : "assets/screen-academies.png";
  const alt = active >= 2 ? "맹모즈 홈 화면" : "맹모즈 아카데미 리스트";
  return (
    <div className="phone phone-real">
      <div className="phone-notch"/>
      <div className="phone-screen">
        <img key={src} src={src} alt={alt} className="phone-shot" loading="lazy"/>
      </div>
    </div>
  );
}

function FloatF1() {
  return (
    <div className="phone-float f1">
      <div className="pf-title">우리 학교 학부모</div>
      <div className="pf-row">
        <div className="review-avatar" style={{ width: 26, height: 26, fontSize: 10 }}>서</div>
        <span style={{ fontWeight: 600, color: "var(--ink-900)" }}>대치초 12명</span>
      </div>
      <div className="pf-row">
        <div className="review-avatar" style={{ width: 26, height: 26, fontSize: 10, background: "linear-gradient(135deg, oklch(0.78 0.10 200), oklch(0.6 0.14 220))" }}>도</div>
        <span style={{ fontWeight: 600, color: "var(--ink-900)" }}>도곡초 8명</span>
      </div>
      <div className="pf-row">
        <div className="review-avatar" style={{ width: 26, height: 26, fontSize: 10, background: "linear-gradient(135deg, oklch(0.78 0.12 145), oklch(0.6 0.16 145))" }}>대</div>
        <span style={{ fontWeight: 600, color: "var(--ink-900)" }}>대청초 6명</span>
      </div>
    </div>
  );
}

function FloatF2() {
  return (
    <div className="phone-float f2">
      <div className="pf-title">수업 분위기</div>
      <div className="pf-row">
        <span style={{ minWidth: 60, fontSize: 11.5, color: "var(--ink-700)" }}>차분한</span>
        <div className="pf-bar"><div className="pf-bar-fill" style={{ width: "82%" }}/></div>
        <div className="pf-num">82%</div>
      </div>
      <div className="pf-row">
        <span style={{ minWidth: 60, fontSize: 11.5, color: "var(--ink-700)" }}>1:1 피드백</span>
        <div className="pf-bar"><div className="pf-bar-fill" style={{ width: "74%" }}/></div>
        <div className="pf-num">74%</div>
      </div>
      <div className="pf-row">
        <span style={{ minWidth: 60, fontSize: 11.5, color: "var(--ink-700)" }}>경쟁적</span>
        <div className="pf-bar"><div className="pf-bar-fill" style={{ width: "28%" }}/></div>
        <div className="pf-num">28%</div>
      </div>
    </div>
  );
}

/* ──────────────────────────────────────────────────────────
   BEFORE / AFTER
   ────────────────────────────────────────────────────────── */
function BeforeAfter() {
  return (
    <section className="ba" data-screen-label="05 Before / After">
      <div className="wrap">
        <div className="ba-head reveal">
          <div className="eyebrow" style={{ marginBottom: 18 }}>Before / After</div>
          <h2 className="h-section">맹모즈를 만나기 전과 후</h2>
        </div>

        <div className="ba-grid">
          <div className="ba-col before reveal d1">
            <span className="ba-tag before">BEFORE</span>
            <h3 className="ba-title">맘카페만으로는<br className="br-md"/>부족했던 정보들</h3>
            <p className="ba-desc">
              맘카페 · 블로그 · SNS까지. 정보는 넘쳐나지만,
              직접 보내본 학부모의 진짜 경험을 찾기는 쉽지 않습니다.
            </p>
            <div className="ba-mess">
              <span className="mess-tag a">광고성 후기 같은데…</span>
              <span className="mess-tag b">대치 테니스 추천?</span>
              <span className="mess-tag c mess-strike">3년 전 후기</span>
              <span className="mess-tag d">DM으로 알려드려요</span>
              <span className="mess-tag e mess-strike">학원 폐업</span>
              <span className="mess-tag f">우리 동네는 어디…</span>
            </div>
            <ul className="ba-bullets">
              <li className="ba-bullet">광고성 후기로 인한 피로감</li>
              <li className="ba-bullet">파편화된 정보, 끊긴 맥락</li>
              <li className="ba-bullet">반복되는 검색과 문의</li>
            </ul>
          </div>

          <div className="ba-col after reveal d2">
            <span className="ba-tag after">WITH MENGMOZ</span>
            <h3 className="ba-title">같은 고민을 해본 학부모의<br className="br-md"/>경험을 한곳에서.</h3>
            <p className="ba-desc">
              수업 후기부터 같은 관심사 학부모의 정보 공유까지,
              우리 아이에게 맞는 정보를 더 빠르고 편하게 찾아보세요.
            </p>
            <div className="ba-clean">
              <div className="clean-row">
                <div className="clean-row-ic"><Ico.users/></div>
                <div>
                  <div className="clean-row-title">대치초 학부모 14명의 후기</div>
                  <div className="clean-row-sub">같은 학교 · 같은 학년 기반</div>
                </div>
                <span className="clean-row-check"><Ico.check/></span>
              </div>
              <div className="clean-row">
                <div className="clean-row-ic"><Ico.shield/></div>
                <div>
                  <div className="clean-row-title">검증 아카데미 8곳 비교</div>
                  <div className="clean-row-sub">운영 · 수업 · 환경 심사 통과</div>
                </div>
                <span className="clean-row-check"><Ico.check/></span>
              </div>
              <div className="clean-row">
                <div className="clean-row-ic"><Ico.message/></div>
                <div>
                  <div className="clean-row-title">테니스맘 모임 · 진행 중</div>
                  <div className="clean-row-sub">실시간 정보 공유 · 비공개</div>
                </div>
                <span className="clean-row-check"><Ico.check/></span>
              </div>
            </div>
            <ul className="ba-bullets">
              <li className="ba-bullet">실제 학부모 후기 기반</li>
              <li className="ba-bullet">종목별 학부모 커뮤니티</li>
              <li className="ba-bullet">검증된 아카데미 정보</li>
            </ul>
            <div className="ba-cta">
              <a className="btn btn-primary" href="#">맹모즈 둘러보기 <Ico.arrow/></a>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

/* ──────────────────────────────────────────────────────────
   WHY TRUST
   ────────────────────────────────────────────────────────── */
function WhyTrust() {
  const cards = [
    { n: "01", icon: <Ico.pin/>,     t: "지역 · 학교 · 종목 기반 정보",  d: "비슷한 환경의 학부모 경험을 우선 보여드립니다. 같은 동네, 같은 학년 기준으로 필터링됩니다." },
    { n: "02", icon: <Ico.message/>, t: "직접 보내본 학부모 후기",      d: "광고성 후기는 노출하지 않습니다. 실제 등록을 인증한 학부모의 경험 기반 후기만 모읍니다." },
    { n: "03", icon: <Ico.shield/>,  t: "검증된 아카데미만 입점",       d: "운영 정보 · 수업 환경 · 코치 이력을 확인한 후 기준에 맞는 아카데미만 소개합니다." },
    { n: "04", icon: <Ico.users/>,   t: "관심사 기반 학부모 커뮤니티",   d: "같은 종목을 보내는 학부모와 비공개 모임에서 정보를 나누고, 코칭 노하우를 함께 쌓습니다." },
  ];
  return (
    <section className="trust" data-screen-label="06 Why Trust">
      <div className="wrap">
        <div className="trust-head reveal">
          <div className="eyebrow">Why Trust</div>
          <h2 className="trust-title">
            믿을 수 있는 스포츠 교육 정보,<br className="br-md"/>
            <em>기존 방식으로는 찾기 어렵습니다.</em>
          </h2>
        </div>
        <div className="trust-grid">
          {cards.map((c, i) => (
            <article key={i} className={"trust-card reveal d" + ((i % 4) + 1)}>
              <div className="trust-icon">{c.icon}</div>
              <div className="trust-num">{c.n}</div>
              <h3>{c.t}</h3>
              <p>{c.d}</p>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ──────────────────────────────────────────────────────────
   FINAL CTA
   ────────────────────────────────────────────────────────── */
function FinalCTA() {
  return (
    <section className="final" id="contact" data-screen-label="07 Final CTA">
      <div className="final-orb a"/>
      <div className="final-orb b"/>
      <div className="wrap-narrow reveal">
        <div className="eyebrow" style={{ justifyContent: "center", display: "inline-flex" }}>Join Mengmoz</div>
        <h2 className="final-title">
          우리 아이에게 맞는 스포츠 교육,<br className="br-md"/>
          <em>맹모즈에서 먼저 만나보세요.</em>
        </h2>
        <p className="final-sub">
          직접 보내본 학부모의 이야기부터<br className="br-md"/>
          같은 관심사 학부모와의 정보 공유까지.
        </p>
        <div className="final-ctas">
          <a className="btn btn-primary btn-lg" href="https://app.maengmoz.com" target="_blank" rel="noopener">학부모 가입하기 <Ico.arrow/></a>
          <a className="btn btn-ghost btn-lg" href="http://pf.kakao.com/_RxkTsX/chat" target="_blank" rel="noopener">아카데미 제휴 문의 <Ico.arrow/></a>
        </div>
      </div>
    </section>
  );
}

/* ──────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────── */
function Footer() {
  return (
    <footer data-screen-label="08 Footer">
      <div className="wrap">
        <div className="f-grid">
          <div>
            <div className="f-logo">
              <img src="assets/mengmoz-logo.png" alt="맹모즈"/>
            </div>
            <p className="f-tag">
              학군맘의 스포츠 교육 커뮤니티.<br className="br-md"/>
              실제 경험 기반 아카데미 플랫폼.
            </p>
          </div>
          <div className="f-col">
            <h4>FOR PARENTS</h4>
            <a href="https://app.maengmoz.com/academies" target="_blank" rel="noopener">학원 찾기</a>
            <a href="https://app.maengmoz.com/community" target="_blank" rel="noopener">학부모 커뮤니티</a>
          </div>
          <div className="f-col">
            <h4>FOR ACADEMY</h4>
            <a href="http://pf.kakao.com/_RxkTsX/chat" target="_blank" rel="noopener">입점 문의 (카카오톡)</a>
            <a href="mailto:info@maengmoz.com">입점 문의 (이메일)</a>
          </div>
          <div className="f-col">
            <h4>COMPANY</h4>
            <a href="#brand">회사소개</a>
            <a href="http://pf.kakao.com/_RxkTsX/chat" target="_blank" rel="noopener">문의하기</a>
          </div>
        </div>
        <div className="f-bottom">
          <div className="f-biz">
            <dl className="biz-dl">
              <div><dt>상호</dt><dd>맹모즈</dd></div>
              <div><dt>대표</dt><dd>이상혁</dd></div>
              <div><dt>사업자번호</dt><dd>622-21-01459</dd></div>
              <div><dt>통신판매번호</dt><dd>2026-서울마포-1271</dd></div>
              <div><dt>전화</dt><dd>010-7939-6553</dd></div>
              <div><dt>이메일</dt><dd><a href="mailto:info@maengmoz.com">info@maengmoz.com</a></dd></div>
              <div className="biz-full"><dt>소재지</dt><dd>서울특별시 마포구 마포대로 4나길 71</dd></div>
            </dl>
          </div>
          <div className="f-copy">© 2026 Mengmoz Inc.</div>
        </div>
      </div>
    </footer>
  );
}

/* ──────────────────────────────────────────────────────────
   ROOT
   ────────────────────────────────────────────────────────── */
function App() {
  const t = window.useTweaks ? window.useTweaks(TWEAKS_DEFAULTS) : [TWEAKS_DEFAULTS, () => {}];
  const tweaks = t[0]; const setTweak = t[1];
  useReveal();

  // Apply accent palette
  useEffect(() => {
    const a = ACCENTS[tweaks.accent] || ACCENTS.violet;
    const root = document.documentElement;
    root.style.setProperty("--violet-400", a.c400);
    root.style.setProperty("--violet-500", a.c500);
    root.style.setProperty("--violet-600", a.c600);
    root.style.setProperty("--violet-700", a.c700);
  }, [tweaks.accent]);

  return (
    <>
      <Nav ctaCopy={tweaks.ctaCopy}/>
      <Hero ctaCopy={tweaks.ctaCopy}/>
      <BrandStory/>
      <WhyMengmoz/>
      <Service/>
      {tweaks.showBA && <BeforeAfter/>}
      {tweaks.showTrust && <WhyTrust/>}
      <FinalCTA/>
      <Footer/>

      {window.TweaksPanel && (
        <window.TweaksPanel title="Tweaks">
          <window.TweakSection title="Brand">
            <window.TweakRadio
              label="Accent"
              value={tweaks.accent}
              onChange={(v) => setTweak("accent", v)}
              options={[
                { value: "violet",  label: "Violet" },
                { value: "indigo",  label: "Indigo" },
                { value: "magenta", label: "Magenta" },
              ]}
            />
          </window.TweakSection>
          <window.TweakSection title="Copy">
            <window.TweakText
              label="Hero CTA"
              value={tweaks.ctaCopy}
              onChange={(v) => setTweak("ctaCopy", v)}
            />
          </window.TweakSection>
          <window.TweakSection title="Sections">
            <window.TweakToggle
              label="Before / After"
              value={tweaks.showBA}
              onChange={(v) => setTweak("showBA", v)}
            />
            <window.TweakToggle
              label="Why Trust"
              value={tweaks.showTrust}
              onChange={(v) => setTweak("showTrust", v)}
            />
          </window.TweakSection>
        </window.TweaksPanel>
      )}
    </>
  );
}

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App/>);
