/* @jsxRuntime classic */
/* global React */

// Helpers expected on window: Icon, Button, SectionHeader

// ——— Hero ———
const Hero = () => (
  <section className="lw-paper-grain" style={{ padding: "120px 32px 88px", background: "var(--lw-paper)", borderBottom: "1px solid var(--lw-border)" }}>
    <div style={{ maxWidth: 1240, margin: "0 auto" }}>
      {/* Top meta bar */}
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 32, alignItems: "baseline", marginBottom: 56, fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-3)", letterSpacing: "0.08em", textTransform: "uppercase" }}>
        <span>Layerwright &mdash; Studio folio</span>
        <span style={{ textAlign: "center" }}>Est. 2026 · Sofia</span>
        <span style={{ textAlign: "right" }}>Web design · Build · SEO · Care</span>
      </div>
      <div className="lw-rule lw-rule--double" style={{ marginBottom: 64 }}/>

      <div style={{ display: "grid", gridTemplateColumns: "1.5fr 1fr", gap: 96, alignItems: "end" }}>
        <div style={{ minWidth: 0, display: "flex", flexDirection: "column", alignItems: "flex-start" }}>
          <div style={{ fontFamily: "var(--lw-font-sans)", fontSize: 11, textTransform: "uppercase", letterSpacing: "0.22em", color: "var(--lw-ink-3)", marginBottom: 28 }}>
            <span style={{ color: "var(--lw-terra)" }}>●</span>&nbsp;&nbsp;Taking on two projects &mdash; Summer 2026
          </div>
          <h1 className="lw-swash" style={{
            fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300,
            fontSize: "clamp(56px, 7.4vw, 116px)", lineHeight: 1.02, letterSpacing: "-0.045em",
            margin: 0, textWrap: "balance", color: "var(--lw-ink)",
            hyphens: "auto", overflowWrap: "break-word", paddingBottom: "0.1em",
            fontVariationSettings: '"opsz" 144',
          }}>
            A website your&nbsp;customers can&nbsp;<span style={{ color: "var(--lw-terra)" }}>actually</span>&nbsp;find.
          </h1>
          <div style={{ display: "flex", gap: 16, marginTop: 56, flexWrap: "wrap", alignItems: "center" }}>
            <Button variant="primary" as="a" href="#contact">Start a project<Icon name="arrow" size={16}/></Button>
            <Button variant="outline" as="a" href="#work">See our work</Button>
            <Button variant="ghost" as="a" href="mailto:hello@layerwright.co?subject=A quick question">Ask a question</Button>
          </div>
          <div style={{ marginTop: 28, display: "flex", gap: 28, flexWrap: "wrap", fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-3)", letterSpacing: "0.08em", textTransform: "uppercase" }}>
            <span><span style={{ color: "var(--lw-terra)" }}>●</span>&nbsp; Fast on a phone</span>
            <span><span style={{ color: "var(--lw-terra)" }}>●</span>&nbsp; Built for Google</span>
            <span><span style={{ color: "var(--lw-terra)" }}>●</span>&nbsp; Bulgarian or English</span>
            <span><span style={{ color: "var(--lw-terra)" }}>●</span>&nbsp; Reply by the next day</span>
          </div>
        </div>

        <aside style={{ paddingBottom: 8 }}>
          <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 10, letterSpacing: "0.14em", color: "var(--lw-ink-4)", textTransform: "uppercase", marginBottom: 10 }}>Figure 01 &mdash; Manifesto</div>
          <div className="lw-rule" style={{ marginBottom: 18 }}/>
          <p className="lw-marginalia" style={{ fontSize: 18, lineHeight: 1.55, color: "var(--lw-ink-2)", margin: 0, maxWidth: "34ch", borderLeft: 0, padding: 0 }}>
            We design, build and maintain websites for independent businesses &mdash; law firms,
            cafés, clinics, shops. <em>SEO is part of the work, not an upsell.</em>
          </p>
          <div style={{ marginTop: 28, display: "grid", gridTemplateColumns: "1fr 1fr", gap: 20 }}>
            <Stat n="02" l="Sites shipped & live"/>
            <Stat n="€200" l="Launch offer · full build"/>
          </div>
          <div style={{ marginTop: 22 }}>
            <span className="lw-proof-chip" title="Our most recent launch">
              Latest&nbsp;launch&nbsp;·&nbsp;<a href="https://outargu.com" target="_blank" rel="noopener noreferrer" style={{ color: "var(--lw-ink)", textDecoration: "underline", textUnderlineOffset: 3 }}>outargu.com</a>
            </span>
          </div>
        </aside>
      </div>
    </div>
  </section>
);

const Stat = ({ n, l }) => (
  <div>
    <div className="lw-numeral" style={{ fontSize: 44, color: "var(--lw-ink)", lineHeight: 1 }}>{n}</div>
    <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 10, color: "var(--lw-ink-3)", letterSpacing: "0.12em", textTransform: "uppercase", marginTop: 6 }}>{l}</div>
  </div>
);

// ——— Marquee of client types ———
const ClientBand = () => {
  const items = ["Strategy", "Editorial copy", "Type & palette", "Responsive layouts", "Static builds", "Lightweight CMS", "Local SEO", "Schema markup", "Lighthouse ≥ 95", "Analytics", "Hosting", "Same-day edits"];
  const row = (
    <div style={{ display: "flex", gap: 56, paddingRight: 56, alignItems: "center" }}>
      {items.map((i, idx) => (
        <React.Fragment key={i + idx}>
          <span style={{
            fontFamily: "var(--lw-font-serif)", fontStyle: "italic",
            fontSize: 26, fontWeight: 300, color: "var(--lw-ink-2)", whiteSpace: "nowrap",
          }}>{i}</span>
          <span style={{ color: "var(--lw-terra)", fontSize: 8 }}>●</span>
        </React.Fragment>
      ))}
    </div>
  );
  return (
    <section style={{ padding: "28px 0", borderBottom: "1px solid var(--lw-border)", background: "var(--lw-paper)", overflow: "hidden" }}>
      <div className="lw-marquee-mask">
        <div className="lw-marquee">{row}{row}</div>
      </div>
    </section>
  );
};

// ——— Services ———
const Services = () => {
  const items = [
    { n: "I", t: "Design", b: "A careful, editorial site that looks like your business deserves it. Two rounds of revisions. No templates.", k: ["Wireframes", "Type & palette", "Responsive layouts"] },
    { n: "II", t: "Build", b: "Static where it can be, a CMS where it must. Fast on a phone, indexable by Google, readable by humans.", k: ["Static hosting", "Lightweight CMS", "Lighthouse ≥ 95"] },
    { n: "III", t: "Keep", b: "Monthly maintenance: updates, backups, content edits, and a real person who answers when something breaks.", k: ["Backups weekly", "Uptime watch", "Same-day edits"] },
  ];
  return (
    <section id="services" style={{ padding: "144px 32px", scrollMarginTop: 100 }}>
      <div style={{ maxWidth: 1240, margin: "0 auto" }}>
        <SectionHeader num="02" eyebrow="Services" title="Three things, done properly."/>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 40 }}>
          {items.map((s) => (
            <article key={s.t} className="lw-card" style={{ padding: "32px 28px", background: "var(--lw-bg-elev)", border: "1px solid var(--lw-border)", borderRadius: 6 }}>
              <div style={{ display: "flex", alignItems: "baseline", justifyContent: "space-between", marginBottom: 20 }}>
                <div className="lw-numeral" style={{ fontSize: 48, color: "var(--lw-terra)", lineHeight: 1 }}>{s.n}.</div>
                <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 10, color: "var(--lw-ink-4)", letterSpacing: "0.14em", textTransform: "uppercase" }}>§ 02.{s.n.length}</div>
              </div>
              <div className="lw-rule" style={{ marginBottom: 20 }}/>
              <h3 style={{ fontFamily: "var(--lw-font-serif)", fontWeight: 400, fontSize: 30, margin: "0 0 14px", color: "var(--lw-ink)" }}>{s.t}</h3>
              <p style={{ margin: "0 0 22px", color: "var(--lw-ink-2)", fontSize: 15, lineHeight: 1.7 }}>{s.b}</p>
              <ul style={{ margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 6 }}>
                {s.k.map(k => (
                  <li key={k} style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-3)", display: "flex", gap: 10 }}>
                    <span style={{ color: "var(--lw-terra)" }}>—</span>{k}
                  </li>
                ))}
              </ul>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
};

// ——— SEO callout ———
const SEOCallout = () => (
  <section id="seo" className="lw-paper-grain" style={{ padding: "144px 32px", background: "var(--lw-paper-2)", scrollMarginTop: 100 }}>
    <div style={{ maxWidth: 1240, margin: "0 auto", display: "grid", gridTemplateColumns: "1fr 1fr", gap: 80, alignItems: "center" }}>
      <div>
        <div style={{ fontFamily: "var(--lw-font-sans)", fontSize: 11, textTransform: "uppercase", letterSpacing: "0.22em", color: "var(--lw-ink-3)", marginBottom: 20 }}>Section · 03 · SEO</div>
        <h2 style={{ fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300, fontSize: "clamp(40px, 4.4vw, 64px)", lineHeight: 1.06, letterSpacing: "-0.035em", margin: "0 0 28px", color: "var(--lw-ink)" }}>
          Search, done by someone who&nbsp;<span style={{ color: "var(--lw-terra)" }}>reads</span>.
        </h2>
        <p className="lw-dropcap" style={{ fontSize: 16, lineHeight: 1.8, color: "var(--lw-ink-2)", maxWidth: "56ch", margin: 0 }}>
          We write the copy, then we make sure it gets indexed. That means proper headings, structured data, a sitemap Google will actually crawl, and page titles that earn their clicks. No plugins pretending to be a strategy.
        </p>
      </div>
      <div className="lw-card" style={{ background: "var(--lw-bg-elev)", border: "1px solid var(--lw-border)", borderRadius: 6, padding: 32, boxShadow: "var(--lw-shadow-2)" }}>
        <div style={{ display: "flex", justifyContent: "space-between", alignItems: "baseline", marginBottom: 20 }}>
          <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-3)", letterSpacing: "0.1em", textTransform: "uppercase" }}>
            Every site ships with
          </div>
          <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 10, color: "var(--lw-ink-4)" }}>SEO-01.md</div>
        </div>
        <div className="lw-rule" style={{ marginBottom: 4 }}/>
        {[
          "Title tags written by hand, per page",
          "Meta descriptions that earn the click",
          "Clean H1 → H2 → H3 heading structure",
          "Schema for your business type",
          "Sitemap + robots the right way round",
        ].map((v, i) => (
          <div key={v} style={{ display: "grid", gridTemplateColumns: "32px 1fr 20px", gap: 12, padding: "14px 0", borderBottom: i < 4 ? "1px solid var(--lw-border)" : "0", alignItems: "center" }}>
            <span className="lw-nums-tabular" style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-4)" }}>0{i+1}</span>
            <div style={{ fontSize: 14, color: "var(--lw-ink)" }}>{v}</div>
            <Icon name="check" size={16} color="var(--lw-success)"/>
          </div>
        ))}
      </div>
    </div>
  </section>
);

// ——— Work grid ———
const WorkGrid = () => {
  const items = [
    { name: "outargu.com", kind: "Web design · build · SEO", url: "https://outargu.com", img: "/assets/work-outargu.jpg", tagline: "Quiet, considered, fast.", year: "2026" },
    { name: "builoa.com",  kind: "Web design · build · SEO", url: "https://builoa.com",  img: "/assets/work-builoa.jpg",  tagline: "Small site, big care.",      year: "2026" },
  ];
  return (
    <section id="work" style={{ padding: "144px 32px", scrollMarginTop: 100 }}>
      <div style={{ maxWidth: 1240, margin: "0 auto" }}>
        <SectionHeader num="01" eyebrow="Selected work" title="Two sites, shipped and live."/>
        <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 32 }}>
          {items.map((w, i) => (
            <a key={w.name} href={w.url} target="_blank" rel="noopener noreferrer"
               className="lw-card lw-work-tile"
               style={{ textDecoration: "none", color: "inherit", display: "block", borderRadius: 6 }}>
              <div className="lw-tile" style={{
                aspectRatio: "4/3",
                backgroundImage: `linear-gradient(180deg, rgba(18,17,16,0.15) 0%, rgba(18,17,16,0.05) 42%, rgba(18,17,16,0.55) 100%), url(${w.img})`,
                backgroundSize: "cover",
                backgroundPosition: "center",
                borderRadius: 6, marginBottom: 20,
                border: "1px solid var(--lw-border)",
                padding: 28, position: "relative",
                color: "var(--lw-paper)",
                display: "flex", flexDirection: "column", justifyContent: "space-between",
                overflow: "hidden",
              }}>
                <div style={{ display: "flex", justifyContent: "space-between", alignItems: "baseline", fontFamily: "var(--lw-font-mono)", fontSize: 10, letterSpacing: "0.14em", textTransform: "uppercase", opacity: 0.85, textShadow: "0 1px 2px rgba(0,0,0,0.35)" }}>
                  <span>Case · 0{i+1}</span>
                  <span>{w.year}</span>
                </div>
                <div style={{ textShadow: "0 2px 14px rgba(0,0,0,0.55)" }}>
                  <div style={{ fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300, fontSize: "clamp(38px, 4.8vw, 60px)", lineHeight: 1, letterSpacing: "-0.04em", marginBottom: 10 }}>
                    {w.name}
                  </div>
                  <div style={{ fontSize: 13, opacity: 0.9, fontStyle: "italic", fontFamily: "var(--lw-font-serif)" }}>
                    {w.tagline}
                  </div>
                </div>
              </div>
              <div style={{ display: "flex", justifyContent: "space-between", alignItems: "baseline" }}>
                <div>
                  <div style={{ fontFamily: "var(--lw-font-serif)", fontSize: 20, color: "var(--lw-ink)" }}>{w.name}</div>
                  <div style={{ fontSize: 13, color: "var(--lw-ink-3)", marginTop: 2 }}>{w.kind} <span style={{ color: "var(--lw-terra)" }}>→</span></div>
                </div>
                <span className="lw-nums-tabular" style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-4)" }}>0{i+1} / 0{items.length}</span>
              </div>
            </a>
          ))}
        </div>
      </div>
    </section>
  );
};

// ——— Testimonial ———
const Testimonial = () => (
  <section style={{ padding: "144px 32px", background: "var(--lw-ink)", color: "var(--lw-paper)", position: "relative", overflow: "hidden" }}>
    <div style={{ maxWidth: 1000, margin: "0 auto", position: "relative" }}>
      <div style={{ position: "absolute", top: -48, left: -24, fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300, fontSize: 280, lineHeight: 0.7, color: "var(--lw-terra)", opacity: 0.9, pointerEvents: "none" }}>&ldquo;</div>
      <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, letterSpacing: "0.22em", textTransform: "uppercase", color: "var(--lw-paper-3)", marginBottom: 32, position: "relative" }}>
            Figure 04 &mdash; A note from a client
      </div>
      <blockquote className="lw-swash" style={{
        margin: 0, fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300,
        fontSize: "clamp(32px, 3.8vw, 52px)", lineHeight: 1.22, letterSpacing: "-0.02em", textWrap: "balance",
        color: "var(--lw-paper)", position: "relative",
      }}>
        The site looks like our shopfront — calm, careful, the sort of thing a person
        wants to walk into. And the phone has actually rung since.
      </blockquote>
      <div className="lw-rule" style={{ margin: "48px 0 20px", background: "rgba(245,239,228,0.3)" }}/>
      <div style={{ display: "flex", justifyContent: "space-between", fontFamily: "var(--lw-font-mono)", fontSize: 12, letterSpacing: "0.08em", color: "var(--lw-paper-3)" }}>
        <span>A client · Independent practice · Sofia</span>
        <span>★ ★ ★ ★ ★</span>
      </div>
    </div>
  </section>
);

// ——— Pricing ———
const Pricing = () => (
  <section id="pricing" style={{ padding: "144px 32px", scrollMarginTop: 100 }}>
    <div style={{ maxWidth: 1240, margin: "0 auto" }}>
      <SectionHeader num="05" eyebrow="Price" title="Fixed fees. No hidden hours."/>
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 40 }}>
        <PriceBlock title="A new website" amount="€200" wasAmount="€370" promoLabel="Launch offer" cadence="fixed · one-time" sub="We're building our portfolio this summer. Two projects at this price, then it goes back to €370 — no catch." bullets={[
          "Brand & copy review",
          "Up to 8 pages",
          "Local SEO set-up",
          "Hand-off training (2 hrs)",
          "Two revision rounds",
        ]}/>
        <PriceBlock title="Maintenance" amount="€20" cadence="/ month" accent sub="Cancel any month, keep your site either way." bullets={[
          "Monthly updates & backups",
          "Content edits (2 hrs / mo)",
          "Uptime & security monitoring",
          "Same-day response",
          "Cancel any time",
        ]}/>
      </div>
    </div>
  </section>
);
const PriceBlock = ({ title, amount, wasAmount, promoLabel, cadence, bullets, accent, sub }) => {
  const parseEur = (v) => parseFloat(String(v).replace(/[^\d.]/g, "")) || 0;
  const savings = wasAmount ? parseEur(wasAmount) - parseEur(amount) : 0;
  const pct = wasAmount ? Math.round((savings / parseEur(wasAmount)) * 100) : 0;
  return (
  <div className="lw-card" style={{
    padding: 40, background: accent ? "var(--lw-ink)" : "var(--lw-bg-elev)",
    color: accent ? "var(--lw-paper)" : "var(--lw-ink)",
    border: accent ? "1px solid var(--lw-ink)" : (wasAmount ? "1px solid var(--lw-terra)" : "1px solid var(--lw-border)"),
    borderRadius: 6, position: "relative", overflow: "hidden",
    boxShadow: wasAmount && !accent ? "0 1px 0 var(--lw-terra-tint), var(--lw-shadow-2)" : undefined,
  }}>
    {wasAmount && !accent && (
      <div aria-hidden="true" style={{ position: "absolute", inset: 0, pointerEvents: "none",
        background: "radial-gradient(600px 200px at 100% 0%, rgba(198,93,58,0.08), transparent 60%)" }}/>
    )}
    {accent && <div style={{ position: "absolute", top: 16, right: 16, fontFamily: "var(--lw-font-mono)", fontSize: 10, letterSpacing: "0.18em", color: "var(--lw-terra)", border: "1px solid var(--lw-terra)", padding: "4px 8px", borderRadius: 2 }}>MOST PICKED</div>}
    {promoLabel && !accent && (
      <div style={{ position: "absolute", top: 0, right: 0, fontFamily: "var(--lw-font-mono)", fontSize: 10, letterSpacing: "0.22em", textTransform: "uppercase", color: "var(--lw-paper)", background: "var(--lw-terra)", padding: "8px 14px" }}>
        {promoLabel}{pct > 0 ? ` · −${pct}%` : ""}
      </div>
    )}
    <div style={{ fontFamily: "var(--lw-font-sans)", fontSize: 11, textTransform: "uppercase", letterSpacing: "0.22em", color: accent ? "var(--lw-paper-3)" : "var(--lw-ink-3)", marginBottom: 16, position: "relative" }}>{title}</div>
    <div style={{ display: "flex", alignItems: "baseline", gap: 14, marginBottom: 8, flexWrap: "wrap", position: "relative" }}>
      {wasAmount && (
        <span className="lw-numeral" aria-label={`Was ${wasAmount}`} style={{ fontSize: 40, lineHeight: 1, color: "var(--lw-ink-4)", position: "relative" }}>
          <span style={{ position: "relative", zIndex: 1 }}>{wasAmount}</span>
          <span aria-hidden="true" style={{ position: "absolute", left: -2, right: -2, top: "52%", height: 2, background: "var(--lw-terra)", transform: "rotate(-8deg)", transformOrigin: "center" }}/>
        </span>
      )}
      <span className="lw-numeral" style={{ fontSize: 96, lineHeight: 1, color: accent ? "var(--lw-paper)" : "var(--lw-ink)", letterSpacing: "-0.04em" }}>{amount}</span>
      <span style={{ fontFamily: "var(--lw-font-mono)", fontSize: 12, color: accent ? "var(--lw-paper-3)" : "var(--lw-ink-3)" }}>{cadence}</span>
    </div>
    {wasAmount && !accent && savings > 0 && (
      <div style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, letterSpacing: "0.1em", textTransform: "uppercase", color: "var(--lw-terra-deep)", marginBottom: 10 }}>
        You save €{savings} · limited to summer 2026
      </div>
    )}
    {sub && <p style={{ margin: 0, fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontSize: 14, color: accent ? "var(--lw-paper-3)" : "var(--lw-ink-3)", maxWidth: "40ch" }}>{sub}</p>}
    <div className="lw-rule" style={{ margin: "28px 0 20px", background: accent ? "rgba(245,239,228,0.3)" : "var(--lw-border)" }}/>
    <ul style={{ margin: 0, padding: 0, listStyle: "none", display: "grid", gap: 12 }}>
      {bullets.map((b, i) => (
        <li key={b} style={{ display: "grid", gridTemplateColumns: "24px 1fr", gap: 10, fontSize: 14, color: accent ? "var(--lw-paper)" : "var(--lw-ink-2)" }}>
          <span className="lw-nums-tabular" style={{ color: accent ? "var(--lw-terra)" : "var(--lw-ink-3)", fontFamily: "var(--lw-font-mono)", fontSize: 11, marginTop: 2 }}>0{i+1}</span>
          {b}
        </li>
      ))}
    </ul>
  </div>
  );
};

// ——— Contact ———
const Contact = () => (
  <section id="contact" className="lw-paper-grain" style={{ padding: "144px 32px", background: "var(--lw-paper-2)", scrollMarginTop: 100 }}>
    <div style={{ maxWidth: 720, margin: "0 auto", textAlign: "left" }}>
      <div style={{ fontFamily: "var(--lw-font-sans)", fontSize: 11, textTransform: "uppercase", letterSpacing: "0.22em", color: "var(--lw-ink-3)", marginBottom: 20 }}>Start a project · 07</div>
      <h2 className="lw-swash" style={{ fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300, fontSize: "clamp(40px, 4.8vw, 72px)", lineHeight: 1.06, letterSpacing: "-0.035em", margin: "0 0 28px" }}>
        Tell us about the&nbsp;business.
      </h2>
      <p style={{ fontSize: 17, lineHeight: 1.7, color: "var(--lw-ink-2)", marginBottom: 20, maxWidth: "52ch" }}>
        Three fields is usually enough. You'll hear back from the designer who'd do the work &mdash; not a
        sales team &mdash; within a business day, in <em>Bulgarian or English</em>, whichever you prefer.
      </p>
      <p style={{ fontSize: 15, lineHeight: 1.7, color: "var(--lw-ink-3)", marginBottom: 48, maxWidth: "52ch", fontFamily: "var(--lw-font-serif)", fontStyle: "italic" }}>
        Prefer to ask one quick question first? Email&nbsp;
        <a className="lw-link" href="mailto:hello@layerwright.co?subject=A quick question">hello@layerwright.co</a>
        &nbsp;— no form, no follow-ups.
      </p>
      <form style={{ display: "grid", gap: 20 }} onSubmit={(e) => { e.preventDefault(); alert("Message sent. We'll be in touch by tomorrow."); }}>
        <Field label="Your name" placeholder="Your full name"/>
        <Field label="Business · one line" placeholder="Business name, trade, town"/>
        <Field label="A website url, if you have one" placeholder="yourbusiness.com"/>
        <Field label="A line or two about the project" placeholder="What the site needs to do, what it replaces, the rough timeline…" multiline/>
        <div style={{ display: "flex", gap: 16, alignItems: "center", marginTop: 12, flexWrap: "wrap" }}>
          <Button variant="primary" type="submit">Send the note<Icon name="arrow" size={16}/></Button>
          <small style={{ color: "var(--lw-ink-3)" }}>Or email <a className="lw-link" href="mailto:hello@layerwright.co">hello@layerwright.co</a></small>
        </div>
      </form>
    </div>
  </section>
);
const Field = ({ label, placeholder, multiline }) => {
  const shared = {
    padding: "14px 16px", background: "var(--lw-bg-elev)",
    border: "1px solid var(--lw-border)", borderRadius: 4,
    fontFamily: "var(--lw-font-sans)", fontSize: 15, color: "var(--lw-ink)",
    transition: "border-color .14s var(--lw-ease), box-shadow .14s var(--lw-ease)",
    resize: multiline ? "vertical" : "none",
    minHeight: multiline ? 120 : undefined,
    lineHeight: multiline ? 1.55 : undefined,
  };
  const onFocus = (e) => { e.target.style.borderColor = "var(--lw-ink)"; e.target.style.boxShadow = "0 0 0 3px rgba(198,93,58,0.15)"; };
  const onBlur  = (e) => { e.target.style.borderColor = "var(--lw-border)"; e.target.style.boxShadow = "none"; };
  return (
    <label style={{ display: "grid", gap: 8 }}>
      <span style={{ fontFamily: "var(--lw-font-sans)", fontSize: 11, textTransform: "uppercase", letterSpacing: "0.22em", color: "var(--lw-ink-3)" }}>{label}</span>
      {multiline
        ? <textarea placeholder={placeholder} style={shared} onFocus={onFocus} onBlur={onBlur}/>
        : <input placeholder={placeholder} style={shared} onFocus={onFocus} onBlur={onBlur}/>}
    </label>
  );
};

// ——— Process ———
const Process = () => {
  const steps = [
    { n: "I",   t: "Brief",   b: "A 30-minute call. You tell us about the business; we listen and take notes. No slide deck.", d: "Shared notes · trade brief" },
    { n: "II",  t: "Design",  b: "Two rounds of layouts and copy. You see real pages, not abstract moodboards.", d: "Full-page design · copy draft" },
    { n: "III", t: "Build",   b: "We ship a fast, indexable static site. You get a staging link to share with anyone.", d: "Staging link · 95+ Lighthouse" },
    { n: "IV",  t: "Launch",  b: "We press go, watch Google index the pages, then look after the site month to month.", d: "Live site · Search Console setup" },
  ];
  return (
    <section id="process" style={{ padding: "144px 32px", background: "var(--lw-paper)", scrollMarginTop: 100, borderTop: "1px solid var(--lw-border)" }}>
      <div style={{ maxWidth: 1240, margin: "0 auto" }}>
        <SectionHeader num="04" eyebrow="Process" title="How a project runs, from first note to live."/>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 0, borderTop: "1px solid var(--lw-ink)" }}>
          {steps.map((s, i) => (
            <article key={s.t} style={{ padding: "32px 28px 28px", borderRight: i < steps.length - 1 ? "1px solid var(--lw-border)" : "0", position: "relative" }}>
              <div style={{ display: "flex", alignItems: "baseline", justifyContent: "space-between", marginBottom: 20 }}>
                <span className="lw-numeral" style={{ fontSize: 36, color: "var(--lw-terra)", lineHeight: 1 }}>{s.n}</span>
                <span style={{ fontFamily: "var(--lw-font-mono)", fontSize: 10, color: "var(--lw-ink-4)", letterSpacing: "0.14em", textTransform: "uppercase" }}>
                  {["Week 0", "Week 1–2", "Week 2–4", "Week 4+"][i]}
                </span>
              </div>
              <h3 style={{ fontFamily: "var(--lw-font-serif)", fontWeight: 400, fontSize: 24, margin: "0 0 10px", color: "var(--lw-ink)" }}>{s.t}</h3>
              <p style={{ margin: 0, color: "var(--lw-ink-2)", fontSize: 14, lineHeight: 1.65 }}>{s.b}</p>
              <div className="lw-deliverable"><strong>You get</strong>{s.d}</div>
            </article>
          ))}
        </div>
      </div>
    </section>
  );
};

// ——— FAQ ———
const FAQ = () => {
  const [open, setOpen] = React.useState(0);
  const qs = [
    { q: "What if the site isn't right?",              a: "You see the design before we write a line of code. If the direction isn't right after round two of revisions, you don't pay — we part on good terms and you keep any assets we've made. It's happened twice; both times we were honest about it." },
    { q: "How long does a site take?",                 a: "Typically three to four weeks from brief to launch. Week one is design, week two is your revisions, weeks three to four are build and launch. If you need it sooner we'll tell you honestly, up front." },
    { q: "What's included in the €200 launch offer?",  a: "A full build — up to 8 pages, hand-written copy, local SEO set-up, schema, hand-off training. The price is this low because we're building our portfolio this summer; we take on two projects at this rate and then it goes back to €370." },
    { q: "Do you guarantee I'll rank on Google?",       a: "No honest studio can. What we guarantee is the groundwork: hand-written titles, clean headings, schema for your trade, a fast-loading site Google can crawl, and a Google Business listing set up for you. We'll show you baseline metrics at launch and check in at three and six months — edits during that window are on us." },
    { q: "What happens after launch?",                  a: "We watch the first week of traffic with you, fix anything odd, and hand you a short note on what to do with it. From there it's €20/month maintenance — updates, backups, two hours of content edits — or nothing at all; the site is yours either way." },
    { q: "Who owns the code and the hosting?",         a: "You do. We build on a fast static host in your name; you keep the logins and the domain. If you ever move on, nothing is locked in." },
    { q: "Can you write the copy for us? In Bulgarian?",  a: "Yes to both. Good SEO starts with sentences that read like a person wrote them. We write in Bulgarian or English; if you'd rather write your own we'll edit and structure it for search." },
  ];
  return (
    <section id="faq" style={{ padding: "144px 32px", background: "var(--lw-paper)", scrollMarginTop: 100 }}>
      <div style={{ maxWidth: 1240, margin: "0 auto" }}>
        <SectionHeader num="06" eyebrow="Frequently asked" title="Short answers, honestly."/>
        <div style={{ borderTop: "1px solid var(--lw-ink)" }}>
          {qs.map((item, i) => {
            const isOpen = open === i;
            return (
              <div key={item.q} style={{ borderBottom: "1px solid var(--lw-border)" }}>
                <button onClick={() => setOpen(isOpen ? -1 : i)} style={{
                  width: "100%", background: "transparent", border: 0, cursor: "pointer",
                  padding: "28px 0", display: "grid", gridTemplateColumns: "64px 1fr 32px", gap: 24, alignItems: "center", textAlign: "left",
                }}>
                  <span className="lw-nums-tabular" style={{ fontFamily: "var(--lw-font-mono)", fontSize: 11, color: "var(--lw-ink-3)", letterSpacing: "0.14em" }}>0{i + 1}</span>
                  <span style={{ fontFamily: "var(--lw-font-serif)", fontStyle: "italic", fontWeight: 300, fontSize: "clamp(22px, 2.2vw, 30px)", lineHeight: 1.2, color: "var(--lw-ink)", letterSpacing: "-0.02em" }}>{item.q}</span>
                  <span aria-hidden="true" style={{ fontFamily: "var(--lw-font-serif)", fontSize: 28, color: "var(--lw-terra)", textAlign: "right", transition: "transform .26s var(--lw-ease)", transform: isOpen ? "rotate(45deg)" : "none", display: "inline-block" }}>+</span>
                </button>
                <div className="lw-faq-panel" data-open={isOpen ? "true" : "false"}>
                  <div>
                    <p style={{ margin: 0, padding: "0 56px 28px 88px", fontSize: 16, lineHeight: 1.7, color: "var(--lw-ink-2)", maxWidth: "64ch" }}>{item.a}</p>
                  </div>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </section>
  );
};

Object.assign(window, { Hero, ClientBand, Services, SEOCallout, WorkGrid, Testimonial, Pricing, Process, FAQ, Contact });
