// Hero variations for the NeoHelio + orbit marketing site.
// Four directions explored side-by-side on a design canvas. The user picks
// one and the full multi-page site is built in that direction.
//
// Each hero is sized like a real desktop viewport (1440 × 820) so they can
// be judged at production scale. All share the brand tokens from styles.css
// and pull in OrbitWordmark from orbit-brand.jsx for the platform mark.

// ────────── Shared nav (the same across all variations) ──────────
const HVNav = ({ active = "home", warm = false }) => (
  <nav style={{
    height: 68,
    display: "flex", alignItems: "center", justifyContent: "space-between",
    padding: "0 56px",
    borderBottom: `1px solid ${warm ? "var(--nh-line)" : "var(--nh-line)"}`,
    background: "rgba(10,14,26,0.55)",
    backdropFilter: "blur(12px)",
    position: "relative", zIndex: 3,
  }}>
    <div style={{ display: "flex", alignItems: "baseline", gap: 14 }}>
      <span style={{
        fontFamily: "var(--nh-display)", fontWeight: 600, fontSize: 22,
        letterSpacing: "-0.035em", color: "var(--nh-ink)",
      }}>
        neohelio<span className="nh-period-glow" style={{ color: "var(--nh-accent)" }}>.</span>
      </span>
      <span className="nh-mono" style={{
        fontSize: 9, letterSpacing: "0.22em", textTransform: "uppercase",
        color: "var(--nh-ink-4)", paddingLeft: 4, borderLeft: "1px solid var(--nh-line)",
      }}>solar telemetry · est. mmxxv</span>
    </div>
    <div style={{ display: "flex", gap: 36 }}>
      {[
        ["home", "Home"],
        ["product", "Product"],
        ["company", "Company"],
        ["contact", "Contact"],
      ].map(([k, label]) => (
        <a key={k} href="#" style={{
          fontFamily: "var(--nh-sans)", fontSize: 13, fontWeight: 500,
          color: active === k ? "var(--nh-ink)" : "var(--nh-ink-3)",
          textDecoration: "none", letterSpacing: "0.01em",
          position: "relative",
        }}>
          {label}
          {active === k && (
            <span style={{
              position: "absolute", bottom: -22, left: 0, right: 0,
              height: 2, background: "var(--nh-accent)",
            }} />
          )}
        </a>
      ))}
    </div>
    <div style={{ display: "flex", gap: 10, alignItems: "center" }}>
      <span className="nh-mono" style={{
        fontSize: 10, color: "var(--nh-ink-3)", letterSpacing: "0.16em",
      }}>
        <span className="nh-dot nh-dot-mint nh-pulse" style={{ marginRight: 8 }} />
        FLEET NOMINAL
      </span>
      <button className="nh-btn nh-btn-primary">Request access</button>
    </div>
  </nav>
);

// ────────── Reusable: tiny console screenshot ──────────
// Mirrors the real Fleet view — financial-first banner, savings tile,
// blended-tariff readout, and a fleet table with TOU power curve.
const HVMiniConsole = ({ style = {} }) => (
  <div style={{
    background: "var(--nh-bg-2)",
    border: "1px solid var(--nh-line)",
    borderRadius: 6,
    overflow: "hidden",
    display: "flex", flexDirection: "column",
    boxShadow: "0 30px 80px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02)",
    ...style,
  }}>
    {/* top chrome */}
    <div style={{
      height: 30, background: "var(--nh-bg-3)",
      borderBottom: "1px solid var(--nh-line)",
      display: "flex", alignItems: "center", padding: "0 14px", gap: 10,
    }}>
      <div style={{ display: "flex", gap: 6 }}>
        <div style={{ width: 7, height: 7, borderRadius: "50%", background: "var(--nh-ink-5)" }} />
        <div style={{ width: 7, height: 7, borderRadius: "50%", background: "var(--nh-ink-5)" }} />
        <div style={{ width: 7, height: 7, borderRadius: "50%", background: "var(--nh-ink-5)" }} />
      </div>
      <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-ink-3)", letterSpacing: "0.18em" }}>
        ORBIT / FLEET · <span style={{ color: "var(--nh-accent)" }}>FINANCIAL</span>
      </span>
      <span style={{ flex: 1 }} />
      <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-mint)" }}>
        <span className="nh-dot nh-dot-mint nh-pulse" style={{ marginRight: 6, width: 5, height: 5 }} />
        SYNCED · 1m
      </span>
    </div>

    {/* body */}
    <div style={{ flex: 1, padding: 14, display: "flex", flexDirection: "column", gap: 10, minHeight: 0 }}>
      {/* top stats row */}
      <div style={{ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 12 }}>
        {[
          ["SITES", "12", "ink"],
          ["CAPACITY", "18.4 MW", "ink"],
          ["ACTIVE", "92%", "mint"],
          ["GROUPS", "03", "violet"],
        ].map(([k, v, tone]) => (
          <div key={k}>
            <div className="nh-mono" style={{ fontSize: 7.5, color: "var(--nh-ink-4)", letterSpacing: "0.18em" }}>{k}</div>
            <div className="nh-mono" style={{
              fontSize: 18, fontWeight: 500, marginTop: 3, lineHeight: 1,
              color: tone === "mint" ? "var(--nh-mint)" :
                     tone === "violet" ? "var(--nh-violet)" :
                     "var(--nh-ink)",
            }}>{v}</div>
          </div>
        ))}
      </div>

      {/* fleet bot banner */}
      <div style={{
        padding: "8px 10px",
        background: "rgba(245,158,11,0.04)",
        border: "1px solid var(--nh-line-amber)",
        borderRadius: 3,
        display: "flex", gap: 8, alignItems: "flex-start",
      }}>
        <span className="nh-mono" style={{
          fontSize: 7.5, color: "var(--nh-accent)", letterSpacing: "0.2em",
          marginTop: 1, whiteSpace: "nowrap",
        }}>◇ KIT.TRANSMISSION</span>
        <span style={{
          fontFamily: "var(--nh-sans)", fontSize: 10.5, lineHeight: 1.4,
          color: "var(--nh-ink-2)",
        }}>
          Your fleet has saved <span style={{ color: "var(--nh-accent)" }}>184.2k</span> this month so far (day 19/31). On track for 298.4k by month-end. <span style={{ color: "var(--nh-mint)" }}>+18% vs baseline.</span>
        </span>
      </div>

      {/* financial tiles */}
      <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 8 }}>
        {[
          ["SAVINGS · MTD", "184,200", "amber"],
          ["VS BASELINE · MTD", "+28,400", "mint"],
          ["BLENDED TARIFF", "0.42 / kWh", "ink"],
        ].map(([k, v, tone]) => (
          <div key={k} className="nh-card" style={{ padding: "8px 10px" }}>
            <div className="nh-mono" style={{ fontSize: 7.5, color: "var(--nh-ink-4)", letterSpacing: "0.18em" }}>// {k}</div>
            <div className="nh-mono" style={{
              fontSize: 16, fontWeight: 500, marginTop: 4, lineHeight: 1,
              color: tone === "amber" ? "var(--nh-accent)" :
                     tone === "mint" ? "var(--nh-mint)" :
                     "var(--nh-ink)",
            }}>{v}</div>
          </div>
        ))}
      </div>

      {/* fleet table */}
      <div style={{
        flex: 1, minHeight: 0, display: "flex", flexDirection: "column", gap: 4,
        paddingTop: 6, borderTop: "1px solid var(--nh-line)",
      }}>
        <div className="nh-mono" style={{
          fontSize: 7.5, color: "var(--nh-ink-4)", letterSpacing: "0.18em",
          display: "grid", gridTemplateColumns: "44px 1fr 60px 70px 60px 70px",
          gap: 8, padding: "0 4px",
        }}>
          <span>STATUS</span><span>SITE</span><span style={{ textAlign: "right" }}>CAPACITY</span>
          <span style={{ textAlign: "right" }}>YIELD</span><span style={{ textAlign: "right" }}>SAVINGS</span>
          <span style={{ textAlign: "right" }}>VS EXPECTED</span>
        </div>
        {[
          ["OK",   "amber", "Cornubia",      "540 kWp", "36,192", "27,840",  "+15,786", true],
          ["WARN", "violet", "River Quarter", "579 kWp", "27,489", "21,200",  "+8,250",  false],
          ["OK",   "amber", "Brickworks",    "509 kWp", "25,905", "17,420",  "+2,687",  false],
          ["OK",   "amber", "Paarl",         "170 kWp", "9,595",  "11,180",  "+4,614",  false],
          ["OK",   "amber", "Lords View",    "759 kWp", "49,544", "—",       "+8,295",  false],
          ["OK",   "amber", "FreshBev",      "252 kWp", "12,666", "—",       "+2,787",  false],
        ].map(([status, color, site, cap, yield_, sav, vs, active], i) => (
          <div key={i} style={{
            display: "grid", gridTemplateColumns: "44px 1fr 60px 70px 60px 70px",
            gap: 8, padding: "3px 4px",
            background: active ? "rgba(245,158,11,0.06)" : "transparent",
            alignItems: "center",
          }}>
            <span className="nh-mono" style={{
              fontSize: 8, color: status === "WARN" ? "var(--nh-violet)" : "var(--nh-mint)",
              letterSpacing: "0.14em",
              border: `1px solid var(--nh-${status === "WARN" ? "violet" : "mint"})`,
              padding: "1px 3px", borderRadius: 2, textAlign: "center",
            }}>{status}</span>
            <span className="nh-mono" style={{ fontSize: 9.5, color: "var(--nh-ink-2)" }}>{site}</span>
            <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-ink-3)", textAlign: "right" }}>{cap}</span>
            <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-ink)", textAlign: "right" }}>{yield_}</span>
            <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-accent)", textAlign: "right" }}>{sav}</span>
            <span className="nh-mono" style={{ fontSize: 9, color: "var(--nh-mint)", textAlign: "right" }}>{vs}</span>
          </div>
        ))}
      </div>
    </div>
  </div>
);

// ────────── Reusable: large stat readout ──────────
const HVStat = ({ k, v, unit, tone = "ink" }) => (
  <div>
    <div className="nh-mono" style={{
      fontSize: 10, color: "var(--nh-ink-4)", letterSpacing: "0.18em", textTransform: "uppercase",
    }}>{k}</div>
    <div style={{ display: "flex", alignItems: "baseline", gap: 6, marginTop: 6 }}>
      <span className="nh-mono" style={{
        fontSize: 28, fontWeight: 500, lineHeight: 1,
        color: tone === "amber" ? "var(--nh-accent)" : "var(--nh-ink)",
      }}>{v}</span>
      {unit && (
        <span className="nh-mono" style={{ fontSize: 11, color: "var(--nh-ink-3)" }}>{unit}</span>
      )}
    </div>
  </div>
);

// ════════════════════════════════════════════════════════════════════
// HERO A · "Mission control" — classic. Big tagline left, console right.
// Dense and confident; closest to the brand book's stated personality.
// ════════════════════════════════════════════════════════════════════
const HeroA = () => (
  <div className="nh-board" style={{ height: "100%", display: "flex", flexDirection: "column" }}>
    <div className="nh-grid-bg" />
    <div className="nh-glow" style={{
      width: 800, height: 800, left: -200, top: -200,
      background: "radial-gradient(circle, var(--nh-amber) 0%, transparent 60%)",
      opacity: 0.16,
    }} />
    <div className="nh-glow" style={{
      width: 700, height: 700, right: -180, bottom: -240,
      background: "radial-gradient(circle, var(--nh-violet) 0%, transparent 60%)",
      opacity: 0.14,
    }} />

    <HVNav active="home" />

    <div style={{
      flex: 1, padding: "72px 56px 56px",
      display: "grid", gridTemplateColumns: "1fr 1fr", gap: 64, alignItems: "center",
      position: "relative", zIndex: 2,
    }}>
      {/* left — copy */}
      <div>
        <div className="nh-mono" style={{
          fontSize: 11, color: "var(--nh-accent)", letterSpacing: "0.22em", textTransform: "uppercase",
          marginBottom: 28,
        }}>
          ◇ NH-IDENT/01 · solar telemetry infrastructure
        </div>
        <h1 style={{
          fontFamily: "var(--nh-display)", fontWeight: 500,
          fontSize: 78, lineHeight: 0.96, letterSpacing: "-0.035em",
          margin: 0, color: "var(--nh-ink)",
          textWrap: "balance",
        }}>
          Precision solar<br />
          monitoring.<br />
          <span style={{ color: "var(--nh-accent)", fontStyle: "italic", fontWeight: 400 }}>
            Control-room grade.
          </span>
        </h1>
        <p style={{
          fontFamily: "var(--nh-sans)", fontSize: 18, lineHeight: 1.6,
          color: "var(--nh-ink-2)", maxWidth: 480, margin: "32px 0 0",
        }}>
          neohelio builds the telemetry layer for utility-scale solar — from inverter-mounted edge devices to the operator console your team actually uses. One pane. Every array. Every 1.4 seconds.
        </p>
        <div style={{ display: "flex", gap: 12, marginTop: 40 }}>
          <button className="nh-btn nh-btn-primary" style={{ padding: "12px 22px", fontSize: 12 }}>
            Request access →
          </button>
          <button className="nh-btn" style={{ padding: "12px 22px", fontSize: 12 }}>
            See the platform
          </button>
        </div>
        <div style={{
          display: "flex", gap: 56, marginTop: 56,
          paddingTop: 28, borderTop: "1px solid var(--nh-line)",
        }}>
          <HVStat k="Sites monitored" v="42" tone="amber" />
          <HVStat k="Capacity tracked" v="6.4" unit="GW" />
          <HVStat k="Platform uptime" v="99.97" unit="%" />
        </div>
      </div>
      {/* right — console preview */}
      <div style={{ height: 460, position: "relative" }}>
        <div className="nh-mono" style={{
          position: "absolute", top: -28, left: 0,
          fontSize: 10, color: "var(--nh-ink-3)", letterSpacing: "0.2em",
        }}>
          ◇ ORBIT · OPERATOR CONSOLE — LIVE PREVIEW
        </div>
        <HVMiniConsole style={{ height: "100%" }} />
        {/* corner brackets */}
        {["tl", "tr", "bl", "br"].map((c) => (
          <div key={c} style={{
            position: "absolute", width: 18, height: 18,
            borderColor: "var(--nh-accent)", borderStyle: "solid",
            borderWidth: c === "tl" ? "1px 0 0 1px" : c === "tr" ? "1px 1px 0 0" :
                          c === "bl" ? "0 0 1px 1px" : "0 1px 1px 0",
            top: c.includes("t") ? -10 : "auto",
            bottom: c.includes("b") ? -10 : "auto",
            left: c.includes("l") ? -10 : "auto",
            right: c.includes("r") ? -10 : "auto",
            opacity: 0.6,
          }} />
        ))}
      </div>
    </div>
  </div>
);

// ════════════════════════════════════════════════════════════════════
// HERO B · "Dual identity" — neohelio (company) over orbit (platform).
// Stacked editorial layout. The relationship between the two brands is
// the lede. Lots of breathing room — warmer than A.
// ════════════════════════════════════════════════════════════════════
const HeroB = () => (
  <div className="nh-board" style={{ height: "100%", display: "flex", flexDirection: "column" }}>
    <div className="nh-grid-bg" />
    <div className="nh-glow" style={{
      width: 900, height: 900, left: "50%", top: "50%",
      transform: "translate(-50%, -50%)",
      background: "radial-gradient(circle, var(--nh-amber) 0%, transparent 55%)",
      opacity: 0.10,
    }} />

    <HVNav active="home" />

    <div style={{
      flex: 1, padding: "0 80px",
      display: "grid", gridTemplateRows: "1fr auto 1fr",
      position: "relative", zIndex: 2,
    }}>
      {/* upper — company */}
      <div style={{ display: "flex", flexDirection: "column", justifyContent: "center", paddingTop: 24 }}>
        <div style={{ display: "flex", alignItems: "center", gap: 18, marginBottom: 18 }}>
          <span className="nh-mono" style={{
            fontSize: 10, color: "var(--nh-accent)", letterSpacing: "0.24em", textTransform: "uppercase",
          }}>◇ THE COMPANY</span>
          <span style={{ flex: 1, height: 1, background: "var(--nh-line)" }} />
          <span className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-4)", letterSpacing: "0.16em" }}>
            FOUNDED MMXXV · 14 REGIONS · SOC-2 TYPE II
          </span>
        </div>
        <h1 style={{
          fontFamily: "var(--nh-display)", fontWeight: 500,
          fontSize: 96, lineHeight: 0.92, letterSpacing: "-0.04em",
          margin: 0, color: "var(--nh-ink)",
        }}>
          neohelio<span className="nh-period-glow" style={{ color: "var(--nh-accent)" }}>.</span>
        </h1>
        <p style={{
          fontFamily: "var(--nh-display)", fontWeight: 400, fontStyle: "italic",
          fontSize: 26, color: "var(--nh-ink-2)", maxWidth: 760,
          margin: "20px 0 0", lineHeight: 1.3, letterSpacing: "-0.015em",
        }}>
          We build the telemetry layer for utility-scale solar — hardware on the array, software in the control room, no gap in between.
        </p>
      </div>

      {/* divider band — "ships" */}
      <div style={{
        display: "flex", alignItems: "center", gap: 24,
        padding: "20px 0", borderTop: "1px solid var(--nh-line)", borderBottom: "1px solid var(--nh-line)",
        position: "relative",
      }}>
        <span className="nh-mono" style={{
          fontSize: 11, color: "var(--nh-ink-3)", letterSpacing: "0.32em", textTransform: "uppercase",
        }}>
          ships ↓
        </span>
        <span style={{ flex: 1, height: 1, background: "var(--nh-line)" }} />
        <span className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-4)", letterSpacing: "0.16em" }}>
          PLATFORM · ORB-IDENT/01 · v.4.2
        </span>
      </div>

      {/* lower — platform */}
      <div style={{
        display: "grid", gridTemplateColumns: "1.1fr 1fr", gap: 48, alignItems: "center",
        paddingBottom: 24,
      }}>
        <div>
          <OrbitWordmark size={108} showId={false} showMark={false} />
          <p style={{
            fontFamily: "var(--nh-sans)", fontSize: 17, lineHeight: 1.55,
            color: "var(--nh-ink-2)", maxWidth: 520, margin: "20px 0 0",
          }}>
            orbit is the operator console we ship — mission control for solar fleets. Every site, every inverter, every string, on one ring of telemetry passing through the console once every 1.4 seconds.
          </p>
          <div style={{ display: "flex", gap: 12, marginTop: 28 }}>
            <button className="nh-btn nh-btn-primary" style={{ padding: "12px 22px", fontSize: 12 }}>
              See orbit →
            </button>
            <button className="nh-btn" style={{ padding: "12px 22px", fontSize: 12 }}>
              About neohelio
            </button>
          </div>
        </div>
        {/* right — readouts strip */}
        <div className="nh-card" style={{ padding: 24 }}>
          <div className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-3)", letterSpacing: "0.2em", marginBottom: 16 }}>
            ◇ FLEET · LIVE — UPDATED 1.4s AGO
          </div>
          <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 24, rowGap: 18 }}>
            <HVStat k="Sites" v="42" tone="amber" />
            <HVStat k="Capacity" v="6.4" unit="GW" />
            <HVStat k="Inverters" v="11,842" />
            <HVStat k="Edge devices" v="14,218" />
          </div>
          <div style={{ display: "flex", justifyContent: "space-between", marginTop: 20, paddingTop: 16, borderTop: "1px solid var(--nh-line)" }}>
            <span className="nh-mono" style={{ fontSize: 10, color: "var(--nh-mint)", letterSpacing: "0.16em" }}>
              <span className="nh-dot nh-dot-mint nh-pulse" style={{ marginRight: 8 }} />
              ALL SYSTEMS NOMINAL
            </span>
            <span className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-4)", letterSpacing: "0.16em" }}>
              T+ 04:18:42 UTC
            </span>
          </div>
        </div>
      </div>
    </div>
  </div>
);

// ════════════════════════════════════════════════════════════════════
// HERO C · "Orbital diagram" — big planetary diagram centered, copy
// flanking. Most metaphorical / visual; observatory feel turned up.
// ════════════════════════════════════════════════════════════════════
const HeroCDiagram = () => (
  <svg viewBox="0 0 520 520" style={{ width: "100%", height: "100%", display: "block" }}>
    <defs>
      <filter id="hvc-blur" x="-50%" y="-50%" width="200%" height="200%">
        <feGaussianBlur stdDeviation="4" />
      </filter>
      <radialGradient id="hvc-glow" cx="50%" cy="50%" r="50%">
        <stop offset="0%" stopColor="var(--nh-amber)" stopOpacity="0.35" />
        <stop offset="60%" stopColor="var(--nh-amber)" stopOpacity="0.05" />
        <stop offset="100%" stopColor="transparent" />
      </radialGradient>
    </defs>
    {/* ambient */}
    <circle cx="260" cy="260" r="240" fill="url(#hvc-glow)" />
    {/* outer trajectories */}
    <ellipse cx="260" cy="260" rx="240" ry="90" fill="none" stroke="var(--nh-line)" strokeWidth="1" strokeDasharray="3 5" transform="rotate(-22 260 260)" />
    <ellipse cx="260" cy="260" rx="200" ry="74" fill="none" stroke="var(--nh-accent)" strokeWidth="1.2" opacity="0.7" transform="rotate(-22 260 260)" />
    <ellipse cx="260" cy="260" rx="160" ry="58" fill="none" stroke="var(--nh-violet)" strokeWidth="1" opacity="0.55" transform="rotate(28 260 260)" />
    <ellipse cx="260" cy="260" rx="120" ry="44" fill="none" stroke="var(--nh-line-2)" strokeWidth="1" strokeDasharray="2 3" transform="rotate(8 260 260)" />
    <ellipse cx="260" cy="260" rx="78" ry="28" fill="none" stroke="var(--nh-accent)" strokeWidth="1" opacity="0.4" transform="rotate(-50 260 260)" />

    {/* sun core */}
    <circle cx="260" cy="260" r="36" fill="var(--nh-bg-3)" stroke="var(--nh-line-amber)" strokeWidth="1.5" />
    <circle cx="260" cy="260" r="20" fill="var(--nh-accent)" filter="url(#hvc-blur)" opacity="0.85" />
    <circle cx="260" cy="260" r="10" fill="var(--nh-accent)" />
    {/* radiating ticks — solar burst */}
    {Array.from({ length: 16 }).map((_, i) => {
      const a = (i * 22.5 * Math.PI) / 180;
      const r1 = 44, r2 = i % 2 ? 56 : 64;
      return (
        <line key={i}
          x1={260 + Math.cos(a) * r1} y1={260 + Math.sin(a) * r1}
          x2={260 + Math.cos(a) * r2} y2={260 + Math.sin(a) * r2}
          stroke="var(--nh-accent)" strokeWidth={i % 2 ? 1 : 1.4}
          opacity={i % 2 ? 0.45 : 0.85} strokeLinecap="round" />
      );
    })}

    {/* satellites with labels */}
    {(() => {
      const sats = [
        { rx: 200, ry: 74, rot: -22, t: 0.15, color: "var(--nh-accent)", r: 6, label: "SITE-04 · 247 MW" },
        { rx: 160, ry: 58, rot: 28, t: 0.62, color: "var(--nh-violet)", r: 4, label: "SITE-22 · 184 MW" },
        { rx: 240, ry: 90, rot: -22, t: 0.88, color: "var(--nh-accent)", r: 3, label: "SITE-31" },
        { rx: 120, ry: 44, rot: 8, t: 0.35, color: "var(--nh-mint)", r: 3.5, label: "SITE-12" },
        { rx: 78,  ry: 28, rot: -50, t: 0.78, color: "var(--nh-accent)", r: 2.5 },
      ];
      return sats.map((s, i) => {
        const θ = s.rot * Math.PI / 180;
        const cosθ = Math.cos(θ), sinθ = Math.sin(θ);
        const a = s.t * Math.PI * 2;
        const x0 = Math.cos(a) * s.rx, y0 = Math.sin(a) * s.ry;
        const x = 260 + x0 * cosθ - y0 * sinθ;
        const y = 260 + x0 * sinθ + y0 * cosθ;
        return (
          <g key={i}>
            <circle cx={x} cy={y} r={s.r * 2.4} fill={s.color} opacity="0.22" />
            <circle cx={x} cy={y} r={s.r} fill={s.color} />
            {s.label && (
              <>
                <line x1={x} y1={y} x2={x + 28} y2={y - 18} stroke={s.color} strokeWidth="0.8" opacity="0.5" />
                <text x={x + 32} y={y - 14} fontFamily="var(--nh-mono)" fontSize="10"
                  fill={s.color} letterSpacing="0.12em">{s.label}</text>
              </>
            )}
          </g>
        );
      });
    })()}

    {/* compass ticks */}
    {["N", "E", "S", "W"].map((d, i) => {
      const a = (i * 90 - 90) * Math.PI / 180;
      const x = 260 + Math.cos(a) * 252;
      const y = 260 + Math.sin(a) * 252;
      return (
        <text key={d} x={x} y={y + 4} fontFamily="var(--nh-mono)" fontSize="10"
          fill="var(--nh-ink-4)" textAnchor="middle" letterSpacing="0.18em">{d}</text>
      );
    })}
  </svg>
);

const HeroC = () => (
  <div className="nh-board" style={{ height: "100%", display: "flex", flexDirection: "column" }}>
    <div className="nh-grid-bg" />
    <HVNav active="home" />

    <div style={{
      flex: 1, padding: "40px 56px 32px",
      display: "grid", gridTemplateColumns: "1fr 1.1fr 1fr", gap: 32, alignItems: "center",
      position: "relative", zIndex: 2,
    }}>
      {/* left copy */}
      <div>
        <div className="nh-mono" style={{
          fontSize: 10, color: "var(--nh-accent)", letterSpacing: "0.22em", textTransform: "uppercase",
          marginBottom: 24,
        }}>
          ◇ NH-IDENT/01
        </div>
        <h1 style={{
          fontFamily: "var(--nh-display)", fontWeight: 500,
          fontSize: 60, lineHeight: 0.96, letterSpacing: "-0.035em",
          margin: 0, color: "var(--nh-ink)",
        }}>
          Every site,<br />
          one ring of<br />
          <span style={{ color: "var(--nh-accent)" }}>telemetry.</span>
        </h1>
        <p style={{
          fontFamily: "var(--nh-sans)", fontSize: 16, lineHeight: 1.6,
          color: "var(--nh-ink-2)", margin: "28px 0 0",
        }}>
          neohelio ships the hardware. orbit reads it. Every array on the same console, refreshed every 1.4 seconds.
        </p>
        <button className="nh-btn nh-btn-primary" style={{ padding: "12px 22px", fontSize: 12, marginTop: 32 }}>
          Request access →
        </button>
      </div>
      {/* center diagram */}
      <div style={{ position: "relative", aspectRatio: "1", maxHeight: 520 }}>
        <HeroCDiagram />
      </div>
      {/* right readouts */}
      <div style={{ display: "flex", flexDirection: "column", gap: 0 }}>
        <div className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-3)", letterSpacing: "0.22em", marginBottom: 18 }}>
          ◇ FLEET TELEMETRY · LIVE
        </div>
        <div className="nh-kv"><span className="k">SITES ONLINE</span><span className="v" style={{ color: "var(--nh-accent)" }}>42 / 42</span></div>
        <div className="nh-kv"><span className="k">CAPACITY</span><span className="v">6.4 GW</span></div>
        <div className="nh-kv"><span className="k">INSTANT OUTPUT</span><span className="v">4.812 GW</span></div>
        <div className="nh-kv"><span className="k">INVERTERS</span><span className="v">11,842</span></div>
        <div className="nh-kv"><span className="k">EDGE DEVICES</span><span className="v">14,218</span></div>
        <div className="nh-kv"><span className="k">TELEMETRY Δt</span><span className="v">1.4 sec</span></div>
        <div className="nh-kv"><span className="k">UPTIME (90d)</span><span className="v" style={{ color: "var(--nh-mint)" }}>99.97 %</span></div>
        <div className="nh-kv"><span className="k">P1 ALERTS</span><span className="v" style={{ color: "var(--nh-coral)" }}>1 ACTIVE</span></div>
        <div style={{ marginTop: 22, padding: 14, background: "rgba(245,158,11,0.06)", border: "1px solid var(--nh-line-amber)", borderRadius: 4 }}>
          <div className="nh-mono" style={{ fontSize: 9, color: "var(--nh-accent)", letterSpacing: "0.18em" }}>◆ NOW SHIPPING</div>
          <div className="nh-mono" style={{ fontSize: 11, color: "var(--nh-ink)", marginTop: 6, lineHeight: 1.4 }}>
            orbit v.4.2 — sub-1.4s string-level<br />telemetry across 14 regions.
          </div>
        </div>
      </div>
    </div>
  </div>
);

// ════════════════════════════════════════════════════════════════════
// HERO D · "Editorial" — almost entirely typographic, generous space.
// One huge headline, small wordmark, one strip of readouts. Warmest.
// ════════════════════════════════════════════════════════════════════
const HeroD = () => (
  <div className="nh-board" style={{ height: "100%", display: "flex", flexDirection: "column" }}>
    <div className="nh-grid-bg" />
    <div className="nh-glow" style={{
      width: 700, height: 700, right: "20%", top: -200,
      background: "radial-gradient(circle, var(--nh-amber) 0%, transparent 60%)",
      opacity: 0.12,
    }} />

    <HVNav active="home" />

    <div style={{
      flex: 1, padding: "96px 80px 56px",
      display: "flex", flexDirection: "column", justifyContent: "space-between",
      position: "relative", zIndex: 2,
    }}>
      {/* eyebrow */}
      <div style={{ display: "flex", justifyContent: "space-between", alignItems: "baseline" }}>
        <span className="nh-mono" style={{
          fontSize: 11, color: "var(--nh-accent)", letterSpacing: "0.28em", textTransform: "uppercase",
        }}>
          ◇ NEOHELIO · SOLAR TELEMETRY INFRASTRUCTURE
        </span>
        <span className="nh-mono" style={{ fontSize: 10, color: "var(--nh-ink-4)", letterSpacing: "0.18em" }}>
          REV. 2026.05 · ALL SYSTEMS NOMINAL
        </span>
      </div>

      {/* headline — the centerpiece */}
      <div style={{ maxWidth: 1100 }}>
        <h1 style={{
          fontFamily: "var(--nh-display)", fontWeight: 500,
          fontSize: 132, lineHeight: 0.92, letterSpacing: "-0.045em",
          margin: 0, color: "var(--nh-ink)",
          textWrap: "balance",
        }}>
          The solar fleet,<br />
          <span style={{ color: "var(--nh-accent)", fontStyle: "italic", fontWeight: 400 }}>read clearly.</span>
        </h1>
        <p style={{
          fontFamily: "var(--nh-display)", fontWeight: 400,
          fontSize: 22, lineHeight: 1.4, letterSpacing: "-0.01em",
          color: "var(--nh-ink-2)", margin: "36px 0 0", maxWidth: 720,
        }}>
          We build the instruments — on the array and in the control room — so utility-scale operators can see every site at once. Hardware by <span style={{ color: "var(--nh-ink)" }}>neohelio</span>. Console by <span style={{ color: "var(--nh-ink)" }}>orbit</span>.
        </p>
        <div style={{ display: "flex", gap: 12, marginTop: 40 }}>
          <button className="nh-btn nh-btn-primary" style={{ padding: "14px 28px", fontSize: 12 }}>
            Request access →
          </button>
          <button className="nh-btn" style={{ padding: "14px 28px", fontSize: 12 }}>
            What we do
          </button>
        </div>
      </div>

      {/* bottom readout strip */}
      <div style={{
        display: "grid", gridTemplateColumns: "repeat(5, 1fr)", gap: 32,
        paddingTop: 28, borderTop: "1px solid var(--nh-line)",
      }}>
        <HVStat k="Sites monitored" v="42" tone="amber" />
        <HVStat k="Capacity" v="6.4" unit="GW" />
        <HVStat k="Edge devices" v="14,218" />
        <HVStat k="Regions" v="14" />
        <HVStat k="Uptime · 90d" v="99.97" unit="%" />
      </div>
    </div>
  </div>
);

// ────────── Canvas root ──────────
const HeroCanvas = () => (
  <DesignCanvas
    title="Hero variations · NeoHelio + orbit website"
    subtitle="Pick a direction — I'll build the full multi-page site in whichever you choose."
  >
    <DCSection
      id="heros"
      title="Home hero"
      subtitle="Four directions, sized at desktop viewport (1440×820). Same nav + brand tokens, different compositional logic."
    >
      <DCArtboard id="a" label="A · Mission control — dense, console preview" width={1440} height={820}>
        <HeroA />
      </DCArtboard>
      <DCArtboard id="b" label="B · Dual identity — neohelio stacked over orbit" width={1440} height={820}>
        <HeroB />
      </DCArtboard>
      <DCArtboard id="c" label="C · Orbital diagram — every site one node" width={1440} height={820}>
        <HeroC />
      </DCArtboard>
      <DCArtboard id="d" label="D · Editorial — typographic, breathing room" width={1440} height={820}>
        <HeroD />
      </DCArtboard>
    </DCSection>
  </DesignCanvas>
);

window.HeroCanvas = HeroCanvas;
