/* Dulius Web — expanded marketing sections (encouraging) + learn-more content */

/* ---------- WHAT YOU GET (value / partnership forward) ---------- */
function WWho() {
  const points = [
    { icon: "layers", t: "Manage every loan in one place", d: "See all your open positions, balances, and payoff dates together. Know your true cost of capital and exactly where each deal stands." },
    { icon: "scale", t: "Stay on top of your debt", d: "Avoid becoming over-leveraged and get a clear plan to pay down responsibly — so debt works for your business, not against it." },
    { icon: "rocket", t: "Be ready when opportunity strikes", d: "Pre-qualified offers on standby mean you can move fast on inventory, equipment, or a growth moment — capital ready the day you need it." },
  ];
  return (
    <section className="wsection wwho">
      <div className="wsection-head">
        <div className="wover wover-center">More than funding</div>
        <h2 className="wsection-h2">The Alternative Lending Engine.</h2>
        <p className="wwho-sub">We build stronger borrowers.</p>
        <p className="wwho-lede">Alternative lending keeps most businesses in the dark — unclear terms, no real sense of where they stand. Dulius keeps you in the know. We're the engine behind your borrowing power: showing you exactly where your score stands, how to position your business, the moves that strengthen your profile, and how to secure better funding at every stage. The stronger you get, the better you borrow — and we're with you for all of it.</p>
      </div>
      <div className="wwho-grid">
        {points.map((p, i) => (
          <div key={i} className="wwho-card">
            <div className="wwho-ic"><WIcon name={p.icon} size={24} /></div>
            <h3 className="wwho-t">{p.t}</h3>
            <p className="wwho-d">{p.d}</p>
          </div>
        ))}
      </div>
    </section>
  );
}

/* ---------- IMPACT STAT BAND ---------- */
function WImpact() {
  const stats = [
    ["20,000+", "businesses serviced"],
    ["$48M+", "in funding matched"],
    ["+63 pts", "avg. score growth in 90 days"],
    ["100+", "funders matched"],
  ];
  return (
    <section className="wimpact">
      <div className="wimpact-in">
        {stats.map(([v, l], i) => (
          <div key={i} className="wimpact-stat">
            <div className="wimpact-v">{v}</div>
            <div className="wimpact-l">{l}</div>
          </div>
        ))}
      </div>
    </section>
  );
}

/* ---------- TESTIMONIALS ---------- */
const TESTIMONIALS = [
  { quote: "I'd been declined four times. Dulius showed me exactly what to fix, and 60 days later I funded $40k to finally buy my own equipment.", name: "Marcus T.", biz: "Thompson's Kitchen · Miami, FL", delta: "512 → 604" },
  { quote: "I didn't even know I had three stacked advances eating my deposits. They mapped it out and got me one clean renewal. Game changer.", name: "Sofia V.", biz: "Vega Logistics · Atlanta, GA", delta: "631 → 712" },
  { quote: "No chasing ten lenders or repeating my paperwork. I see real offers, I pick one, done. And my score actually goes up every month.", name: "Priya N.", biz: "Brightwell Dental · Austin, TX", delta: "690 → 748" },
];
function WTestimonials() {
  return (
    <section className="wsection wtest">
      <div className="wsection-head">
        <div className="wover wover-center">Real owners, real momentum</div>
        <h2 className="wsection-h2">Funding that moves you forward</h2>
      </div>
      <div className="wtest-grid">
        {TESTIMONIALS.map((t, i) => (
          <div key={i} className="wtest-card">
            <div className="wtest-stars">{"★★★★★"}</div>
            <p className="wtest-q">“{t.quote}”</p>
            <div className="wtest-foot">
              <div className="wtest-id"><div className="wtest-name">{t.name}</div><div className="wtest-biz">{t.biz}</div></div>
              <div className="wtest-delta">{t.delta}</div>
            </div>
          </div>
        ))}
      </div>
    </section>
  );
}

/* ---------- FAQ ---------- */
const FAQS = [
  ["Will checking my score hurt my credit?", "Never. There's no credit pull to get your Dulius Score — it's built from your business cash flow and a credit range you tell us. We only verify credit later, with your consent, during underwriting."],
  ["What if I have bad credit or past defaults?", "You can still qualify. Dulius is built for businesses banks turned away. We score your current cash flow and trajectory — not just your past — and give you a clear path to grow."],
  ["How fast can I get funded?", "Most applications are reviewed within 24 hours. Once you accept an offer and sign, funding typically lands in 1–2 business days."],
  ["What does Dulius cost?", "The Dulius platform is free to use — checking your score and getting matched never costs a thing. For members who want more, we offer two subscriptions, Premium ($19/mo) and Pro ($49/mo), with deeper insights and tools. If you accept a funding offer, every term and cost is laid out clearly in your offer before you sign — no surprise add-on fees, no hidden charges."],
  ["How do I raise my Dulius Score?", "Your Score Path shows the exact moves — keep payments on time, reduce utilization, keep accounts synced, and avoid NSFs. Most members see meaningful gains within 60–90 days."],
];
function WFAQ() {
  const [open, setOpen] = React.useState(0);
  return (
    <section className="wsection wfaq" id="faq">
      <div className="wsection-head">
        <div className="wover wover-center">Questions, answered</div>
        <h2 className="wsection-h2">Everything you're wondering</h2>
      </div>
      <div className="wfaq-list">
        {FAQS.map(([q, a], i) => (
          <div key={i} className={`wfaq-item ${open === i ? "open" : ""}`}>
            <button className="wfaq-q" onClick={() => setOpen(open === i ? -1 : i)}>
              <span>{q}</span><WIcon name={open === i ? "minus" : "plus"} size={18} />
            </button>
            {open === i && <p className="wfaq-a">{a}</p>}
          </div>
        ))}
      </div>
    </section>
  );
}

Object.assign(window, { WWho, WImpact, WTestimonials, WFAQ });
