// c-app.jsx — Variant C · Triage
// Provocative campaign. Emotional-bleeding thesis from the strategic brief.
// Bigger type, more copper presence, more direct copy. Urgency-led.

const C_TWEAKS = /*EDITMODE-BEGIN*/{
  "showBleedingPulse": true,
  "showChineseSignals": true,
  "density": "standard"
}/*EDITMODE-END*/;

const C_NAV = [
  { label: 'The Bleeding', href: '#bleeding' },
  { label: 'The Triage', href: '#triage' },
  { label: 'Proof', href: '#proof' },
  { label: 'About', href: '#about' },
  { label: 'Readiness Check', href: '#readiness' },
];

const BLEEDING_SITES = [
  { id: 'L', x: 22, y: 28, label: 'Listing copy', bleeds: 'authority', severity: 'critical', body: 'Spec-heavy bullets where a Western competitor sells aspiration. Reads like a manufacturer, not a brand.' },
  { id: 'N', x: 64, y: 18, label: 'Brand name', bleeds: 'trust', severity: 'critical', body: 'Pinyin abbreviation. No recall. No category association. The first 200ms of brand perception, wasted.' },
  { id: 'I', x: 48, y: 52, label: 'Lifestyle imagery', bleeds: 'aspiration', severity: 'high', body: "Stock photos. White-table flat lays. No one feels themselves in the brand's world — because there isn't one." },
  { id: 'R', x: 80, y: 42, label: 'Review patterns', bleeds: 'permission to charge', severity: 'high', body: 'Negative review themes cluster around perceived quality despite manufacturing parity. Trust deficit, priced in.' },
  { id: 'D', x: 16, y: 68, label: 'Owned demand', bleeds: 'pricing autonomy', severity: 'mid', body: 'No DTC. No email list. No way to talk to a buyer outside the marketplace fee structure.' },
  { id: 'C', x: 70, y: 76, label: 'Creator strategy', bleeds: 'cultural permission', severity: 'mid', body: 'Mega-influencer one-shots with no follow-through. Nano/micro creators outperform 4–6× on efficiency. Spend misallocated.' },
];

const C_TRIAGE = [
  { num: '01', name: 'Diagnose', verb: 'Find the bleeding.', body: 'Score 10 capability domains and 240+ benchmarks. Locate every site where pricing power leaks. Quantify what each costs.' },
  { num: '02', name: 'Blueprint', verb: 'Stop the bleeding.', body: 'Prioritized triage plan. Critical bleeds first, then compounding builds. Sequenced for cashflow and momentum.' },
  { num: '03', name: 'Domain Playbook', verb: 'Repair the system.', body: 'Operational deliverables your team runs on after we leave. Brand, content, influencer, retail — built for your reality.' },
  { num: '04', name: 'Navigate', verb: 'Protect the gains.', body: 'Quarterly re-scoring. Drift detection. Advisory continuity as the market evolves and new bleeds emerge.' },
];

const C_PILLARS = [
  { kicker: 'Not opinions', label: 'Methodology with teeth', body: '240+ scored benchmarks. Two evaluators, same brand, same score. The product is a map, not a deck.' },
  { kicker: 'Not two vendors', label: 'One operating layer', body: 'CN Professional Services embedded with your team in Mandarin. US Advisory making the strategic calls in English. The translation happens on our side.' },
  { kicker: 'Not extractive', label: 'Aligned incentives', body: "We work for you like a peer, not an agency selling services to hit our own KPIs. Reputation is our business — getting it right beats being right." },
];

const SEVERITY_COLOR = {
  critical: 'var(--copper-hot)',
  high: 'var(--copper)',
  mid: 'var(--light-blue)',
};

// ─────────────────────────────────────────────────────────────
// Nav — bold, with copper accent
// ─────────────────────────────────────────────────────────────
function CNav() {
  const [scrolled, setScrolled] = React.useState(false);
  React.useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 24);
    onScroll();
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);
  return (
    <nav style={{
      position: 'fixed', top: 0, left: 0, right: 0, zIndex: 50,
      background: scrolled ? 'rgba(20, 22, 30, 0.84)' : 'transparent',
      backdropFilter: scrolled ? 'blur(20px) saturate(140%)' : 'none',
      WebkitBackdropFilter: scrolled ? 'blur(20px) saturate(140%)' : 'none',
      borderBottom: '1px solid ' + (scrolled ? 'var(--surface-border)' : 'transparent'),
      transition: 'all .3s ease',
    }}>
      <div className="container" style={{
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
        padding: scrolled ? '14px 48px' : '22px 48px',
      }}>
        <a href="#" style={{
          display: 'flex', alignItems: 'baseline', gap: 4,
          fontFamily: 'var(--font-heading)', fontWeight: 700, fontSize: 19,
        }}>
          <span style={{ color: 'var(--white)' }}>Project</span>
          <span style={{ color: 'var(--light-blue)' }}>Silk</span>
        </a>
        <div style={{ display: 'flex', alignItems: 'center', gap: 28 }}>
          <ul style={{
            display: 'flex', gap: 26, listStyle: 'none', margin: 0, padding: 0,
            fontSize: 13, color: 'var(--text-secondary)',
          }}>
            {C_NAV.map(it => (
              <li key={it.label}>
                <a href={it.href} style={{ transition: 'color .2s' }}
                   onMouseEnter={(e) => e.currentTarget.style.color = 'var(--white)'}
                   onMouseLeave={(e) => e.currentTarget.style.color = ''}>
                  {it.label}
                </a>
              </li>
            ))}
          </ul>
          <a href="#cta" className="btn btn-primary" style={{ padding: '10px 18px', fontSize: 13 }}>
            Diagnose now
          </a>
        </div>
      </div>
    </nav>
  );
}

// ─────────────────────────────────────────────────────────────
// Hero — bold provocation, diagonal copper slash
// ─────────────────────────────────────────────────────────────
function CHero({ t }) {
  return (
    <section style={{
      position: 'relative',
      minHeight: '100vh',
      overflow: 'hidden',
      paddingBlock: '180px 80px',
      background: 'var(--rich-black)',
      display: 'flex', alignItems: 'center',
    }}>
      {/* Diagonal copper slash (the bleeding gesture) */}
      <div style={{
        position: 'absolute',
        top: '-10%', right: '-20%',
        width: '60%', height: '120%',
        background: 'radial-gradient(ellipse at center, rgba(217,119,6,0.20) 0%, rgba(180,83,9,0.08) 30%, transparent 60%)',
        filter: 'blur(60px)',
        pointerEvents: 'none',
      }} />
      <div style={{
        position: 'absolute',
        top: '20%', right: '-5%',
        width: '70%', height: 2,
        background: 'linear-gradient(90deg, transparent 0%, var(--copper-hot) 50%, transparent 100%)',
        opacity: 0.5,
        transform: 'rotate(-12deg)',
        pointerEvents: 'none',
      }} />

      <div className="container" style={{ position: 'relative', zIndex: 2, width: '100%' }}>
        {t.showChineseSignals && (
          <div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 32 }}>
            <span style={{
              fontFamily: 'var(--font-zh)', fontSize: 13,
              color: 'var(--copper-hot)', letterSpacing: '0.3em',
            }}>
              止 血 · 然 后 建 品 牌
            </span>
            <span style={{ width: 24, height: 1, background: 'var(--copper-hot)', opacity: 0.6 }} />
            <span style={{
              fontFamily: 'var(--font-mono)', fontSize: 11,
              letterSpacing: '0.22em', textTransform: 'uppercase', color: 'var(--copper-hot)',
            }}>
              Stop the bleeding. Then build the brand.
            </span>
          </div>
        )}

        <h1 style={{
          fontFamily: 'var(--font-heading)',
          fontSize: 'clamp(56px, 8vw, 132px)',
          lineHeight: 0.96,
          fontWeight: 700,
          letterSpacing: '-0.035em',
          marginBottom: 40,
          maxWidth: 1200,
          textWrap: 'balance',
        }}>
          Your brand is
          <br />
          <span style={{ color: 'var(--copper-hot)', position: 'relative' }}>
            bleeding pricing power.
            {/* Underline animation */}
            <span style={{
              position: 'absolute',
              left: 0, right: 0, bottom: '-0.05em',
              height: 2,
              background: 'linear-gradient(90deg, var(--copper-hot) 0%, transparent 100%)',
              opacity: 0.5,
            }} />
          </span>
          <br />
          <span style={{ color: 'var(--text-secondary)' }}>We can see exactly where.</span>
        </h1>

        <p style={{
          fontSize: 'clamp(18px, 1.5vw, 24px)',
          lineHeight: 1.45,
          color: 'var(--white)',
          maxWidth: 780,
          marginBottom: 48,
          fontWeight: 400,
        }}>
          Chinese brands are world-class operators. Operationally excellent.
          <span style={{ color: 'var(--text-secondary)' }}>{' '}But in the US, you're emotionally invisible —
          and that's costing you 30–60% of pricing power you've already earned.</span>
        </p>

        <div style={{ display: 'flex', gap: 16, alignItems: 'center', flexWrap: 'wrap', marginBottom: 80 }}>
          <a href="#bleeding" className="btn btn-primary" style={{ padding: '16px 28px', fontSize: 16 }}>
            See where you're bleeding
            <span className="arrow">→</span>
          </a>
          <a href="#triage" className="btn btn-ghost" style={{ padding: '16px 24px', fontSize: 15 }}>
            How we stop it
          </a>
        </div>

        {/* Vital signs row */}
        <div style={{
          display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)',
          paddingTop: 32,
          borderTop: '1px solid var(--surface-border)',
          gap: 32,
        }}>
          <VitalStat n="6" unit="" label="bleeding sites avg" pulse={t.showBleedingPulse} />
          <VitalStat n="–58%" unit="" label="per-unit price gap" pulse={false} />
          <VitalStat n="240+" unit="" label="scored benchmarks" pulse={false} />
          <VitalStat n="3.19×" unit="" label="Year 1 ROI (anonymized)" pulse={false} />
        </div>
      </div>
    </section>
  );
}

function VitalStat({ n, unit, label, pulse }) {
  return (
    <div style={{ position: 'relative' }}>
      {pulse && (
        <div style={{
          position: 'absolute', top: -3, left: -10,
          width: 6, height: 6, borderRadius: '50%',
          background: 'var(--copper-hot)',
          boxShadow: '0 0 12px var(--copper-hot)',
          animation: 'breathe 1.6s ease-in-out infinite',
        }} />
      )}
      <div style={{
        fontFamily: 'var(--font-heading)',
        fontSize: 'clamp(28px, 2.4vw, 40px)',
        fontWeight: 700,
        color: 'var(--white)',
        letterSpacing: '-0.03em',
        lineHeight: 1, marginBottom: 8,
      }}>
        {n}<span style={{ fontSize: '0.6em', color: 'var(--text-secondary)' }}>{unit}</span>
      </div>
      <div style={{
        fontFamily: 'var(--font-mono)',
        fontSize: 11, letterSpacing: '0.1em', textTransform: 'uppercase',
        color: 'var(--text-tertiary)',
      }}>{label}</div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Section 2 — "The bleeding now" — symptoms map + list
// ─────────────────────────────────────────────────────────────
function CBleeding({ t }) {
  const [active, setActive] = React.useState('L');
  const current = BLEEDING_SITES.find(b => b.id === active);
  return (
    <section className="section section--navy" id="bleeding" style={{ position: 'relative', overflow: 'hidden' }}>
      <div className="container">
        <div style={{
          paddingBottom: 24, borderBottom: '2px solid var(--copper)',
          marginBottom: 56,
          display: 'flex', justifyContent: 'space-between', alignItems: 'baseline',
        }}>
          <div>
            <div style={{
              fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.22em',
              textTransform: 'uppercase', color: 'var(--copper-hot)', marginBottom: 8,
            }}>
              Vital signs · the six common bleeds
            </div>
            <h2 style={{
              fontFamily: 'var(--font-heading)',
              fontSize: 'clamp(40px, 5vw, 72px)',
              lineHeight: 1.05, letterSpacing: '-0.025em',
            }}>
              Most brands bleed
              <br />
              <span style={{ color: 'var(--copper-hot)' }}>in three to five places at once.</span>
            </h2>
          </div>
        </div>

        <p style={{
          fontSize: 18, lineHeight: 1.6, color: 'var(--text-secondary)',
          maxWidth: 720, marginBottom: 56,
        }}>
          A bleeding site isn't "not working." It's actively hurting you. A typo bleeds trust.
          Amateur photography bleeds authority. Discounting too often bleeds premium perception.
          Bleeds destroy quick emotion and long emotion instantly. They're triaged first, before anything else.
        </p>

        <div style={{
          display: 'grid', gridTemplateColumns: '1.1fr 1fr',
          gap: 64, alignItems: 'start',
        }}>
          {/* Bleeding map — abstract surface with marked hotspots */}
          <BleedingMap sites={BLEEDING_SITES} active={active} onSelect={setActive} pulse={t.showBleedingPulse} />

          {/* Detail panel for active site */}
          <div>
            <div style={{
              display: 'inline-flex', alignItems: 'center', gap: 10, marginBottom: 16,
              padding: '6px 12px',
              border: '1px solid ' + SEVERITY_COLOR[current.severity],
              borderRadius: 999,
              fontFamily: 'var(--font-mono)', fontSize: 10,
              letterSpacing: '0.18em', textTransform: 'uppercase',
              color: SEVERITY_COLOR[current.severity],
            }}>
              <span style={{
                width: 6, height: 6, borderRadius: '50%',
                background: SEVERITY_COLOR[current.severity],
                boxShadow: `0 0 10px ${SEVERITY_COLOR[current.severity]}`,
              }} />
              {current.severity} bleed
            </div>

            <h3 style={{
              fontFamily: 'var(--font-heading)',
              fontSize: 36, fontWeight: 700, letterSpacing: '-0.02em',
              marginBottom: 12, color: 'var(--white)',
            }}>
              {current.label}
            </h3>
            <div style={{ fontSize: 16, color: SEVERITY_COLOR[current.severity], marginBottom: 20, fontWeight: 500 }}>
              Bleeds: {current.bleeds}
            </div>
            <p style={{ fontSize: 16, lineHeight: 1.65, color: 'var(--text-secondary)', marginBottom: 32 }}>
              {current.body}
            </p>

            {/* Site picker */}
            <div style={{
              display: 'flex', flexWrap: 'wrap', gap: 8,
              paddingTop: 24, borderTop: '1px solid var(--surface-border)',
            }}>
              {BLEEDING_SITES.map(s => (
                <button key={s.id} onClick={() => setActive(s.id)} style={{
                  padding: '8px 14px',
                  border: '1px solid ' + (s.id === active ? SEVERITY_COLOR[s.severity] : 'var(--surface-border-strong)'),
                  background: s.id === active ? 'rgba(217,119,6,0.1)' : 'transparent',
                  color: s.id === active ? 'var(--white)' : 'var(--text-secondary)',
                  borderRadius: 4,
                  fontSize: 12, fontFamily: 'var(--font-body)', fontWeight: 500,
                  cursor: 'pointer',
                  transition: 'all .2s',
                }}>
                  {s.label}
                </button>
              ))}
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

function BleedingMap({ sites, active, onSelect, pulse }) {
  return (
    <div style={{
      position: 'relative',
      aspectRatio: '4/3',
      border: '1px solid var(--surface-border-strong)',
      borderRadius: 6,
      background: 'radial-gradient(ellipse at center, rgba(96,165,250,0.04) 0%, rgba(0,0,0,0.2) 100%), var(--rich-black)',
      overflow: 'hidden',
    }}>
      {/* Grid lines suggesting "anatomy" */}
      <svg viewBox="0 0 100 75" style={{ position: 'absolute', inset: 0, width: '100%', height: '100%' }}>
        {[0.25, 0.5, 0.75].map((p, i) => (
          <line key={`h${i}`} x1="0" x2="100" y1={75 * p} y2={75 * p}
            stroke="rgba(255,255,255,0.05)" strokeDasharray="0.5 1" />
        ))}
        {[0.25, 0.5, 0.75].map((p, i) => (
          <line key={`v${i}`} x1={100 * p} x2={100 * p} y1="0" y2="75"
            stroke="rgba(255,255,255,0.05)" strokeDasharray="0.5 1" />
        ))}
        {/* Concentric rings around brand center */}
        <circle cx="50" cy="37.5" r="8" stroke="rgba(96,165,250,0.15)" strokeWidth="0.3" fill="none" />
        <circle cx="50" cy="37.5" r="16" stroke="rgba(96,165,250,0.1)" strokeWidth="0.3" fill="none" />
        <circle cx="50" cy="37.5" r="26" stroke="rgba(96,165,250,0.06)" strokeWidth="0.3" fill="none" />
        <circle cx="50" cy="37.5" r="0.6" fill="var(--light-blue)" />
      </svg>

      {/* Hotspots */}
      {sites.map(s => {
        const isActive = s.id === active;
        const color = SEVERITY_COLOR[s.severity];
        return (
          <button key={s.id} onClick={() => onSelect(s.id)} style={{
            position: 'absolute',
            left: `${s.x}%`, top: `${s.y}%`,
            transform: 'translate(-50%, -50%)',
            width: isActive ? 24 : 16, height: isActive ? 24 : 16,
            borderRadius: '50%',
            background: 'transparent',
            border: 'none',
            cursor: 'pointer',
            padding: 0,
            zIndex: isActive ? 2 : 1,
            transition: 'all .3s',
          }}>
            <span style={{
              position: 'absolute', inset: 0,
              borderRadius: '50%',
              background: color,
              boxShadow: `0 0 ${isActive ? 24 : 12}px ${color}`,
              animation: pulse ? `breathe ${1.4 + (s.x % 7) * 0.1}s ease-in-out infinite` : 'none',
              opacity: isActive ? 1 : 0.7,
            }} />
            <span style={{
              position: 'absolute',
              top: '50%', left: '50%', transform: 'translate(-50%, -50%)',
              fontFamily: 'var(--font-mono)', fontSize: 9, color: 'var(--rich-black)',
              fontWeight: 700,
            }}>{s.id}</span>
            {/* Outer ripple when active */}
            {isActive && (
              <span style={{
                position: 'absolute', inset: -14,
                borderRadius: '50%',
                border: `1px solid ${color}`,
                opacity: 0.5,
                animation: 'breathe 2s ease-in-out infinite',
              }} />
            )}
          </button>
        );
      })}

      {/* Legend in corner */}
      <div style={{
        position: 'absolute', bottom: 14, left: 14,
        padding: '8px 12px',
        background: 'rgba(20,22,30,0.7)',
        border: '1px solid var(--surface-border)',
        borderRadius: 4,
        display: 'flex', gap: 14,
        fontFamily: 'var(--font-mono)', fontSize: 9, letterSpacing: '0.12em',
        textTransform: 'uppercase', color: 'var(--text-secondary)',
      }}>
        <Legend dot="var(--copper-hot)" label="Critical" />
        <Legend dot="var(--copper)" label="High" />
        <Legend dot="var(--light-blue)" label="Mid" />
      </div>

      <div style={{
        position: 'absolute', top: 14, right: 14,
        fontFamily: 'var(--font-mono)', fontSize: 9, letterSpacing: '0.18em',
        textTransform: 'uppercase', color: 'var(--text-tertiary)',
      }}>
        Illustrative · typical Chinese brand
      </div>
    </div>
  );
}

function Legend({ dot, label }) {
  return (
    <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
      <span style={{ width: 6, height: 6, borderRadius: '50%', background: dot, boxShadow: `0 0 6px ${dot}` }} />
      {label}
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Section 3 — Triage system (the OS reframed)
// ─────────────────────────────────────────────────────────────
function CTriage() {
  return (
    <section className="section section--black" id="triage" style={{ position: 'relative' }}>
      <div className="container">
        <div style={{ marginBottom: 64, maxWidth: 920 }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.22em',
            textTransform: 'uppercase', color: 'var(--light-blue)', marginBottom: 16,
          }}>
            The triage system
          </div>
          <h2 style={{
            fontFamily: 'var(--font-heading)',
            fontSize: 'clamp(40px, 5vw, 72px)',
            lineHeight: 1.05, letterSpacing: '-0.025em',
            marginBottom: 28,
          }}>
            Find it. Stop it.
            <br />
            <span style={{ color: 'var(--light-blue)' }}>Repair the system. Protect the gains.</span>
          </h2>
          <p style={{ fontSize: 18, lineHeight: 1.6, color: 'var(--text-secondary)' }}>
            Every engagement runs the same four phases. Emergency surgery first.
            Diet and exercise second. Then maintenance, forever, because the market doesn't stand still.
          </p>
        </div>

        <div style={{
          display: 'grid',
          gridTemplateColumns: 'repeat(4, 1fr)',
          gap: 24,
        }}>
          {C_TRIAGE.map((p, i) => (
            <TriageCard key={p.num} {...p} index={i} />
          ))}
        </div>

        <div style={{
          marginTop: 80, padding: 40,
          border: '1px solid var(--copper)',
          borderRadius: 6,
          background: 'linear-gradient(135deg, rgba(180,83,9,0.08) 0%, rgba(180,83,9,0.02) 100%)',
          display: 'grid', gridTemplateColumns: '1fr 1.4fr',
          gap: 48, alignItems: 'center',
        }}>
          <div style={{
            fontFamily: 'var(--font-heading)',
            fontSize: 'clamp(32px, 3.6vw, 52px)',
            lineHeight: 1.05, fontWeight: 700,
            letterSpacing: '-0.02em',
            color: 'var(--white)',
          }}>
            10 domains.<br />
            <span style={{ color: 'var(--copper-hot)' }}>240+ benchmarks.</span><br />
            Mapped, scored, sequenced.
          </div>
          <div>
            <p style={{ fontSize: 16, lineHeight: 1.65, color: 'var(--text-secondary)', marginBottom: 24 }}>
              The product is the map itself — a scored, living picture of your business as an operating system,
              measured against what world-class looks like in your category. The roadmap falls out of the gap analysis,
              not from opinion.
            </p>
            <a href="#" className="btn btn-ghost">
              Tour the methodology
              <span className="arrow">→</span>
            </a>
          </div>
        </div>
      </div>
    </section>
  );
}

function TriageCard({ num, name, verb, body }) {
  return (
    <div style={{
      position: 'relative',
      padding: '32px 24px',
      border: '1px solid var(--surface-border-strong)',
      borderRadius: 6,
      background: 'linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 100%)',
      minHeight: 280,
      display: 'flex', flexDirection: 'column',
      transition: 'transform .3s, border-color .25s',
    }}
      onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-4px)'; e.currentTarget.style.borderColor = 'var(--copper)'; }}
      onMouseLeave={(e) => { e.currentTarget.style.transform = ''; e.currentTarget.style.borderColor = ''; }}
    >
      <div style={{
        fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.18em',
        color: 'var(--copper-hot)', marginBottom: 16,
      }}>
        {num} · phase
      </div>
      <h4 style={{
        fontFamily: 'var(--font-heading)',
        fontSize: 28, fontWeight: 700, letterSpacing: '-0.02em',
        marginBottom: 6, color: 'var(--white)',
      }}>{name}</h4>
      <div style={{
        fontSize: 15, color: 'var(--light-blue)',
        marginBottom: 18, fontWeight: 500,
      }}>{verb}</div>
      <p style={{ fontSize: 14, lineHeight: 1.65, color: 'var(--text-secondary)', margin: 0, flex: 1 }}>{body}</p>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Section 4 — Proof (compressed Grownsy)
// ─────────────────────────────────────────────────────────────
function CProof() {
  return (
    <section className="section section--navy" id="proof" style={{ position: 'relative', overflow: 'hidden' }}>
      <div className="glow-orb glow-blue" style={{ width: 600, height: 600, left: -200, top: '20%', opacity: 0.4 }} />

      <div className="container" style={{ position: 'relative', zIndex: 1 }}>
        <div style={{
          paddingBottom: 24,
          borderBottom: '2px solid var(--light-blue)',
          marginBottom: 56,
        }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.22em',
            textTransform: 'uppercase', color: 'var(--light-blue)',
          }}>
            Proof · anonymized engagement
          </div>
        </div>

        <div style={{
          display: 'grid', gridTemplateColumns: '1.1fr 1fr',
          gap: 80, alignItems: 'center',
        }}>
          <div>
            <h2 style={{
              fontFamily: 'var(--font-heading)',
              fontSize: 'clamp(40px, 5vw, 72px)',
              lineHeight: 1.04, letterSpacing: '-0.025em',
              marginBottom: 28,
            }}>
              5 bleeds diagnosed.
              <br />
              <span style={{ color: 'var(--copper-hot)' }}>3.19× ROI in Year 1.</span>
              <br />
              <span style={{ color: 'var(--text-secondary)' }}>8.0×+ projected by Year 3.</span>
            </h2>
            <p style={{ fontSize: 17, lineHeight: 1.65, color: 'var(--text-secondary)', marginBottom: 32, maxWidth: 540 }}>
              A leading Chinese baby products brand. Strong Amazon volume, no brand premium.
              We diagnosed gaps across five capability domains, blueprinted three intervention waves,
              and modeled the path through Year 3.
            </p>
            <div style={{ display: 'flex', gap: 14, flexWrap: 'wrap' }}>
              <a href="#" className="btn btn-primary">
                Read the case study
                <span className="arrow">→</span>
              </a>
              <a href="#" style={{
                display: 'inline-flex', alignItems: 'center', gap: 8,
                fontSize: 14, color: 'var(--light-blue)',
                padding: '14px 0',
              }}>
                Download anonymized PDF ↓
              </a>
            </div>
          </div>

          <CProofVisual />
        </div>
      </div>
    </section>
  );
}

function CProofVisual() {
  return (
    <div style={{
      padding: '32px 28px',
      border: '1px solid var(--surface-border-strong)',
      borderRadius: 6,
      background: 'rgba(255,255,255,0.02)',
    }}>
      <div style={{
        fontFamily: 'var(--font-mono)', fontSize: 10, letterSpacing: '0.18em',
        textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 20,
      }}>
        Projected ROI · sequenced
      </div>

      {[
        { wave: 'W1', label: 'Stop the bleeding · Listings + Influencer', roi: 1.8, color: 'var(--copper-hot)' },
        { wave: 'W2', label: 'Build foundation · DTC + PR', roi: 2.4, color: 'var(--light-blue)' },
        { wave: 'W3', label: 'Compound · Retail + Brand', roi: 3.9, color: 'var(--white)' },
      ].map((w, i) => (
        <div key={i} style={{ marginBottom: 18 }}>
          <div style={{
            display: 'flex', justifyContent: 'space-between', alignItems: 'baseline',
            marginBottom: 8,
          }}>
            <span style={{ fontSize: 14, color: 'var(--white)', fontWeight: 500 }}>
              <span style={{ fontFamily: 'var(--font-mono)', fontSize: 11, color: w.color, marginRight: 10 }}>{w.wave}</span>
              {w.label}
            </span>
            <span style={{ fontFamily: 'var(--font-heading)', fontSize: 18, fontWeight: 700, color: w.color }}>
              {w.roi.toFixed(1)}×
            </span>
          </div>
          <div style={{ height: 6, background: 'rgba(255,255,255,0.04)', borderRadius: 3, overflow: 'hidden' }}>
            <div style={{
              width: `${(w.roi / 4) * 100}%`,
              height: '100%',
              background: w.color,
              opacity: 0.8,
              transition: 'width 1s ease',
            }} />
          </div>
        </div>
      ))}

      <div style={{
        marginTop: 24, paddingTop: 20,
        borderTop: '1px dashed var(--surface-border-strong)',
        display: 'flex', justifyContent: 'space-between', alignItems: 'center',
      }}>
        <div>
          <div style={{ fontFamily: 'var(--font-mono)', fontSize: 10, letterSpacing: '0.12em', textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 4 }}>
            Year 3 projection
          </div>
          <div style={{ fontFamily: 'var(--font-heading)', fontSize: 14, color: 'var(--white)' }}>
            Compounded across coordinated capabilities
          </div>
        </div>
        <div style={{
          fontFamily: 'var(--font-heading)', fontSize: 48, fontWeight: 700,
          color: 'var(--copper-hot)', letterSpacing: '-0.03em', lineHeight: 1,
        }}>
          8.0×+
        </div>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Section 5 — Difference (3 punchier pillars)
// ─────────────────────────────────────────────────────────────
function CDifference() {
  return (
    <section className="section section--black" id="about">
      <div className="container">
        <div style={{
          paddingBottom: 24, borderBottom: '1px solid var(--surface-border)',
          marginBottom: 56,
          display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', gap: 32,
        }}>
          <h2 style={{
            fontFamily: 'var(--font-heading)',
            fontSize: 'clamp(40px, 5vw, 68px)',
            lineHeight: 1.05, letterSpacing: '-0.025em',
            maxWidth: 720,
          }}>
            What we won't compromise on.
          </h2>
          <a href="#" style={{
            fontSize: 14, color: 'var(--light-blue)',
            display: 'inline-flex', alignItems: 'center', gap: 8,
            paddingBottom: 8,
          }}>
            Founder, team & advisors
            <span className="arrow">→</span>
          </a>
        </div>

        <div style={{
          display: 'grid',
          gridTemplateColumns: 'repeat(3, 1fr)',
          gap: 1,
          background: 'var(--surface-border-strong)',
          border: '1px solid var(--surface-border-strong)',
        }}>
          {C_PILLARS.map((p, i) => (
            <div key={i} style={{
              background: 'var(--rich-black)',
              padding: '36px 32px',
              minHeight: 260,
              display: 'flex', flexDirection: 'column',
            }}>
              <div style={{
                fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.2em',
                textTransform: 'uppercase', color: 'var(--copper-hot)', marginBottom: 18,
              }}>
                {p.kicker}
              </div>
              <h3 style={{
                fontFamily: 'var(--font-heading)',
                fontSize: 26, fontWeight: 700, letterSpacing: '-0.015em',
                marginBottom: 14, lineHeight: 1.15,
              }}>
                {p.label}
              </h3>
              <p style={{ fontSize: 15, color: 'var(--text-secondary)', lineHeight: 1.65, margin: 0 }}>{p.body}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─────────────────────────────────────────────────────────────
// Section 6 — CTA fork (provocative)
// ─────────────────────────────────────────────────────────────
function CCTA() {
  return (
    <section className="section section--navy" id="cta" style={{ position: 'relative', overflow: 'hidden' }}>
      <div className="glow-orb glow-copper" style={{
        width: 900, height: 900,
        left: '50%', top: '50%', transform: 'translate(-50%, -50%)',
        opacity: 0.3,
      }} />

      <div className="container" style={{ position: 'relative', zIndex: 1 }}>
        <div style={{ textAlign: 'center', maxWidth: 920, marginInline: 'auto', marginBottom: 56 }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.22em',
            textTransform: 'uppercase', color: 'var(--copper-hot)', marginBottom: 24,
          }}>
            Two ways in
          </div>
          <h2 style={{
            fontFamily: 'var(--font-heading)',
            fontSize: 'clamp(44px, 5.6vw, 84px)',
            lineHeight: 1.02, letterSpacing: '-0.03em',
          }}>
            See where you're bleeding.
            <br />
            <span style={{ color: 'var(--copper-hot)' }}>Then stop it.</span>
          </h2>
        </div>

        <div style={{
          display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)',
          gap: 24,
          maxWidth: 1080, marginInline: 'auto',
        }}>
          <CForkCard
            primary
            kicker="Ready to engage"
            title="Schedule a Diagnostic"
            body="A 45-minute conversation. We show you our read on your top three bleeds and what would close them — whether or not you engage further."
            cta="Start the conversation"
            href="#"
          />
          <CForkCard
            kicker="Not sure yet"
            title="Affiliate Readiness Check"
            body="Submit 10 fields. Receive a structured readiness snapshot showing your likely bleeding sites. Fully anonymous. No commitment."
            cta="Start the check"
            href="#readiness"
          />
        </div>
      </div>
    </section>
  );
}

function CForkCard({ primary, kicker, title, body, cta, href }) {
  return (
    <a href={href} style={{
      padding: '40px 36px',
      border: '1px solid ' + (primary ? 'var(--copper)' : 'var(--surface-border-strong)'),
      borderRadius: 6,
      background: primary
        ? 'linear-gradient(180deg, rgba(180,83,9,0.14) 0%, rgba(180,83,9,0.02) 100%)'
        : 'rgba(255,255,255,0.02)',
      display: 'flex', flexDirection: 'column', gap: 16,
      transition: 'transform .3s, border-color .25s',
      cursor: 'pointer',
      minHeight: 280,
    }}
      onMouseEnter={(e) => { e.currentTarget.style.transform = 'translateY(-4px)'; }}
      onMouseLeave={(e) => { e.currentTarget.style.transform = ''; }}
    >
      <div style={{
        fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.18em',
        textTransform: 'uppercase',
        color: primary ? 'var(--copper-hot)' : 'var(--light-blue)',
      }}>
        {kicker}
      </div>
      <h3 style={{
        fontFamily: 'var(--font-heading)',
        fontSize: 32, fontWeight: 700, letterSpacing: '-0.02em',
        lineHeight: 1.1, color: 'var(--white)',
      }}>
        {title}
      </h3>
      <p style={{ fontSize: 15, color: 'var(--text-secondary)', lineHeight: 1.6, margin: 0 }}>{body}</p>
      <div style={{
        marginTop: 'auto', paddingTop: 16,
        display: 'inline-flex', alignItems: 'center', gap: 10,
        color: primary ? 'var(--copper-hot)' : 'var(--light-blue)',
        fontSize: 15, fontWeight: 500,
      }}>
        {cta}
        <span className="arrow">→</span>
      </div>
    </a>
  );
}

// ─────────────────────────────────────────────────────────────
// Footer (shared structure, copper accent)
// ─────────────────────────────────────────────────────────────
function CFooter({ t }) {
  return (
    <footer style={{
      background: 'var(--rich-black)',
      borderTop: '1px solid var(--copper)',
      paddingBlock: 72,
    }}>
      <div className="container">
        <div style={{
          display: 'grid',
          gridTemplateColumns: '1.5fr 1fr 1fr 1.2fr',
          gap: 56,
          marginBottom: 56,
        }}>
          <div>
            <a href="#" style={{
              display: 'inline-flex', alignItems: 'baseline', gap: 4,
              fontFamily: 'var(--font-heading)', fontWeight: 700, fontSize: 24,
              marginBottom: 18,
            }}>
              <span style={{ color: 'var(--white)' }}>Project</span>
              <span style={{ color: 'var(--light-blue)' }}>Silk</span>
            </a>
            <p style={{ fontSize: 14, color: 'var(--text-secondary)', lineHeight: 1.6, maxWidth: 340 }}>
              We find where Chinese brands bleed pricing power in the US market — and we close it.
              Western strategy built for Chinese businesses.
            </p>
            {t.showChineseSignals && (
              <div style={{ marginTop: 16, fontFamily: 'var(--font-zh)', fontSize: 14, color: 'var(--copper-hot)', letterSpacing: '0.18em' }}>
                止血，然后建品牌
              </div>
            )}
          </div>

          <div>
            <div style={{
              fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.18em',
              textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 16,
            }}>Site</div>
            <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 8, fontSize: 14 }}>
              {['The Bleeding', 'The Triage', 'Proof', 'About', 'Readiness Check', 'Contact'].map(l => (
                <li key={l}><a href="#" style={{ color: 'var(--text-secondary)' }}>{l}</a></li>
              ))}
            </ul>
          </div>
          <div>
            <div style={{
              fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.18em',
              textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 16,
            }}>Connect</div>
            <ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 8, fontSize: 14 }}>
              <li><a href="#" style={{ color: 'var(--text-secondary)' }}>hello@project-silk.com</a></li>
              <li><a href="#" style={{ color: 'var(--text-secondary)' }}>LinkedIn</a></li>
              <li><a href="#" style={{ color: 'var(--text-secondary)' }}>Foundry Studio</a></li>
            </ul>
          </div>
          <CFooterWeChat />
        </div>

        <div style={{
          paddingTop: 24, borderTop: '1px solid var(--surface-border)',
          display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap', gap: 12,
          fontSize: 12, color: 'var(--text-tertiary)',
        }}>
          <div>© 2026 Project Silk · A Foundry Studio venture</div>
          <div style={{ display: 'flex', gap: 24 }}>
            <a href="#">Privacy</a>
            <a href="#">Terms</a>
          </div>
        </div>
      </div>
    </footer>
  );
}

function CFooterWeChat() {
  return (
    <div>
      <div style={{
        fontFamily: 'var(--font-mono)', fontSize: 11, letterSpacing: '0.18em',
        textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 16,
      }}>
        WeCom · 企业微信
      </div>
      <div style={{ display: 'flex', gap: 14 }}>
        <div style={{
          width: 78, height: 78,
          background: 'var(--deep-navy-2)',
          border: '1px solid var(--surface-border-strong)',
          borderRadius: 4,
          display: 'grid',
          gridTemplateColumns: 'repeat(8, 1fr)', gridTemplateRows: 'repeat(8, 1fr)',
          padding: 5, gap: 1.5,
        }}>
          {Array.from({ length: 64 }).map((_, i) => (
            <div key={i} style={{
              background: (i * 17 + Math.floor(i / 8) * 3) % 4 === 0 ? 'var(--white)' : 'transparent',
            }} />
          ))}
        </div>
        <div style={{ fontSize: 13, color: 'var(--text-secondary)', lineHeight: 1.55 }}>
          Project Silk<br />
          <span style={{ fontFamily: 'var(--font-zh)' }}>项目丝路</span><br />
          <span style={{ color: 'var(--text-tertiary)', fontSize: 11 }}>Scan to add</span>
        </div>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// WeChat pill
// ─────────────────────────────────────────────────────────────
function CWeChatPill() {
  const [open, setOpen] = React.useState(false);
  return (
    <div style={{ position: 'fixed', left: 24, bottom: 24, zIndex: 40 }}>
      {open && (
        <div style={{
          position: 'absolute', bottom: 60, left: 0,
          background: 'rgba(20, 22, 30, 0.94)',
          border: '1px solid var(--surface-border-strong)',
          backdropFilter: 'blur(18px) saturate(140%)',
          WebkitBackdropFilter: 'blur(18px) saturate(140%)',
          borderRadius: 8, padding: 16, width: 220,
          boxShadow: '0 24px 60px rgba(0,0,0,0.6)',
        }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 10, letterSpacing: '0.18em',
            textTransform: 'uppercase', color: 'var(--text-tertiary)', marginBottom: 12,
          }}>WeCom · 企业微信</div>
          <div style={{
            width: '100%', aspectRatio: '1/1',
            background: 'var(--deep-navy-2)',
            border: '1px solid var(--surface-border-strong)', borderRadius: 4,
            display: 'grid', gridTemplateColumns: 'repeat(10, 1fr)', gridTemplateRows: 'repeat(10, 1fr)',
            padding: 8, gap: 1.5, marginBottom: 10,
          }}>
            {Array.from({ length: 100 }).map((_, i) => (
              <div key={i} style={{
                background: (i * 13 + Math.floor(i / 10) * 5) % 4 === 0 ? 'var(--white)' : 'transparent',
              }} />
            ))}
          </div>
          <div style={{ fontSize: 12, color: 'var(--text-secondary)', lineHeight: 1.5 }}>
            Scan to add Project Silk's<br />official WeCom account
          </div>
        </div>
      )}
      <button onClick={() => setOpen(o => !o)} style={{
        background: open ? 'var(--copper-hot)' : 'rgba(20, 22, 30, 0.92)',
        color: open ? 'var(--rich-black)' : 'var(--white)',
        border: '1px solid ' + (open ? 'var(--copper-hot)' : 'var(--surface-border-strong)'),
        borderRadius: 999, padding: '12px 18px',
        display: 'flex', alignItems: 'center', gap: 10,
        fontSize: 13, fontWeight: 500, cursor: 'pointer',
        backdropFilter: 'blur(18px) saturate(140%)',
        WebkitBackdropFilter: 'blur(18px) saturate(140%)',
        boxShadow: open ? '0 8px 32px var(--glow-copper-high)' : '0 8px 24px rgba(0,0,0,0.4)',
        transition: 'all .25s ease',
      }}>
        <span style={{
          width: 8, height: 8, borderRadius: '50%',
          background: open ? 'var(--rich-black)' : 'var(--copper-hot)',
          boxShadow: open ? 'none' : '0 0 8px var(--copper-hot)',
        }} />
        WeChat · 微信
      </button>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// App
// ─────────────────────────────────────────────────────────────
function App() {
  const [t, setTweak] = useTweaks(C_TWEAKS);
  return (
    <div data-density={t.density}>
      <CNav />
      <CHero t={t} />
      <CBleeding t={t} />
      <CTriage />
      <CProof />
      <CDifference />
      <CCTA />
      <CFooter t={t} />
      <CWeChatPill />

      <TweaksPanel>
        <TweakSection label="Pulse" />
        <TweakToggle label="Bleeding pulse animation"
          value={t.showBleedingPulse}
          onChange={(v) => setTweak('showBleedingPulse', v)} />
        <TweakSection label="Localization" />
        <TweakToggle label="Show Chinese signals"
          value={t.showChineseSignals}
          onChange={(v) => setTweak('showChineseSignals', v)} />
        <TweakSection label="Density" />
        <TweakRadio label="Section rhythm"
          value={t.density}
          options={['compact', 'standard', 'spacious']}
          onChange={(v) => setTweak('density', v)} />
      </TweaksPanel>
    </div>
  );
}

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