// Helios product demo — 7 scenes.
// Each scene fills a 1920×1080 deck-stage section.
// Composition: warm wash → floating tilted UI mockups → foreground type/CTA.

// BrandCorner — the slide-level top-left brand persistence.
// Uses the canonical HeliosWordmark from Primitives.jsx so the slide chrome
// stays in sync with the app-shell sidebars (which also render HeliosWordmark).
const BrandCorner = ({ pos = "tl", dim = false }) => (
  <div className={`brand-corner ${pos} ${dim ? "dim" : ""}`}>
    <HeliosWordmark size={28}/>
  </div>
);

const SlideLabel = ({ num, total = 8, label }) => (
  <div className="slide-label">
    <span className="num">{String(num).padStart(2, "0")}</span>
    <span className="bar"/>
    <span>{label}</span>
    <span className="bar"/>
    <span>{String(num).padStart(2, "0")} / {String(total).padStart(2, "0")}</span>
  </div>
);

// ─────────────────────────────────────────────────────────
// SCENE 1 — Cold open
// ─────────────────────────────────────────────────────────
const Scene1 = () => (
  <>
    <div className="scene-wash wash-warm wash-grid"/>
    <BrandCorner pos="tl"/>
    <SlideLabel num={1} label="meet helios"/>

    {/* Floating tilted UI screens drifting behind the headline */}
    <FloatingFrame
      drift="a" duration={11} rx={6} ry={-22} rz={-1} scale={0.42}
      className="anim-float"
      style={{ top: 110, left: 60, zIndex: 1 }}>
      <AppShell current="dashboard" width={1280} height={820}>
        <ReportsDashboardScreen/>
      </AppShell>
    </FloatingFrame>

    <FloatingFrame
      drift="b" duration={13} rx={-4} ry={20} rz={1} scale={0.40}
      className="anim-float stagger-2"
      style={{ top: 160, right: 50, zIndex: 1 }}>
      <AppShell current="signals" width={1280} height={820}>
        <SignalsScreen/>
      </AppShell>
    </FloatingFrame>

    <FloatingFrame
      drift="c" duration={15} rx={3} ry={-6} rz={0} scale={0.38}
      className="anim-float stagger-3"
      style={{ bottom: 90, left: 280, zIndex: 1 }}>
      <AppShell current="thread" width={1280} height={820}>
        <ChatThreadScreen/>
      </AppShell>
    </FloatingFrame>

    <FloatingFrame
      drift="a" duration={12} rx={-5} ry={14} rz={-1} scale={0.36}
      className="anim-float stagger-4"
      style={{ bottom: 120, right: 280, zIndex: 1 }}>
      <AppShell current="data" width={1280} height={820}>
        <ConnectorsScreen/>
      </AppShell>
    </FloatingFrame>

    {/* Center foreground — the headline */}
    <div style={{
      position: "absolute", inset: 0, display: "flex",
      flexDirection: "column", alignItems: "center", justifyContent: "center",
      zIndex: 5, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 28 }}>
        <span className="dot"/>helios · business analytics, in plain words
      </div>
      <h1 className="hero-display anim-rise stagger-1" style={{ textAlign: "center", maxWidth: 1340 }}>
        What would you<br/>like to <em>know?</em>
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ textAlign: "center", marginTop: 36, maxWidth: 720 }}>
        A chat-first analyst for your business. Ask anything about your sales,
        bookings, and customers — get answers in seconds, not dashboards.
      </p>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 2 — The problem (spreadsheets everywhere, nothing shared)
// Reshaped from a real customer call: "no single source of truth,
// managing multiple spreadsheets, no dashboard sharing".
// ─────────────────────────────────────────────────────────

// A faux spreadsheet card — green tab bar + grid of cells, tilted in 3D.
// Conveys "yet another sheet" instantly without needing real data.
const SheetCard = ({
  title, owner, edited, rows = 5, cols = 5, accent = "#1a8754",
  style, className, drift, duration, delay,
  rx = 0, ry = 0, rz = 0,
}) => (
  <div
    className={className}
    style={{
      position: "absolute",
      width: 360,
      background: "var(--color-surface-strong)",
      border: "1px solid var(--color-border)",
      borderRadius: 10,
      boxShadow: "0 30px 50px -16px rgba(26,24,21,0.30), 0 8px 18px -6px rgba(26,24,21,0.18), 0 0 0 1px rgba(26,24,21,0.04)",
      transform: `perspective(1800px) rotateX(${rx}deg) rotateY(${ry}deg) rotateZ(${rz}deg)`,
      transformStyle: "preserve-3d",
      overflow: "hidden",
      ...style,
      animation: drift ? `drift-${drift} ${duration || 11}s ease-in-out ${delay || 0}s infinite` : style?.animation,
    }}
  >
    {/* Title bar with the spreadsheet-green accent */}
    <div style={{
      height: 28, background: accent, color: "#fff",
      display: "flex", alignItems: "center", gap: 8,
      padding: "0 10px",
      fontFamily: "var(--font-sans)", fontSize: 11, fontWeight: 500, letterSpacing: "-0.005em",
    }}>
      <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
        <rect x="3" y="3" width="18" height="18" rx="2"/>
        <path d="M3 9h18M9 3v18"/>
      </svg>
      <span style={{ flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>{title}</span>
      <span style={{ opacity: 0.7, fontFamily: "var(--font-mono)", fontSize: 10 }}>·xlsx</span>
    </div>
    {/* Toolbar row */}
    <div style={{
      height: 22, background: "var(--color-surface-muted)",
      borderBottom: "1px solid var(--color-border)",
      display: "flex", alignItems: "center", gap: 4, padding: "0 8px",
    }}>
      {[24, 18, 18, 14].map((w, i) => (
        <div key={i} style={{ width: w, height: 8, background: "var(--color-border-strong)", borderRadius: 2 }}/>
      ))}
    </div>
    {/* Cells */}
    <table style={{ width: "100%", borderCollapse: "collapse", tableLayout: "fixed", background: "#fff" }}>
      <tbody>
        {Array.from({ length: rows }).map((_, r) => (
          <tr key={r}>
            {Array.from({ length: cols }).map((_, c) => (
              <td key={c} style={{
                border: "1px solid #e8e6e0",
                height: 22, padding: "0 6px",
                fontSize: 10, color: r === 0 ? "var(--color-text-secondary)" : "var(--color-text)",
                fontWeight: r === 0 ? 600 : 400,
                fontFamily: r === 0 ? "var(--font-sans)" : "var(--font-mono)",
                fontFeatureSettings: '"tnum" 1, "zero" 1',
                background: r === 0 ? "#f6f5f1" : "#fff",
                textAlign: c === 0 ? "left" : "right",
                overflow: "hidden", whiteSpace: "nowrap",
              }}>
                {r === 0
                  ? ["item", "wk1", "wk2", "wk3", "Δ"][c]
                  : c === 0
                    ? ["Lash fill","Brows","Mani","Pedi","Acrylic"][r-1]
                    : (1200 + r * 173 + c * 91).toString()}
              </td>
            ))}
          </tr>
        ))}
      </tbody>
    </table>
    {/* Foot — "edited by" sticker */}
    <div style={{
      borderTop: "1px solid var(--color-border)",
      padding: "6px 10px",
      display: "flex", alignItems: "center", gap: 8,
      fontSize: 10, color: "var(--color-text-muted)",
      fontFamily: "var(--font-mono)",
    }}>
      <div style={{
        width: 14, height: 14, borderRadius: 9999,
        background: "var(--color-surface-muted)", border: "1px solid var(--color-border)",
        display: "inline-flex", alignItems: "center", justifyContent: "center",
        fontSize: 8, fontWeight: 600, color: "var(--color-text-secondary)",
        fontFamily: "var(--font-sans)",
      }}>{owner.split(" ").map(s => s[0]).join("")}</div>
      <span style={{ flex: 1 }}>edited by {owner}</span>
      <span>{edited}</span>
    </div>
  </div>
);

// "v3", "FINAL", "v3-mira-edit" version stickers — the small chaos sigils.
const VersionTag = ({ children, style, className }) => (
  <div className={className} style={{
    position: "absolute",
    background: "var(--color-warning-bg)",
    color: "var(--color-warning-text)",
    border: "1px solid var(--color-warning-border)",
    borderRadius: 4,
    padding: "3px 8px",
    fontFamily: "var(--font-mono)", fontSize: 11, fontWeight: 500,
    letterSpacing: 0,
    boxShadow: "0 6px 14px -4px rgba(26,24,21,0.20)",
    transform: "rotate(-4deg)",
    zIndex: 8,
    ...style,
  }}>{children}</div>
);

// Slide 2 — modern, punchy, customer-call shaped:
// "no single source of truth · spreadsheets everywhere · no dashboard sharing"
// Composition: HUGE backdrop type (twelve), an offset spreadsheet collage on
// the right, a single sharp truth-stat in the center.
const Scene2 = () => (
  <>
    <div className="scene-wash wash-warm"/>
    <BrandCorner pos="tl" dim/>
    <SlideLabel num={2} label="the problem"/>

    {/* Massive ghost numeral as backdrop — the "twelve" of the headline */}
    <div className="anim-fade" style={{
      position: "absolute",
      top: 0, bottom: 0, right: -120,
      display: "flex", alignItems: "center",
      fontFamily: "var(--font-serif)", fontWeight: 75,
      fontSize: 1400, lineHeight: 0.8,
      letterSpacing: "-0.06em",
      color: "rgba(26,24,21,0.045)",
      zIndex: 0, pointerEvents: "none", userSelect: "none",
    }}>12</div>

    {/* Spreadsheet collage — fanned, all in the right half */}
    <SheetCard
      title="weekly_revenue_v3.xlsx" owner="Mira K." edited="2 days ago"
      drift="a" duration={11} delay={0.0}
      className="anim-rise"
      rx={6} ry={-12} rz={-4}
      style={{ top: 140, right: 420, zIndex: 4 }}/>
    <SheetCard
      title="bookings_oct_FINAL.xlsx" owner="Sam P." edited="last week"
      drift="b" duration={13} delay={0.15}
      className="anim-rise stagger-1"
      rx={-4} ry={10} rz={3} accent="#1a8754"
      style={{ top: 110, right: 80, zIndex: 6 }}/>
    <SheetCard
      title="margins_by_service.xlsx" owner="Mira K." edited="3 wks ago"
      drift="c" duration={10} delay={0.3}
      className="anim-rise stagger-2"
      rx={8} ry={-6} rz={2} accent="#0f6b40"
      style={{ top: 410, right: 280, zIndex: 5 }}/>
    <SheetCard
      title="staff_hours_q4.xlsx" owner="Anna L." edited="yesterday"
      drift="a" duration={12} delay={0.45}
      className="anim-rise stagger-3"
      rx={-3} ry={14} rz={-2} accent="#1a8754"
      style={{ top: 460, right: -60, zIndex: 4 }}/>
    <SheetCard
      title="cancellations_oct.xlsx" owner="Sam P." edited="5 days ago"
      drift="b" duration={9} delay={0.6}
      className="anim-rise stagger-4"
      rx={-7} ry={-8} rz={2} accent="#0f6b40"
      style={{ top: 740, right: 340, zIndex: 6 }}/>
    <SheetCard
      title="ad_spend_meta_google.xlsx" owner="Mira K." edited="this AM"
      drift="c" duration={11} delay={0.75}
      className="anim-rise stagger-5"
      rx={5} ry={6} rz={-1} accent="#1a8754"
      style={{ top: 780, right: 60, zIndex: 5 }}/>

    {/* Version-chaos stickers — the "v3, FINAL, FINAL_v2" sigils */}
    <VersionTag className="anim-drop stagger-2" style={{ top: 122, right: 380 }}>v3</VersionTag>
    <VersionTag className="anim-drop stagger-3" style={{ top: 92, right: 60, transform: "rotate(3deg)" }}>FINAL</VersionTag>
    <VersionTag className="anim-drop stagger-4" style={{ top: 392, right: 240, transform: "rotate(-2deg)" }}>v3-mira-edit</VersionTag>
    <VersionTag className="anim-drop stagger-5" style={{ top: 720, right: 300 }}>FINAL_v2</VersionTag>

    {/* Foreground — left column. Headline stays clear of the collage. */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 760,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10,
    }}>
      {/* Quote attribution chip — anchors the slide as customer-truth */}
      <div className="anim-drop" style={{
        display: "inline-flex", alignSelf: "flex-start", alignItems: "center", gap: 10,
        padding: "6px 12px",
        background: "var(--color-surface-strong)",
        border: "1px solid var(--color-border)",
        borderRadius: 9999,
        fontFamily: "var(--font-mono)", fontSize: 12, letterSpacing: 0,
        color: "var(--color-text-secondary)",
        marginBottom: 28,
        boxShadow: "var(--shadow-subtle)",
      }}>
        <span style={{
          width: 6, height: 6, borderRadius: 9999, background: "var(--color-helios)",
        }}/>
        what every founder tells us
      </div>

      <h1 className="hero-display anim-rise stagger-1" style={{
        fontSize: 132, lineHeight: 0.94, letterSpacing: "-0.022em",
      }}>
        Same business.<br/>
        <em>Twelve</em> truths.
      </h1>

      <p className="hero-sub anim-fade stagger-3" style={{
        marginTop: 36, fontSize: 22, maxWidth: 640,
      }}>
        Every tool exports its own spreadsheet. Each owner keeps their own copy.
        Dashboards stay in one person's tab — never shared, never current.
      </p>

      {/* Pain rail — two-column, no bullet circles. Just verdicts. */}
      <div className="anim-fade stagger-4" style={{
        marginTop: 40,
        display: "grid", gridTemplateColumns: "1fr 1fr", gap: "16px 24px",
        maxWidth: 660,
      }}>
        {[
          ["no single source of truth", "every sheet says something different"],
          ["spreadsheets everywhere",   "v3, FINAL, FINAL_v2 — pick one"],
          ["no dashboard sharing",       "the answer dies on one screen"],
          ["the week beats the answer",  "by friday, you've moved on"],
        ].map(([h, sub]) => (
          <div key={h} style={{
            paddingLeft: 16,
            borderLeft: "2px solid var(--color-helios)",
          }}>
            <div style={{
              fontFamily: "var(--font-sans)", fontSize: 17, fontWeight: 500,
              color: "var(--color-text)", letterSpacing: "-0.005em",
            }}>{h}</div>
            <div style={{
              fontFamily: "var(--font-mono)", fontSize: 12,
              color: "var(--color-text-muted)", marginTop: 4,
              letterSpacing: 0,
            }}>{sub}</div>
          </div>
        ))}
      </div>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 3 — Just ask (composer hero)
// ─────────────────────────────────────────────────────────
const Scene3 = () => (
  <>
    <div className="scene-wash wash-magenta"/>
    <BrandCorner pos="tl"/>
    <SlideLabel num={3} label="just ask"/>

    {/* Magenta halo behind composer */}
    <div className="send-halo anim-fade" style={{ top: 380, right: 280, zIndex: 1 }}/>

    {/* The hero composer screen, tilted forward and to the right */}
    <FloatingFrame
      drift="a" duration={11} rx={4} ry={-14} rz={-1} scale={0.62}
      className="anim-float"
      style={{ top: 110, right: 50, zIndex: 5 }}>
      <AppShell current="new" width={1280} height={820}>
        <NewConversationScreen/>
      </AppShell>
    </FloatingFrame>

    {/* Foreground left — copy */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 720,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 28 }}>
        <span className="dot"/>chapter two · just ask
      </div>
      <h1 className="hero-display anim-rise stagger-1">
        No spreadsheets.<br/>No filters.<br/><em>Just ask.</em>
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ marginTop: 32 }}>
        Type a question the way you'd ask a colleague.
        Helios reads from your tools and writes back the answer — with the chart,
        the table, and the why.
      </p>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 4 — Get answers, not dashboards
// ─────────────────────────────────────────────────────────
const PopChartCard = () => {
  const data = [1100, 720, 1840, 2110, 2680, 3210, 1180];
  const days = ["mon","tue","wed","thu","fri","sat","sun"];
  const max = Math.max(...data);
  const W = 360, H = 130, P = 14, BW = 28;
  const peak = data.indexOf(max);
  return (
    <div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
      <div style={{ display: "flex", alignItems: "baseline", gap: 8 }}>
        <span style={{ fontSize: 14, fontWeight: 600 }}>Revenue by day</span>
        <span style={{ fontSize: 11, color: "var(--color-text-muted)", fontFamily: "var(--font-mono)" }}>last week · €</span>
      </div>
      <svg viewBox={`0 0 ${W} ${H}`} width="100%" style={{ display: "block" }}>
        <line x1={P} x2={W - 8} y1={H - 22} y2={H - 22}
              stroke="var(--color-border-strong)" strokeWidth="1"/>
        {data.map((v, i) => {
          const x = P + i * ((W - P - 8) / data.length);
          const h = (v / max) * (H - 42);
          const y = H - 22 - h;
          return (
            <g key={i}>
              <rect x={x} y={y} width={BW} height={h} rx="2"
                    fill={i === peak ? "var(--color-ink)" : "var(--color-border-strong)"}/>
              <text x={x + BW / 2} y={H - 6} fontSize="10" textAnchor="middle"
                    fill="var(--color-text-muted)"
                    style={{ fontFamily: "var(--font-mono)" }}>{days[i]}</text>
            </g>
          );
        })}
      </svg>
      <div style={{
        fontSize: 12, color: "var(--color-text-secondary)",
        fontFamily: "var(--font-prose)", lineHeight: "18px",
        marginTop: 4, maxWidth: "38ch",
      }}>
        Tuesday came in at <strong style={{ fontWeight: 500, color: "var(--color-text)" }}>€720</strong>,
        about 35% below your weekday average.
      </div>
    </div>
  );
};

const Scene4 = () => (
  <>
    <div className="scene-wash wash-warm"/>
    <BrandCorner pos="tl"/>
    <SlideLabel num={4} label="answers, not dashboards"/>

    {/* Chat thread tilted in 3D */}
    <FloatingFrame
      drift="b" duration={12} rx={6} ry={-14} rz={1} scale={0.66}
      className="anim-float"
      style={{ top: 120, right: -40, zIndex: 4 }}>
      <AppShell current="thread" width={1280} height={820}>
        <ChatThreadScreen/>
      </AppShell>
    </FloatingFrame>

    {/* Pop-out chart card — depth element in front of the thread */}
    <div className="pop-card anim-rise stagger-3"
         style={{
           top: 460, left: 620, width: 400, zIndex: 8,
           transform: "perspective(1800px) rotateX(2deg) rotateY(-6deg) translateZ(80px)",
         }}>
      <PopChartCard/>
    </div>

    {/* Floating tool pill — depth element behind */}
    <div className="chip anim-fade stagger-2" style={{
      position: "absolute", top: 280, left: 720, zIndex: 7,
      transform: "perspective(1800px) rotateX(0deg) rotateY(-12deg)",
    }}>
      <span className="pulse"/>
      <span style={{ color: "var(--color-text)" }}>queried Square</span>
      <span style={{ color: "var(--color-text-muted)" }}>·</span>
      <span>312 rows</span>
    </div>

    {/* Foreground left — copy */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 600,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 24 }}>
        <span className="dot"/>chapter three · answers
      </div>
      <h1 className="hero-display anim-rise stagger-1" style={{ fontSize: 110 }}>
        Get <em>answers</em>,<br/>not dashboards.
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ marginTop: 32 }}>
        Helios writes back in plain prose with the chart in line — and shows
        its work, so you can trust the numbers.
      </p>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 5 — Home: your morning, briefed
// The Home screen IS the answer to "always watching" — lead signal,
// KPIs, weekly digest, health rail, all on one canvas.
// ─────────────────────────────────────────────────────────

// Floating callouts that point INTO regions of the home screen.
// They sit on a layer in front of the tilted screen, with their own depth.
const HomeCallout = ({ label, x, y, w = 240, delay = 0, anchor = "left" }) => (
  <div
    className="anim-rise"
    style={{
      position: "absolute",
      top: y, left: x, width: w,
      animationDelay: `${delay}s`,
      zIndex: 9,
      transform: "perspective(1800px) rotateX(2deg) rotateY(-6deg) translateZ(60px)",
    }}>
    <div style={{
      background: "var(--color-surface-strong)",
      border: "1px solid var(--color-border-strong)",
      borderRadius: 12,
      padding: "10px 14px",
      boxShadow: "0 24px 40px -16px rgba(26,24,21,0.22), 0 4px 10px -4px rgba(26,24,21,0.10)",
      fontSize: 12, lineHeight: "18px",
      color: "var(--color-text)",
      letterSpacing: "-0.005em",
      position: "relative",
    }}>
      <div style={{
        fontFamily: "var(--font-mono)", fontSize: 10,
        color: "var(--color-text-muted)",
        marginBottom: 2, letterSpacing: 0,
      }}>{label.eyebrow}</div>
      <div style={{ fontWeight: 500 }}>{label.title}</div>
      {/* Connector line — short stroke from the card toward the screen */}
      <span style={{
        position: "absolute",
        [anchor === "left" ? "right" : "left"]: -28,
        top: "50%",
        width: 28, height: 1,
        background: "var(--color-border-strong)",
        transform: "translateY(-0.5px)",
      }}/>
      <span style={{
        position: "absolute",
        [anchor === "left" ? "right" : "left"]: -32,
        top: "50%",
        width: 6, height: 6, borderRadius: 9999,
        background: "var(--color-ink)",
        transform: "translate(50%, -50%)",
      }}/>
    </div>
  </div>
);

const Scene5 = () => (
  <>
    <div className="scene-wash wash-warm wash-grid"/>
    <BrandCorner pos="tl"/>
    <SlideLabel num={5} label="your morning, briefed"/>

    {/* The Home screen — large, tilted, the centerpiece */}
    <FloatingFrame
      drift="a" duration={14} rx={5} ry={-12} rz={-0.5}
      scale={0.62}
      width={1280} height={1080}
      className="anim-float"
      style={{ top: 80, right: -40, zIndex: 4 }}>
      <HomeShell current="home" width={1280} height={1080}>
        <HomeScreen/>
      </HomeShell>
    </FloatingFrame>

    {/* Floating callouts that label the regions of the screen */}
    <HomeCallout
      x={690} y={230} w={210} delay={0.6} anchor="right"
      label={{ eyebrow: "today's signal", title: "One thing wants your eyes" }}/>
    <HomeCallout
      x={1180} y={420} w={200} delay={0.9} anchor="left"
      label={{ eyebrow: "kpi strip", title: "Numbers, with context" }}/>
    <HomeCallout
      x={680} y={620} w={210} delay={1.2} anchor="right"
      label={{ eyebrow: "weekly digest", title: "A 2-min auto-summary" }}/>
    <HomeCallout
      x={1180} y={780} w={200} delay={1.5} anchor="left"
      label={{ eyebrow: "data health", title: "What helios is watching" }}/>

    {/* Foreground left — copy */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 560,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 24 }}>
        <span className="dot"/>chapter four · the home screen
      </div>
      <h1 className="hero-display anim-rise stagger-1" style={{ fontSize: 104 }}>
        Your morning,<br/>on <em>one screen</em>.
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ marginTop: 32 }}>
        Open Helios and the week is already read for you — the one thing that
        needs attention, the numbers that moved, a two-minute prose digest, and
        the conversations you left open. No dashboard archaeology.
      </p>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 6 — Know before your team knows.
// A phone lock screen with a Helios push at 7:42 AM, the clock,
// and a faded "team standup · 9:00" calendar block underneath.
// ─────────────────────────────────────────────────────────
const SceneKnow = () => (
  <>
    <div className="scene-wash wash-ink"/>
    <BrandCorner pos="tl" dim/>
    <SlideLabel num={6} label="know first"/>

    {/* Huge background clock — 07:42 — sets the time-of-day mood */}
    <div className="anim-fade" style={{
      position: "absolute", top: 90, left: 60, zIndex: 1,
      fontFamily: "var(--font-mono)",
      fontSize: 360, lineHeight: "320px",
      letterSpacing: "-0.04em",
      color: "rgba(255,255,255,0.06)",
      fontFeatureSettings: '"tnum" 1, "zero" 1',
      userSelect: "none",
    }}>07:42</div>

    {/* Phone lock screen with the Helios push notification */}
    <div className="anim-rise stagger-1" style={{
      position: "absolute", top: 110, right: 220, zIndex: 6,
      width: 380, height: 780,
      borderRadius: 48,
      background: "linear-gradient(160deg, #1A1815 0%, #2A2520 60%, #3A2E2A 100%)",
      border: "12px solid #0A0908",
      boxShadow: "0 60px 100px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset",
      transform: "perspective(2000px) rotateY(-12deg) rotateX(6deg) rotateZ(-2deg)",
      transformStyle: "preserve-3d",
      overflow: "hidden",
      padding: "60px 18px 24px",
    }}>
      {/* Status bar */}
      <div style={{
        display: "flex", justifyContent: "space-between",
        color: "rgba(255,255,255,0.85)",
        fontFamily: "var(--font-mono)", fontSize: 13, fontWeight: 500,
        padding: "0 14px 60px",
      }}>
        <span>7:42</span>
        <span style={{ display: "flex", gap: 4, fontSize: 11 }}>
          <span>●●●●</span><span>5G</span><span>96%</span>
        </span>
      </div>
      {/* Big time */}
      <div style={{ textAlign: "center", color: "#fff", marginBottom: 80 }}>
        <div style={{ fontFamily: "var(--font-mono)", fontSize: 16, opacity: 0.7 }}>
          Thursday, November 6
        </div>
        <div style={{
          fontFamily: "var(--font-sans)", fontSize: 92, fontWeight: 200,
          letterSpacing: "-0.03em", lineHeight: 1, marginTop: 4,
        }}>7:42</div>
      </div>

      {/* The Helios push */}
      <div className="anim-rise stagger-3" style={{
        margin: "0 8px",
        background: "rgba(255,255,255,0.92)",
        backdropFilter: "blur(20px)",
        borderRadius: 18,
        padding: "14px 14px 12px",
        boxShadow: "0 20px 40px -10px rgba(0,0,0,0.4)",
      }}>
        <div style={{ display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }}>
          <div style={{
            width: 22, height: 22, borderRadius: 6,
            background: "#1A1815",
            display: "flex", alignItems: "center", justifyContent: "center",
            flexShrink: 0,
          }}>
            <HeliosMark size={14}/>
          </div>
          <span style={{ fontSize: 12, fontWeight: 600, letterSpacing: "-0.005em" }}>HELIOS</span>
          <span style={{ flex: 1 }}/>
          <span style={{ fontSize: 11, color: "var(--color-text-muted)", fontFamily: "var(--font-mono)" }}>now</span>
        </div>
        <div style={{ fontSize: 13, fontWeight: 600, color: "var(--color-text)", marginBottom: 4 }}>
          Tuesday afternoon ran 38% under your usual.
        </div>
        <div style={{ fontSize: 12.5, lineHeight: "18px", color: "var(--color-text-secondary)" }}>
          4 cancellations between 2 — 5 PM. None rebooked. Worth a look before standup.
        </div>
      </div>

      {/* Faded calendar block — standup at 9:00 */}
      <div className="anim-fade stagger-4" style={{
        margin: "14px 8px 0",
        background: "rgba(255,255,255,0.08)",
        border: "1px solid rgba(255,255,255,0.10)",
        borderRadius: 14, padding: "10px 12px",
        color: "rgba(255,255,255,0.65)",
        fontSize: 12, display: "flex", alignItems: "center", gap: 10,
      }}>
        <div style={{ width: 3, height: 28, background: "var(--color-helios)", borderRadius: 2 }}/>
        <div style={{ flex: 1 }}>
          <div style={{ fontWeight: 500, color: "rgba(255,255,255,0.92)" }}>Team standup</div>
          <div style={{ fontSize: 11, opacity: 0.7, fontFamily: "var(--font-mono)" }}>9:00 — 9:15 · in 78 min</div>
        </div>
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" style={{ opacity: 0.5 }}>
          <rect x="3" y="4" width="18" height="18" rx="2"/>
          <path d="M16 2v4M8 2v4M3 10h18"/>
        </svg>
      </div>
    </div>

    {/* Foreground left — copy */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 720,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 24, color: "rgba(255,255,255,0.7)" }}>
        <span className="dot"/>chapter five · know first
      </div>
      <h1 className="hero-display anim-rise stagger-1" style={{ fontSize: 104, color: "#fff" }}>
        Know before<br/>your <em>team</em> knows.
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ marginTop: 32, fontSize: 22, color: "rgba(255,255,255,0.75)" }}>
        Helios watches your numbers overnight. A push lands at breakfast, not
        at the end of the month — so you walk into standup already knowing
        what changed, why, and what to ask about.
      </p>

      <div className="anim-fade stagger-4" style={{
        marginTop: 36, display: "flex", gap: 14, flexWrap: "wrap",
      }}>
        {[
          { eyebrow: "7:42 am", text: "Helios spots the dip" },
          { eyebrow: "8:10 am", text: "You read the why on the train" },
          { eyebrow: "9:00 am", text: "Standup starts. You're already 3 steps ahead." },
        ].map(b => (
          <div key={b.eyebrow} style={{
            background: "rgba(255,255,255,0.06)",
            border: "1px solid rgba(255,255,255,0.10)",
            borderRadius: 12, padding: "12px 16px",
            minWidth: 200, flex: "1 1 200px",
          }}>
            <div style={{
              fontFamily: "var(--font-mono)", fontSize: 11,
              color: "var(--color-helios)", letterSpacing: 0,
              fontFeatureSettings: '"tnum" 1, "zero" 1',
            }}>{b.eyebrow}</div>
            <div style={{ fontSize: 14, color: "rgba(255,255,255,0.92)", marginTop: 4, letterSpacing: "-0.005em" }}>{b.text}</div>
          </div>
        ))}
      </div>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 7 — Ask anywhere (your data inside Claude / ChatGPT)
// Three branded chat tiles fanned in 3D, each answering the same business
// question. Proves "the AI you already use, now knows your business."
// ─────────────────────────────────────────────────────────

// A single chat tile — header bar with brand icon + body with Q&A.
// Three variants: helios (rich KPI tiles), claude (conversational prose
// with tool chip), chatgpt (bulleted list with tool chip).
const ChatTile = ({ brand, style, className }) => {
  const config = {
    helios: {
      name: "Helios",
      icon: (
        <div style={{
          width: 22, height: 22, borderRadius: 6, background: "#1A1815",
          display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0,
        }}>
          <HeliosMark size={14}/>
        </div>
      ),
    },
    claude: {
      name: "Claude",
      icon: (
        <svg width="22" height="22" viewBox="0 0 24 24" style={{ flexShrink: 0 }}>
          <path fill="#D97757" d="M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"/>
        </svg>
      ),
    },
    chatgpt: {
      name: "ChatGPT",
      icon: (
        <svg width="22" height="22" viewBox="0 0 24 24" style={{ flexShrink: 0 }}>
          <path fill="#1A1815" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/>
        </svg>
      ),
    },
  }[brand];

  return (
    <div className={className} style={{
      position: "absolute",
      width: 460,
      background: "var(--color-surface-strong)",
      border: "1px solid var(--color-border)",
      borderRadius: 16,
      overflow: "hidden",
      boxShadow: "0 36px 64px -18px rgba(26,24,21,0.32), 0 14px 28px -10px rgba(26,24,21,0.18), 0 0 0 1px rgba(26,24,21,0.04)",
      transformStyle: "preserve-3d",
      ...style,
    }}>
      {/* Header */}
      <div style={{
        display: "flex", alignItems: "center", gap: 10,
        padding: "14px 18px",
        borderBottom: "1px solid var(--color-border)",
        background: "var(--color-surface-muted)",
      }}>
        {config.icon}
        <span style={{
          fontSize: 14, fontWeight: 600,
          letterSpacing: "-0.005em",
          color: "var(--color-text)",
        }}>{config.name}</span>
      </div>

      {/* Body */}
      <div style={{ padding: "18px 20px 22px", display: "flex", flexDirection: "column", gap: 14 }}>
        {/* User bubble — same question in all three */}
        <div style={{
          alignSelf: "flex-end",
          background: "var(--color-surface-muted)",
          borderRadius: "16px 16px 4px 16px",
          padding: "9px 14px",
          fontSize: 14, color: "var(--color-text-secondary)",
          maxWidth: "82%",
        }}>Revenue this month?</div>

        {/* Brand-specific reply */}
        {brand === "helios" && (
          <>
            <span style={{
              fontSize: 10, fontWeight: 700, textTransform: "uppercase",
              letterSpacing: "0.06em", color: "var(--color-helios)",
            }}>Helios</span>
            <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8 }}>
              {[
                { label: "Net Revenue", value: "€9,415", trend: "+5.3%" },
                { label: "Orders", value: "412", trend: "+6.5%" },
              ].map(k => (
                <div key={k.label} style={{
                  background: "var(--color-surface-muted)",
                  borderRadius: 10, padding: "10px 12px",
                }}>
                  <div style={{
                    fontSize: 9, fontWeight: 700, textTransform: "uppercase",
                    letterSpacing: "0.04em", color: "var(--color-text-muted)",
                  }}>{k.label}</div>
                  <div style={{ fontSize: 18, fontWeight: 700, marginTop: 3, color: "var(--color-text)" }}>{k.value}</div>
                  <div style={{ fontSize: 10, marginTop: 2, color: "var(--color-success-solid)" }}>{k.trend}</div>
                </div>
              ))}
            </div>
            <p style={{ fontSize: 13, lineHeight: 1.5, color: "var(--color-text)" }}>
              Revenue up <strong style={{ fontWeight: 700 }}>5.3%</strong> — stronger weekend traffic.
            </p>
          </>
        )}

        {brand === "claude" && (
          <>
            <span style={{
              display: "inline-flex", alignItems: "center", gap: 6,
              fontSize: 11, color: "var(--color-text-muted)",
              background: "var(--color-surface-muted)", borderRadius: 4,
              padding: "4px 9px", width: "fit-content",
            }}>
              <span style={{ width: 6, height: 6, borderRadius: 9999, background: "var(--color-helios)" }}/>
              Helios · <span style={{ fontFamily: "var(--font-mono)", color: "var(--color-text-secondary)" }}>revenue_summary</span>
            </span>
            <p style={{ fontSize: 14, lineHeight: 1.55, color: "var(--color-text)" }}>
              Your <strong style={{ fontWeight: 700 }}>net revenue</strong> this month is <strong style={{ fontWeight: 700 }}>€9,415</strong>, up 5.3% vs April on 412 orders.
            </p>
            <p style={{ fontSize: 13.5, lineHeight: 1.55, color: "var(--color-text-secondary)" }}>
              Weekend traffic is doing most of the lift. Want me to break this down by location?
            </p>
          </>
        )}

        {brand === "chatgpt" && (
          <>
            <span style={{
              display: "inline-flex", alignItems: "center", gap: 6,
              fontSize: 11, color: "var(--color-text-muted)",
              background: "var(--color-surface-muted)", borderRadius: 4,
              padding: "4px 9px", width: "fit-content",
            }}>
              <span style={{ width: 6, height: 6, borderRadius: 9999, background: "var(--color-helios)" }}/>
              Used Helios
            </span>
            <p style={{ fontSize: 14, lineHeight: 1.55, color: "var(--color-text)" }}>Here's your revenue snapshot for May:</p>
            <ul style={{ listStyle: "none", padding: 0, margin: 0, display: "flex", flexDirection: "column", gap: 5 }}>
              {[
                ["Net revenue:", "€9,415", "(+5.3%)"],
                ["Orders:", "412", "(+6.5%)"],
                ["Avg ticket:", "€22.85", null],
              ].map(([label, value, trend]) => (
                <li key={label} style={{
                  fontSize: 13.5, lineHeight: 1.5, color: "var(--color-text)",
                  paddingLeft: 14, position: "relative",
                }}>
                  <span style={{ position: "absolute", left: 4, color: "var(--color-text-muted)" }}>•</span>
                  <strong style={{ fontWeight: 700 }}>{label}</strong> {value}
                  {trend && <span style={{ color: "var(--color-success-solid)", fontSize: 12.5 }}> {trend}</span>}
                </li>
              ))}
            </ul>
          </>
        )}
      </div>
    </div>
  );
};

const SceneAskAnywhere = () => (
  <>
    <div className="scene-wash wash-warm"/>
    <BrandCorner pos="tl"/>
    <SlideLabel num={7} label="ask anywhere"/>

    {/* Three chat tiles fanned in 3D depth — Claude is centerpiece (in front),
        Helios upper-back, ChatGPT lower-front-right. Same question, three surfaces. */}
    <ChatTile
      brand="helios"
      className="anim-rise"
      style={{
        top: 180, right: 600, zIndex: 4,
        transform: "perspective(2400px) rotateY(-12deg) rotateX(4deg) rotateZ(-2deg)",
      }}
    />
    <ChatTile
      brand="claude"
      className="anim-rise stagger-2"
      style={{
        top: 320, right: 110, zIndex: 6,
        transform: "perspective(2400px) rotateY(-5deg) rotateX(1deg) translateZ(80px) scale(1.06)",
      }}
    />
    <ChatTile
      brand="chatgpt"
      className="anim-rise stagger-3"
      style={{
        top: 680, right: 340, zIndex: 5,
        transform: "perspective(2400px) rotateY(-8deg) rotateX(-2deg) rotateZ(2deg) scale(0.95)",
      }}
    />

    {/* Foreground left — copy */}
    <div style={{
      position: "absolute", top: 0, bottom: 0, left: 100,
      width: 700,
      display: "flex", flexDirection: "column", justifyContent: "center",
      zIndex: 10, pointerEvents: "none",
    }}>
      <div className="eyebrow anim-drop" style={{ marginBottom: 24 }}>
        <span className="dot"/>chapter six · ask anywhere
      </div>
      <h1 className="hero-display anim-rise stagger-1" style={{ fontSize: 114 }}>
        Same intelligence.<br/>Three <em>surfaces</em>.
      </h1>
      <p className="hero-sub anim-fade stagger-3" style={{ marginTop: 36, fontSize: 22, maxWidth: 600 }}>
        Plug your business into the AI you already use — Claude, ChatGPT,
        or the Helios app. Same live answers, wherever you're working.
      </p>

      {/* MCP credibility chip */}
      <div className="anim-fade stagger-4" style={{
        marginTop: 32, display: "inline-flex", alignSelf: "flex-start",
        alignItems: "center", gap: 10,
        padding: "8px 14px",
        background: "var(--color-surface-strong)",
        border: "1px solid var(--color-border)",
        borderRadius: 9999,
        fontFamily: "var(--font-mono)", fontSize: 12,
        color: "var(--color-text-secondary)",
        boxShadow: "var(--shadow-subtle)",
      }}>
        <span style={{ width: 6, height: 6, borderRadius: 9999, background: "var(--color-helios)" }}/>
        powered by MCP · the open standard
      </div>
    </div>
  </>
);

// ─────────────────────────────────────────────────────────
// SCENE 8 — Get started (CTA) with cycling connectors + aha moment
// The headline cycles: "Connect Square in 30 seconds" → Stripe → Shopify…
// then lands on the aha: "Suddenly, every number agrees."
// ─────────────────────────────────────────────────────────
const CONNECTORS = [
  { name: "Square",     meta: "POS · 312 today",   accent: "#0070BA" },
  { name: "Stripe",     meta: "payments",          accent: "#635BFF" },
  { name: "Shopify",    meta: "orders",            accent: "#5E8E3E" },
  { name: "Calendar",   meta: "bookings",          accent: "#1F8A5B" },
  { name: "Mindbody",   meta: "members",           accent: "#0F4F2A" },
  { name: "QuickBooks", meta: "accounting",        accent: "#2CA01C" },
];

const Scene6 = () => {
  const [step, setStep] = React.useState(0); // 0..5 = cycling, 6 = aha
  React.useEffect(() => {
    const t = setInterval(() => {
      setStep(s => (s >= 6 ? 0 : s + 1));
    }, 1500);
    return () => clearInterval(t);
  }, []);

  const aha = step === 6;
  const active = CONNECTORS[step % CONNECTORS.length];

  return (
    <>
      <div className={`scene-wash ${aha ? "wash-magenta" : "wash-warm"} wash-grid`}
           style={{ transition: "opacity 600ms" }}/>
      <BrandCorner pos="tl"/>
      <SlideLabel num={8} label={aha ? "the aha" : "get started"}/>

      {/* Foreground — title + CTA, top-center */}
      <div style={{
        position: "absolute", inset: "0 0 auto 0",
        paddingTop: 160,
        display: "flex", flexDirection: "column", alignItems: "center",
        zIndex: 10,
      }}>
        <div className="eyebrow anim-drop" style={{ marginBottom: 28 }}>
          <span className="dot"/>{aha ? "chapter seven · the aha" : "chapter seven · ready when you are"}
        </div>

        {/* Cycling headline. Key on step so it re-mounts and re-animates. */}
        {!aha ? (
          <h1 key={`h-${step}`} className="hero-display anim-rise"
              style={{ textAlign: "center", maxWidth: 1500, fontSize: 120, lineHeight: 1.0 }}>
            Connect <em style={{ color: active.accent }}>{active.name}</em> in 30 seconds.
          </h1>
        ) : (
          <h1 key="h-aha" className="hero-display anim-rise"
              style={{ textAlign: "center", maxWidth: 1500, fontSize: 120, lineHeight: 1.0 }}>
            Suddenly, every<br/>number <em>agrees.</em>
          </h1>
        )}

        <p key={`p-${aha ? "aha" : "cta"}`} className="hero-sub anim-fade"
           style={{ textAlign: "center", marginTop: 32, maxWidth: 760 }}>
          {aha
            ? "One source of truth. One screen. Every tool — and everyone on the team — looking at the same answer."
            : "Free for the first 30 days. No credit card. Cancel anytime."}
        </p>

        {/* CTA appears on the aha step */}
        {aha && (
          <div className="anim-rise stagger-2" style={{
            marginTop: 44, display: "flex", gap: 14, alignItems: "center",
          }}>
            <button className="cta-btn">
              Start free
              <span className="arrow">
                <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
                  <path d="M5 12h14M12 5l7 7-7 7"/>
                </svg>
              </span>
            </button>
            <button className="ghost-btn">Book a demo</button>
          </div>
        )}
      </div>

      {/* Connector arc — every tile present; the active one lifts/highlights.
          On aha step, all tiles glow magenta-edged and lift together. */}
      <div style={{
        position: "absolute",
        top: 760, left: "50%",
        transform: "translateX(-50%) perspective(2200px) rotateX(20deg)",
        transformStyle: "preserve-3d",
        width: 1500,
        display: "flex",
        gap: 18,
        justifyContent: "center",
        zIndex: 3,
      }}>
        {CONNECTORS.map((t, i) => {
          const isActive = !aha && i === step;
          return (
            <div key={t.name}
                 style={{
                   background: "var(--color-surface-strong)",
                   border: `1px solid ${aha ? "var(--color-helios)" : isActive ? t.accent : "var(--color-border)"}`,
                   borderRadius: 18,
                   padding: "20px 22px",
                   boxShadow: aha
                     ? "0 30px 50px -14px rgba(255, 76, 170, 0.35), 0 0 0 2px rgba(255, 76, 170, 0.18)"
                     : isActive
                       ? `0 36px 60px -14px ${t.accent}55, 0 0 0 2px ${t.accent}30`
                       : "0 24px 40px -16px rgba(26,24,21,0.18), 0 0 0 1px rgba(26,24,21,0.04)",
                   minWidth: 176,
                   textAlign: "center",
                   transformStyle: "preserve-3d",
                   transform: isActive
                     ? "translateY(-22px) translateZ(80px) scale(1.08)"
                     : aha
                       ? "translateY(-6px) translateZ(20px)"
                       : "translateY(0) translateZ(0)",
                   transition: "transform 500ms var(--ease-out-expo), box-shadow 500ms, border-color 400ms",
                   opacity: aha ? 1 : isActive ? 1 : 0.65,
                 }}>
              <div style={{
                width: 48, height: 48, borderRadius: 14,
                background: isActive || aha ? t.accent : "var(--color-surface-muted)",
                color: isActive || aha ? "#fff" : "var(--color-text)",
                border: "1px solid var(--color-border)",
                margin: "0 auto 12px",
                display: "flex", alignItems: "center", justifyContent: "center",
                fontWeight: 700, fontSize: 22, letterSpacing: "-0.02em",
                transition: "background 400ms, color 400ms",
              }}>{t.name.charAt(0)}</div>
              <div style={{ fontSize: 15, fontWeight: 600, letterSpacing: "-0.005em" }}>{t.name}</div>
              <div style={{
                fontSize: 11, color: "var(--color-text-muted)",
                fontFamily: "var(--font-mono)", marginTop: 3,
                fontFeatureSettings: '"tnum" 1',
              }}>{t.meta}</div>
              {/* "✓ connected" tick on aha step */}
              {aha && (
                <div className="anim-fade" style={{
                  marginTop: 8,
                  display: "inline-flex", alignItems: "center", gap: 4,
                  fontFamily: "var(--font-mono)", fontSize: 10.5,
                  color: "var(--color-success-text)",
                }}>
                  <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round">
                    <polyline points="20 6 9 17 4 12"/>
                  </svg>
                  connected
                </div>
              )}
            </div>
          );
        })}
      </div>

      {/* Cycle progress dots — show only during cycling, not on aha */}
      {!aha && (
        <div style={{
          position: "absolute", left: 0, right: 0, bottom: 80,
          display: "flex", justifyContent: "center", gap: 10,
          zIndex: 11,
        }}>
          {CONNECTORS.map((_, i) => (
            <span key={i} style={{
              width: i === step ? 28 : 8, height: 8,
              borderRadius: 9999,
              background: i === step ? "var(--color-text)" : "var(--color-border-strong)",
              transition: "width 400ms, background 400ms",
            }}/>
          ))}
        </div>
      )}

      {/* Footer — gethelios.io stays put */}
      <div className="anim-fade" style={{
        position: "absolute", left: 0, right: 0, bottom: 32,
        textAlign: "center",
        fontFamily: "var(--font-mono)", fontSize: 13,
        color: "var(--color-text-muted)",
        letterSpacing: "0.04em",
        zIndex: 11,
      }}>
        gethelios.io
      </div>
    </>
  );
};

Object.assign(window, { Scene1, Scene2, Scene3, Scene4, Scene5, SceneKnow, SceneAskAnywhere, Scene6 });
