// CLARITY — Fuel Talent homepage (Apple-emulation)
// Light primary with dramatic dark sections. SF Pro / Inter typography.
// Sapphire (#1e3a8a) accent, used sparingly on CTAs, links, and active states.

const { useState, useEffect, useRef, useMemo, useCallback } = React;

// ─── content (shared with Studio — single source of truth lives here) ──
const NAV = [
  { label: "Expertise",  href: "#expertise",  panel: "expertise" },
  { label: "Services",   href: "#services",   panel: "services" },
  { label: "Resources",  href: "#resources",  panel: "resources" },
  { label: "Find a Job", href: "jobs.html",   panel: null, noUnderline: true },
  { label: "About",      href: "#about",      panel: null, noUnderline: true },
];

const MEGA_PANELS = {
  expertise: {
    eyebrow: "Expertise · 8 practices",
    cols: [
      { head: "Build",    items: ["Tech & Engineering", "Product", "Design & UX Research"] },
      { head: "Operate",  items: ["HR & Operations", "Finance & Accounting", "Admin & Lifestyle"] },
      { head: "Lead",     items: ["C-Suite", "Marketing"] },
      { head: "Featured", items: ["Browse all expertise ›", "Submit a role"] },
    ],
  },
  services: {
    eyebrow: "Services · 3 modes",
    cols: [
      { head: "01 — Recruiting & Staffing",   items: ["Permanent placement", "Contract & contingent", "Embedded recruiting"] },
      { head: "02 — Professional & Managed", items: ["Specialist teams", "Operational coverage", "Project execution"] },
      { head: "03 — Digital Workers",         items: [{ label: "The roles we staff", href: "digital-worker.html#roles" }, { label: "How we build them", href: "digital-worker.html#stack" }, { label: "Hire a Digital Worker ›", href: "digital-worker.html" }] },
      { head: "Not sure?",                    items: ["Talk to a strategist ›"] },
    ],
  },
  resources: {
    eyebrow: "Fuel for thought",
    cols: [
      { head: "Field Notes",  items: ["Hiring playbooks", "Career guides", "Salary trends 2026"] },
      { head: "Case Studies", items: ["Provider case · Providence", "Scale-up case · Pacagen"] },
      { head: "Podcast",      items: ["Make Them Lose Sleep", "Browse all episodes ›"] },
      { head: "Subscribe",    items: ["Monthly newsletter"] },
    ],
  },
};

const EXPERTISE = [
  { id: "tech",      group: "Build",   title: "Tech & Engineering",   live: 47, days: 18, blurb: "Software, infra, ML, security and platform leaders for high-growth tech." },
  { id: "design",    group: "Build",   title: "Design & UX Research", live: 23, days: 16, blurb: "Product designers, design systems leads, and research-led practitioners." },
  { id: "product",   group: "Build",   title: "Product",              live: 19, days: 21, blurb: "PMs and product leadership who can ship inside ambiguity." },
  { id: "marketing", group: "Lead",    title: "Marketing",            live: 14, days: 17, blurb: "Growth, brand, content and demand-gen operators for B2B and consumer." },
  { id: "csuite",    group: "Lead",    title: "C-Suite",              live:  6, days: 41, blurb: "Founder, CEO, CTO, CPO and CFO searches for venture-backed companies." },
  { id: "admin",     group: "Operate", title: "Admin & Lifestyle",    live: 11, days: 12, blurb: "Executive assistants, chiefs of staff and household operators." },
  { id: "hrops",     group: "Operate", title: "HR & Operations",      live: 17, days: 19, blurb: "People leaders, recruiters, biz-ops and program managers." },
  { id: "finance",   group: "Operate", title: "Finance & Accounting", live: 12, days: 22, blurb: "Controllers, FP&A, CFOs and finance operators ready to scale." },
];

const SERVICES = [
  { num: "01", title: <>Recruiting & <em>Staffing.</em></>, blurb: "Permanent and contract hires across engineering, design, product and operations. We average 18 days to offer and close 91% of extended offers.", link: "Explore Recruiting", href: "#" },
  { num: "02", title: <>Professional & <em>Managed.</em></>, blurb: "Embedded teams of senior specialists who execute critical initiatives or run ongoing operations end-to-end.", link: "Explore Managed", href: "#" },
  { num: "03", title: <>Digital <em>Workers.</em></>, blurb: "An AI-fueled workforce of digital agents that automates repetitive work — so your humans can do the hard thinking.", link: "Explore Digital Workers", href: "digital-worker.html" },
];

const PILLARS = [
  { num: "01", title: <><em>Who</em> we fuel.</>, body: "Venture-backed startups, scale-ups, and innovation-led enterprises. Whether you're building your first engineering team or scaling a mature org, we deliver talent that fits on paper and in culture.",
    stats: [{ k: <>48<em>hr</em></>, v: "to first slate" }, { k: <>18<em>d</em></>, v: "median offer time" }] },
  { num: "02", title: <><em>How</em> we fuel.</>, body: "Discovery, calibration, sourcing, vetting, present. We pair human judgment with proprietary AI sourcing that surfaces candidates outside the obvious channels — and removes the busywork that slows great recruiters down.",
    stats: [{ k: "5-step", v: "calibrated" }, { k: "AI-assisted", v: "sourcing + screening" }] },
  { num: "03", title: <><em>Why</em> we fuel.</>, body: "We build legacies — not just fill roles. We close 91% of extended offers because we don't push the wrong fits. We invest in the long-term relationship with both sides, and that compounds.",
    stats: [{ k: <>91<em>%</em></>, v: "offer accept" }, { k: <>10<em>y</em>+</>, v: "median client tenure" }] },
];

const TESTIMONIALS = [
  { quote: <>Fuel consistently takes the time to learn what's needed from an open role, how it fits within the team, and the qualities that will help a candidate <em>succeed and thrive.</em></>, name: "CHRO", role: "Think Tank · Executive Private Office", initials: "TT" },
  { quote: <>Incredibly responsive, adaptable, and a <em>valuable partner</em> that delivers results.</>, name: "Beth Mead", role: "Providence", initials: "BM" },
  { quote: <>Continuous improvement is in your DNA. The experience and vision was <em>exactly what I'd hoped for.</em></>, name: "Casey Bayless", role: "Moss Adams · Recruiting Manager", initials: "CB" },
  { quote: <>Fuel found the <em>most effective candidates</em> for us.</>, name: "Director of Product Design", role: "Remitly", initials: "RT" },
  { quote: <>Their ability to consistently present <em>high-quality candidates</em> tailored to our specific needs has been remarkable.</>, name: "Marc", role: "Co-Founder & CTO", initials: "MC" },
];

const CLIENT_WORDMARKS = [
  { name: "Providence",   render: () => <span className="wm wm-providence">Providence</span> },
  { name: "Moss Adams",   render: () => <span className="wm wm-mossadams">MOSS ADAMS</span> },
  { name: "Appen",         render: () => <span className="wm wm-appen"><i>a</i>ppen</span> },
  { name: "Remitly",       render: () => <span className="wm wm-remitly">Remitly</span> },
  { name: "Whitepages",    render: () => <span className="wm wm-whitepages">white<b>pages</b></span> },
  { name: "Madrona",       render: () => <span className="wm wm-madrona">Madrona</span> },
  { name: "RealSelf",      render: () => <span className="wm wm-realself">real<b>self</b></span> },
  { name: "KnowLabs",      render: () => <span className="wm wm-knowlabs">knowlabs</span> },
  { name: "Pacagen",       render: () => <span className="wm wm-pacagen">P<i>aca</i>gen</span> },
];

const JOBS_PREVIEW = [
  { id: "FT-0481", title: "Staff Software Engineer, Platform", company: "Series C SaaS",       loc: "Seattle, WA · Hybrid",  type: "Direct", area: "Tech" },
  { id: "FT-0476", title: "Senior Product Designer",            company: "AI Health Startup",   loc: "Remote (US)",            type: "Direct", area: "Design" },
  { id: "FT-0470", title: "Director of Product, Growth",        company: "Consumer Marketplace", loc: "Bellevue, WA",          type: "Direct", area: "Product" },
  { id: "FT-0463", title: "Head of Recruiting",                 company: "Climate Tech",        loc: "Seattle · Onsite",       type: "Direct", area: "HR & Ops" },
];

const RESOURCES = [
  { kind: "Field Notes",  title: "10 strategies for attracting top talent in a thin market", read: "5 min", date: "May 12" },
  { kind: "Field Notes",  title: "Streamlining the virtual onboarding process",              read: "4 min", date: "Apr 29" },
  { kind: "Candidates",   title: "Affected by mass layoffs? Where to start and regain confidence", read: "6 min", date: "Apr 14" },
  { kind: "Case Study",   title: "How we built an engineering team from zero to 40",        read: "8 min", date: "Mar 30" },
];

const PROOF_STATS = [
  { n: "48 hr", l: "to first candidate slate" },
  { n: "18 d",  l: "average time-to-offer" },
  { n: "91%",   l: "offer accept rate" },
  { n: "300+",  l: "active company partners" },
  { n: "75+",   l: "five-star reviews" },
  { n: "100k",  l: "podcast listeners" },
  { n: "9",     l: "specialty practices" },
  { n: "10y+",  l: "in market" },
];

// ─── nav ─────────────────────────────────────────────────────────────
function TopNav({ darkBg }) {
  const [open, setOpen] = useState(null);
  const closeT = useRef(null);
  const enter = (key) => { clearTimeout(closeT.current); setOpen(key); };
  const leave = () => { closeT.current = setTimeout(() => setOpen(null), 120); };
  return (
    <header className={`topnav ${darkBg ? "is-dark" : ""}`} onMouseLeave={leave}>
      <div className="container nav-inner">
        <a className="brand" href="index.html">
          <span className="brand-mark"></span>
          <span>Fuel Talent</span>
        </a>
        <nav className="nav-links">
          {NAV.map((n) => (
            <a key={n.label}
               className={`nav-link ${open && open === n.panel ? "is-open" : ""}`}
               href={n.href}
               onMouseEnter={() => enter(n.panel)}>
              {n.label}
            </a>
          ))}
        </nav>
        <a className="nav-pill" href="jobs.html">For Candidates <span>›</span></a>
      </div>
      <MegaMenu open={open} onMouseEnter={() => clearTimeout(closeT.current)} onMouseLeave={leave} />
    </header>
  );
}

function MegaMenu({ open, onMouseEnter, onMouseLeave }) {
  const p = open && MEGA_PANELS[open];
  return (
    <div className="megamenu" style={{
      maxHeight: p ? 380 : 0,
      opacity: p ? 1 : 0,
      pointerEvents: p ? "auto" : "none",
    }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>
      {p && (
        <div className="container megamenu-inner">
          <div className="mega-eyebrow">{p.eyebrow}</div>
          {p.cols.map((c) => (
            <div key={c.head} className="mega-col">
              <div className="mega-head">{c.head}</div>
              <ul>
                {c.items.map((it) => {
                  const label = typeof it === "string" ? it : it.label;
                  const href  = typeof it === "string" ? "#"   : it.href;
                  return <li key={label}><a href={href}>{label}</a></li>;
                })}
              </ul>
            </div>
          ))}
        </div>
      )}
    </div>
  );
}

// ─── hero ────────────────────────────────────────────────────────────
function Hero() {
  const videoRef = useRef(null);
  useEffect(() => {
    const v = videoRef.current;
    if (!v) return;
    v.muted = true;
    const tryPlay = () => v.play().catch(() => {});
    tryPlay();
    document.addEventListener("visibilitychange", tryPlay);
    return () => document.removeEventListener("visibilitychange", tryPlay);
  }, []);
  return (
    <section className="hero" id="top">
      <video
        ref={videoRef}
        className="hero-video"
        src="/studio/hero.mp4"
        autoPlay muted loop playsInline
      />
      <div className="hero-scrim"></div>
      <div className="container hero-inner">
        <div className="hero-eyebrow">
          <span className="brand-mark"></span>
          <span>Fuel Talent</span>
          <span className="sep">·</span>
          <span>Seattle</span>
        </div>
        <h1 className="hero-headline">
          The people <em>who&nbsp;build</em><br/>
          what's next.
        </h1>
        <p className="hero-tagline">
          A Seattle-based recruiting firm for high-growth companies — calibrated searches, embedded teams, and an AI-fueled workforce of digital agents.
        </p>
        <div className="hero-ctas">
          <a className="btn" href="#contact">Submit a role <span>›</span></a>
          <a className="btn btn-ghost" href="digital-worker.html">Hire a Digital Worker <span>›</span></a>
        </div>
      </div>
      <a href="#intro" className="hero-scroll">Scroll</a>
    </section>
  );
}

// ─── proof bar ───────────────────────────────────────────────────────
function ProofBar() {
  const doubled = [...PROOF_STATS, ...PROOF_STATS];
  return (
    <div className="proof">
      <div className="proof-track">
        {doubled.map((it, i) => (
          <span key={i} className="proof-item">
            <span className="n">{it.n}</span>
            <span className="l">{it.l}</span>
            <span className="sep">·</span>
          </span>
        ))}
      </div>
    </div>
  );
}

// ─── intro (Apple "two-up" centered statement) ──────────────────────
function Intro() {
  return (
    <section className="intro s-light" id="intro">
      <div className="container">
        <div className="eyebrow">Designed for ambition</div>
        <h2>
          We don't fill roles.<br/>
          <em>We build legacies.</em>
        </h2>
        <p>
          For 10+ years we've connected Seattle's most ambitious companies with the people who shape what they become — from founding engineer to chief executive. We calibrate every search, present only candidates who fit, and close 91% of extended offers.
        </p>
        <div className="ctas">
          <a className="btn" href="#services">See how we work <span>›</span></a>
          <a className="clink" href="#about">Why founders choose Fuel</a>
        </div>
      </div>
    </section>
  );
}

// ─── scroll-pinned product-reveal section (signature) ──────────────
const REVEAL_STOPS = [
  { stat: <><span>300</span><span className="unit">+</span></>, phrase: <>People we've placed across Seattle's <em>most ambitious teams.</em></> },
  { stat: <><span>91</span><span className="unit">%</span></>, phrase: <>Of extended offers, accepted — because we <em>calibrate</em> first.</> },
  { stat: <><span>18</span><span className="unit">d</span></>, phrase: <>Median time-to-offer. Fast, <em>without shortcuts.</em></> },
];

function ScrollReveal() {
  const wrapRef = useRef(null);
  const [stop, setStop] = useState(0);
  useEffect(() => {
    const update = () => {
      const el = wrapRef.current;
      if (!el) return;
      const r = el.getBoundingClientRect();
      const total = Math.max(1, el.offsetHeight - window.innerHeight);
      const raw = Math.min(1, Math.max(0, -r.top / total));
      // 3 stops over the section, each occupies ~1/3
      const idx = Math.min(REVEAL_STOPS.length - 1, Math.floor(raw * REVEAL_STOPS.length));
      setStop(idx);
    };
    update();
    window.addEventListener("scroll", update, { passive: true });
    window.addEventListener("resize", update);
    return () => {
      window.removeEventListener("scroll", update);
      window.removeEventListener("resize", update);
    };
  }, []);
  return (
    <section className="reveal" ref={wrapRef} style={{ height: `${REVEAL_STOPS.length * 100}vh` }}>
      <div className="reveal-sticky">
        <video
          className="reveal-video"
          src="/studio/case.mp4"
          autoPlay muted loop playsInline
        />
        <div className="reveal-scrim"></div>
        {REVEAL_STOPS.map((s, i) => (
          <div key={i} className={`reveal-stop ${stop === i ? "is-on" : ""}`}>
            <div>
              <p className="stat">{s.stat}</p>
              <p className="phrase">{s.phrase}</p>
            </div>
          </div>
        ))}
        <div className="reveal-progress">
          {REVEAL_STOPS.map((_, i) => (
            <span key={i} className={stop === i ? "on" : ""} />
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── services — Apple bento tiles ──────────────────────────────────
function Services() {
  return (
    <section className="services sect-pad" id="services">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Services</div>
          <h2>Talent that <em>moves you forward.</em></h2>
          <p className="sub">Three ways to engage — calibrated to where you are, not where a packaged offering says you should be.</p>
        </div>
        <div className="services-grid">
          {SERVICES.map((s) => (
            <article key={s.num} className="svc-tile">
              <div className="num">{s.num}</div>
              <h3>{s.title}</h3>
              <p className="body">{s.blurb}</p>
              <div className="foot">
                <a className="clink" href={s.href}>{s.link}</a>
              </div>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── pillars — Who, How, Why ───────────────────────────────────────
function Pillars() {
  return (
    <section className="pillars sect-pad" id="about">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Operating system</div>
          <h2>Three pillars, <em>one promise.</em></h2>
          <p className="sub">Who we fuel. How we work. Why this compounds for the companies we partner with.</p>
        </div>
        <div className="pillars-grid">
          {PILLARS.map((p) => (
            <article key={p.num} className="pillar-col">
              <div className="num">{p.num}</div>
              <h3>{p.title}</h3>
              <p className="body">{p.body}</p>
              <div className="stats">
                {p.stats.map((s, i) => (
                  <div key={i} className="stat">
                    <div className="k">{s.k}</div>
                    <div className="l">{s.v}</div>
                  </div>
                ))}
              </div>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── expertise — filter tabs + tile grid ───────────────────────────
function Expertise() {
  const [filter, setFilter] = useState("All");
  const groups = ["All", "Build", "Operate", "Lead"];
  const filtered = useMemo(
    () => (filter === "All" ? EXPERTISE : EXPERTISE.filter((e) => e.group === filter)),
    [filter]
  );
  return (
    <section className="expertise sect-pad" id="expertise">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Expertise</div>
          <h2>Deep specialty, <em>human-shipped.</em></h2>
          <p className="sub">Eight specialist practices, each led by a partner who's hired into the field they recruit for.</p>
        </div>
        <div className="ex-filter">
          {groups.map((g) => (
            <button key={g} className={`ex-tag ${filter === g ? "is-active" : ""}`} onClick={() => setFilter(g)}>
              {g}
            </button>
          ))}
        </div>
        <div className="ex-grid">
          {filtered.map((e) => (
            <a key={e.id} className="ex-card" href="#">
              <div className="row">
                <span className="group">{e.group}</span>
                <span className="live">live</span>
              </div>
              <h3>{e.title}</h3>
              <p className="blurb">{e.blurb}</p>
              <div className="foot">
                <span><b>{e.live}</b> roles · <b>{e.days}d</b> avg</span>
                <span className="arr">›</span>
              </div>
            </a>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── case study reel — Apple full-bleed media block ───────────────
function CaseReel() {
  const videoRef = useRef(null);
  useEffect(() => {
    const v = videoRef.current;
    if (!v) return;
    v.muted = true;
    v.play().catch(() => {});
  }, []);
  return (
    <section className="case sect-pad">
      <div className="container">
        <div className="case-inner">
          <div className="case-media">
            <video ref={videoRef} src="/uploads/fuel-talent-surgery.mp4" autoPlay muted loop playsInline />
            <span className="tag">Case · 11 months</span>
          </div>
          <div className="case-copy">
            <div className="eyebrow on-dark">Inside the work</div>
            <h3>From zero to 40 <em>in eleven months.</em></h3>
            <p>A profitable Series C health-tech company partnered with us on a build-out across platform, ML, and security. Forty hires shipped at 92% offer acceptance, without ever scaling beyond two embedded consultants.</p>
            <div className="case-stats">
              <div><div className="k">40</div><div className="l">hires shipped</div></div>
              <div><div className="k">11 mo</div><div className="l">end-to-end</div></div>
              <div><div className="k">92%</div><div className="l">offer accept</div></div>
            </div>
            <a className="clink on-dark" href="#">Read the full case study</a>
          </div>
        </div>
      </div>
    </section>
  );
}

// ─── testimonials — Apple single-quote stage ──────────────────────
function Testimonials() {
  const [i, setI] = useState(0);
  const next = useCallback(() => setI((x) => (x + 1) % TESTIMONIALS.length), []);
  const prev = useCallback(() => setI((x) => (x - 1 + TESTIMONIALS.length) % TESTIMONIALS.length), []);
  useEffect(() => {
    const t = setInterval(next, 7500);
    return () => clearInterval(t);
  }, [next]);
  const q = TESTIMONIALS[i];
  return (
    <section className="testimonials sect-pad">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Voices</div>
          <h2>What our partners <em>say.</em></h2>
        </div>
        <div className="tm-stage" key={i}>
          <div className="tm-mark">"</div>
          <p className="tm-quote">{q.quote}</p>
          <div className="tm-attr">
            <div className="tm-avatar">{q.initials}</div>
            <div className="tm-who">
              {q.name}
              <div className="role">{q.role}</div>
            </div>
          </div>
        </div>
        <div className="tm-ctrl">
          <button onClick={prev} aria-label="Previous">‹</button>
          <button onClick={next} aria-label="Next">›</button>
          <div className="dots">
            {TESTIMONIALS.map((_, k) => (
              <span key={k} className={`dot ${k === i ? "on" : ""}`} onClick={() => setI(k)} />
            ))}
          </div>
        </div>
      </div>
    </section>
  );
}

// ─── clients band ────────────────────────────────────────────────────
function Clients() {
  return (
    <section className="clients">
      <div className="container">
        <h4>Trusted by Seattle's most ambitious teams</h4>
        <div className="clients-grid">
          {CLIENT_WORDMARKS.map((c) => (
            <div key={c.name} className="client-cell" title={c.name}>{c.render()}</div>
          ))}
        </div>
      </div>
    </section>
  );
}

// ─── jobs preview ────────────────────────────────────────────────────
function Jobs() {
  const [q, setQ] = useState("");
  const [loc, setLoc] = useState("");
  const filtered = useMemo(() => {
    const ql = q.toLowerCase(), ll = loc.toLowerCase();
    return JOBS_PREVIEW.filter((j) =>
      (!ql || j.title.toLowerCase().includes(ql) || j.area.toLowerCase().includes(ql)) &&
      (!ll || j.loc.toLowerCase().includes(ll))
    );
  }, [q, loc]);
  return (
    <section className="jobs sect-pad" id="jobs">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Live board</div>
          <h2>Where careers <em>get fueled.</em></h2>
          <p className="sub">Every role is calibrated directly with the hiring manager — no recycled listings, no surprises.</p>
        </div>
        <form className="jobs-form" onSubmit={(e) => e.preventDefault()}>
          <label className="jobs-field">
            <span>Title or practice</span>
            <input value={q} onChange={(e) => setQ(e.target.value)} placeholder="Staff Engineer, Product Designer..." />
          </label>
          <label className="jobs-field">
            <span>Location</span>
            <input value={loc} onChange={(e) => setLoc(e.target.value)} placeholder="Seattle, Remote..." />
          </label>
          <label className="jobs-field">
            <span>Stage</span>
            <select defaultValue="any">
              <option value="any">Any stage</option>
              <option>Seed</option><option>Series A</option><option>Series B</option><option>Series C+</option>
            </select>
          </label>
          <button className="jobs-go">Search <span>›</span></button>
        </form>
        <div className="jobs-list">
          {filtered.map((j) => (
            <a key={j.id} className="job-row" href="jobs.html">
              <span className="job-id">{j.id}</span>
              <div>
                <span className="job-title">{j.title}</span>
                <div className="job-sub">{j.company} · {j.area}</div>
              </div>
              <span className="meta">{j.loc}</span>
              <span className="pill">{j.type}</span>
              <span className="arr">›</span>
            </a>
          ))}
        </div>
        <div className="jobs-foot">
          <a className="clink" href="jobs.html">Open the full board</a>
        </div>
      </div>
    </section>
  );
}

// ─── resources + podcast ────────────────────────────────────────────
function Resources() {
  const [playing, setPlaying] = useState(false);
  const [pos, setPos] = useState(0.32);
  useEffect(() => {
    if (!playing) return;
    const t = setInterval(() => setPos((p) => (p >= 0.99 ? 0 : p + 0.005)), 200);
    return () => clearInterval(t);
  }, [playing]);
  const wave = useMemo(() => Array.from({ length: 48 }).map((_, i) => 6 + Math.sin(i * 0.5) * 4 + (i % 3) * 4 + Math.random() * 5), []);
  return (
    <section className="resources sect-pad" id="resources">
      <div className="container">
        <div className="sect-head">
          <div className="eyebrow">Resources</div>
          <h2>Fuel for <em>thought.</em></h2>
          <p className="sub">Hiring playbooks, candidate guides, case studies and a podcast — written by the team that runs the searches.</p>
        </div>
        <div className="res-grid">
          <div className="res-list">
            {RESOURCES.map((r) => (
              <a key={r.title} className="res-item" href="#">
                <div>
                  <div className="meta"><span>{r.kind}</span><span>·</span><span>{r.date}</span></div>
                  <h4>{r.title}</h4>
                </div>
                <div className="read">{r.read} ›</div>
              </a>
            ))}
          </div>
          <div className="pod-card">
            <div className="lbl">Latest podcast · Ep. 047</div>
            <div className="pod-cover">
              <video src="/studio/podcast.mp4" autoPlay muted loop playsInline />
            </div>
            <div className="pod-title">"What Fuels You" — <em>Shauna Swerland,</em> host.</div>
            <div className="pod-row">
              <button className="pod-play" onClick={() => setPlaying(!playing)}>
                {playing ? "❚❚" : <span style={{ marginLeft: 2 }}>▶</span>}
              </button>
              <div className="pod-wave">
                {wave.map((h, i) => <i key={i} className={i / wave.length < pos ? "on" : ""} style={{ height: `${h}px` }} />)}
              </div>
              <div className="pod-time">{Math.floor(pos * 42)}:{String(Math.floor((pos * 42 * 60) % 60)).padStart(2, "0")} / 42:18</div>
            </div>
            <div className="pod-stats">
              <div><div className="n">75+</div><div className="l">five-star reviews</div></div>
              <div><div className="n">100k</div><div className="l">listeners</div></div>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

// ─── CTA ──────────────────────────────────────────────────────────
function CTABand() {
  return (
    <section className="cta" id="contact">
      <div className="cta-content container">
        <h2>
          We build <em>legacies,</em><br/>
          <span className="quiet">not just fill roles.</span>
        </h2>
        <p>Haven't found the right role? We'll help you find it. Hiring? We'll deliver people who change what's possible.</p>
        <div className="btns">
          <a className="btn btn-light" href="jobs.html">Find a job <span>›</span></a>
          <a className="clink on-dark" href="#contact">Let's talk</a>
        </div>
      </div>
    </section>
  );
}

// ─── footer ───────────────────────────────────────────────────────
function Footer() {
  return (
    <footer>
      <div className="container">
        <div className="foot-grid">
          <div>
            <a className="foot-brand" href="index.html">
              <span className="brand-mark"></span>
              <span>Fuel Talent</span>
            </a>
            <div className="foot-addr">
              500 108th Avenue NE, Suite 1100<br/>
              Bellevue, WA 98004<br/>
              <a href="mailto:info@fueltalent.com">info@fueltalent.com</a>
            </div>
            <div className="foot-social">
              {["LinkedIn", "Instagram", "Facebook"].map((s) => (
                <a key={s} href="#">{s}</a>
              ))}
            </div>
          </div>
          <div className="foot-col">
            <h5>Expertise</h5>
            {EXPERTISE.slice(0, 6).map((e) => <a key={e.id} href="#expertise">{e.title}</a>)}
          </div>
          <div className="foot-col">
            <h5>Services</h5>
            <a href="#services">Recruiting & Staffing</a>
            <a href="#services">Professional & Managed</a>
            <a href="digital-worker.html">Digital Workers</a>
          </div>
          <div className="foot-col">
            <h5>Find a Job</h5>
            <a href="jobs.html">Job search</a>
            <a href="jobs.html">For candidates</a>
            <a href="jobs.html">Upload resume</a>
          </div>
          <div className="foot-col">
            <h5>About</h5>
            <a href="#">About Fuel Talent</a>
            <a href="#">Meet the team</a>
            <a href="#">Insights</a>
            <a href="#">Privacy policy</a>
          </div>
        </div>
        <div className="foot-meta">
          <span>© 2026 Fuel Talent, LLC · All rights reserved</span>
          <span>Human first · AI-enabled · Seattle</span>
          <a href="#">Privacy policy</a>
        </div>
      </div>
    </footer>
  );
}

// ─── App root ────────────────────────────────────────────────────
function App() {
  return (
    <>
      <TopNav />
      <Hero />
      <ProofBar />
      <Intro />
      <ScrollReveal />
      <Services />
      <Pillars />
      <Expertise />
      <CaseReel />
      <Testimonials />
      <Clients />
      <Jobs />
      <Resources />
      <CTABand />
      <Footer />
    </>
  );
}

ReactDOM.createRoot(document.getElementById("app")).render(<App />);
