// Page sections: nav, hero, how-it-works, features, social, CTA, footer.

const { Ticker, PriceChart, RegionalMap } = window;

function Logo() {
  return (
    <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
      <svg width="22" height="22" viewBox="0 0 24 24" fill="none">
        <rect x="2"  y="14" width="3" height="8" rx="0.5" fill="#c2730b" />
        <rect x="6"  y="10" width="3" height="12" rx="0.5" fill="#c2730b" />
        <rect x="10" y="6"  width="3" height="16" rx="0.5" fill="#c2730b" />
        <rect x="14" y="11" width="3" height="11" rx="0.5" fill="#1d1709" />
        <rect x="18" y="3"  width="3" height="19" rx="0.5" fill="#1d1709" />
      </svg>
      <span style={{ fontSize: 17, fontWeight: 700, letterSpacing: '-0.01em' }}>hayscout<span style={{ color: 'var(--amber)' }}>.ai</span></span>
    </div>
  );
}

function Nav({ onJoin }) {
  return (
    <>
      <style>{`
        .nav { position: sticky; top: 0; z-index: 10;
          backdrop-filter: blur(18px) saturate(140%);
          -webkit-backdrop-filter: blur(18px) saturate(140%);
          background: rgba(245, 241, 230, 0.78);
          border-bottom: 1px solid var(--line);
        }
        .nav-inner { max-width: var(--container); margin: 0 auto;
          padding: 14px var(--pad-x);
          display: flex; align-items: center; justify-content: space-between; gap: 24px; }
        .nav-links { display: flex; gap: 28px; }
        .nav-links a { font-size: 14px; color: var(--ink-2); font-weight: 500; }
        .nav-links a:hover { color: var(--amber); }
        .nav-cta { display: flex; gap: 10px; align-items: center; }
        .nav-cta .login { font-size: 13.5px; color: var(--ink-2); font-weight: 500; padding: 6px 10px; }
        .btn-primary { background: var(--ink); color: var(--paper); border: 0;
          padding: 9px 16px; border-radius: 7px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; }
        .btn-primary:hover { background: var(--amber); }
        @media (max-width: 760px) { .nav-links { display: none; } }
      `}</style>
      <nav className="nav">
        <div className="nav-inner">
          <Logo />
          <div className="nav-links">
            <a href="#market">Market</a>
            <a href="#sellers">For sellers</a>
            <a href="#buyers">For buyers</a>
            <a href="#data">Data</a>
            <a href="#pricing">Pricing</a>
          </div>
          <div className="nav-cta">
            <a href="#" className="login">Log in</a>
            <button className="btn-primary" onClick={onJoin}>Join waitlist</button>
          </div>
        </div>
      </nav>
    </>
  );
}

function Hero({ onJoin, copyTone, density }) {
  const heads = {
    technical: <>The <span className="serif">spot market</span> for hay,<br/>finally legible.</>,
    balanced:  <>Real-time hay prices,<br/>before you <span className="serif">cut the deal</span>.</>,
    approachable: <>Never sell low.<br/>Never <span className="serif">buy high</span>.</>,
  };
  const subs = {
    technical: 'Aggregated USDA AMS reports, 1,240+ verified loads/wk, and forward demand signals — for sellers, growers, and buyers who price on data.',
    balanced:  'Live pricing, demand maps, and forecasts so growers and buyers in every region make their next move with confidence.',
    approachable: 'See what hay is really worth in your region, who is buying, and where prices are heading — all on one screen.',
  };
  return (
    <>
      <style>{`
        .hero { max-width: var(--container); margin: 0 auto;
          padding: clamp(36px, 7vw, 88px) var(--pad-x) clamp(24px, 4vw, 48px); }
        .hero-eyebrow {
          display: inline-flex; align-items: center; gap: 8px;
          font-family: 'JetBrains Mono', monospace; font-size: 11px;
          color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase;
          padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px;
          background: rgba(255,255,255,0.4);
        }
        .hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-2); }
        .hero h1 {
          font-size: clamp(40px, 6.5vw, 88px);
          line-height: 0.96;
          letter-spacing: -0.035em;
          font-weight: 600;
          margin: 18px 0 0;
          text-wrap: balance;
        }
        .hero h1 .serif { color: var(--amber); }
        .hero p.lede { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2);
          max-width: 580px; margin-top: 22px; line-height: 1.5; text-wrap: pretty; }
        .hero-actions { display: flex; gap: 12px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
        .btn-cta {
          background: var(--ink); color: var(--paper); border: 0;
          padding: 14px 22px; border-radius: 8px;
          font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em;
          display: inline-flex; align-items: center; gap: 8px;
        }
        .btn-cta:hover { background: var(--amber); }
        .btn-cta .arrow { transition: transform 0.2s; }
        .btn-cta:hover .arrow { transform: translateX(3px); }
        .btn-ghost {
          background: transparent; color: var(--ink); border: 1px solid var(--line-2);
          padding: 13px 20px; border-radius: 8px;
          font-size: 14.5px; font-weight: 500;
        }
        .btn-ghost:hover { background: rgba(255,255,255,0.5); border-color: var(--ink); }
        .hero-trust {
          margin-top: 18px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
          color: var(--ink-3); letter-spacing: 0.04em;
        }
        .hero-grid {
          margin-top: clamp(32px, 5vw, 56px);
          display: grid;
          grid-template-columns: 1.05fr 0.95fr;
          gap: 18px;
        }
        @media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

        .hero-stats {
          display: grid; grid-template-columns: repeat(4, 1fr);
          gap: 0;
          margin-top: clamp(20px, 3vw, 36px);
          border-top: 1px solid var(--line);
          border-bottom: 1px solid var(--line);
        }
        .stat { padding: 18px 0; border-right: 1px solid var(--line); }
        .stat:last-child { border-right: 0; }
        .stat-num { font-family: 'JetBrains Mono', monospace; font-size: clamp(22px, 2.5vw, 30px);
          font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
          letter-spacing: -0.01em; }
        .stat-lbl { font-size: 12px; color: var(--ink-3); margin-top: 4px;
          font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em; text-transform: uppercase; }
        @media (max-width: 700px) { .hero-stats { grid-template-columns: repeat(2, 1fr); }
          .stat:nth-child(2) { border-right: 0; }
          .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
        }
      `}</style>
      <section className="hero">
        <span className="hero-eyebrow"><span className="dot" /> v1 · launching summer '26</span>
        <h1>{heads[copyTone] || heads.balanced}</h1>
        <p className="lede">{subs[copyTone] || subs.balanced}</p>
        <div className="hero-actions">
          <button className="btn-cta" onClick={onJoin}>
            Join the waitlist <span className="arrow">→</span>
          </button>
          <button className="btn-ghost">See live market →</button>
        </div>
        <div className="hero-trust">FREE FOR SELLERS · NO CREDIT CARD · 8,400+ ON THE LIST</div>

        <div className="hero-grid">
          <PriceChart />
          <RegionalMap />
        </div>

        <div className="hero-stats">
          <div className="stat">
            <div className="stat-num">14,802</div>
            <div className="stat-lbl">Verified loads / 90d</div>
          </div>
          <div className="stat">
            <div className="stat-num">$1.4B</div>
            <div className="stat-lbl">Volume tracked</div>
          </div>
          <div className="stat">
            <div className="stat-num">24</div>
            <div className="stat-lbl">States covered</div>
          </div>
          <div className="stat">
            <div className="stat-num">3.2hr</div>
            <div className="stat-lbl">Avg buyer match</div>
          </div>
        </div>
      </section>
    </>
  );
}

// ── Sellers / Buyers split ──────────────────────────────────────────────────
function SellerBuyer() {
  const [tab, setTab] = React.useState('sellers');
  const sellers = [
    { n: '01', t: 'Submit your stock once', d: 'Tonnage, cutting, RFV, location, photos. Auto-imports from your scale tickets if you have them.' },
    { n: '02', t: 'See your true regional price', d: 'Live spot ranges by grade and radius. We surface where your hay would sell highest, not the average.' },
    { n: '03', t: 'Get matched to verified buyers', d: 'Buyers ping you with firm offers. You accept, decline, or counter — no broker, no listing fees.' },
  ];
  const buyers = [
    { n: '01', t: 'Never overpay — landed-cost transparency', d: 'Every offer benchmarked against the live regional spot. Freight, grade, and lab quality are baked in, so you know the true delivered price before you sign.' },
    { n: '02', t: 'Quality verified before the truck shows up', d: 'Loads ship with lab tests from Equi-Analytical, Dairyland, and Cumberland Valley. RFV, NDF, and crude protein meet your nutritionist's spec — or you reject it.' },
    { n: '03', t: 'Lock supply before the spike', d: 'Forward contracts priced off real-time curves with NOAA drought + crop-progress signals. Hedge 30/60/90 days out so fuel and weather shocks don't blow up your feed budget.' },
  ];
  const items = tab === 'sellers' ? sellers : buyers;

  return (
    <>
      <style>{`
        .sb { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
        .sb-inner { max-width: var(--container); margin: 0 auto;
          padding: clamp(48px, 7vw, 96px) var(--pad-x); }
        .sb-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; }
        .sb-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px;
          letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
        .sb-title { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em;
          font-weight: 600; margin: 8px 0 0; max-width: 16ch; text-wrap: balance; }
        .sb-tabs { display: inline-flex; padding: 4px;
          background: var(--paper-3); border-radius: 999px; border: 1px solid var(--line); }
        .sb-tabs button { background: transparent; border: 0; padding: 8px 18px;
          border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-3);
          font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
        .sb-tabs button.on { background: var(--ink); color: var(--paper); }
        .sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
        @media (max-width: 800px) { .sb-grid { grid-template-columns: 1fr; } }
        .sb-card { background: #fbf8ee; border: 1px solid var(--line); border-radius: var(--r-lg);
          padding: 28px 26px; position: relative; min-height: 220px; }
        .sb-num { font-family: 'JetBrains Mono', monospace; font-size: 11px;
          color: var(--amber); letter-spacing: 0.1em; }
        .sb-card h3 { font-size: 22px; font-weight: 600; margin: 12px 0 10px; letter-spacing: -0.015em;
          line-height: 1.15; }
        .sb-card p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; margin: 0; }
        .sb-card::after {
          content: ""; position: absolute; right: 22px; bottom: 22px;
          width: 26px; height: 26px;
          background: linear-gradient(135deg, var(--amber-soft), var(--amber));
          border-radius: 6px;
          opacity: 0.65;
        }
      `}</style>
      <section className="sb" id="sellers">
        <div className="sb-inner">
          <div className="sb-hd">
            <div>
              <div className="sb-eyebrow">How it works</div>
              <h2 className="sb-title">One platform. Both sides of the deal.</h2>
            </div>
            <div className="sb-tabs">
              <button className={tab === 'sellers' ? 'on' : ''} onClick={() => setTab('sellers')}>For sellers</button>
              <button className={tab === 'buyers' ? 'on' : ''} onClick={() => setTab('buyers')}>For buyers</button>
            </div>
          </div>
          <div className="sb-grid">
            {items.map((it) => (
              <div className="sb-card" key={it.n}>
                <div className="sb-num">/{it.n}</div>
                <h3>{it.t}</h3>
                <p>{it.d}</p>
              </div>
            ))}
          </div>
        </div>
      </section>
    </>
  );
}

// ── Features grid ──────────────────────────────────────────────────────────
function Features() {
  const f = [
    { k: 'A', t: 'Live spot prices', d: 'Per grade, cutting, and region. Updated continuously from USDA AMS and the hayscout network.' },
    { k: 'B', t: '7-day forecasts', d: 'Forward curves built from drought, fuel, futures, and verified contract flow. Hedge with confidence.' },
    { k: 'C', t: 'Buyer–seller match', d: 'Auto-pair on grade, lane, and timing. Direct firm offers — no listing fees, no brokers.' },
    { k: 'D', t: 'Quality lab integration', d: 'Pull RFV, RFQ, NDF, and crude protein straight from Equi-Analytical, Dairyland, Cumberland Valley.' },
    { k: 'E', t: 'Freight-adjusted pricing', d: 'Real DAT/DOT lane rates baked in. See landed cost, not just FOB.' },
    { k: 'F', t: 'Drought + weather signals', d: 'NOAA + USDA Crop Progress overlays so you anticipate the next supply shock.' },
  ];
  return (
    <>
      <style>{`
        .feat { max-width: var(--container); margin: 0 auto; padding: clamp(64px, 8vw, 110px) var(--pad-x); }
        .feat-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px;
          color: var(--amber); letter-spacing: 0.12em; text-transform: uppercase; }
        .feat-title { font-size: clamp(30px, 4vw, 50px); line-height: 1.04; letter-spacing: -0.025em;
          font-weight: 600; margin: 10px 0 56px; max-width: 18ch; text-wrap: balance; }
        .feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
          border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
        .feat-cell { padding: 32px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
          background: rgba(255,255,255,0.3); }
        .feat-cell:hover { background: rgba(255,255,255,0.6); }
        .feat-key { font-family: 'JetBrains Mono', monospace; font-size: 11px;
          color: var(--ink-4); letter-spacing: 0.1em; }
        .feat-cell h3 { font-size: 19px; font-weight: 600; margin: 14px 0 10px; letter-spacing: -0.015em; }
        .feat-cell p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }
        @media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }
      `}</style>
      <section className="feat" id="data">
        <div className="feat-eyebrow">/ what you get</div>
        <h2 className="feat-title">The whole hay market on one terminal.</h2>
        <div className="feat-grid">
          {f.map((it) => (
            <div className="feat-cell" key={it.k}>
              <div className="feat-key">{it.k} —</div>
              <h3>{it.t}</h3>
              <p>{it.d}</p>
            </div>
          ))}
        </div>
      </section>
    </>
  );
}

// ── Social proof ───────────────────────────────────────────────────────────
function Proof() {
  return (
    <>
      <style>{`
        .proof { background: var(--ink); color: var(--paper);
          padding: clamp(56px, 7vw, 96px) var(--pad-x); }
        .proof-inner { max-width: var(--container); margin: 0 auto;
          display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center; }
        @media (max-width: 900px) { .proof-inner { grid-template-columns: 1fr; } }
        .proof-quote { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400;
          font-size: clamp(24px, 3vw, 38px); line-height: 1.2; letter-spacing: -0.01em;
          color: var(--paper); text-wrap: pretty; }
        .proof-quote .mark { color: var(--amber-2); }
        .proof-attrib { display: flex; align-items: center; gap: 14px; margin-top: 28px;
          font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em; color: rgba(245,241,230,.7); }
        .proof-attrib .av { width: 38px; height: 38px; border-radius: 50%;
          background: linear-gradient(135deg, var(--amber-soft), var(--amber));
          color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
        .proof-stats { display: flex; flex-direction: column; gap: 8px;
          padding: 28px; border: 1px solid rgba(245,241,230,.15); border-radius: var(--r-lg);
          background: rgba(245,241,230,0.03); }
        .proof-stat-row { display: flex; justify-content: space-between; align-items: baseline;
          padding: 12px 0; border-bottom: 1px dashed rgba(245,241,230,.12); }
        .proof-stat-row:last-child { border-bottom: 0; }
        .proof-stat-lbl { font-family: 'JetBrains Mono', monospace; font-size: 11px;
          color: rgba(245,241,230,.6); letter-spacing: 0.06em; text-transform: uppercase; }
        .proof-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 600;
          color: var(--paper); font-variant-numeric: tabular-nums; }
        .proof-stat-val .delta { color: #aedc6f; font-size: 13px; margin-left: 6px; }
      `}</style>
      <section className="proof">
        <div className="proof-inner">
          <div>
            <div className="proof-quote">
              <span className="mark">"</span>I used to call four buyers and three brokers to figure out a fair price. Now it's on one screen the moment I finish baling. Hayscout paid for itself in one load.<span className="mark">"</span>
            </div>
            <div className="proof-attrib">
              <span className="av">RM</span>
              <div>
                <div style={{ color: 'var(--paper)', fontWeight: 600 }}>Beta grower · 1,200 acres</div>
                <div>Imperial Valley, CA</div>
              </div>
            </div>
          </div>
          <div className="proof-stats">
            <div className="proof-stat-row">
              <span className="proof-stat-lbl">Avg seller uplift</span>
              <span className="proof-stat-val">+$24<span className="delta">/ ton</span></span>
            </div>
            <div className="proof-stat-row">
              <span className="proof-stat-lbl">Time to firm offer</span>
              <span className="proof-stat-val">3.2<span className="delta">hr</span></span>
            </div>
            <div className="proof-stat-row">
              <span className="proof-stat-lbl">Beta growers active</span>
              <span className="proof-stat-val">15</span>
            </div>
            <div className="proof-stat-row">
              <span className="proof-stat-lbl">Buyer side waitlist</span>
              <span className="proof-stat-val">200</span>
            </div>
          </div>
        </div>
      </section>
    </>
  );
}

// ── Waitlist CTA ───────────────────────────────────────────────────────────
function CTA({ joined, onJoin, email, setEmail, role, setRole, submitting, error }) {
  return (
    <>
      <style>{`
        .cta { padding: clamp(72px, 9vw, 120px) var(--pad-x);
          position: relative; overflow: hidden; }
        .cta::before {
          content: ""; position: absolute; inset: 0;
          background:
            radial-gradient(1000px 400px at 80% 100%, rgba(232,144,32,0.18), transparent 60%),
            radial-gradient(800px 400px at 0% 0%, rgba(194,115,11,0.10), transparent 60%);
          pointer-events: none;
        }
        .cta-inner { max-width: 760px; margin: 0 auto; text-align: center; position: relative; }
        .cta h2 { font-size: clamp(38px, 5.5vw, 72px); line-height: 1.0; letter-spacing: -0.035em;
          font-weight: 600; margin: 0; text-wrap: balance; }
        .cta h2 .serif { color: var(--amber); }
        .cta p { font-size: clamp(15px, 1.3vw, 18px); color: var(--ink-2);
          margin: 22px auto 36px; max-width: 540px; line-height: 1.5; }
        .cta-form { display: flex; gap: 8px;
          background: #fbf8ee; border: 1px solid var(--line-2); border-radius: 12px;
          padding: 6px; max-width: 520px; margin: 0 auto;
          box-shadow: 0 6px 24px rgba(45,33,16,0.08); }
        .cta-form input { flex: 1; min-width: 0; height: 48px;
          border: 0; background: transparent; padding: 0 14px;
          font-size: 15px; font-family: inherit; outline: none; color: var(--ink); }
        .cta-form input::placeholder { color: var(--ink-4); }
        .cta-form button { background: var(--ink); color: var(--paper); border: 0;
          padding: 0 22px; height: 48px; border-radius: 8px;
          font-size: 14.5px; font-weight: 600; }
        .cta-form button:hover { background: var(--amber); }
        .cta-roles { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
        .cta-roles button { background: transparent; border: 1px solid var(--line-2);
          padding: 7px 14px; border-radius: 999px; font-family: 'JetBrains Mono', monospace;
          font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
          font-weight: 600; }
        .cta-roles button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
        .cta-success { background: #fbf8ee; border: 1px solid var(--line-2); border-radius: 12px;
          padding: 22px 26px; max-width: 520px; margin: 0 auto;
          font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.02em; color: var(--ink-2);
          display: flex; align-items: center; gap: 14px; text-align: left; }
        .cta-success .check { width: 30px; height: 30px; border-radius: 50%;
          background: var(--green); color: var(--paper); display: grid; place-items: center;
          font-weight: 700; flex-shrink: 0; }
        .cta-form button[disabled] { opacity: 0.6; cursor: wait; }
        .cta-error { max-width: 520px; margin: 12px auto 0; font-family: 'JetBrains Mono', monospace;
          font-size: 11.5px; color: var(--red); letter-spacing: 0.04em; }
      `}</style>
      <section className="cta" id="join">
        <div className="cta-inner">
          <h2>Trade hay on <span className="serif">data</span>,<br/>not gut feel.</h2>
          <p>Join growers and buyers on the v1 waitlist. Free for sellers at launch — and free forever for the first 1,000 farms that join.</p>
          {joined ? (
            <div className="cta-success">
              <div className="check">✓</div>
              <div>
                <div style={{ color: 'var(--ink)', fontWeight: 600, marginBottom: 2 }}>You're on the list.</div>
                We'll email you when v1 opens. Tell a neighbor.
              </div>
            </div>
          ) : (
            <>
              <form className="cta-form" onSubmit={(e) => { e.preventDefault(); onJoin(); }}>
                <input
                  type="email"
                  placeholder="you@yourfarm.com"
                  value={email}
                  onChange={(e) => setEmail(e.target.value)}
                  required
                />
                <button type="submit" disabled={submitting}>{submitting ? 'Joining…' : 'Join waitlist →'}</button>
              </form>
              {error && <div className="cta-error">{error}</div>}
              <div className="cta-roles">
                {['Grower', 'Buyer', 'Broker', 'Other'].map((r) => (
                  <button key={r} type="button" className={role === r ? 'on' : ''} onClick={() => setRole(r)}>
                    {r}
                  </button>
                ))}
              </div>
            </>
          )}
        </div>
      </section>
    </>
  );
}

// ── Footer ─────────────────────────────────────────────────────────────────
function Footer() {
  return (
    <>
      <style>{`
        .ftr { border-top: 1px solid var(--line); padding: 48px var(--pad-x) 36px;
          background: var(--paper-2); }
        .ftr-inner { max-width: var(--container); margin: 0 auto;
          display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
        @media (max-width: 760px) { .ftr-inner { grid-template-columns: 1fr 1fr; } }
        .ftr-blurb { font-size: 13.5px; color: var(--ink-3); margin-top: 14px; max-width: 280px; line-height: 1.55; }
        .ftr-col h4 { font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
          letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
          margin: 0 0 14px; font-weight: 600; }
        .ftr-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; }
        .ftr-col a:hover { color: var(--amber); }
        .ftr-bottom { max-width: var(--container); margin: 36px auto 0;
          padding-top: 22px; border-top: 1px solid var(--line);
          display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
          font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
      `}</style>
      <footer className="ftr">
        <div className="ftr-inner">
          <div className="ftr-col">
            <Logo />
            <div className="ftr-blurb">Real-time hay market intelligence. Built in CA.</div>
          </div>
          <div className="ftr-col">
            <h4>Product</h4>
            <a href="#">Live market</a>
            <a href="#">Forecasts</a>
            <a href="#">Marketplace</a>
            <a href="#">Mobile app</a>
          </div>
          <div className="ftr-col">
            <h4>Company</h4>
            <a href="#">About</a>
            <a href="#">Methodology</a>
            <a href="#">Press</a>
            <a href="#">Careers</a>
          </div>
          <div className="ftr-col">
            <h4>Resources</h4>
            <a href="#">Market reports</a>
            <a href="#">Grade guide</a>
            <a href="#">API docs</a>
            <a href="mailto:hello@hayscout.ai">Contact</a>
          </div>
        </div>
        <div className="ftr-bottom">
          <span>© 2026 HAYSCOUT INTELLIGENCE, INC.</span>
          <span>
            <a href="privacy.html" style={{ color: 'inherit' }}>PRIVACY</a> ·{' '}
            <a href="terms.html" style={{ color: 'inherit' }}>TERMS</a> ·{' '}
            BUILT IN CA · MADE FOR THE FARM
          </span>
        </div>
      </footer>
    </>
  );
}

window.Sections = { Nav, Ticker, Hero, SellerBuyer, Features, Proof, CTA, Footer };
