function Features() {
  return (
    <section id="features" className="navy dk" style={{ margin: "0 12px", borderRadius: 32, overflow: "hidden", isolation: "isolate" }} data-screen-label="Features">
      <div className="grid-bg"></div><div className="noise"></div>
            <div className="sec wrap" style={{ position: "relative" }}>
        <SecHead eyebrow="Features" title={<>Everything You Need to <span className="gx">Find &amp; Win</span> Investors</>} lead="AI-powered filters, live signals, and structured data fields designed to connect you with the investors who matter most." />
        <div className="fgrid">
          {CH.features.map((f, i) => { const A = FEATURE_ART[i]; return (
            <article key={f.title} className="fc rv" style={{ "--d": (i % 4) * 80 + "ms" }} onMouseMove={spot}>
              <IconBox icon={f.icon} size="md" style={{ boxShadow: "0 0 0 1px rgba(255,255,255,.12) inset, 0 8px 20px rgba(0,0,0,.25)" }} />
              <h3>{f.title}<span>{f.gray}</span></h3>
              <div className="art"><A /></div>
            </article>); })}
        </div>
      </div>
    </section>
  );
}

function DataStats() {
  const comp = [["angel", 54000], ["vc", 62000], ["family-office", 47000]];
  const total = comp.reduce((s, c) => s + c[1], 0);
  return (
    <section id="data" className="sec" data-screen-label="Data">
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "minmax(0,1fr) minmax(0,1fr)", gap: 48, alignItems: "end", marginBottom: 56 }} className="data-head">
          <SecHead align="l" eyebrow="The Database" title={<>The Data Behind <span className="gx">Your Next Raise</span></>} />
          <div className="rv" style={{ "--d": "120ms", paddingBottom: 40 }}>
            <p className="lead" style={{ fontSize: 17 }}>Capital Hunt gives you access to the most comprehensive investor database on the market — verified, structured, and ready to search. (numbers are estimates)</p>
            <div className="comp" style={{ marginTop: 24 }}>{comp.map(([t, n], i) => <div key={t} style={{ width: (n / total) * 100 + "%", background: DS.INVESTOR_TYPES[t].hex, transitionDelay: i * 150 + "ms" }}></div>)}</div>
            <div style={{ display: "flex", gap: 18, marginTop: 12, flexWrap: "wrap" }}>{comp.map(([t]) => <InvestorTypeTag key={t} type={t} size="sm" />)}</div>
          </div>
        </div>
        <div className="stats">
          {CH.stats.map((s, i) => (
            <div key={s.label} className="stat rv" style={{ "--d": (i % 3) * 90 + "ms" }}>
              <div className="n"><CountUp to={s.target} suffix={s.suffix} /></div>
              <div className="lb">{i === 3 && <span style={{ width: 8, height: 8, borderRadius: 8, background: "var(--accent-gold)" }}></span>}{s.label}</div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

function Academy() {
  return (
    <section id="academy" className="wrap" style={{ paddingBottom: 40 }} data-screen-label="Academy">
      <div className="rv" style={{ position: "relative", borderRadius: 32, overflow: "hidden", padding: "64px", display: "grid", gridTemplateColumns: "minmax(0,1fr) minmax(0,1.1fr)", gap: 48, alignItems: "center", background: "radial-gradient(60% 80% at 100% 0%,rgba(59,130,246,.18),transparent 60%),radial-gradient(50% 70% at 0% 100%,rgba(229,166,0,.14),transparent 60%),linear-gradient(135deg,#EEF2FC,#F8F9FD)", border: "1px solid #E3E8F5" }}>
        <div style={{ display: "flex", flexDirection: "column", gap: 20, alignItems: "flex-start" }}>
          <span className="eb"><i></i>Capital Academy</span>
          <h2 className="h2">Capital Hunt <span className="gx">Academy</span></h2>
          <p className="lead" style={{ fontSize: 17 }}>Master the art of fundraising with institutional-grade courses, winning pitch deck templates, and expert coaching from founders who've raised millions.</p>
          <Button variant="solid" size="xl" iconRight="ArrowRight" href="#">Explore Capital Academy</Button>
        </div>
        <div style={{ display: "flex", justifyContent: "center" }}><CoursePlayer compact /></div>
      </div>
    </section>
  );
}

function Quote({ t }) {
  const i = t.quote.toLowerCase().indexOf(t.highlight.toLowerCase());
  const q = i < 0 ? t.quote : <>{t.quote.slice(0, i)}<strong>{t.quote.slice(i, i + t.highlight.length)}</strong>{t.quote.slice(i + t.highlight.length)}</>;
  return (
    <article className="tcard">
      <div className="stars">{[0, 1, 2, 3, 4].map(k => <Icon key={k} name="Star" size={15} fill="currentColor" />)}</div>
      <blockquote>“{q}”</blockquote>
      <div style={{ display: "flex", alignItems: "center", gap: 12, paddingTop: 16, borderTop: "1px solid var(--border-subtle)" }}>
        <Avatar initials={initialsOf(t.name)} size={40} style={{ background: "var(--accent-primary)" }} />
        <div><p style={{ fontSize: 14, fontWeight: 700 }}>{t.name}</p><p style={{ fontSize: 12.5, color: "var(--text-muted)" }}>{t.role}, {t.company}</p></div>
      </div>
    </article>
  );
}

function VideoCard({ v, i }) {
  const [play, setPlay] = React.useState(false);
  const poster = v.poster || `https://img.youtube.com/vi/${v.yt}/hqdefault.jpg`;
  return (
    <div className="vid rv" style={{ "--d": i * 100 + "ms", cursor: play ? "default" : "pointer" }} role={play ? undefined : "button"} tabIndex={play ? undefined : 0} aria-label={play ? undefined : `Play ${v.name} video testimonial`} onClick={() => !play && setPlay(true)} onKeyDown={e => { if (!play && e.target === e.currentTarget && (e.key === "Enter" || e.key === " ")) { e.preventDefault(); setPlay(true); } }}>
      {play ? (
        <iframe style={{ position: "absolute", inset: 0, width: "100%", height: "100%", border: 0 }} src={`https://www.youtube.com/embed/${v.yt}?autoplay=1&rel=0&modestbranding=1&playsinline=1`} title={`${v.name} testimonial`} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowFullScreen></iframe>
      ) : (
        <>
          <img src={poster} alt={`${v.name} video testimonial`} />
          <span className="play"><Icon name="Play" size={26} fill="#fff" /></span>
          <div className="ov"><div style={{ display: "flex", alignItems: "center", gap: 12 }}><Avatar initials={initialsOf(v.name)} size={40} /><div><p style={{ fontSize: 16, fontWeight: 700 }}>{v.name}</p><p style={{ fontSize: 13, color: "#B8C1D9" }}>{v.role}, {v.company}</p></div></div></div>
        </>
      )}
    </div>
  );
}

function Testimonials() {
  const q = CH.testimonials1, v = CH.videos;
  return (
    <section id="testimonials" className="sec" style={{ paddingTop: 96, paddingBottom: 96 }} data-screen-label="Testimonials">
      <div className="wrap">
        <div className="thead">
          <SecHead align="l" eyebrow="Testimonials" title={<>Don’t Take Our Word for It.</>} lead="Here’s what founders and advisors say about working with us." />
          <div className="tproof rv">
            <div style={{ display: "flex" }}>{CH.founders.map((s, i) => <Photo key={i} src={s} name="F" size={36} style={{ marginLeft: i ? -10 : 0, boxShadow: "0 0 0 2px #fff" }} />)}</div>
            <div><div className="mono" style={{ fontSize: 22, fontWeight: 600, letterSpacing: "-.02em", color: "var(--accent-primary)", lineHeight: 1 }}>2,000+</div><div style={{ fontSize: 13.5, color: "var(--text-secondary)", marginTop: 4 }}>founders pre-registered</div></div>
          </div>
        </div>
        <div className="tg4">
          <div className="rv"><Quote t={q[0]} /></div>
          <VideoCard v={v[0]} i={1} />
          <div className="rv" style={{ "--d": "200ms" }}><Quote t={q[1]} /></div>
          <VideoCard v={v[1]} i={3} />
        </div>
      </div>
    </section>
  );
}

function Pricing() {
  const [p, setP] = React.useState("quarterly");
  const price = m => p === "quarterly" ? m * 3 : Math.round(m * 6 * .85);
  const per = p === "quarterly" ? "/quarter" : "/6 months";
  const fmt = n => "$" + n.toLocaleString("en-US");
  return (
    <section id="pricing" className="sec" data-screen-label="Pricing">
      <div className="wrap">
        <SecHead eyebrow="Pricing" title={<>Simple Pricing. <span className="gx">Serious Value.</span></>} lead="Everything you need to find investors and close your round.">
          <p className="rv" style={{ "--d": "200ms", fontSize: 14, color: "var(--text-muted)" }}>Plans from <b className="mono" style={{ color: "var(--accent-primary)" }}>$99/m</b></p>
          <div className="rv ptog" style={{ "--d": "260ms" }}><SegmentedToggle value={p} onChange={setP} options={[{ value: "quarterly", label: "Quarterly" }, { value: "6m", label: "Pay For 6 Months", note: "Save 15%" }]} /></div>
        </SecHead>
        <div className="tiers">
          {CH.tiers.map((t, i) => (
            <article key={t.name} className={"tier rv" + (t.popular ? " pop" : "")} style={{ "--d": i * 100 + "ms" }}>
              {t.popular && <><div className="grid-bg"></div><span className="chip-pop">Most Popular</span></>}
              <div style={{ position: "relative" }}>
                <h3 style={{ fontSize: 20, fontWeight: 800 }}>{t.name}</h3>
                <p style={{ marginTop: 18, fontSize: 14, textDecoration: "line-through", color: t.popular ? "#8D97B5" : "var(--text-muted)" }}>{fmt(price(t.monthly))}{per}</p>
                <p style={{ display: "flex", alignItems: "baseline", gap: 8, marginTop: 6 }}><span className="price">{fmt(Math.round(price(t.monthly) * .5))}</span><span style={{ fontSize: 14, color: t.popular ? "#B8C1D9" : "var(--text-secondary)" }}>{per}</span></p>
                <span style={{ display: "inline-flex", marginTop: 12, height: 26, alignItems: "center", padding: "0 10px", borderRadius: 99, fontSize: 12, fontWeight: 700, background: t.popular ? "rgba(229,166,0,.16)" : "rgba(30,58,138,.08)", color: t.popular ? "#F2C14E" : "var(--accent-primary)" }}>Early Access Price — 50% Off</span>
              </div>
              <div style={{ height: 1, background: t.popular ? "rgba(255,255,255,.12)" : "var(--border-subtle)" }}></div>
              <ul style={{ position: "relative" }}>{t.features.map(f => <li key={f}><Icon name="CheckCircle2" size={17} color={t.popular ? "#F2C14E" : "var(--accent-primary)"} style={{ marginTop: 1 }} />{f}</li>)}</ul>
              <Button variant={t.popular ? "primary" : "outline"} fullWidth arrow href={CH.APP} target="_blank" style={t.popular ? { background: "#fff", color: "var(--accent-primary)" } : {}}>Get Early Access</Button>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
}

function FAQ() {
  const h = Math.ceil(CH.faq.length / 2);
  return (
    <section id="faq" className="sec" data-screen-label="FAQ">
      <div className="wrap">
        <SecHead eyebrow="FAQ" title={<>Get Your Questions <span className="gx">Answered</span></>} lead="Everything you need to know about Capital Hunt, our investor database, and how we help founders raise capital." />
        <div className="faq2">
          <div className="rv"><FAQAccordion items={CH.faq.slice(0, h)} defaultOpen={0} /></div>
          <div className="rv" style={{ "--d": "100ms" }}><FAQAccordion items={CH.faq.slice(h)} defaultOpen={-1} /></div>
        </div>
        <div className="rv" style={{ maxWidth: 720, margin: "40px auto 0", padding: 22, borderRadius: 20, border: "1px solid var(--border-subtle)", background: "#F7F8FA", display: "flex", gap: 14, alignItems: "center", flexWrap: "wrap" }}>
          <IconBox icon="MessageCircle" />
          <div style={{ flex: 1, minWidth: 200 }}><p style={{ fontWeight: 700 }}>Still have questions?</p><p style={{ fontSize: 13.5, color: "var(--text-muted)" }}>Our team replies within one working day.</p></div>
          <Button variant="solid" href="contact.html" iconRight="ArrowRight">Fill Out Contact Form</Button>
        </div>
      </div>
    </section>
  );
}

function FinalAndFooter() {
  return (
    <section className="final navy dk" onMouseMove={spot} data-screen-label="Final CTA + footer">
      <div className="spot"></div>
      {[380, 620, 880].map((s, i) => <div key={s} className="cta-ring" style={{ width: s, height: s, top: 300 }}></div>)}
      <div className="wrap" style={{ position: "relative", paddingTop: 140, paddingBottom: 120, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 26 }}>
        <img className="rv" src="assets/logos/icon-gradient.png" alt="" style={{ width: 72, height: 72, borderRadius: 20, boxShadow: "0 0 0 1px rgba(255,255,255,.12)" }} />
        <h2 className="h2 rv" style={{ "--d": "80ms", fontSize: "clamp(40px,5.6vw,76px)", maxWidth: 900 }}>Get Early Access to <span className="gx">Capital Hunt</span></h2>
        <p className="lead rv" style={{ "--d": "160ms", fontSize: 19 }}>Join 2,000+ pre-registered founders using Capital Hunt to find, connect with, and close investors. Early access members get 50% off — doors close December 28th, 2026.</p>
        <ul className="rv" style={{ "--d": "220ms", listStyle: "none", padding: 0, margin: 0, display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "10px 24px" }}>{CH.benefits.map(b => <li key={b} style={{ display: "flex", alignItems: "center", gap: 8, fontSize: 14.5, color: "#DDE3F3" }}><Icon name="Check" size={16} color="#F2C14E" strokeWidth={3} />{b}</li>)}</ul>
        <div className="rv" style={{ "--d": "300ms", marginTop: 8 }}><Button variant="primary" size="xl" arrow pulse href={CH.APP} target="_blank" style={{ background: "#fff", color: "var(--accent-primary)" }}>Get Early Access</Button></div>
      </div>
      <div className="wrap" style={{ position: "relative" }}>
        <SiteFooterBody />
      </div>
    </section>
  );
}

Object.assign(window, { Features, DataStats, Academy, Testimonials, Pricing, FAQ, FinalAndFooter });
