/* SRQ Analytics — v2 page sections
   Goals vs v1: (1) no numbered sequences anywhere; (2) broaden the
   systems/automation story beyond finance into operations, sales, and back
   office. The v1 "How it works" step grid and the "Approach" pillars are both
   gone from this page — the Noir/Atlas variants still render them from
   sections.jsx, which is why .steps and .pillars stay in styles.css. */

const Outcomes = () => (
  <section className="section" id="outcomes">
    <div className="wrap">
      <div className="section-head reveal">
        <span className="eyebrow">The outcome</span>
        <h2 className="h2" style={{ marginTop: 18 }}>What it all adds up to.</h2>
        <p className="lead">Every engagement is designed around three outcomes.</p>
      </div>
      <div className="outcomes reveal">
        <div className="outcome">
          <h3>Clearer decisions</h3>
          <p>Leadership grounded in a clear, current view of where the business stands and where it is headed.</p>
        </div>
        <div className="outcome">
          <h3>A stronger profit and cash position</h3>
          <p>Improved margins and healthier cash flow, with less value lost to manual effort, blind spots, and decisions made a beat too late.</p>
        </div>
        <div className="outcome">
          <h3>A more capable, valued team</h3>
          <p>Your people spend less time on busywork and more on the work that matters — equipped with the systems and insight to excel and grow.</p>
        </div>
      </div>
    </div>
  </section>
);

const Nav = () => (
  <header className="nav">
    <div className="wrap nav-inner">
      <a className="brand" href="#top"><Mark /> SRQ&nbsp;Analytics</a>
      <nav className="nav-links">
        <a href="#services">Services</a>
        <a href="#about">About</a>
        <a href="#faq">FAQ</a>
      </nav>
      <div className="nav-cta">
        <a className="btn btn-primary" href="#contact"><span className="lbl-long">Book a consultation</span><span className="lbl-short">Contact</span> <Arrow /></a>
      </div>
    </div>
  </header>
);

const Hero = () => (
  <section className="hero" id="top">
    <div className="wrap hero-grid">
      <div className="hero-copy">
        <span className="eyebrow">Fractional CFO · Systems · Analytics · Applied AI</span>
        <h1 className="display">The clarity of a CFO. The leverage of <em>technology</em>.</h1>
        <p className="lead">SRQ Analytics combines executive financial leadership with hands-on technology implementation, helping businesses identify opportunities, solve complex operational challenges and develop practical solutions that deliver measurable business value.</p>
        <div className="hero-actions">
          <a className="btn btn-primary" href="#contact">Book a consultation <Arrow /></a>
          <a className="btn btn-ghost" href="#services">Explore services</a>
        </div>
        <div className="hero-meta">
          <div className="item"><span className="k">CFO-level</span><span className="l">strategic finance</span></div>
          <div className="item"><span className="k">Systems-first</span><span className="l">operations automated</span></div>
          <div className="item"><span className="k">AI-assisted</span><span className="l">decisions, human-in-the-loop</span></div>
        </div>
      </div>
      <div className="hero-visual">
        <div className="viz">
          <div className="viz-glow" />
          <div className="viz-head">
            <span className="viz-title">Business performance · year over year</span>
            <span className="viz-dot" />
          </div>
          <div className="viz-kpi">
            <span className="viz-big">$2.4M</span>
            <span className="viz-delta">
              <svg width="9" height="9" viewBox="0 0 10 10" fill="none" aria-hidden="true"><path d="M5 1.5L8.6 7.5H1.4z" fill="currentColor" /></svg>
              34% YoY
            </span>
          </div>
          <div className="viz-chart">
            {[["Q1", 38, 52], ["Q2", 45, 61], ["Q3", 52, 74], ["Q4", 58, 88]].map(([q, prev, cur]) => (
              <div className="viz-col" key={q}>
                <div className="viz-pair">
                  <span className="vb prev" style={{ height: prev + "%" }} />
                  <span className="vb cur" style={{ height: cur + "%" }} />
                </div>
                <span className="viz-x">{q}</span>
              </div>
            ))}
          </div>
          <div className="viz-legend">
            <span><i className="sw prev" /> Last year</span>
            <span><i className="sw cur" /> This year</span>
          </div>
          <div className="viz-list">
            <div className="viz-item"><span className="lbl">Hours saved / week <span className="pill">automated</span></span><span className="val">22 hrs</span></div>
            <div className="viz-item"><span className="lbl">Manual tasks removed</span><span className="val">140+</span></div>
            <div className="viz-item"><span className="lbl">Lead response time <span className="pill">▼ faster</span></span><span className="val">4 min</span></div>
            <div className="viz-item"><span className="lbl">Gross margin</span><span className="val">61%</span></div>
            <div className="viz-item"><span className="lbl">Cash runway</span><span className="val">18.4 mo</span></div>
          </div>
          <p className="viz-note">Illustrative example — not client data.</p>
        </div>
      </div>
    </div>
  </section>
);

const SERVICES = [
  { ico: Ico.cfo, t: "Fractional CFO", d: "Experienced financial leadership covering financial strategy, forecasting, cash management, pricing and profitability — without the overhead of a full-time executive.", tags: ["Strategy", "Forecasting", "Cash management", "Pricing"] },
  { ico: Ico.gears, t: "Systems & Automation", d: "Design and implement practical business systems, integrate disparate technologies and automate labor-intensive processes to improve operational efficiency.", tags: ["Business systems", "Integrations", "Process automation"] },
  { ico: Ico.chart, t: "Business Intelligence & Analytics", d: "Connect financial and operational data to improve business visibility, understand customer economics and identify opportunities for growth and improved profitability.", tags: ["Reporting & KPIs", "Customer economics", "Profitability"] },
  { ico: Ico.ai, t: "Applied AI & Innovation", d: "Evaluate, prototype and implement AI-enabled solutions where they provide meaningful business value, with an emphasis on responsible investment and measurable results.", tags: ["Prototyping", "Implementation", "Human-in-the-loop"] },
];

const Services = () => (
  <section className="section" id="services">
    <div className="wrap">
      <div className="section-head reveal">
        <span className="eyebrow">What we do</span>
        <h2 className="h2" style={{ marginTop: 18 }}>Financial leadership — and the systems to run the whole business.</h2>
      </div>
      <div className="services reveal">
        {SERVICES.map((s) => (
          <div className="svc" key={s.t}>
            <div className="svc-ico">{s.ico}</div>
            <h3>{s.t}</h3>
            <p>{s.d}</p>
            <div className="svc-tags">{s.tags.map((t) => <span key={t}>{t}</span>)}</div>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const About = () => (
  <section className="section" id="about">
    <div className="wrap about-grid">
      <div className="about-head reveal">
        <span className="eyebrow">About</span>
        <h2 className="h2" style={{ marginTop: 16 }}>Executive experience. A builder's mindset.</h2>
      </div>
      <div className="about-card reveal">
        <div className="glow" />
        <img
          className="about-photo"
          src="portrait.webp"
          width="504"
          height="504"
          alt="Nik Bergenske, Principal of SRQ Analytics"
          decoding="async"
        />
        <div className="name">Nik Bergenske</div>
        <div className="role">Principal</div>
      </div>
      <div className="about-copy reveal">
        <p>SRQ Analytics is led by Nik Bergenske, a finance and technology executive with nearly 30 years of experience across software, financial services and entrepreneurial businesses.</p>
        <p>His professional background includes investment banking at Bank of America and CFO and COO leadership at a financial technology company subsequently acquired by Goldman Sachs. He holds a degree in economics from the University of Chicago.</p>
        <p>Nik combines financial acumen, strategic thinking and hands-on technology implementation to solve complex business challenges. His approach emphasizes practical innovation, responsible technology investment and measurable business value.</p>
        <p>SRQ Analytics works directly with business owners and management teams, providing fractional executive leadership, business systems expertise and strategic guidance without the overhead of a full-time executive team.</p>
      </div>
    </div>
  </section>
);

const Contact = () => (
  <section className="section dark" id="contact">
    <div className="wrap cta reveal">
      <span className="eyebrow on-dark" style={{ justifyContent: "center", display: "flex" }}>Let's talk</span>
      <h2 className="display" style={{ marginTop: 20 }}>Have a challenge worth <em>a conversation</em>?</h2>
      <p className="lead on-dark">Book a consultation to discuss your objectives, the challenges in front of you and where experienced financial and technology leadership could make a difference.</p>
      <div className="cta-actions">
        <a className="btn btn-primary on-dark" href="mailto:hello@srqanalytics.com">Book a consultation <Arrow /></a>
      </div>
      <div className="cta-contacts">
        <a href="mailto:hello@srqanalytics.com">{Ico.mail} hello@srqanalytics.com</a>
        <a href="#about">{Ico.pin} Sarasota, Florida</a>
      </div>
    </div>
  </section>
);

const FAQS = [
  { q: "What does SRQ Analytics do?", a: "SRQ Analytics provides fractional CFO leadership, business systems and automation, business intelligence and applied AI for small and mid-size businesses — combining executive financial leadership with hands-on technology implementation." },
  { q: "What is a fractional CFO?", a: "A fractional CFO is an experienced finance executive who works with your business part-time, providing cash flow management, forecasting, budgeting, and strategic guidance without the cost of a full-time hire." },
  { q: "What kinds of systems and automation do you build?", a: "Practical business systems, integrations between existing tools and automation of labor-intensive processes across finance, operations and sales — with AI-enabled solutions applied where they add measurable value and kept under human oversight." },
  { q: "Where is SRQ Analytics located?", a: "SRQ Analytics is based in Sarasota, Florida, and is available for remote engagements with businesses nationwide." },
  { q: "Who is SRQ Analytics for?", a: "Small and mid-size businesses — owners and management teams who want experienced financial leadership and practical technology expertise without the overhead of a full-time executive." },
];

const Faq = () => (
  <section className="section faq-section" id="faq">
    <div className="wrap">
      <div className="section-head reveal">
        <span className="eyebrow">Questions</span>
        <h2 className="h2" style={{ marginTop: 18 }}>Good to know.</h2>
      </div>
      <div className="faq-list reveal">
        {FAQS.map((f) => (
          <details className="faq-item" key={f.q}>
            <summary>
              <span>{f.q}</span>
              <span className="faq-mark" aria-hidden="true" />
            </summary>
            <p>{f.a}</p>
          </details>
        ))}
      </div>
    </div>
  </section>
);

const Footer = () => (
  <footer className="footer">
    <div className="wrap footer-inner">
      <a className="brand" href="#top"><Mark size={22} /> SRQ&nbsp;Analytics</a>
      <span className="meta">© {new Date().getFullYear()} SRQ Analytics · Sarasota, FL · <a href="mailto:hello@srqanalytics.com">hello@srqanalytics.com</a></span>
    </div>
  </footer>
);

Object.assign(window, { Nav, Hero, Services, Outcomes, About, Faq, Contact, Footer });
