/* global React, ReactDOM, RangeMap */
const { useState } = React;

/* ---------- Inline SVG icons ---------- */
const Icon = {
  Target: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1.5" fill="currentColor"/></svg>),
  Pin: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M12 21s-7-7.5-7-12a7 7 0 0 1 14 0c0 4.5-7 12-7 12Z"/><circle cx="12" cy="9" r="2.5"/></svg>),
  Phone: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><rect x="6" y="2" width="12" height="20" rx="3"/><line x1="11" y1="18" x2="13" y2="18"/></svg>),
  TV: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><rect x="3" y="4" width="18" height="13" rx="2"/><line x1="8" y1="20" x2="16" y2="20"/></svg>),
  Globe: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg>),
  Paint: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><circle cx="12" cy="12" r="9"/><circle cx="7.5" cy="10" r="1" fill="currentColor"/><circle cx="12" cy="7" r="1" fill="currentColor"/><circle cx="16.5" cy="10" r="1" fill="currentColor"/><path d="M12 21a3 3 0 0 1 0-6 1.5 1.5 0 0 0 0-3"/></svg>),
  Bolt: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M13 2 4 14h7l-1 8 9-12h-7z"/></svg>),
  Chart: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M3 21h18M6 17v-5M11 17V8M16 17v-3M21 17V5"/></svg>),
  Wifi: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M2 9a16 16 0 0 1 20 0M5 13a11 11 0 0 1 14 0M8.5 16.5a6 6 0 0 1 7 0"/><circle cx="12" cy="20" r="0.8" fill="currentColor"/></svg>),
  Check: (p) => (<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" {...p}><polyline points="4 12 10 18 20 6"/></svg>),
  Arrow: (p) => (<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M5 12h14M13 5l7 7-7 7"/></svg>),
  Mail: (p) => (<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 6 9-6"/></svg>),
  Call: (p) => (<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M5 4h4l2 5-3 2a12 12 0 0 0 6 6l2-3 5 2v4a2 2 0 0 1-2 2A18 18 0 0 1 3 6a2 2 0 0 1 2-2z"/></svg>),
  Map: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M9 3 3 6v15l6-3 6 3 6-3V3l-6 3z"/><path d="M9 3v15M15 6v15"/></svg>),
  Upload: (p) => (<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" {...p}><path d="M12 16V4M7 9l5-5 5 5M5 20h14"/></svg>),
};

/* ---------- Brand ---------- */
function Brand({ size = "nav" }) {
  return (
    <a href="#top" className={`brand brand--${size}`} aria-label="RangeMap home">
      <img src="assets/rangemap-logo-cropped.png" alt="RangeMap" />
    </a>
  );
}

/* ---------- Nav ---------- */
function Nav() {
  return (
    <nav className="nav">
      <div className="nav__inner">
        <Brand />
        <div className="nav__links">
          <a href="#features">Features</a>
          <a href="#how">How it works</a>
          <a href="#pricing">Pricing</a>
          <a href="markerstyles/">Marker styles</a>
          <a href="#contact">Contact</a>
        </div>
        <div className="nav__cta">
          <a className="btn btn--ghost" href="login/">Sign in</a>
          <a className="btn btn--primary" href="thelinks/" target="_blank" rel="noopener">Book a demo <Icon.Arrow /></a>
        </div>
      </div>
    </nav>
  );
}

/* ---------- Hero ---------- */
function Hero() {
  const [device, setDevice] = useState("desktop");
  return (
    <section className="hero wrap" id="top" data-screen-label="01 Hero">
      <div className="hero__grid">
        <div>
          <div className="eyebrow">Range software for golf courses</div>
          <h1 style={{ marginTop: 18 }}>
            Map your range.<br/>
            <span className="accent">Give every golfer<br/>exact yardages.</span>
          </h1>
          <p className="hero__sub">
            RangeMap turns your driving range into an interactive distance guide.
            Set pin locations once — golfers see live yardages on their phone,
            your kiosks, or any TV around the bay.
          </p>
          <div className="hero__cta">
            <a className="btn btn--primary btn--lg" href="thelinks/" target="_blank" rel="noopener">Book a demo <Icon.Arrow /></a>
            <a className="btn btn--ghost btn--lg" href="#how">See how it works</a>
          </div>
          <div className="hero__chips">
            <div className="hero__chip">
              <span style={{color: "var(--green)"}}><Icon.Target /></span>
              <div><b>±1 yard accuracy</b><span>GPS + drone imagery</span></div>
            </div>
            <div className="hero__chip">
              <span style={{color: "var(--green)"}}><Icon.Phone /></span>
              <div><b>No app to install</b><span>Just a URL, any device</span></div>
            </div>
            <div className="hero__chip">
              <span style={{color: "var(--green)"}}><Icon.Bolt /></span>
              <div><b>15-min setup</b><span>Drop pins, you're live</span></div>
            </div>
          </div>
        </div>

        <div>
          <div style={{display: "flex", justifyContent: "center"}}>
            <div className="device-toggle" role="tablist" aria-label="Preview device">
              <button
                type="button"
                role="tab"
                aria-selected={device === "desktop"}
                className={`device-toggle__btn ${device === "desktop" ? "is-active" : ""}`}
                onClick={() => setDevice("desktop")}
              >
                <Icon.TV /> Desktop &amp; TV
              </button>
              <button
                type="button"
                role="tab"
                aria-selected={device === "mobile"}
                className={`device-toggle__btn ${device === "mobile" ? "is-active" : ""}`}
                onClick={() => setDevice("mobile")}
              >
                <Icon.Phone /> Mobile
              </button>
            </div>
          </div>
          <div className={`hero__stage ${device === "mobile" ? "hero__stage--mobile" : ""}`}>
            <RangeMap device={device} />
          </div>
        </div>
      </div>
    </section>
  );
}

/* ---------- How It Works ---------- */
function HowItWorks() {
  const steps = [
    {
      num: 1,
      title: "Upload your range",
      copy: "Send aerial imagery, a drone snapshot, or share Google Maps coords. We trace the range outline for you.",
      visual: (
        <svg viewBox="0 0 280 130" width="100%" height="100%" preserveAspectRatio="xMidYMid slice">
          <defs>
            <linearGradient id="s1g" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0%" stopColor="#cfe2cb" /><stop offset="100%" stopColor="#a8c6a4" />
            </linearGradient>
          </defs>
          <rect width="280" height="130" fill="url(#s1g)" />
          <path d="M70 110 L210 110 L240 30 L40 30 Z" fill="#5a8a4d" stroke="#3e6336" strokeWidth="1.5" />
          <path d="M70 110 L210 110 L240 30 L40 30 Z" fill="none" stroke="rgba(255,255,255,0.2)" strokeWidth="1" strokeDasharray="3 4" />
          <rect x="120" y="50" width="40" height="30" rx="4" fill="rgba(255,255,255,0.7)" stroke="#2eb04a" strokeWidth="1.5" strokeDasharray="4 3" />
          <text x="140" y="68" textAnchor="middle" fontSize="9" fontFamily="JetBrains Mono, monospace" fill="#0f1e15" fontWeight="700">DROP HERE</text>
        </svg>
      ),
    },
    {
      num: 2,
      title: "Drop your targets",
      copy: "Click anywhere on your range to add a target. Name it, color it, set the elevation. Yardages auto-calculate.",
      visual: (
        <svg viewBox="0 0 280 130" width="100%" height="100%" preserveAspectRatio="xMidYMid slice">
          <rect width="280" height="130" fill="#cfe2cb" />
          <path d="M70 110 L210 110 L240 30 L40 30 Z" fill="#5a8a4d" stroke="#3e6336" strokeWidth="1.5" />
          {[
            {x: 100, y: 80, c: "#f5d34a"},
            {x: 160, y: 60, c: "#5ab4e9"},
            {x: 200, y: 45, c: "#e96a5a"},
          ].map((p,i) => (
            <g key={i}>
              <line x1={p.x} y1={p.y} x2={p.x} y2={p.y-14} stroke="#fff" strokeWidth="1.5" />
              <path d={`M ${p.x} ${p.y-14} L ${p.x+10} ${p.y-11} L ${p.x} ${p.y-8} Z`} fill={p.c} />
              <circle cx={p.x} cy={p.y} r="4" fill={p.c} stroke="#fff" strokeWidth="1" />
            </g>
          ))}
          {/* cursor */}
          <g transform="translate(140,75)">
            <path d="M0 0 L12 4 L6 6 L9 13 L7 14 L4 7 L0 11 Z" fill="#fff" stroke="#0f1e15" strokeWidth="1" />
          </g>
        </svg>
      ),
    },
    {
      num: 3,
      title: "Share the URL",
      copy: "Every range gets a shareable link. Print it on tee cards, show a QR code at the bay, or run it on the lobby TV.",
      visual: (
        <svg viewBox="0 0 280 130" width="100%" height="100%" preserveAspectRatio="xMidYMid slice">
          <rect width="280" height="130" fill="#eef4ed" />
          {/* phone */}
          <g transform="translate(40, 18)">
            <rect width="60" height="95" rx="9" fill="#0a1a11" />
            <rect x="3" y="3" width="54" height="89" rx="7" fill="#1a4423" />
            <rect x="8" y="12" width="44" height="60" rx="3" fill="#2a6b39" />
            <circle cx="22" cy="38" r="3" fill="#f5d34a" />
            <circle cx="38" cy="30" r="3" fill="#5ab4e9" />
            <circle cx="32" cy="50" r="3" fill="#5acf63" />
            <text x="30" y="86" textAnchor="middle" fontSize="7" fontFamily="JetBrains Mono, monospace" fontWeight="700" fill="#5acf63">122 YDS</text>
          </g>
          {/* QR-ish */}
          <g transform="translate(125, 35)">
            <rect width="60" height="60" rx="6" fill="#fff" stroke="#0f1e15" strokeWidth="1" />
            {/* QR pattern */}
            {Array.from({length:7}).map((_,row) => Array.from({length:7}).map((_,col) => {
              const k = (row*7 + col*3 + 7) % 5;
              if (k < 2) return <rect key={`${row}-${col}`} x={6 + col*7} y={6 + row*7} width="6" height="6" fill="#0f1e15" />;
              return null;
            }))}
            <rect x="5" y="5" width="14" height="14" fill="none" stroke="#0f1e15" strokeWidth="2"/>
            <rect x="41" y="5" width="14" height="14" fill="none" stroke="#0f1e15" strokeWidth="2"/>
            <rect x="5" y="41" width="14" height="14" fill="none" stroke="#0f1e15" strokeWidth="2"/>
          </g>
          {/* TV */}
          <g transform="translate(200, 30)">
            <rect width="55" height="38" rx="3" fill="#0a1a11" />
            <rect x="3" y="3" width="49" height="32" rx="2" fill="#2a6b39" />
            <circle cx="14" cy="18" r="2.5" fill="#f5d34a" />
            <circle cx="28" cy="14" r="2.5" fill="#5ab4e9" />
            <circle cx="38" cy="22" r="2.5" fill="#5acf63" />
            <rect x="22" y="42" width="11" height="3" fill="#0a1a11" />
            <rect x="14" y="45" width="27" height="2" fill="#0a1a11" />
          </g>
        </svg>
      ),
    },
  ];

  return (
    <section className="section section--alt" id="how" data-screen-label="02 How it works">
      <div className="wrap">
        <div className="section__head">
          <span className="eyebrow">How it works</span>
          <h2>Live in an afternoon. Updated in seconds.</h2>
          <p>No installs, no hardware, no service contracts. Just three steps and your range is on every golfer's phone.</p>
        </div>

        <div className="steps">
          {steps.map(s => (
            <div className="step" key={s.num}>
              <div className="step__num">{s.num}</div>
              <h3>{s.title}</h3>
              <p>{s.copy}</p>
              <div className="step__visual">{s.visual}</div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ---------- Features ---------- */
function Features() {
  const items = [
    { icon: <Icon.Pin />,    title: "GPS-accurate maps",   copy: "Industry-leading precision so golfers know their carry within a yard." },
    { icon: <Icon.Target />, title: "Unlimited targets",   copy: "Add greens, bunkers, rings, dispersion zones — whatever your range has." },
    { icon: <Icon.Phone />,  title: "Mobile-first",        copy: "Works on every phone without an app. Just share the link or scan a QR." },
    { icon: <Icon.TV />,     title: "Big-screen ready",    copy: "Run the map on lobby TVs and bay kiosks. Auto-rotating bay views built in." },
    { icon: <Icon.Bolt />,   title: "Update in seconds",   copy: "Move a pin, add a target, swap a logo. Changes go live the moment you save." },
    { icon: <Icon.Globe />,  title: "Custom domain (Pro)", copy: "Host the map at range.yourcourse.com — fully yours, fully white-labeled." },
  ];
  return (
    <section className="section" id="features" data-screen-label="03 Features">
      <div className="wrap">
        <div className="section__head">
          <span className="eyebrow">Features</span>
          <h2>Everything your range needs.<br/>Nothing it doesn't.</h2>
          <p>A focused tool built for one job: making practice smarter.</p>
        </div>
        <div className="features">
          {items.map((f, i) => (
            <div className="feature" key={i}>
              <div className="feature__icon">{f.icon}</div>
              <h3>{f.title}</h3>
              <p>{f.copy}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* ---------- Pricing ---------- */
function Pricing() {
  return (
    <section className="section" id="pricing" data-screen-label="04 Pricing">
      <div className="wrap">
        <div className="section__head">
          <span className="eyebrow">Pricing</span>
          <h2>Two plans. No surprises.</h2>
          <p>Start with Amateur. Move to Pro when you want it on your own domain.</p>
        </div>

        <div className="pricing">
          <div className="tier">
            <div className="tier__name">Amateur</div>
            <div className="tier__tag">For ranges that just want it live, fast.</div>
            <div className="tier__price">
              <span className="currency">$</span>
              <span className="num">9.99</span>
              <span className="per">/ month</span>
            </div>
            <div className="tier__note">Hosted at RangeMap. No setup fee.</div>
            <div className="tier__url">
              <Icon.Globe />
              <span>rangemap.app/<b>yourcourse</b></span>
            </div>
            <ul className="tier__features">
              <li><Icon.Check /> Interactive range map for your course</li>
              <li><Icon.Check /> Unlimited targets &amp; pin updates</li>
              <li><Icon.Check /> Mobile, tablet &amp; TV display modes</li>
              <li><Icon.Check /> QR code &amp; tee-card generator</li>
              <li><Icon.Check /> RangeMap branding in footer <span>(small)</span></li>
              <li><Icon.Check /> Email support</li>
            </ul>
            <a className="btn btn--ghost tier__cta" href="#contact">Start with Amateur</a>
          </div>

          <div className="tier tier--featured">
            <div className="tier__badge">Most popular</div>
            <div className="tier__name">Pro</div>
            <div className="tier__tag">For courses that want it fully theirs.</div>
            <div className="tier__price">
              <span className="currency">$</span>
              <span className="num">9.99</span>
              <span className="per">/ month</span>
            </div>
            <div className="tier__note">
              <b style={{color: "var(--ink)"}}>+ $149 one-time setup fee.</b> Hosted on your own domain, fully white-labeled.
            </div>
            <div className="tier__url">
              <Icon.Globe />
              <span>range.<b>yourcourse</b>.com</span>
              <span className="lock">· yours</span>
            </div>
            <ul className="tier__features">
              <li><Icon.Check /> <b>Everything in Amateur, plus:</b></li>
              <li><Icon.Check /> Host on your own domain</li>
              <li><Icon.Check /> Full white-label — no RangeMap branding</li>
              <li><Icon.Check /> Bring your brand — logo, colors &amp; typography</li>
              <li><Icon.Check /> Custom CSS &amp; theme overrides</li>
              <li><Icon.Check /> Priority support + onboarding call</li>
            </ul>
            <a className="btn btn--primary tier__cta" href="#contact">Go Pro <Icon.Arrow /></a>
          </div>
        </div>
      </div>
    </section>
  );
}

/* ---------- Contact ---------- */
function Contact() {
  const [submitted, setSubmitted] = useState(false);
  const [sending, setSending] = useState(false);
  const [sendErr, setSendErr] = useState(null);
  const [plan, setPlan] = useState("pro");
  const [form, setForm] = useState({ name: "", email: "", course: "", message: "" });

  const onChange = (k) => (e) => setForm(f => ({ ...f, [k]: e.target.value }));

  // Submits to FormSubmit (https://formsubmit.co) — a no-signup form-to-email
  // service. The first submission triggers a confirmation email to
  // mike.atwell@rangemap.golf that must be clicked once to activate the form.
  // After that, every submission lands as an email.
  const onSubmit = async (e) => {
    e.preventDefault();
    if (sending) return;
    setSending(true);
    setSendErr(null);
    try {
      const res = await fetch("https://formsubmit.co/ajax/mike.atwell@rangemap.golf", {
        method: "POST",
        headers: { "Content-Type": "application/json", "Accept": "application/json" },
        body: JSON.stringify({
          _subject: `RangeMap inquiry — ${form.name}${form.course ? ` (${form.course})` : ""}`,
          _captcha: "false",
          _template: "table",
          name: form.name,
          email: form.email,
          course: form.course,
          plan,
          message: form.message,
        }),
      });
      if (!res.ok) throw new Error("send failed");
      setSubmitted(true);
    } catch (err) {
      setSendErr("Couldn't send — please email mike.atwell@rangemap.golf directly.");
    } finally {
      setSending(false);
    }
  };

  return (
    <section className="section" id="contact" data-screen-label="05 Contact">
      <div className="wrap">
        <div className="section__head">
          <span className="eyebrow">Contact</span>
          <h2>Let's get your range on the map.</h2>
          <p>Book a 15-minute demo or just send a note — a real person on our team gets back within a business day.</p>
        </div>

        <div className="contact">
          <div className="contact__info">
            <h3>Talk to someone who actually answers.</h3>
            <p>We work with public, private, and resort courses across North America. Tell us a bit about your range — we'll show you what your map could look like.</p>

            <div className="contact__meta">
              <div className="contact__meta-item">
                <span className="ico"><Icon.Mail /></span>
                <div>
                  <span>Email</span>
                  <b><a href="mailto:mike.atwell@rangemap.golf" style={{color:"inherit",textDecoration:"none"}}>mike.atwell@rangemap.golf</a></b>
                </div>
              </div>
              <div className="contact__meta-item">
                <span className="ico"><Icon.Call /></span>
                <div>
                  <span>Phone</span>
                  <b><a href="tel:+13038839684" style={{color:"inherit",textDecoration:"none"}}>(303) 883-9684</a></b>
                </div>
              </div>
              <div className="contact__meta-item">
                <span className="ico"><Icon.Map /></span>
                <div>
                  <span>Service area</span>
                  <b>US &amp; Canada · expanding 2026</b>
                </div>
              </div>
            </div>
          </div>

          <form className="form" onSubmit={onSubmit}>
            <div className="form__row">
              <div className="form__field">
                <label>Your name</label>
                <input type="text" placeholder="Jordan Lee" value={form.name} onChange={onChange("name")} required />
              </div>
              <div className="form__field">
                <label>Email</label>
                <input type="email" placeholder="you@course.com" value={form.email} onChange={onChange("email")} required />
              </div>
            </div>
            <div className="form__field form__field--full">
              <label>Course name</label>
              <input type="text" placeholder="Cedar Creek Country Club" value={form.course} onChange={onChange("course")} />
            </div>
            <div className="form__field form__field--full">
              <label>Plan you're considering</label>
              <div className="form__plan">
                <label>
                  <input type="radio" name="plan" value="amateur" checked={plan==="amateur"} onChange={() => setPlan("amateur")} />
                  <span>Amateur · $9.99/mo</span>
                </label>
                <label>
                  <input type="radio" name="plan" value="pro" checked={plan==="pro"} onChange={() => setPlan("pro")} />
                  <span>Pro · $9.99/mo + $149</span>
                </label>
                <label>
                  <input type="radio" name="plan" value="unsure" checked={plan==="unsure"} onChange={() => setPlan("unsure")} />
                  <span>Not sure yet</span>
                </label>
              </div>
            </div>
            <div className="form__field form__field--full">
              <label>What should we know?</label>
              <textarea placeholder="A bit about your range, how many bays, when you'd like to launch…" value={form.message} onChange={onChange("message")} />
            </div>
            <button className="btn btn--primary btn--lg" type="submit"
                    disabled={sending || submitted}
                    style={{width: "100%", justifyContent: "center"}}>
              {submitted ? "Sent — talk soon!" : sending ? "Sending…" : "Request Info"} {(!submitted && !sending) && <Icon.Arrow />}
            </button>
            {sendErr && <div style={{marginTop:10,color:"#e85e5e",fontSize:13,textAlign:"center"}}>{sendErr}</div>}
            {submitted && (
              <div className="form__success">
                <Icon.Check /> Thanks, {form.name || "friend"} — we'll be in touch within a business day.
              </div>
            )}
          </form>
        </div>
      </div>
    </section>
  );
}

/* ---------- CTA + Footer ---------- */
function CTABanner() {
  return (
    <div className="wrap" style={{paddingTop: 0, paddingBottom: 0}}>
      <div className="cta-banner">
        <div>
          <h2>Ready to elevate your driving range?</h2>
          <p>Pin your targets in 15 minutes. Give every golfer a real distance guide.</p>
        </div>
        <a className="btn btn--primary btn--lg" href="thelinks/" target="_blank" rel="noopener">Book a demo <Icon.Arrow /></a>
      </div>
    </div>
  );
}

function Footer() {
  return (
    <footer className="footer">
      <div className="wrap footer__inner">
        <Brand size="footer" />
        <div className="footer__nav">
          <a href="#features">Features</a>
          <a href="#how">How it works</a>
          <a href="#pricing">Pricing</a>
          <a href="markerstyles/">Marker styles</a>
          <a href="#contact">Contact</a>
        </div>
        <div className="footer__copy">© 2026 RangeMap. All rights reserved.</div>
      </div>
    </footer>
  );
}

/* ---------- App ---------- */
function App() {
  return (
    <React.Fragment>
      <Nav />
      <Hero />
      <HowItWorks />
      <Features />
      <Pricing />
      <CTABanner />
      <Contact />
      <Footer />
    </React.Fragment>
  );
}

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