// CLEARVERSE one-page intro site
// Premium, minimal, futuristic. Deep navy background, neon-blue accent,
// dot-particle dolphin hero.

const { useState, useEffect, useRef } = React;

// ---------- Tiny utility hooks ----------
const useInView = () => {
  const ref = useRef(null);
  const [inView, setInView] = useState(false);
  useEffect(() => {
    if (!ref.current || inView) return;
    let raf = 0;
    const check = () => {
      if (!ref.current) return;
      const r = ref.current.getBoundingClientRect();
      const vh = window.innerHeight || 0;
      // trigger when any part of the element is within (slightly inset) the viewport
      if (r.top < vh * 0.9 && r.bottom > vh * 0.05) {
        setInView(true);
        window.removeEventListener('scroll', check);
        window.removeEventListener('resize', check);
        return;
      }
      raf = requestAnimationFrame(() => {});
    };
    // initial check (run synchronously + on next frame + on a short delay
    // so we don't depend on a throttled rAF in a hidden iframe)
    check();
    raf = requestAnimationFrame(check);
    const t1 = setTimeout(check, 50);
    const t2 = setTimeout(check, 250);
    window.addEventListener('scroll', check, { passive: true });
    window.addEventListener('resize', check);
    return () => {
      cancelAnimationFrame(raf);
      clearTimeout(t1); clearTimeout(t2);
      window.removeEventListener('scroll', check);
      window.removeEventListener('resize', check);
    };
  }, [inView]);
  return [ref, inView];
};

const useScrollY = () => {
  const [y, setY] = useState(0);
  useEffect(() => {
    const onScroll = () => setY(window.scrollY);
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);
  return y;
};

// Returns 'mobile' (<640) | 'tablet' (<1024) | 'desktop' (>=1024)
const useBreakpoint = () => {
  const get = () => {
    if (typeof window === 'undefined') return 'desktop';
    const w = window.innerWidth;
    if (w < 640) return 'mobile';
    if (w < 1024) return 'tablet';
    return 'desktop';
  };
  const [bp, setBp] = useState(get);
  useEffect(() => {
    const on = () => setBp(get());
    window.addEventListener('resize', on);
    return () => window.removeEventListener('resize', on);
  }, []);
  return bp;
};
const isMobile = (bp) => bp === 'mobile';
const isTablet = (bp) => bp === 'tablet';
const isDesktop = (bp) => bp === 'desktop';

// ---------- Reveal wrapper ----------
const Reveal = ({ children, delay = 0, y = 24, as: As = 'div', ...rest }) => {
  const [ref, inView] = useInView();
  return (
    <As
      ref={ref}
      {...rest}
      style={{
        ...rest.style,
        opacity: inView ? 1 : 0,
        transform: inView ? 'translate3d(0,0,0)' : `translate3d(0, ${y}px, 0)`,
        transition: `opacity 1.1s cubic-bezier(.2,.7,.2,1) ${delay}ms, transform 1.1s cubic-bezier(.2,.7,.2,1) ${delay}ms`,
        willChange: 'opacity, transform',
      }}
    >
      {children}
    </As>
  );
};

// ---------- Navigation ----------
const Nav = ({ accent }) => {
  const y = useScrollY();
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  const [open, setOpen] = useState(false);
  const condensed = y > 20;
  const links = [
    ['About', '#about'],
    ['Vision', '#vision'],
    ['What we do', '#direction'],
    ['Values', '#values'],
    ['Contact', '#contact'],
  ];
  return (
    <nav
      data-screen-label="00 Nav"
      style={{
        position: 'fixed', top: 0, left: 0, right: 0, zIndex: 50,
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
        padding: condensed
          ? (mobile ? '12px 20px' : '14px 40px')
          : (mobile ? '18px 20px' : '24px 40px'),
        background: condensed || (mobile && open) ? 'rgba(6,10,22,0.7)' : 'transparent',
        backdropFilter: condensed || (mobile && open) ? 'blur(18px) saturate(140%)' : 'none',
        WebkitBackdropFilter: condensed || (mobile && open) ? 'blur(18px) saturate(140%)' : 'none',
        borderBottom: condensed ? '1px solid rgba(120,170,255,0.08)' : '1px solid transparent',
        transition: 'all .5s cubic-bezier(.2,.7,.2,1)',
        fontFamily: 'var(--font-display)',
      }}
    >
      <a href="#top" style={{
        display: 'flex', alignItems: 'center', gap: 10,
        textDecoration: 'none', color: '#fff', letterSpacing: '0.18em',
        fontWeight: 600, fontSize: mobile ? 12 : 13,
      }}>
        <LogoMark accent={accent} />
        <span>CLEARVERSE</span>
      </a>

      {mobile ? (
        <button
          aria-label="Menu"
          onClick={() => setOpen(o => !o)}
          style={{
            width: 40, height: 40, borderRadius: 999,
            border: `1px solid ${accent}40`,
            background: `${accent}10`,
            color: accent,
            display: 'grid', placeItems: 'center',
            cursor: 'pointer',
          }}>
          <svg width="18" height="18" viewBox="0 0 18 18" aria-hidden>
            {open ? (
              <g stroke="currentColor" strokeWidth="1.4" strokeLinecap="round">
                <line x1="4" y1="4" x2="14" y2="14" />
                <line x1="14" y1="4" x2="4" y2="14" />
              </g>
            ) : (
              <g stroke="currentColor" strokeWidth="1.4" strokeLinecap="round">
                <line x1="3" y1="6" x2="15" y2="6" />
                <line x1="3" y1="12" x2="15" y2="12" />
              </g>
            )}
          </svg>
        </button>
      ) : (
        <div style={{ display: 'flex', gap: 36, alignItems: 'center' }}>
          {links.map(([label, href]) => (
            <a key={href} href={href} className="nav-link" style={{
              color: 'rgba(220,232,255,0.7)', textDecoration: 'none',
              fontSize: 12.5, letterSpacing: '0.08em', fontWeight: 500,
            }}>{label}</a>
          ))}
          <a href="#contact" style={{
            padding: '8px 16px',
            borderRadius: 999,
            border: `1px solid ${accent}55`,
            color: accent,
            fontSize: 12, letterSpacing: '0.1em', fontWeight: 600,
            textDecoration: 'none',
            background: `${accent}10`,
            transition: 'all .3s',
          }} onMouseEnter={(e)=>{e.currentTarget.style.background = `${accent}22`;}}
             onMouseLeave={(e)=>{e.currentTarget.style.background = `${accent}10`;}}>
            문의하기
          </a>
        </div>
      )}

      {/* Mobile drawer */}
      {mobile && (
        <div style={{
          position: 'absolute', top: '100%', left: 0, right: 0,
          background: 'rgba(6,10,22,0.92)',
          backdropFilter: 'blur(20px) saturate(140%)',
          WebkitBackdropFilter: 'blur(20px) saturate(140%)',
          borderBottom: '1px solid rgba(120,170,255,0.1)',
          padding: open ? '20px 20px 28px' : '0 20px',
          maxHeight: open ? 400 : 0,
          opacity: open ? 1 : 0,
          overflow: 'hidden',
          transition: 'all .45s cubic-bezier(.2,.7,.2,1)',
          display: 'flex', flexDirection: 'column', gap: 4,
        }}>
          {links.map(([label, href]) => (
            <a key={href} href={href}
              onClick={() => setOpen(false)}
              style={{
                color: 'rgba(220,232,255,0.85)', textDecoration: 'none',
                fontSize: 18, fontWeight: 500, letterSpacing: '-0.005em',
                padding: '14px 0',
                borderBottom: '1px solid rgba(120,170,255,0.08)',
              }}>{label}</a>
          ))}
          <a href="#contact" onClick={() => setOpen(false)} style={{
            marginTop: 14, padding: '14px 20px',
            borderRadius: 999,
            background: `linear-gradient(135deg, ${accent}, ${accent}cc)`,
            color: '#031022', fontSize: 13, letterSpacing: '0.06em', fontWeight: 700,
            textDecoration: 'none', textAlign: 'center',
            fontFamily: 'var(--font-display)',
          }}>문의하기</a>
        </div>
      )}
    </nav>
  );
};

const LogoMark = ({ accent }) => (
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" aria-hidden>
    <circle cx="11" cy="11" r="10" stroke={accent} strokeOpacity="0.5" />
    <circle cx="11" cy="11" r="5" fill={accent} fillOpacity="0.4" />
    <circle cx="11" cy="11" r="2" fill={accent} />
    <circle cx="18.5" cy="6" r="1.2" fill={accent} />
    <circle cx="4" cy="16" r="1" fill={accent} fillOpacity="0.7" />
    <circle cx="17" cy="17" r="0.8" fill={accent} fillOpacity="0.5" />
  </svg>
);

// ---------- Hero ----------
const Hero = ({ accent, density, intensity }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  return (
    <section
      id="top"
      data-screen-label="01 Hero"
      style={{
        position: 'relative',
        minHeight: mobile ? 'min(100svh, 760px)' : '100vh',
        overflow: 'hidden',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
      }}
    >
      <DolphinHero accent={accent} density={density} intensity={intensity} />

      {/* Top label */}
      <div style={{
        position: 'absolute',
        top: mobile ? 88 : 110,
        left: '50%', transform: 'translateX(-50%)',
        display: 'flex', alignItems: 'center', gap: 12,
        color: 'rgba(220,232,255,0.55)',
        fontFamily: 'var(--font-display)',
        fontSize: mobile ? 10 : 11, letterSpacing: '0.35em', fontWeight: 500,
        zIndex: 2,
        whiteSpace: 'nowrap',
      }}>
        <span style={{
          width: 6, height: 6, borderRadius: 999, background: accent,
          boxShadow: `0 0 12px ${accent}`,
        }} />
        A NEW DIGITAL FLOW
        <span style={{ width: 32, height: 1, background: 'rgba(220,232,255,0.2)' }} />
      </div>

      {/* Main copy */}
      <div style={{
        position: 'relative', zIndex: 2,
        textAlign: 'center', padding: mobile ? '0 20px' : '0 24px',
        maxWidth: 1100,
      }}>
        <h1 style={{
          fontFamily: 'var(--font-display)',
          fontSize: mobile ? 'clamp(30px, 8.6vw, 46px)' : 'clamp(40px, 6.4vw, 96px)',
          lineHeight: 1.1,
          letterSpacing: '-0.025em',
          fontWeight: 500,
          color: '#fff',
          margin: 0,
          textWrap: 'balance',
        }}>
          <Reveal as="span" delay={150} y={36} style={{ display: 'block' }}>
            복잡한 세상을 <em style={{
              fontStyle: 'normal',
              background: `linear-gradient(120deg, ${accent}, #B6E5FF 60%, ${accent})`,
              WebkitBackgroundClip: 'text',
              backgroundClip: 'text',
              color: 'transparent',
            }}>명확하게</em>,
          </Reveal>
          <Reveal as="span" delay={350} y={36} style={{ display: 'block' }}>
            작은 행동을 더 큰 <em style={{
              fontStyle: 'normal',
              background: `linear-gradient(120deg, ${accent}, #B6E5FF 60%, ${accent})`,
              WebkitBackgroundClip: 'text',
              backgroundClip: 'text',
              color: 'transparent',
            }}>가치</em>로.
          </Reveal>
        </h1>
        <Reveal delay={650} y={20}>
          <p style={{
            marginTop: 28,
            color: 'rgba(220,232,255,0.62)',
            fontSize: mobile ? 14 : 'clamp(14px, 1.1vw, 17px)',
            lineHeight: 1.7,
            maxWidth: 560,
            margin: '28px auto 0',
            textWrap: 'pretty',
            wordBreak: 'keep-all',
            lineBreak: 'strict',
            overflowWrap: 'normal',
            textShadow: mobile ? '0 2px 18px rgba(0,0,0,0.9), 0 0 28px rgba(3,10,24,0.95)' : 'none',
          }}>
            CLEARVERSE는 기술과 AI를 통해 사람·정보·행동·기회를 연결하는 플랫폼 컴퍼니입니다.
            {mobile ? ' ' : <br />}
            아직 정의되지 않은 가능성 속에서, 우리는 더 명확하고 가치 있는 디지털 경험을 만들어갑니다.
          </p>
        </Reveal>
        <Reveal delay={850} y={16}>
          <div style={{
            marginTop: mobile ? 32 : 40,
            display: 'flex', gap: 12,
            justifyContent: 'center', flexWrap: 'wrap',
            flexDirection: mobile ? 'column' : 'row',
            alignItems: 'center',
          }}>
            <a href="#about" className="btn-primary" style={{
              padding: mobile ? '14px 32px' : '14px 28px', borderRadius: 999,
              background: `linear-gradient(135deg, ${accent}, ${accent}cc)`,
              color: '#031022',
              fontSize: 13, letterSpacing: '0.06em', fontWeight: 700,
              textDecoration: 'none',
              boxShadow: `0 8px 30px ${accent}44, inset 0 1px 0 rgba(255,255,255,0.4)`,
              transition: 'transform .3s, box-shadow .3s',
              fontFamily: 'var(--font-display)',
              minWidth: mobile ? 200 : 0,
              textAlign: 'center',
            }}>회사 소개 보기 →</a>
            <a href="#contact" style={{
              padding: mobile ? '14px 32px' : '14px 28px', borderRadius: 999,
              border: '1px solid rgba(220,232,255,0.2)',
              color: 'rgba(220,232,255,0.9)',
              fontSize: 13, letterSpacing: '0.06em', fontWeight: 600,
              textDecoration: 'none',
              background: 'rgba(255,255,255,0.02)',
              backdropFilter: 'blur(8px)',
              fontFamily: 'var(--font-display)',
              minWidth: mobile ? 200 : 0,
              textAlign: 'center',
            }}>문의하기</a>
          </div>
        </Reveal>
      </div>

      {/* Scroll indicator (hidden on mobile to save space) */}
      {!mobile && (
        <div style={{
          position: 'absolute', bottom: 36, left: '50%', transform: 'translateX(-50%)',
          zIndex: 2, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10,
          color: 'rgba(220,232,255,0.45)',
        }}>
        <span style={{ fontFamily: 'var(--font-display)', fontSize: 10, letterSpacing: '0.35em' }}>SCROLL</span>
        <span style={{
          width: 1, height: 50, background: `linear-gradient(180deg, ${accent}, transparent)`,
          position: 'relative',
        }}>
          <span className="scroll-dot" style={{
            position: 'absolute', top: 0, left: '50%', transform: 'translateX(-50%)',
            width: 4, height: 4, borderRadius: 999, background: accent,
            boxShadow: `0 0 10px ${accent}`,
          }} />
        </span>
      </div>
      )}
    </section>
  );
};

// ---------- About ----------
const About = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  return (
  <section id="about" data-screen-label="02 About" style={sectionStyle(bp)}>
    <div style={{
      ...wrap(bp),
      display: 'grid',
      gridTemplateColumns: mobile ? '1fr' : '1fr 1.4fr',
      gap: mobile ? 32 : 80, alignItems: 'start',
    }}>
      <div>
        <SectionEyebrow accent={accent} num="01" label="About" />
        <Reveal>
          <h2 style={h2Style(bp)}>
            CLEARVERSE는<br />
            <span style={{
              color: 'rgba(255,255,255,0.45)',
              wordBreak: 'keep-all',
              lineBreak: 'strict',
              overflowWrap: 'normal',
            }}>명확한 연결을 만드는</span><br />
            회사입니다.
          </h2>
        </Reveal>
      </div>
      <div style={{ paddingTop: mobile ? 0 : 60 }}>
        <Reveal delay={120}>
          <p style={bodyStyle}>
            세상에는 좋은 정보, 좋은 서비스, 좋은 기회가 많습니다.<br />
            하지만 많은 사람들은 복잡한 과정 속에서 무엇을 선택해야 할지, 어떤 행동을 해야 할지 쉽게 알기 어렵습니다.
          </p>
        </Reveal>
        <Reveal delay={220}>
          <p style={{ ...bodyStyle, marginTop: 22, color: 'rgba(230,242,255,0.92)' }}>
            CLEARVERSE는 이 복잡함을 기술로 정리하고,<br />
            사람들의 행동이 더 나은 기회와 가치로 이어질 수 있도록 돕는 회사를 지향합니다.
          </p>
        </Reveal>

        <Reveal delay={320}>
          <div style={{
            marginTop: mobile ? 36 : 56,
            display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 0,
            borderTop: '1px solid rgba(120,170,255,0.12)',
            borderBottom: '1px solid rgba(120,170,255,0.12)',
          }}>
            {[
              ['Clear', '명확함'],
              ['Connect', '연결'],
              ['Verse', '확장 가능한 세계'],
            ].map(([en, ko], i) => (
              <div key={en} style={{
                padding: mobile ? '16px 10px' : '22px 18px',
                borderLeft: i > 0 ? '1px solid rgba(120,170,255,0.12)' : 'none',
              }}>
                <div style={{ color: accent, fontFamily: 'var(--font-display)', fontSize: mobile ? 11 : 13, letterSpacing: '0.18em', fontWeight: 600 }}>
                  {en}
                </div>
                <div style={{ marginTop: 6, color: 'rgba(220,232,255,0.55)', fontSize: mobile ? 11 : 13 }}>{ko}</div>
              </div>
            ))}
          </div>
        </Reveal>
      </div>
    </div>
  </section>
  );
};

// ---------- Problems ----------
const Problems = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  const items = [
    { k: '01', t: '정보는 많지만 명확하지 않습니다', b: '사용자는 수많은 정보 속에서 자신에게 필요한 선택을 찾기 어렵습니다.' },
    { k: '02', t: '행동은 많지만 가치로 연결되지 않습니다', b: '사람들의 방문·참여·기록·선택은 의미 있는 데이터이지만 충분히 활용되지 못합니다.' },
    { k: '03', t: '기업과 사용자는 더 좋은 연결이 필요합니다', b: '기업은 실질적 행동을 원하고, 사용자는 합당한 보상과 경험을 원합니다.' },
    { k: '04', t: '기술은 더 쉽게 쓰여야 합니다', b: 'AI와 데이터는 복잡한 것을 더 복잡하게 만드는 것이 아니라, 더 쉽게 만들어야 합니다.' },
  ];
  return (
    <section id="vision" data-screen-label="03 Problems" style={sectionStyle(bp)}>
      <div style={wrap(bp)}>
        <SectionEyebrow accent={accent} num="02" label="What we see" align="center" />
        <Reveal>
          <h2 style={{ ...h2Style(bp), textAlign: 'center', maxWidth: 900, margin: '0 auto' }}>
            우리는 <em style={{ fontStyle: 'normal', color: accent }}>복잡함</em>에서<br />
            기회를 봅니다.
          </h2>
        </Reveal>

        <div style={{
          marginTop: mobile ? 48 : 80,
          display: 'grid',
          gridTemplateColumns: mobile ? '1fr' : 'repeat(2, 1fr)',
          gap: 1,
          background: 'rgba(120,170,255,0.1)',
          borderRadius: 18, overflow: 'hidden',
          border: '1px solid rgba(120,170,255,0.1)',
        }}>
          {items.map((it, i) => (
            <Reveal key={it.k} delay={i * 90}>
              <div className="problem-card" style={{
                background: 'rgba(10,18,38,0.9)',
                padding: mobile ? '32px 24px' : '42px 40px',
                minHeight: mobile ? 200 : 240,
                display: 'flex', flexDirection: 'column', justifyContent: 'space-between',
                position: 'relative', overflow: 'hidden',
              }}>
                <div style={{
                  display: 'flex', alignItems: 'baseline', gap: 14,
                  color: accent, fontFamily: 'var(--font-display)', fontSize: 12, letterSpacing: '0.18em', fontWeight: 600,
                }}>
                  <span>{it.k}</span>
                  <span style={{ flex: 1, height: 1, background: `linear-gradient(90deg, ${accent}44, transparent)` }} />
                </div>
                <div>
                  <h3 style={{
                    margin: mobile ? '24px 0 12px' : '32px 0 14px',
                    fontFamily: 'var(--font-display)',
                    fontSize: mobile ? 18 : 22, lineHeight: 1.4, fontWeight: 500, color: '#fff',
                    letterSpacing: '-0.01em',
                  }}>{it.t}</h3>
                  <p style={{ margin: 0, color: 'rgba(220,232,255,0.55)', fontSize: mobile ? 13.5 : 14.5, lineHeight: 1.7, textWrap: 'pretty' }}>
                    {it.b}
                  </p>
                </div>
                <ProblemGlyph index={i} accent={accent} />
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
};

const ProblemGlyph = ({ index, accent }) => {
  // Abstract micro-glyphs in the corner of each card
  const size = 120;
  return (
    <svg width={size} height={size} viewBox="0 0 120 120"
      style={{ position: 'absolute', right: -10, bottom: -10, opacity: 0.5 }} aria-hidden>
      <defs>
        <radialGradient id={`g${index}`}>
          <stop offset="0" stopColor={accent} stopOpacity="0.5" />
          <stop offset="1" stopColor={accent} stopOpacity="0" />
        </radialGradient>
      </defs>
      {index === 0 && Array.from({ length: 60 }).map((_, i) => {
        const x = 20 + (i % 8) * 11;
        const y = 20 + Math.floor(i / 8) * 11;
        const r = 0.6 + ((i * 13) % 7) / 4;
        return <circle key={i} cx={x} cy={y} r={r} fill={accent} opacity={0.2 + (i % 5) * 0.12} />;
      })}
      {index === 1 && (
        <g>
          {Array.from({ length: 8 }).map((_, i) => (
            <line key={i} x1={20} y1={30 + i * 10} x2={100 - i * 3} y2={30 + i * 10}
              stroke={accent} strokeOpacity={0.3 - i * 0.025} strokeWidth="1" />
          ))}
        </g>
      )}
      {index === 2 && (
        <g>
          <circle cx="36" cy="60" r="20" stroke={accent} strokeOpacity="0.5" fill="none" />
          <circle cx="84" cy="60" r="20" stroke={accent} strokeOpacity="0.5" fill="none" />
          <line x1="56" y1="60" x2="64" y2="60" stroke={accent} strokeOpacity="0.4" strokeDasharray="2 2" />
        </g>
      )}
      {index === 3 && (
        <g>
          {Array.from({ length: 12 }).map((_, i) => {
            const a = (i / 12) * Math.PI * 2;
            return <line key={i}
              x1={60 + Math.cos(a) * 18} y1={60 + Math.sin(a) * 18}
              x2={60 + Math.cos(a) * 36} y2={60 + Math.sin(a) * 36}
              stroke={accent} strokeOpacity={0.35} strokeWidth="1" />;
          })}
          <circle cx="60" cy="60" r="6" fill={accent} fillOpacity="0.6" />
        </g>
      )}
    </svg>
  );
};

// ---------- Direction ----------
const Direction = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  const tablet = isTablet(bp);
  const items = [
    {
      n: '01', t: '행동 기반 플랫폼',
      b: '사람들의 일상 속 행동이 기록되고, 연결되고, 보상받는 플랫폼을 만들어갑니다.',
      tags: ['참여', '방문', '인증', '기록', '추천', '미션'],
    },
    {
      n: '02', t: 'AI 기반 자동화',
      b: '반복적이고 복잡한 과정을 AI로 단순화하여, 더 빠르고 명확한 의사결정을 돕습니다.',
      tags: ['요약', '추천', '자동 분류', '콘텐츠 생성', '행동 분석'],
    },
    {
      n: '03', t: '로컬·생활 연결',
      b: '지역·상점·사용자·서비스를 연결하여 실질적인 생활 기반 가치를 만듭니다.',
      tags: ['지역 상권', '생활 혜택', '방문 미션', '커뮤니티', '로컬'],
    },
    {
      n: '04', t: '데이터 기반 가치 설계',
      b: '사용자의 행동과 선택을 데이터로 이해하고, 더 좋은 경험과 성과로 연결합니다.',
      tags: ['행동 분석', '성과 캠페인', '맞춤 추천', '리워드'],
    },
  ];
  return (
    <section id="direction" data-screen-label="04 Direction" style={sectionStyle(bp)}>
      <div style={wrap(bp)}>
        <SectionEyebrow accent={accent} num="03" label="What we do" />
        <Reveal>
          <h2 style={h2Style(bp)}>
            CLEARVERSE가<br />만들어갈 <em style={{ fontStyle: 'normal', color: accent }}>방향</em>.
          </h2>
        </Reveal>

        <div style={{ marginTop: mobile ? 48 : 80, display: 'flex', flexDirection: 'column', gap: 0 }}>
          {items.map((it, i) => (
            <Reveal key={it.n} delay={i * 60}>
              <div className="direction-row" style={{
                display: 'grid',
                gridTemplateColumns: mobile ? '60px 1fr' : tablet ? '90px 1fr' : '120px 1fr 1.3fr 1fr',
                alignItems: mobile ? 'start' : 'center',
                gap: mobile ? 14 : 32,
                padding: mobile ? '26px 0' : '36px 0',
                borderTop: '1px solid rgba(120,170,255,0.12)',
                borderBottom: i === items.length - 1 ? '1px solid rgba(120,170,255,0.12)' : 'none',
                position: 'relative',
              }}>
                <div style={{
                  color: accent, fontFamily: 'var(--font-display)',
                  fontSize: mobile ? 11 : 13, letterSpacing: '0.2em', fontWeight: 600,
                  paddingTop: mobile ? 6 : 0,
                }}>
                  {it.n} /04
                </div>
                <div style={{ display: mobile || tablet ? 'flex' : 'contents', flexDirection: 'column', gap: mobile ? 10 : 14 }}>
                  <h3 style={{
                    margin: 0, fontFamily: 'var(--font-display)',
                    fontSize: mobile ? 20 : 28, lineHeight: 1.2, fontWeight: 500, color: '#fff',
                    letterSpacing: '-0.015em',
                  }}>{it.t}</h3>
                  <p style={{ margin: 0, color: 'rgba(220,232,255,0.6)', fontSize: mobile ? 13.5 : 15, lineHeight: 1.65, textWrap: 'pretty' }}>
                    {it.b}
                  </p>
                  <div style={{
                    display: 'flex', flexWrap: 'wrap', gap: 6,
                    justifyContent: (mobile || tablet) ? 'flex-start' : 'flex-end',
                    marginTop: mobile ? 4 : 0,
                  }}>
                    {it.tags.map(tag => (
                      <span key={tag} style={{
                        padding: '5px 10px',
                        borderRadius: 999,
                        border: `1px solid ${accent}30`,
                        color: 'rgba(220,232,255,0.7)',
                        fontSize: 11.5,
                        letterSpacing: '0.02em',
                        background: `${accent}08`,
                      }}>{tag}</span>
                    ))}
                  </div>
                </div>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
};

// ---------- Values ----------
const Values = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  const tablet = isTablet(bp);
  const items = [
    { k: 'Clear', ko: '명확함', d: '복잡한 것을 명확하게 정리합니다.', icon: 'clear' },
    { k: 'Connect', ko: '연결', d: '사람, 정보, 서비스, 기회를 연결합니다.', icon: 'connect' },
    { k: 'Action', ko: '행동', d: '생각보다 행동을 중요하게 봅니다.', icon: 'action' },
    { k: 'Value', ko: '가치', d: '행동이 가치로 이어지는 구조를 만듭니다.', icon: 'value' },
    { k: 'Growth', ko: '성장', d: '사용자·파트너·회사가 함께 성장합니다.', icon: 'growth' },
  ];
  return (
    <section id="values" data-screen-label="05 Values" style={{ ...sectionStyle(bp), background: 'linear-gradient(180deg, transparent, rgba(63,182,255,0.02) 50%, transparent)' }}>
      <div style={wrap(bp)}>
        <SectionEyebrow accent={accent} num="04" label="Core values" align="center" />
        <Reveal>
          <h2 style={{ ...h2Style(bp), textAlign: 'center' }}>
            CLEARVERSE가<br />중요하게 생각하는 것.
          </h2>
        </Reveal>

        <div style={{
          marginTop: mobile ? 48 : 80,
          display: 'grid',
          gridTemplateColumns: mobile ? '1fr 1fr' : tablet ? 'repeat(3, 1fr)' : 'repeat(5, 1fr)',
          gap: mobile ? 10 : 16,
        }}>
          {items.map((v, i) => (
            <Reveal key={v.k} delay={i * 70}>
              <div className="value-card" style={{
                position: 'relative',
                padding: mobile ? '24px 18px 22px' : '32px 24px 28px',
                borderRadius: 16,
                background: 'linear-gradient(180deg, rgba(20,32,60,0.5), rgba(8,14,32,0.5))',
                border: '1px solid rgba(120,170,255,0.12)',
                overflow: 'hidden',
                minHeight: mobile ? 200 : 260,
                display: 'flex', flexDirection: 'column', justifyContent: 'space-between',
                transition: 'transform .5s, border-color .5s, background .5s',
              }}>
                <div>
                  <ValueIcon kind={v.icon} accent={accent} />
                </div>
                <div>
                  <div style={{
                    fontFamily: 'var(--font-display)',
                    fontSize: mobile ? 18 : 22, fontWeight: 500, color: '#fff',
                    letterSpacing: '-0.01em',
                  }}>{v.k}</div>
                  <div style={{ color: accent, fontSize: mobile ? 10 : 12, letterSpacing: '0.18em', marginTop: 2, fontWeight: 500 }}>
                    {v.ko.toUpperCase()}
                  </div>
                  <p style={{
                    marginTop: 12, color: 'rgba(220,232,255,0.55)',
                    fontSize: mobile ? 12 : 13, lineHeight: 1.6, textWrap: 'pretty',
                  }}>{v.d}</p>
                </div>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
};

const ValueIcon = ({ kind, accent }) => {
  // Abstract dot/line glyphs
  const s = 56;
  return (
    <div style={{
      width: s, height: s, borderRadius: 14,
      background: `radial-gradient(circle at 30% 30%, ${accent}22, transparent 70%)`,
      border: `1px solid ${accent}30`,
      display: 'grid', placeItems: 'center',
      marginBottom: 22,
    }}>
      <svg width="32" height="32" viewBox="0 0 32 32" fill="none" aria-hidden>
        {kind === 'clear' && (
          <g stroke={accent} strokeWidth="1.2" strokeLinecap="round">
            <line x1="6" y1="10" x2="22" y2="10" />
            <line x1="6" y1="16" x2="26" y2="16" opacity="0.5" />
            <line x1="6" y1="22" x2="18" y2="22" opacity="0.3" />
            <circle cx="24" cy="22" r="2" fill={accent} />
          </g>
        )}
        {kind === 'connect' && (
          <g>
            <circle cx="8" cy="8" r="2.5" fill={accent} />
            <circle cx="24" cy="8" r="2.5" fill={accent} opacity="0.7" />
            <circle cx="16" cy="22" r="2.5" fill={accent} />
            <line x1="8" y1="8" x2="16" y2="22" stroke={accent} strokeOpacity="0.5" />
            <line x1="24" y1="8" x2="16" y2="22" stroke={accent} strokeOpacity="0.5" />
            <line x1="8" y1="8" x2="24" y2="8" stroke={accent} strokeOpacity="0.3" strokeDasharray="2 2" />
          </g>
        )}
        {kind === 'action' && (
          <g stroke={accent} strokeWidth="1.4" strokeLinecap="round" fill="none">
            <path d="M6 22 L13 14 L18 19 L26 8" />
            <circle cx="26" cy="8" r="2" fill={accent} stroke="none" />
            <circle cx="6" cy="22" r="1.4" fill={accent} stroke="none" opacity="0.6" />
          </g>
        )}
        {kind === 'value' && (
          <g>
            <polygon points="16,5 24,11 21,22 11,22 8,11" stroke={accent} strokeWidth="1.2" fill="none" />
            <circle cx="16" cy="14" r="2.5" fill={accent} />
          </g>
        )}
        {kind === 'growth' && (
          <g stroke={accent} strokeWidth="1.2" strokeLinecap="round" fill="none">
            <line x1="6" y1="26" x2="6" y2="18" opacity="0.4" />
            <line x1="12" y1="26" x2="12" y2="14" opacity="0.6" />
            <line x1="18" y1="26" x2="18" y2="10" opacity="0.8" />
            <line x1="24" y1="26" x2="24" y2="6" />
            <circle cx="24" cy="6" r="2" fill={accent} stroke="none" />
          </g>
        )}
      </svg>
    </div>
  );
};

// ---------- Possibility ----------
const Possibility = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  return (
  <section data-screen-label="06 Possibility" style={sectionStyle(bp)}>
    <div style={{ ...wrap(bp), textAlign: 'center', maxWidth: 1000 }}>
      <SectionEyebrow accent={accent} num="05" label="Possibility" align="center" />
      <Reveal>
        <h2 style={{ ...h2Style(bp), textAlign: 'center' }}>
          우리는 지금,<br />
          <em style={{ fontStyle: 'normal',
            background: `linear-gradient(120deg, ${accent}, #B6E5FF 60%, ${accent})`,
            WebkitBackgroundClip: 'text', backgroundClip: 'text', color: 'transparent',
          }}>가능성</em>을 설계하고 있습니다.
        </h2>
      </Reveal>
      <Reveal delay={120}>
        <p style={{ ...bodyStyle, marginTop: 32, color: 'rgba(220,232,255,0.7)', maxWidth: 640, margin: '32px auto 0' }}>
          CLEARVERSE는 하나의 정해진 제품보다 더 넓은 가능성에서 출발합니다.
          사람들의 행동, 지역의 기회, 기업의 니즈, AI 기술의 가능성을 연결하며
          다양한 디지털 서비스와 플랫폼을 만들어갈 준비를 하고 있습니다.
        </p>
      </Reveal>
      <Reveal delay={260}>
        <blockquote style={{
          marginTop: mobile ? 48 : 64,
          padding: mobile ? '32px 16px' : '40px 32px',
          borderTop: `1px solid ${accent}30`,
          borderBottom: `1px solid ${accent}30`,
          fontFamily: 'var(--font-display)',
          fontSize: mobile ? 'clamp(18px, 5.4vw, 24px)' : 'clamp(20px, 2vw, 28px)',
          lineHeight: 1.4,
          fontWeight: 400,
          color: '#fff',
          fontStyle: 'normal',
          letterSpacing: '-0.01em',
        }}>
          “첫 번째 제품보다 중요한 것은,<br />
          우리가 어떤 <em style={{ fontStyle: 'normal', color: accent }}>문제</em>를 해결하려 하는지입니다.”
        </blockquote>
      </Reveal>
    </div>
  </section>
  );
};

// ---------- Future Areas ----------
const FutureAreas = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  const areas = [
    { k: 'Mission & Reward', d: '참여 행동을 가치로 전환하는 미션·리워드 구조' },
    { k: 'AI Automation', d: '반복 업무와 복잡한 판단을 돕는 AI 기반 자동화' },
    { k: 'Local Platform', d: '지역과 사용자를 연결하는 생활 밀착형 플랫폼' },
    { k: 'Data Experience', d: '행동 데이터를 기반으로 한 사용자 경험 설계' },
    { k: 'Digital Contents', d: '브랜드와 사용자를 연결하는 콘텐츠 기반 서비스' },
  ];
  return (
    <section data-screen-label="07 Future" style={sectionStyle(bp)}>
      <div style={wrap(bp)}>
        <SectionEyebrow accent={accent} num="06" label="Future areas" />
        <div style={{
          display: 'grid',
          gridTemplateColumns: mobile ? '1fr' : '1fr 1.3fr',
          gap: mobile ? 36 : 80, alignItems: 'start',
        }}>
          <Reveal>
            <h2 style={h2Style(bp)}>
              관심을 두고 있는<br />
              <span style={{ color: 'rgba(255,255,255,0.45)' }}>다섯 가지 흐름.</span>
            </h2>
            <p style={{ ...bodyStyle, marginTop: 24, color: 'rgba(220,232,255,0.55)', fontSize: 14.5 }}>
              아직 확정된 사업이 아닌, 우리가 깊이 들여다보고 있는 방향입니다.
            </p>
          </Reveal>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 0, paddingTop: 8 }}>
            {areas.map((a, i) => (
              <Reveal key={a.k} delay={i * 60}>
                <div className="future-row" style={{
                  display: 'grid',
                  gridTemplateColumns: mobile ? '32px 1fr 24px' : '36px 1fr 1.4fr 40px',
                  alignItems: mobile ? 'start' : 'center',
                  gap: mobile ? 14 : 24,
                  padding: mobile ? '20px 0' : '26px 0',
                  borderTop: '1px solid rgba(120,170,255,0.1)',
                  borderBottom: i === areas.length - 1 ? '1px solid rgba(120,170,255,0.1)' : 'none',
                  cursor: 'default',
                  transition: 'padding .35s',
                }}>
                  <span style={{
                    color: accent, fontFamily: 'var(--font-display)',
                    fontSize: mobile ? 11 : 12, letterSpacing: '0.18em', fontWeight: 600,
                    paddingTop: mobile ? 4 : 0,
                  }}>0{i+1}</span>
                  <div style={{ display: 'flex', flexDirection: 'column', gap: mobile ? 6 : 0 }}>
                    <h3 style={{
                      margin: 0, fontFamily: 'var(--font-display)',
                      fontSize: mobile ? 17 : 20, fontWeight: 500, color: '#fff', letterSpacing: '-0.01em',
                    }}>{a.k}</h3>
                    {mobile && (
                      <p style={{ margin: 0, color: 'rgba(220,232,255,0.55)', fontSize: 13.5, lineHeight: 1.6 }}>{a.d}</p>
                    )}
                  </div>
                  {!mobile && (
                    <p style={{ margin: 0, color: 'rgba(220,232,255,0.55)', fontSize: 14, lineHeight: 1.6 }}>{a.d}</p>
                  )}
                  <svg width="18" height="18" viewBox="0 0 18 18" style={{ justifySelf: 'end', marginTop: mobile ? 6 : 0 }}>
                    <path d="M3 9 H 14 M 10 5 L 14 9 L 10 13" stroke={accent} strokeWidth="1.2" fill="none" />
                  </svg>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

// ---------- Closing message ----------
const Closing = ({ accent }) => {
  const bp = useBreakpoint();
  return (
  <section data-screen-label="08 Closing" style={{ ...sectionStyle(bp), paddingBottom: bp === 'mobile' ? 36 : 60 }}>
    <div style={{ ...wrap(bp), maxWidth: 1100 }}>
      <Reveal>
        <h2 style={{
          fontFamily: 'var(--font-display)',
          fontSize: bp === 'mobile' ? 'clamp(22px, 6.4vw, 32px)' : 'clamp(28px, 3.6vw, 56px)',
          lineHeight: 1.25,
          fontWeight: 400,
          letterSpacing: '-0.02em',
          color: '#fff',
          textWrap: 'balance',
        }}>
          CLEARVERSE는 아직 완성된 답보다,<br />
          더 나은 <em style={{ fontStyle: 'normal', color: accent }}>질문</em>에서 시작합니다.
        </h2>
      </Reveal>
      <Reveal delay={150}>
        <p style={{ ...bodyStyle, marginTop: 32, maxWidth: 640 }}>
          우리는 사람들이 왜 움직이는지, 어떤 경험이 가치를 만드는지,
          기술이 어떻게 일상을 더 명확하게 만들 수 있는지 고민합니다.
          CLEARVERSE는 이 질문들을 바탕으로 새로운 플랫폼과 서비스를 만들어가고 있습니다.
        </p>
      </Reveal>
    </div>
  </section>
  );
};

// ---------- Contact ----------
const Contact = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  return (
  <section id="contact" data-screen-label="09 Contact" style={{
    position: 'relative',
    padding: mobile ? '110px 20px 60px' : '160px 40px 80px',
    background: 'linear-gradient(180deg, transparent, rgba(63,182,255,0.04))',
    overflow: 'hidden',
  }}>
    <ContactBg accent={accent} />
    <div style={{ position: 'relative', maxWidth: 1100, margin: '0 auto', textAlign: 'center' }}>
      <SectionEyebrow accent={accent} num="07" label="Contact" align="center" />
      <Reveal>
        <h2 style={{ ...h2Style(bp), textAlign: 'center' }}>
          함께 이야기할 준비가<br />되어 있습니다.
        </h2>
      </Reveal>
      <Reveal delay={120}>
        <p style={{ ...bodyStyle, marginTop: 28, color: 'rgba(220,232,255,0.6)', maxWidth: 560, margin: '28px auto 0' }}>
          CLEARVERSE의 방향성, 협업, 투자, 서비스 제안과 관련해<br />
          궁금한 점이 있다면 편하게 연락해 주세요.
        </p>
      </Reveal>
      <Reveal delay={240}>
        <div style={{ marginTop: mobile ? 36 : 48, display: 'flex', gap: 12, justifyContent: 'center', flexWrap: 'wrap' }}>
          <a href="mailto:berryking@naver.com" style={{
            padding: mobile ? '14px 26px' : '16px 32px', borderRadius: 999,
            background: `linear-gradient(135deg, ${accent}, ${accent}cc)`,
            color: '#031022',
            fontSize: 13, letterSpacing: '0.06em', fontWeight: 700,
            textDecoration: 'none',
            boxShadow: `0 8px 30px ${accent}44, inset 0 1px 0 rgba(255,255,255,0.4)`,
            fontFamily: 'var(--font-display)',
          }}>이메일 보내기</a>
          <a href="#" style={{
            padding: mobile ? '14px 26px' : '16px 32px', borderRadius: 999,
            border: '1px solid rgba(220,232,255,0.2)',
            color: 'rgba(220,232,255,0.9)',
            fontSize: 13, letterSpacing: '0.06em', fontWeight: 600,
            textDecoration: 'none',
            background: 'rgba(255,255,255,0.02)',
            fontFamily: 'var(--font-display)',
          }}>제안서 다운로드</a>
        </div>
      </Reveal>
      <Reveal delay={360}>
        <div style={{
          marginTop: mobile ? 64 : 88, paddingTop: mobile ? 24 : 32,
          borderTop: '1px solid rgba(120,170,255,0.1)',
          display: 'grid',
          gridTemplateColumns: mobile ? '1fr' : '1fr 1fr 1fr',
          gap: mobile ? 22 : 24,
          color: 'rgba(220,232,255,0.55)', fontSize: 13,
          textAlign: 'left',
        }}>
          <div>
            <div style={{ color: accent, fontFamily: 'var(--font-display)', fontSize: 11, letterSpacing: '0.22em', fontWeight: 600 }}>EMAIL</div>
            <div style={{ marginTop: 8, color: 'rgba(230,242,255,0.9)' }}>berryking@naver.com</div>
          </div>
          <div>
            <div style={{ color: accent, fontFamily: 'var(--font-display)', fontSize: 11, letterSpacing: '0.22em', fontWeight: 600 }}>BUSINESS</div>
            <div style={{ marginTop: 8, color: 'rgba(230,242,255,0.9)' }}>berryking@naver.com</div>
          </div>
          <div>
            <div style={{ color: accent, fontFamily: 'var(--font-display)', fontSize: 11, letterSpacing: '0.22em', fontWeight: 600 }}>LOCATION</div>
            <div style={{ marginTop: 8, color: 'rgba(230,242,255,0.9)' }}>Gyeonggi-do, Republic of Korea</div>
          </div>
        </div>
      </Reveal>
    </div>
  </section>
  );
};

const ContactBg = ({ accent }) => (
  <svg style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', opacity: 0.7 }} aria-hidden>
    <defs>
      <radialGradient id="cbg" cx="50%" cy="100%" r="60%">
        <stop offset="0" stopColor={accent} stopOpacity="0.18" />
        <stop offset="1" stopColor={accent} stopOpacity="0" />
      </radialGradient>
    </defs>
    <rect width="100%" height="100%" fill="url(#cbg)" />
  </svg>
);

// ---------- Footer ----------
const Footer = ({ accent }) => {
  const bp = useBreakpoint();
  const mobile = isMobile(bp);
  return (
  <footer style={{
    padding: mobile ? '32px 20px' : '48px 40px',
    borderTop: '1px solid rgba(120,170,255,0.08)',
    display: 'flex',
    flexDirection: mobile ? 'column' : 'row',
    justifyContent: 'space-between',
    alignItems: mobile ? 'flex-start' : 'center',
    gap: mobile ? 12 : 0,
    color: 'rgba(220,232,255,0.4)', fontSize: mobile ? 11.5 : 12,
    fontFamily: 'var(--font-display)', letterSpacing: '0.04em',
  }}>
    <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
      <LogoMark accent={accent} />
      <span>CLEARVERSE © 2026 — Representative: Park Juyeon. 복잡한 세상을 명확하게.</span>
    </div>
    <div>Make Actions Valuable.</div>
  </footer>
  );
};

// ---------- Section eyebrow ----------
const SectionEyebrow = ({ accent, num, label, align = 'left' }) => (
  <Reveal>
    <div style={{
      display: 'flex', alignItems: 'center', gap: 14,
      justifyContent: align === 'center' ? 'center' : 'flex-start',
      marginBottom: 28,
      fontFamily: 'var(--font-display)',
      color: 'rgba(220,232,255,0.55)',
      fontSize: 11, letterSpacing: '0.32em', fontWeight: 500,
    }}>
      <span style={{ color: accent }}>{num}</span>
      <span style={{ width: 28, height: 1, background: `linear-gradient(90deg, ${accent}, transparent)` }} />
      <span style={{ textTransform: 'uppercase' }}>{label}</span>
    </div>
  </Reveal>
);

// ---------- Shared styles ----------
const wrap = (bp) => ({
  maxWidth: 1280,
  margin: '0 auto',
  padding: bp === 'mobile' ? '0 20px' : bp === 'tablet' ? '0 32px' : '0 40px',
});
const sectionStyle = (bp) => ({
  padding: bp === 'mobile' ? '90px 0' : bp === 'tablet' ? '120px 0' : '160px 0',
});
const h2Style = (bp) => ({
  fontFamily: 'var(--font-display)',
  fontSize: bp === 'mobile' ? 'clamp(28px, 8vw, 40px)' : 'clamp(32px, 4.4vw, 64px)',
  lineHeight: 1.12,
  letterSpacing: '-0.022em',
  fontWeight: 500,
  margin: 0,
  color: '#fff',
  textWrap: 'balance',
  wordBreak: 'keep-all',
  lineBreak: 'strict',
  overflowWrap: 'normal',
});
const bodyStyle = {
  color: 'rgba(220,232,255,0.65)',
  fontSize: 16,
  lineHeight: 1.7,
  margin: 0,
  textWrap: 'pretty',
  wordBreak: 'keep-all',
  lineBreak: 'strict',
  overflowWrap: 'normal',
};

// ---------- App ----------
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "accent": "#3FB6FF",
  "density": 1.0,
  "intensity": 1.0,
  "background": "deepNavy"
}/*EDITMODE-END*/;

const BG_PRESETS = {
  deepNavy: 'radial-gradient(ellipse at 50% 0%, #0a1834 0%, #050a1a 40%, #02060f 100%)',
  midnight: 'radial-gradient(ellipse at 50% 0%, #050a1f 0%, #02050e 50%, #000004 100%)',
  abyss: 'radial-gradient(ellipse at 50% 30%, #0a1438 0%, #060f25 50%, #030713 100%)',
};

const App = () => {
  const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);

  useEffect(() => {
    document.body.style.background = BG_PRESETS[t.background] || BG_PRESETS.deepNavy;
  }, [t.background]);

  return (
    <div style={{ position: 'relative', color: '#fff', overflow: 'hidden' }}>
      <Nav accent={t.accent} />
      <Hero accent={t.accent} density={t.density} intensity={t.intensity} />
      <About accent={t.accent} />
      <Problems accent={t.accent} />
      <Direction accent={t.accent} />
      <Values accent={t.accent} />
      <Possibility accent={t.accent} />
      <FutureAreas accent={t.accent} />
      <Closing accent={t.accent} />
      <Contact accent={t.accent} />
      <Footer accent={t.accent} />

      <TweaksPanel title="Tweaks">
        <TweakSection title="Brand">
          <TweakColor
            label="Accent color"
            value={t.accent}
            onChange={(v) => setTweak('accent', v)}
            options={['#3FB6FF', '#00E5FF', '#5B7BFF', '#9B6BFF', '#39FFC1']}
          />
          <TweakSelect
            label="Background"
            value={t.background}
            onChange={(v) => setTweak('background', v)}
            options={[
              { value: 'deepNavy', label: 'Deep navy' },
              { value: 'midnight', label: 'Midnight' },
              { value: 'abyss', label: 'Abyss' },
            ]}
          />
        </TweakSection>
        <TweakSection title="Dolphin">
          <TweakSlider
            label="Particle density"
            value={t.density} min={0.5} max={2.0} step={0.1}
            onChange={(v) => setTweak('density', v)}
          />
          <TweakSlider
            label="Glow intensity"
            value={t.intensity} min={0.4} max={1.6} step={0.1}
            onChange={(v) => setTweak('intensity', v)}
          />
        </TweakSection>
      </TweaksPanel>
    </div>
  );
};

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