// IndustryPage — template for per-sector landing pages.
// Pulls data from window.INDUSTRIES (industriesData.jsx) and reuses the
// Case animations (CaseAnimations.jsx) to embed the matching deployment.

const SECTOR_TO_ANIM = {
  ARCHITECTURE: () => <AnimArchitecture />,
  LAW:          () => <AnimLaw />,
  HOUSING:      () => <AnimHousing />,
  ACCOUNTING:   () => <AnimAccounting />,
  HEALTHCARE:   () => <AnimHealthcare />,
  INSURANCE:    () => <AnimInsurance />,
};

function IndustryHero({ data }) {
  return (
    <section style={{
      position: "relative",
      padding: "120px 0 96px",
      background: "var(--paper)",
      color: "var(--fg-1)",
      overflow: "hidden",
      borderBottom: "1px solid var(--border-1)",
    }}>
      {/* Drifting motif */}
      <Parallax speed={0.18} style={{
        position: "absolute", right: "-160px", top: 60,
        width: 520, opacity: 0.16, pointerEvents: "none",
      }}>
        <img src="assets/motif-wireframe-sphere.svg" alt=""
          className="drift-y"
          style={{ width: "100%", display: "block" }}/>
      </Parallax>

      <div className="container" style={{ position: "relative" }}>
        <Reveal className="reveal-up" style={{
          display: "flex", flexDirection: "column", gap: 28,
          maxWidth: "62ch",
        }}>
          <div style={{ display: "flex", alignItems: "center", gap: 14 }}>
            <MonoTag tone="flame">INDUSTRY / {data.code}</MonoTag>
            <MonoTag>{data.sector}</MonoTag>
            <Hairline flex={1} />
            <EyebrowLabel prefix="●">INTAKE OPEN</EyebrowLabel>
          </div>

          <h1 style={{
            fontFamily: "var(--font-display)",
            fontSize: "clamp(48px, 7vw, 96px)",
            fontWeight: 500, lineHeight: 0.98,
            letterSpacing: "-0.025em",
            margin: 0, textWrap: "balance",
            color: "var(--fg-1)",
          }}>
            <ScrambleHeading segments={[
              { text: data.headlineLead + " " },
              { text: data.headlineEmph, accent: true },
            ]} duration={1300} />
          </h1>

          <p style={{
            fontFamily: "var(--font-sans)",
            fontSize: 19, lineHeight: 1.55,
            color: "var(--fg-2)",
            margin: 0, maxWidth: "54ch",
          }}>{data.sub}</p>

          <div style={{ display: "flex", gap: 12, flexWrap: "wrap", alignItems: "center" }}>
            <Button variant="flame" href={getPageContext().linkToMain("contact")}>
              Book a 30-min walkthrough <ArrowGlyph />
            </Button>
            <Button variant="secondary" href="#tools">
              See the tools
            </Button>
            <span style={{
              marginLeft: 4,
              fontFamily: "var(--font-mono)",
              fontSize: 11, letterSpacing: "0.12em",
              color: "var(--fg-3)",
              textTransform: "uppercase",
            }}>● {data.practitioner}</span>
          </div>
        </Reveal>
      </div>
    </section>
  );
}

function IndustryPains({ data }) {
  return (
    <section style={{
      padding: "96px 0",
      background: "var(--bg-2)",
      borderBottom: "1px solid var(--border-1)",
      position: "relative",
      overflow: "hidden",
    }}>
      {/* Faint dot pattern */}
      <div aria-hidden="true" style={{
        position: "absolute", inset: 0,
        backgroundImage: "radial-gradient(rgba(10,10,10,0.08) 1px, transparent 1px)",
        backgroundSize: "32px 32px",
        maskImage: "radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%)",
        WebkitMaskImage: "radial-gradient(ellipse 75% 65% at 50% 50%, #000 35%, transparent 100%)",
        opacity: 0.7,
      }}/>

      <div className="container" style={{ position: "relative", display: "flex", flexDirection: "column", gap: 56 }}>
        <SectionHeader
          eyebrow={`// FOR ${data.sector} · WHAT'S BROKEN TODAY`}
          title={data.painsTitle
            ? <>{data.painsTitle.lead}<AccentDot /> {data.painsTitle.tail}</>
            : <>The four things<AccentDot /> {data.name.toLowerCase()} partners always say.</>}
        />

        <div className="grid-2" style={{
          display: "grid",
          gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
          gap: 24,
        }}>
          {data.pains.map((p, i) => (
            <Reveal key={i} className="reveal-tilt" delay={i * 80}>
              <article style={{
                padding: 32,
                background: "var(--bg-1)",
                border: "1px solid var(--border-1)",
                borderRadius: 8,
                display: "flex", flexDirection: "column", gap: 12,
                position: "relative",
                minHeight: 200,
              }}>
                <span style={{
                  fontFamily: "var(--font-mono)", fontSize: 11,
                  letterSpacing: "0.18em",
                  color: "var(--site-accent, var(--flame))",
                  fontWeight: 500,
                }}>PAIN / {String(i + 1).padStart(2, "0")}</span>
                <h3 style={{
                  fontFamily: "var(--font-display)",
                  fontSize: 22, fontWeight: 500,
                  letterSpacing: "-0.015em", lineHeight: 1.2,
                  margin: 0, color: "var(--fg-1)",
                  textWrap: "balance",
                }}>{p.title}</h3>
                <p style={{
                  fontFamily: "var(--font-sans)",
                  fontSize: 14.5, lineHeight: 1.6,
                  color: "var(--fg-2)", margin: 0,
                }}>{p.body}</p>
              </article>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}

function IndustryTools({ data }) {
  return (
    <section id="tools" style={{
      padding: "120px 0",
      background: "var(--paper)",
      borderBottom: "1px solid var(--border-1)",
    }}>
      <div className="container" style={{ display: "flex", flexDirection: "column", gap: 56 }}>
        <SectionHeader
          eyebrow={`// FOR ${data.sector} · WHAT WE'D BUILD`}
          title={<>Six tools<AccentDot /> Built for the way you actually work.</>}
          sub="We don't ship every tool to every client. We scope, prioritise, and ship the ones that move partner hours back to partner work. Below is the typical menu — yours is shaped during scoping."
        />

        <div className="grid-3" style={{
          display: "grid",
          gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
          gap: 1,
          background: "var(--border-1)",
          border: "1px solid var(--border-1)",
          borderRadius: 8,
          overflow: "hidden",
        }}>
          {data.tools.map((t, i) => (
            <Reveal key={i} className="reveal-up" delay={i * 60}>
              <article style={{
                padding: 28,
                background: "var(--bg-1)",
                display: "flex", flexDirection: "column", gap: 12,
                minHeight: 180, height: "100%",
                position: "relative",
              }}>
                <div style={{
                  display: "flex", alignItems: "baseline", justifyContent: "space-between",
                }}>
                  <span style={{
                    fontFamily: "var(--font-mono)", fontSize: 11,
                    letterSpacing: "0.16em",
                    color: "var(--fg-3)",
                    fontWeight: 500,
                  }}>TOOL / {String(i + 1).padStart(2, "0")}</span>
                  <span style={{
                    color: "var(--site-accent, var(--flame))",
                    fontFamily: "var(--font-mono)", fontSize: 14,
                  }}>◆</span>
                </div>
                <h3 style={{
                  fontFamily: "var(--font-display)",
                  fontSize: 22, fontWeight: 500,
                  letterSpacing: "-0.015em", lineHeight: 1.2,
                  margin: 0, color: "var(--fg-1)",
                }}>{t.name}</h3>
                <p style={{
                  fontFamily: "var(--font-sans)",
                  fontSize: 14.5, lineHeight: 1.6,
                  color: "var(--fg-2)", margin: 0,
                }}>{t.desc}</p>
              </article>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}

function IndustryLiveDemo({ data }) {
  const Anim = SECTOR_TO_ANIM[data.sector];
  const cs = data.caseStudy || {};
  const metricSign = (String(cs.metric || "").match(/^[+\-−]/) || [""])[0];
  const metricRest = String(cs.metric || "").replace(/^[+\-−]/, "");
  return (
    <section style={{
      padding: "120px 0",
      background: "var(--ink)",
      color: "var(--paper)",
      position: "relative",
      overflow: "hidden",
    }}>
      <Parallax speed={0.22} style={{
        position: "absolute", left: "-180px", top: "10%",
        width: 480, opacity: 0.10, pointerEvents: "none",
      }}>
        <img src="assets/motif-wireframe-torus.svg" alt=""
          className="spin-slow"
          style={{ width: "100%", display: "block", filter: "invert(1)" }}/>
      </Parallax>

      <div className="container" style={{
        position: "relative",
        display: "flex", flexDirection: "column", gap: 48,
      }}>
        {/* Section header */}
        <Reveal className="reveal-up col gap-4" style={{ maxWidth: "60ch" }}>
          <EyebrowLabel color="var(--n-400)">LIVE DEPLOYMENT · CASE {data.caseRef}</EyebrowLabel>
          <h2 style={{
            fontFamily: "var(--font-display)",
            fontSize: "clamp(36px, 4.5vw, 56px)",
            fontWeight: 500, lineHeight: 1.05,
            letterSpacing: "-0.02em", margin: 0,
            color: "var(--paper)", textWrap: "balance",
            maxWidth: "18ch",
          }}>
            Built, shipped<AccentDot /> Running in production.
          </h2>
        </Reveal>

        {/* Case card — animation + full case study, mirrors the old Deployments card */}
        <Reveal className="reveal-clip-down">
          <article style={{
            display: "grid",
            gridTemplateColumns: "minmax(0, 7fr) minmax(0, 5fr)",
            gap: 0,
            border: "1px solid rgba(245,243,238,0.14)",
            borderRadius: 8,
            overflow: "hidden",
            background: "var(--ink-2)",
            boxShadow: "0 32px 60px -24px rgba(0,0,0,0.65)",
          }} className="grid-2">
            {/* Animated demo column */}
            <div className="case-card-demo" style={{
              background: "var(--ink)",
              position: "relative",
              minHeight: 380,
              overflow: "hidden",
              borderRight: "1px solid rgba(245,243,238,0.10)",
            }}>
              {Anim && <Anim />}
              <div style={{
                position: "absolute", top: 20, left: 20,
                display: "flex", gap: 8, zIndex: 2,
              }}>
                <MonoTag tone="invert">{data.sector}</MonoTag>
                <MonoTag tone="flame">CASE / {data.caseRef}</MonoTag>
              </div>
            </div>

            {/* Content column */}
            <div className="case-card-body" style={{
              padding: 40,
              display: "flex", flexDirection: "column", gap: 20,
              justifyContent: "space-between",
            }}>
              <div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
                <span style={{
                  fontFamily: "var(--font-mono)", fontSize: 11,
                  letterSpacing: "0.18em", color: "var(--n-400)",
                }}>{(cs.client || data.name).toUpperCase()}</span>
                <h3 style={{
                  fontFamily: "var(--font-display)",
                  fontSize: 28, fontWeight: 500,
                  letterSpacing: "-0.02em", lineHeight: 1.14,
                  margin: 0, color: "var(--paper)", textWrap: "balance",
                }}>{cs.title}</h3>
                <p style={{
                  fontFamily: "var(--font-sans)",
                  fontSize: 15, lineHeight: 1.6,
                  color: "var(--n-300)", margin: 0, maxWidth: "48ch",
                }}>{cs.summary}</p>
                {cs.tags && (
                  <div style={{ display: "flex", flexWrap: "wrap", gap: 6 }}>
                    {cs.tags.map((t, k) => (
                      <span key={k} style={{
                        fontFamily: "var(--font-mono)", fontSize: 10,
                        letterSpacing: "0.08em", color: "var(--n-400)",
                        padding: "3px 8px",
                        border: "1px solid rgba(245,243,238,0.18)",
                        borderRadius: 3,
                      }}>{t}</span>
                    ))}
                  </div>
                )}
              </div>

              <div className="case-card-footer" style={{
                display: "flex", alignItems: "flex-end", justifyContent: "space-between",
                paddingTop: 16, borderTop: "1px solid rgba(245,243,238,0.12)",
              }}>
                <div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
                  <span style={{
                    fontFamily: "var(--font-mono)", fontSize: 44, fontWeight: 500,
                    color: "var(--paper)", letterSpacing: "-0.02em", lineHeight: 1,
                  }}>
                    <span style={{ color: "var(--site-accent, var(--flame))" }}>{metricSign}</span>
                    {metricRest}
                  </span>
                  <span style={{
                    fontFamily: "var(--font-mono)", fontSize: 10,
                    letterSpacing: "0.18em", textTransform: "uppercase",
                    color: "var(--n-400)",
                  }}>{cs.metricLabel}</span>
                </div>
                <a href={getPageContext().linkToMain("contact")} style={{
                  fontFamily: "var(--font-sans)", fontSize: 13,
                  color: "var(--paper)", textDecoration: "none",
                  display: "inline-flex", alignItems: "center", gap: 8,
                  borderBottom: "1px solid rgba(245,243,238,0.32)",
                  paddingBottom: 2,
                }}>
                  Discuss a build like this <ArrowGlyph />
                </a>
              </div>
            </div>
          </article>
        </Reveal>
      </div>
    </section>
  );
}

// Shown instead of IndustryLiveDemo for sectors with noCase: true.
// Honest framing: this is in co-development, pilot cohort open, full source on
// delivery. Same dark slab silhouette as IndustryLiveDemo so the page rhythm
// holds whether or not we have a shipped case to point at.
function IndustryCohort({ data }) {
  return (
    <section style={{
      padding: "120px 0",
      background: "var(--ink)",
      color: "var(--paper)",
      borderTop: "1px solid var(--border-2)",
      position: "relative",
      overflow: "hidden",
    }}>
      <Parallax speed={0.22} style={{
        position: "absolute", right: "-160px", top: "8%",
        width: 460, opacity: 0.10, pointerEvents: "none",
      }}>
        <img src="assets/motif-wireframe-cube.svg" alt=""
          className="spin-slow"
          style={{ width: "100%", display: "block", filter: "invert(1)" }}/>
      </Parallax>

      <div className="container grid-2" style={{
        position: "relative",
        display: "grid",
        gridTemplateColumns: "minmax(0, 5fr) minmax(0, 7fr)",
        gap: 64, alignItems: "center",
      }}>
        <Reveal className="reveal-from-left col gap-5">
          <EyebrowLabel color="var(--n-400)">// CO-DEVELOPMENT · COHORT {data.code}</EyebrowLabel>
          <h2 style={{
            fontFamily: "var(--font-display)",
            fontSize: "clamp(36px, 4.5vw, 56px)",
            fontWeight: 500, lineHeight: 1.05,
            letterSpacing: "-0.02em", margin: 0,
            color: "var(--paper)", textWrap: "balance",
            maxWidth: "18ch",
          }}>
            Not shipped yet<AccentDot /> Co-build with us.
          </h2>
          <p style={{
            fontFamily: "var(--font-sans)",
            fontSize: 16, lineHeight: 1.65,
            color: "var(--n-300)", margin: 0,
            maxWidth: "46ch",
          }}>
            {data.name} is the next vertical on our roadmap. We build it the same way as every other deployment — alongside practitioners, against a real workload, with full source on delivery. The first three partner firms get the lowest seats and the most influence over the stack.
          </p>
          <a href={getPageContext().linkToMain("contact")} style={{
            fontFamily: "var(--font-sans)", fontSize: 14,
            color: "var(--paper)", textDecoration: "none",
            display: "inline-flex", alignItems: "center", gap: 8,
            borderBottom: "1px solid rgba(245,243,238,0.32)",
            paddingBottom: 2,
            width: "fit-content",
          }}>
            Join the pilot cohort <ArrowGlyph />
          </a>
        </Reveal>

        <Reveal className="reveal-up" delay={120} style={{
          position: "relative",
          minHeight: 380,
          borderRadius: 8,
          border: "1px solid rgba(245,243,238,0.16)",
          overflow: "hidden",
          background: "var(--ink-2)",
          boxShadow: "0 32px 60px -24px rgba(0,0,0,0.6)",
          display: "flex", flexDirection: "column",
          padding: 28,
          gap: 18,
        }}>
          <div style={{
            display: "flex", gap: 8,
          }}>
            <MonoTag tone="invert">{data.sector}</MonoTag>
            <MonoTag tone="flame">PILOT / OPEN</MonoTag>
          </div>

          {/* Cohort terms — terse, mono, instrument-panel feel */}
          <div style={{
            marginTop: 12,
            display: "grid",
            gridTemplateColumns: "auto 1fr",
            columnGap: 24, rowGap: 14,
            fontFamily: "var(--font-mono)",
            fontSize: 12,
            color: "var(--paper)",
          }}>
            {[
              ["COHORT",     "3 partner firms"],
              ["ENGAGEMENT", "6 months · weekly working session"],
              ["DELIVERY",   "Full source · self-host · no lock-in"],
              ["PRICING",    "Cohort rate — held for life"],
              ["OPENS",      "Q3 2026"],
            ].map(([k, v]) => (
              <React.Fragment key={k}>
                <span style={{
                  letterSpacing: "0.14em",
                  color: "var(--n-400)",
                  whiteSpace: "nowrap",
                }}>// {k}</span>
                <span style={{
                  letterSpacing: "0.02em",
                  color: "var(--paper)",
                }}>{v}</span>
              </React.Fragment>
            ))}
          </div>

          <div style={{
            marginTop: "auto",
            paddingTop: 18,
            borderTop: "1px solid rgba(245,243,238,0.12)",
            fontFamily: "var(--font-mono)", fontSize: 11,
            letterSpacing: "0.10em",
            color: "var(--n-400)",
            textTransform: "uppercase",
          }}>
            {data.cohortNote || "Pilot cohort opens Q3 2026."}
          </div>
        </Reveal>
      </div>
    </section>
  );
}

function IndustryOthers({ currentSlug }) {
  const others = INDUSTRY_ORDER.filter((s) => s !== currentSlug);
  const ctx = getPageContext();
  return (
    <section style={{
      padding: "96px 0",
      background: "var(--bg-1)",
      borderTop: "1px solid var(--border-1)",
    }}>
      <div className="container" style={{ display: "flex", flexDirection: "column", gap: 40 }}>
        <SectionHeader
          eyebrow="// OTHER INDUSTRIES"
          title={<>Different firm<AccentDot /> Different stack.</>}
          sub="Every sector below has its own playbook. Pick yours."
        />
        <div style={{
          display: "grid",
          gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
          gap: 16,
        }}>
          {others.map((slug) => {
            const ind = INDUSTRIES[slug];
            return (
              <a key={slug} href={ctx.linkToIndustry(slug)} style={{
                textDecoration: "none",
                padding: 20,
                border: "1px solid var(--border-1)",
                borderRadius: 8,
                background: "var(--bg-1)",
                color: "var(--fg-1)",
                display: "flex", flexDirection: "column", gap: 8,
                transition: "border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast)",
                minHeight: 110,
              }}
                onMouseEnter={(e) => {
                  e.currentTarget.style.borderColor = "var(--border-3)";
                  e.currentTarget.style.background = "var(--bg-2)";
                  e.currentTarget.style.transform = "translateY(-2px)";
                }}
                onMouseLeave={(e) => {
                  e.currentTarget.style.borderColor = "var(--border-1)";
                  e.currentTarget.style.background = "var(--bg-1)";
                  e.currentTarget.style.transform = "translateY(0)";
                }}
              >
                <span style={{
                  fontFamily: "var(--font-mono)", fontSize: 10,
                  letterSpacing: "0.16em", color: "var(--fg-3)",
                }}>{ind.code} / {ind.sector}</span>
                <span style={{
                  fontFamily: "var(--font-display)",
                  fontSize: 20, fontWeight: 500,
                  letterSpacing: "-0.015em", lineHeight: 1.1,
                  color: "var(--fg-1)",
                }}>{ind.name}</span>
                <span style={{
                  marginTop: "auto",
                  fontFamily: "var(--font-mono)", fontSize: 11,
                  letterSpacing: "0.10em", color: "var(--site-accent, var(--flame))",
                }}>VIEW →</span>
              </a>
            );
          })}
        </div>
      </div>
    </section>
  );
}

function IndustryCTA({ data }) {
  const ctx = getPageContext();
  return (
    <section style={{
      padding: "120px 0",
      background: "var(--paper)",
      borderTop: "1px solid var(--border-1)",
      position: "relative",
      overflow: "hidden",
    }}>
      <div className="container grid-2" style={{
        display: "grid",
        gridTemplateColumns: "minmax(0, 7fr) minmax(0, 5fr)",
        gap: 64,
        alignItems: "center",
      }}>
        <Reveal className="reveal-up col gap-4">
          <EyebrowLabel>// NEXT STEP</EyebrowLabel>
          <h2 style={{
            fontFamily: "var(--font-display)",
            fontSize: "clamp(36px, 5vw, 64px)",
            fontWeight: 500, lineHeight: 1.0,
            letterSpacing: "-0.025em", margin: 0,
            color: "var(--fg-1)", textWrap: "balance",
            maxWidth: "18ch",
          }}>
            Tell us how your {data.name.toLowerCase()} practice runs<AccentDot /> We'll tell you what we'd ship.
          </h2>
          <p style={{
            fontFamily: "var(--font-sans)",
            fontSize: 16, lineHeight: 1.6,
            color: "var(--fg-2)", margin: 0,
            maxWidth: "48ch",
          }}>
            One paragraph is enough. 30-minute call, no sales deck. We reply within two business days.
          </p>
        </Reveal>

        <Reveal className="reveal-up" delay={120} style={{
          display: "flex", flexDirection: "column", gap: 14,
          padding: 32,
          border: "1px solid var(--border-2)",
          borderRadius: 10,
          background: "var(--bg-2)",
        }}>
          <Button variant="flame" href={ctx.linkToMain("contact")}>
            Send a brief <ArrowGlyph />
          </Button>
          <a href={`https://wa.me/601170068801?text=${encodeURIComponent("Hi Promefy — I'm from a " + data.name.toLowerCase() + " firm. Can we talk?")}`}
             target="_blank" rel="noopener noreferrer"
             style={{
               padding: "12px 16px",
               background: "var(--bg-1)",
               border: "1px solid var(--border-2)",
               color: "var(--fg-1)",
               textAlign: "center",
               textDecoration: "none",
               borderRadius: 6,
               fontFamily: "var(--font-sans)",
               fontSize: 14,
               fontWeight: 500,
             }}>
            Chat on WhatsApp →
          </a>
          <span style={{
            fontFamily: "var(--font-mono)", fontSize: 11,
            letterSpacing: "0.14em",
            color: "var(--fg-3)",
            textAlign: "center", textTransform: "uppercase",
          }}>● ~ 30 MIN INTRO · NO COMMITMENT</span>
        </Reveal>
      </div>
    </section>
  );
}

function IndustryPage({ slug }) {
  const data = INDUSTRIES[slug];
  if (!data) return <div style={{ padding: 80 }}>Industry not found.</div>;
  // Make sure the slug is exposed for Nav active state
  React.useEffect(() => {
    window.__INDUSTRY_SLUG = slug;
    document.title = `Promefy Solutions — ${data.name} · ${data.headlineEmph}`;
  }, [slug, data]);
  return (
    <>
      <IndustryHero data={data} />
      <IndustryPains data={data} />
      {data.noCase ? <IndustryCohort data={data} /> : <IndustryLiveDemo data={data} />}
      <IndustryOthers currentSlug={slug} />
      <IndustryCTA data={data} />
    </>
  );
}

// IndustryApp — wraps the page with the same chrome as the main App
// (Nav, Footer, WhatsApp widget) but skips the heavy multi-section composition.
function IndustryApp({ slug }) {
  // Default tweaks (no edit panel on industry pages — these are for clients)
  React.useEffect(() => {
    const root = document.documentElement;
    const defaults = window.__TWEAK_DEFAULTS || {};
    root.dataset.theme = defaults.theme || "light";
    root.dataset.accent = defaults.accent || "matrix";
    root.dataset.crosshair = defaults.crosshair !== false ? "on" : "off";
    // Seed accent in case the inline boot script isn't present.
    if (!root.style.getPropertyValue("--site-accent")) {
      root.style.setProperty("--site-accent", "#00FF66");
      root.style.setProperty("--site-accent-fg", "#0A0A0A");
      root.style.setProperty("--site-accent-soft", "rgba(0,255,102,0.16)");
    }
  }, []);

  // No scroll-spy needed on industry pages — Nav uses href targets
  return (
    <main>
      <Nav active={null} onNavigate={() => {}} dark={false} />
      <IndustryPage slug={slug} />
      <Footer />
      <Whatsapp />
    </main>
  );
}

Object.assign(window, { IndustryPage, IndustryApp });
