/* global React */
const DS = window.GaskinsLawnCareDesignSystem_2f7300;
const { Wordmark, Button, Badge, SectionHeading, Card, Ribbon, Starburst, Callout, Tag, Input, Select, Checkbox, IconButton } = DS;

/* ---------- icons (Lucide-style, matching the DS kit) ---------- */
const Icon = (paths, size = 22) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">{paths}</svg>
);
const icons = {
  mower: Icon(<><circle cx="6" cy="18" r="2"/><circle cx="16" cy="18" r="2"/><path d="M4 16V9h9l4 4h1"/><path d="M13 9V5h5"/></>),
  scissors: Icon(<><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><line x1="20" y1="4" x2="8.12" y2="15.88"/><line x1="14.47" y1="14.48" x2="20" y2="20"/><line x1="8.12" y1="8.12" x2="12" y2="12"/></>),
  sprout: Icon(<><path d="M7 20h10"/><path d="M10 20c5.5-2.5.8-6.4 3-10"/><path d="M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z"/><path d="M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z"/></>),
  wind: Icon(<><path d="M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2"/><path d="M9.6 4.6A2 2 0 1 1 11 8H2"/><path d="M12.6 19.4A2 2 0 1 0 14 16H2"/></>),
  phone: Icon(<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z"/>),
  mail: Icon(<><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m22 7-10 6L2 7"/></>),
  pin: Icon(<><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z"/><circle cx="12" cy="10" r="3"/></>),
  check: Icon(<polyline points="20 6 9 17 4 12"/>),
  star: Icon(<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>, 16),
  clock: Icon(<><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></>),
  shield: Icon(<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>),
  arrowDown: Icon(<><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></>),
};

const PHONE = "(336) 465-6620";

/* FormSubmit — quote requests get emailed to this address (no account/key needed).
   First real submission triggers a one-time "Activate Form" email to this inbox;
   click that link once and all future submissions come through automatically. */
const LEAD_EMAIL = "levisamuelgaskins@gmail.com";

const container = { maxWidth: 'var(--container-lg)', margin: '0 auto', width: '100%', padding: '0 24px' };

function go(id) {
  const el = document.getElementById(id);
  if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 40, behavior: 'smooth' });
}

const VIDEO_URL = "assets/hero.mp4";

/* reveal-on-scroll: adds `.in` when the element enters view.
   Stagger by setting an inline transition-delay on the caller. */
function useReveal(threshold = 0.15) {
  const ref = React.useRef(null);
  React.useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => { if (e.isIntersecting) { el.classList.add('in'); io.unobserve(el); } });
    }, { threshold });
    io.observe(el);
    return () => io.disconnect();
  }, [threshold]);
  return ref;
}

/* frosted panel that keeps content legible over the moving scene */
function Glass({ children, style = {}, className = '', ...rest }) {
  return (
    <div className={`glass ${className}`.trim()} style={{
      background: 'rgba(26,29,18,0.92)',
      border: '1px solid rgba(244,238,220,0.10)',
      borderRadius: 'var(--radius-lg)',
      boxShadow: '0 12px 34px rgba(0,0,0,0.45)',
      ...style,
    }} {...rest}>{children}</div>
  );
}

/* ---------- Fixed nav ---------- */
function TopChrome() {
  return (
    <>
      <header style={{ position: 'fixed', top: 0, left: 0, right: 0, zIndex: 40, background: 'rgba(15,17,10,0.82)', backdropFilter: 'blur(10px)', WebkitBackdropFilter: 'blur(10px)', borderBottom: '1px solid rgba(244,238,220,0.10)' }}>
        <div style={{ ...container, display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '10px 24px' }}>
          <a onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} style={{ cursor: 'pointer' }}><Wordmark size="sm" /></a>
          <div style={{ display: 'flex', alignItems: 'center', gap: 24 }}>
            <nav style={{ display: 'flex', alignItems: 'center', gap: 24 }} className="nav-links">
              {[['Services','services'],['Why Us','why'],['Area','area']].map(([l,id]) => (
                <a key={id} onClick={() => go(id)} style={{ cursor: 'pointer', whiteSpace: 'nowrap', color: 'var(--cream-100)', fontFamily: 'var(--font-heading)', fontWeight: 600, fontSize: 13, letterSpacing: '.06em', textTransform: 'uppercase' }}>{l}</a>
              ))}
            </nav>
            <Button className="btn-glow" size="sm" iconLeft={icons.phone} onClick={() => go('book')}>Free Estimate</Button>
          </div>
        </div>
      </header>
    </>
  );
}

/* section wrapper — sized to content so the page stays tight */
function Section({ id, children, align = 'center', pad = '66px 0' }) {
  return (
    <section id={id} style={{ display: 'flex', alignItems: 'center', padding: pad, position: 'relative' }}>
      <div style={container}>{children}</div>
    </section>
  );
}

/* ---------- Hero ---------- */
function Hero() {
  const shadow = { textShadow: '0 3px 24px rgba(15,17,10,0.9), 0 1px 2px rgba(15,17,10,0.95)' };
  return (
    <section className="hero-section" style={{ minHeight: '100vh', display: 'flex', alignItems: 'center', padding: '72px 0 40px', position: 'relative', overflow: 'hidden' }}>
      <div className="hero-zone" style={{ position: 'relative', zIndex: 2, display: 'flex', justifyContent: 'center', paddingRight: 'clamp(0px, 24vw, 680px)' }}>
      <div style={{ width: '100%', maxWidth: 1240, padding: 'clamp(24px, 3vw, 40px) clamp(28px, 4vw, 60px)', display: 'grid', gridTemplateColumns: 'auto 1fr', gap: 'clamp(28px, 3vw, 52px)', alignItems: 'center', background: 'radial-gradient(120% 120% at 30% 45%, rgba(12,14,8,0.62) 0%, rgba(12,14,8,0.34) 55%, rgba(12,14,8,0) 100%)', backdropFilter: 'blur(6px)', WebkitBackdropFilter: 'blur(6px)', borderRadius: 28 }} className="hero-grid">
        <div style={{ display: 'flex', flexDirection: 'column', gap: 15, width: 'clamp(186px, 16.5vw, 244px)' }} className="hero-owner">
          <div className="portrait-wrap" style={{ position: 'relative', transform: 'rotate(-2deg)', alignSelf: 'flex-start' }}>
            <div className="portrait-glow"></div>
            <div style={{ position: 'relative', zIndex: 1, border: '3px solid var(--charcoal-950)', borderRadius: 'var(--radius-md)', boxShadow: 'var(--shadow-stamp-sm)', background: 'var(--forest-900)', padding: 6 }}>
              <img
                src="assets/levi.webp"
                alt="Levi Gaskins, owner of Gaskins Lawn Care"
                style={{ display: 'block', width: 'clamp(178px, 16vw, 236px)', height: 'clamp(224px, 20vw, 296px)', objectFit: 'cover', borderRadius: 6 }}
              />
            </div>
          </div>
          <div>
            <div style={{ fontFamily: 'var(--font-heading)', fontWeight: 600, textTransform: 'uppercase', letterSpacing: '.04em', color: 'var(--cream-50)', fontSize: 20, lineHeight: 1.1 }}>Levi Gaskins</div>
            <div style={{ fontFamily: 'var(--font-body)', color: 'var(--lime-400)', fontSize: 14, marginTop: 2, marginBottom: 10 }}>Owner &amp; Operator</div>
            <p style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-300)', fontSize: 14.5, lineHeight: 1.55, margin: 0 }}>
              Born and raised in Asheboro. I started Gaskins to give my neighbors sharp, dependable lawn care at a fair price — every yard gets the same attention I&rsquo;d give my own.
            </p>
          </div>
        </div>

        <div className="hero-pitch" style={{ minWidth: 0 }}>
          <Badge variant="lime" className="hero-badge" style={{ marginBottom: 16 }}>{icons.pin}&nbsp;Asheboro &amp; Randolph County, NC</Badge>
          <div className="hero-script" style={{ fontFamily: 'var(--font-brush)', color: 'var(--lime-400)', fontSize: 'clamp(30px, 3.4vw, 52px)', transform: 'rotate(-3deg)', margin: '0 0 6px', textShadow: '0 0 24px rgba(164,190,57,0.55), 0 2px 6px rgba(15,17,10,0.8)' }}>Details matter.</div>
          <h1 style={{ fontFamily: 'var(--font-display)', textTransform: 'uppercase', color: 'var(--cream-50)', fontSize: 'clamp(42px, 5vw, 88px)', lineHeight: 0.9, margin: '0 0 18px', textShadow: '0 4px 34px rgba(15,17,10,0.98), 0 1px 2px rgba(15,17,10,0.98)' }}>
            The <span style={{ color: 'var(--lime-400)', textShadow: '0 0 16px rgba(164,190,57,0.75), 0 0 36px rgba(164,190,57,0.4), 0 4px 30px rgba(15,17,10,0.9)' }}>sharpest</span> lawn<br/>on the <span style={{ color: 'var(--lime-400)', textShadow: '0 0 16px rgba(164,190,57,0.75), 0 0 36px rgba(164,190,57,0.4), 0 4px 30px rgba(15,17,10,0.9)' }}>block.</span>
          </h1>
          <p style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-100)', fontSize: 'clamp(16px, 1.7vw, 21px)', lineHeight: 1.5, maxWidth: 620, margin: '0 0 26px', ...shadow }}>
            Reliable, locally owned lawn care at honest prices. Free estimate in under a minute — no pressure.
          </p>
          <div className="hero-ctas" style={{ display: 'flex', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
            <Button className="btn-glow hero-cta" size="lg" onClick={() => go('book')}>Get My Free Estimate</Button>
            <Button className="hero-cta-ghost" size="lg" variant="outline" iconLeft={icons.phone} onClick={() => { window.location.href = 'tel:+13364656620'; }}>{PHONE}</Button>
          </div>
          <div className="hero-trust" style={{ display: 'flex', gap: 22, marginTop: 22, color: 'var(--cream-200)', fontFamily: 'var(--font-body)', fontSize: 'clamp(13px, 1.1vw, 16px)', flexWrap: 'wrap', ...shadow }}>
            {['Free estimates', 'Locally owned', 'Call or text'].map(t => (
              <span key={t} style={{ display: 'inline-flex', gap: 8, alignItems: 'center' }}><span style={{ color: 'var(--lime-400)' }}>{icons.check}</span> {t}</span>
            ))}
          </div>
        </div>
      </div>
      </div>

      <div style={{ position: 'absolute', left: 0, right: 0, bottom: 26, zIndex: 2, display: 'flex', justifyContent: 'center' }}>
        <div onClick={() => go('services')} style={{ cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: 10, color: 'var(--cream-200)', fontFamily: 'var(--font-heading)', fontWeight: 600, fontSize: 12, letterSpacing: '.16em', textTransform: 'uppercase', ...shadow }}>
          <span className="scroll-nudge" style={{ display: 'inline-flex' }}>{icons.arrowDown}</span> Scroll for details
        </div>
      </div>
    </section>
  );
}

/* ---------- Glowing gradient feature card ---------- */
const BigIcon = (paths) => (
  <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round">{paths}</svg>
);

function FeatureCard({ title, description, icon, gradient, delay = 0 }) {
  const ref = useReveal();
  return (
    <div ref={ref} className="feat-card reveal" style={{ transitionDelay: delay + 's' }}>
      <div className="feat-glow" style={{ background: gradient }}></div>
      <div className="feat-face" style={{ background: `linear-gradient(var(--charcoal-900), var(--charcoal-900)) padding-box, ${gradient} border-box` }}>
        <div className="feat-inner">
          <div className="feat-icon">{icon}</div>
          <div>
            <h3 className="feat-title">{title}</h3>
            <p className="feat-desc">{description}</p>
          </div>
        </div>
      </div>
    </div>
  );
}

/* ---------- Services (glowing feature cards) ---------- */
function Services() {
  const list = [
    {
      title: 'Lawn Mowing',
      icon: BigIcon(<><circle cx="6" cy="18" r="2"/><circle cx="16" cy="18" r="2"/><path d="M4 16V9h9l4 4h1"/><path d="M13 9V5h5"/></>),
      gradient: 'linear-gradient(137deg, #A4BE39 0%, #E1EDA8 45%, #6E8221 100%)',
      desc: 'Crisp, even cuts on a schedule that fits your yard — striped, clean, and consistent every visit.',
    },
    {
      title: 'Edging',
      icon: BigIcon(<><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><line x1="20" y1="4" x2="8.12" y2="15.88"/><line x1="14.47" y1="14.48" x2="20" y2="20"/><line x1="8.12" y1="8.12" x2="12" y2="12"/></>),
      gradient: 'linear-gradient(137deg, #B8CF55 0%, #FBF8EF 45%, #4A6534 100%)',
      desc: 'Sharp, defined borders along walks, beds, and driveways. The detail that makes a yard look finished.',
    },
    {
      title: 'Weed Eating',
      icon: BigIcon(<><path d="M7 20h10"/><path d="M10 20c5.5-2.5.8-6.4 3-10"/><path d="M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z"/><path d="M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z"/></>),
      gradient: 'linear-gradient(137deg, #CEE07C 0%, #A4BE39 45%, #2E4020 100%)',
      desc: 'Trimmed fence lines, posts, and tight corners the mower can\u2019t reach. Nothing left shaggy.',
    },
    {
      title: 'Blowing Off',
      icon: BigIcon(<><path d="M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2"/><path d="M9.6 4.6A2 2 0 1 1 11 8H2"/><path d="M12.6 19.4A2 2 0 1 0 14 16H2"/></>),
      gradient: 'linear-gradient(137deg, #7FA9B8 0%, #B8CF55 45%, #223016 100%)',
      desc: 'Every driveway, walkway, and porch blown clean before we leave. We treat it like our own.',
    },
  ];
  return (
    <Section id="services" pad="80px 0">
      <div style={{ textAlign: 'center', marginBottom: 44, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12 }}>
        <SectionHeading align="center">What We Do</SectionHeading>
        <p style={{ color: 'var(--cream-300)', fontFamily: 'var(--font-body)', fontSize: 17, maxWidth: 520, margin: 0 }}>Everything your lawn needs to stay sharp all season — bundled or à la carte.</p>
      </div>
      <div className="feat-grid">
        {list.map((s, i) => (
          <FeatureCard key={s.title} title={s.title} description={s.desc} icon={s.icon} gradient={s.gradient} delay={0.1 + i * 0.1} />
        ))}
      </div>
    </Section>
  );
}

/* ---------- Why Us + proof ---------- */
function WhyUs() {
  const points = [
    { icon: icons.check, t: 'Details matter', d: 'We treat every yard like the front of a magazine — clean lines, no missed corners.' },
    { icon: icons.clock, t: 'Show up on time', d: 'We come when we say we will, and we text you when we\u2019re on the way.' },
    { icon: icons.shield, t: 'Honest pricing', d: 'Fair, affordable rates and a free estimate before any work starts.' },
  ];
  return (
    <Section id="why">
      <div className="why-grid" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 28, alignItems: 'stretch' }}>
        <Glass style={{ padding: 'clamp(26px, 3.5vw, 44px)' }}>
          <SectionHeading>Why Gaskins</SectionHeading>
          <p style={{ color: 'var(--cream-200)', fontFamily: 'var(--font-body)', fontSize: 16, lineHeight: 1.6, margin: '14px 0 26px', maxWidth: 460 }}>
            A locally owned crew out of Asheboro. No call centers, no runaround — just a well-kept lawn and a handshake you can trust.
          </p>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
            {points.map(pt => (
              <div key={pt.t} style={{ display: 'flex', gap: 14, alignItems: 'flex-start' }}>
                <span style={{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 42, height: 42, flexShrink: 0, borderRadius: 'var(--radius-md)', background: 'var(--lime-500)', color: 'var(--charcoal-950)', border: '2px solid var(--charcoal-950)' }}>{pt.icon}</span>
                <div>
                  <div style={{ fontFamily: 'var(--font-heading)', fontWeight: 600, textTransform: 'uppercase', letterSpacing: '.03em', color: 'var(--cream-50)', fontSize: 16 }}>{pt.t}</div>
                  <div style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-300)', fontSize: 14, lineHeight: 1.5 }}>{pt.d}</div>
                </div>
              </div>
            ))}
          </div>
        </Glass>
        <Glass style={{ padding: 'clamp(26px, 3.5vw, 44px)', display: 'flex', flexDirection: 'column', justifyContent: 'space-between', gap: 24 }}>
          <div>
            <div style={{ display: 'flex', gap: 4, color: 'var(--lime-500)', marginBottom: 14 }}>{[0,1,2,3,4].map(i => <span key={i}>{icons.star}</span>)}</div>
            <p style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-50)', fontSize: 'clamp(19px, 2.2vw, 24px)', lineHeight: 1.45, margin: 0 }}>
              &ldquo;Levi does what he says and the yard looks perfect every single week. You can tell he actually cares.&rdquo;
            </p>
          </div>
          <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
            <div style={{ width: 46, height: 46, borderRadius: 'var(--radius-pill)', background: 'var(--forest-600)', border: '2px solid var(--charcoal-950)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: 'var(--font-display)', color: 'var(--cream-50)', fontSize: 20 }}>D</div>
            <div>
              <div style={{ fontFamily: 'var(--font-heading)', fontWeight: 600, color: 'var(--cream-50)', textTransform: 'uppercase', letterSpacing: '.03em', fontSize: 14 }}>Dana R.</div>
              <div style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-400)', fontSize: 13 }}>Asheboro, NC</div>
            </div>
          </div>
        </Glass>
      </div>
    </Section>
  );
}

/* ---------- Service area ---------- */
function ServiceArea() {
  const areas = ['Asheboro', 'Randolph County', 'Franklinville', 'Ramseur', 'Sophia', 'Trinity', 'Archdale', 'Seagrove'];
  return (
    <Section id="area">
      <Glass style={{ padding: 'clamp(28px, 4vw, 52px)', textAlign: 'center', maxWidth: 720, margin: '0 auto' }}>
        <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 16 }}>
          <SectionHeading align="center">Service Area</SectionHeading>
          <p style={{ color: 'var(--cream-200)', fontFamily: 'var(--font-body)', fontSize: 16, maxWidth: 460, margin: 0 }}>Proudly serving Asheboro and the surrounding Randolph County communities.</p>
          <div style={{ display: 'flex', flexWrap: 'wrap', gap: 10, justifyContent: 'center', marginTop: 6 }}>
            {areas.map((a, i) => <Tag key={a} active={i === 0}>{a}</Tag>)}
          </div>
        </div>
      </Glass>
    </Section>
  );
}

/* ---------- Book Now (arrives as the lawn finishes) ---------- */
function BookNow() {
  const [sent, setSent] = React.useState(false);
  const [sending, setSending] = React.useState(false);
  const [error, setError] = React.useState("");
  const [textMe, setTextMe] = React.useState(true);

  async function handleSubmit(e) {
    e.preventDefault();
    setError("");
    setSending(true);
    try {
      const res = await fetch("https://formsubmit.co/ajax/" + encodeURIComponent(LEAD_EMAIL), {
        method: "POST",
        headers: { Accept: "application/json" },
        body: new FormData(e.target),
      });
      const data = await res.json();
      if (data.success === true || data.success === "true") {
        setSent(true);
      } else {
        setError(data.message || "Something went wrong. Please call or text us instead.");
      }
    } catch (err) {
      setError("Couldn't send — check your connection, or just call or text us.");
    } finally {
      setSending(false);
    }
  }

  return (
    <Section id="book" pad="70px 0 96px">
      <div className="book-grid" style={{ display: 'grid', gridTemplateColumns: '.9fr 1.1fr', gap: 32, alignItems: 'center' }}>
        <div>
          <div style={{ marginBottom: 16 }}>
            <Ribbon>Free Estimates</Ribbon>
          </div>
          <h2 className="book-h2" style={{ fontFamily: 'var(--font-display)', textTransform: 'uppercase', color: 'var(--cream-50)', fontSize: 'clamp(44px, 6.5vw, 84px)', lineHeight: 0.9, margin: '0 0 16px' }}>
            Get your<br/>quote<br/><span style={{ color: 'var(--lime-500)' }}>today.</span>
          </h2>
          <p style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-100)', fontSize: 18, lineHeight: 1.55, maxWidth: 440, margin: '0 0 24px', textShadow: '0 2px 12px rgba(15,17,10,0.8)' }}>
            Tell us about your yard and we&rsquo;ll text you a price. No pressure, no obligation.
          </p>
          <Callout icon={icons.phone} kicker="Call or text today" value={PHONE} />
        </div>
        <Glass style={{ padding: 'clamp(24px, 3.5vw, 40px)' }}>
          {sent ? (
            <div style={{ textAlign: 'center', padding: '24px 0' }}>
              <span style={{ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 66, height: 66, borderRadius: 'var(--radius-pill)', background: 'var(--lime-500)', color: 'var(--charcoal-950)', border: '2px solid var(--charcoal-950)', margin: '0 auto 16px' }}>{icons.check}</span>
              <h3 style={{ fontFamily: 'var(--font-display)', textTransform: 'uppercase', color: 'var(--cream-50)', fontSize: 30, margin: '0 0 8px' }}>Request sent!</h3>
              <p style={{ fontFamily: 'var(--font-body)', color: 'var(--cream-300)', fontSize: 15, margin: 0 }}>Thanks — Levi will text you a quote shortly.</p>
              <Button variant="outline" style={{ marginTop: 18 }} onClick={() => setSent(false)}>Send another</Button>
            </div>
          ) : (
            <form onSubmit={handleSubmit} className="book-form" style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 }}>
              {/* FormSubmit config — controls the email; not shown to visitors */}
              <input type="hidden" name="_subject" value="New quote request — Gaskins Lawn Care" />
              <input type="hidden" name="_template" value="table" />
              <input type="hidden" name="_captcha" value="false" />
              {/* Honeypot: bots fill this, humans never see it */}
              <input type="text" name="_honey" tabIndex={-1} autoComplete="off" style={{ display: 'none' }} />

              <Input tone="dark" label="Name" name="Name" placeholder="Your name" required />
              <Input tone="dark" label="Phone" name="Phone" placeholder="(336) 000-0000" required />
              <div style={{ gridColumn: '1 / -1' }}><Input tone="dark" label="Address" name="Address" placeholder="Street, Asheboro" /></div>
              <div style={{ gridColumn: '1 / -1' }}>
                <Select tone="dark" label="Service needed" name="Service needed">
                  <option>Full service (mow, edge, trim, blow)</option>
                  <option>Lawn mowing only</option>
                  <option>Edging &amp; trimming</option>
                  <option>One-time cleanup</option>
                </Select>
              </div>
              <div style={{ gridColumn: '1 / -1' }}><Checkbox tone="dark" label="Text me the quote" name="Text me the quote" value="Yes" checked={textMe} onChange={(e) => setTextMe(e.target.checked)} /></div>
              {error && (
                <div style={{ gridColumn: '1 / -1', fontFamily: 'var(--font-body)', color: 'var(--rust-600)', fontSize: 14 }}>{error}</div>
              )}
              <div style={{ gridColumn: '1 / -1' }}><Button className="btn-glow" block size="lg" type="submit" disabled={sending}>{sending ? 'Sending…' : 'Request Free Estimate'}</Button></div>
            </form>
          )}
        </Glass>
      </div>
    </Section>
  );
}

function Footer() {
  return (
    <footer style={{ position: 'relative', zIndex: 2 }}>
      <div style={{ background: 'var(--lime-500)', padding: '18px 0', borderTop: '2px solid var(--charcoal-950)', borderBottom: '2px solid var(--charcoal-950)' }}>
        <div style={{ ...container, display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 20, flexWrap: 'wrap' }}>
          <span style={{ fontFamily: 'var(--font-display)', textTransform: 'uppercase', color: 'var(--charcoal-950)', fontSize: 26 }}>Ready when you are.</span>
          <a href="tel:+13364656620" style={{ display: 'flex', gap: 12, alignItems: 'center' }}>
            <IconButton variant="dark" label="Call"><span style={{ color: 'var(--lime-500)' }}>{icons.phone}</span></IconButton>
            <span style={{ fontFamily: 'var(--font-display)', color: 'var(--charcoal-950)', fontSize: 28, whiteSpace: 'nowrap' }}>{PHONE}</span>
          </a>
        </div>
      </div>
      <div style={{ background: 'var(--charcoal-950)', padding: '40px 0' }}>
        <div style={{ ...container, display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', gap: 24, flexWrap: 'wrap' }}>
          <Wordmark size="md" tagline />
          <div style={{ textAlign: 'right', fontFamily: 'var(--font-body)', color: 'var(--cream-400)', fontSize: 13, lineHeight: 1.8 }}>
            <div style={{ display: 'inline-flex', gap: 8, alignItems: 'center' }}>{icons.mail} levisamuelgaskins@gmail.com</div><br/>
            <div style={{ display: 'inline-flex', gap: 8, alignItems: 'center' }}>{icons.pin} Asheboro, NC</div>
            <div style={{ fontFamily: 'var(--font-script)', color: 'var(--cream-100)', fontSize: 26, marginTop: 8 }}>Levi Gaskins</div>
          </div>
        </div>
      </div>
    </footer>
  );
}

function App() {
  return (
    <>
      <TopChrome />
      <Hero />
      <Services />
      <WhyUs />
      <ServiceArea />
      <BookNow />
      <Footer />
    </>
  );
}

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