/* Wings-themed reveal-slider hero animation.
   MacBook chassis + draggable reveal slider that uncovers a Wings-branded
   answer overlay on top of a "what they see" coding/proctor screen.
   Matches Wings palette: warm cream bg, magenta accent (#B026FF),
   Inter Tight / Instrument Serif / JetBrains Mono. */

const { RevealScreen: WRS, MacBook: WMB } = window;

const WINGS_ACCENT = "#B026FF";

// ─── the "what they see" base layer — a proctor coding screen ───
function WingsCodingScreen() {
  const monoStyle = { fontFamily: "'JetBrains Mono', monospace" };
  return (
    <div style={{
      width: "100%", height: "100%",
      background: "#0d0d12",
      color: "#e4e4e8",
      fontFamily: "'Inter Tight', system-ui, sans-serif",
      display: "grid",
      gridTemplateRows: "44px 1fr"
    }}>
      {/* top bar — browser chrome */}
      <div style={{
        display: "flex", alignItems: "center", gap: 14,
        padding: "0 18px",
        borderBottom: "1px solid #1d1d26",
        background: "#15151c"
      }}>
        <div style={{ display: "flex", gap: 7 }}>
          <span style={{ width: 12, height: 12, borderRadius: "50%", background: "#ff5f57" }} />
          <span style={{ width: 12, height: 12, borderRadius: "50%", background: "#febc2e" }} />
          <span style={{ width: 12, height: 12, borderRadius: "50%", background: "#28c840" }} />
        </div>
        <div style={{ ...monoStyle, fontSize: 12.5, color: "#8b8e98", marginLeft: 10 }}>
          hackerrank.com / test / two-sum
        </div>
        <div style={{ marginLeft: "auto", display: "flex", gap: 10, alignItems: "center" }}>
          <span style={{
            ...monoStyle,
            fontSize: 11.5, color: "#ff5f57",
            display: "inline-flex", alignItems: "center", gap: 6
          }}>
            <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#ff5f57", boxShadow: "0 0 8px #ff5f57" }} />
            REC · 02:14
          </span>
          <span style={{ ...monoStyle, fontSize: 11, color: "rgba(255,255,255,0.45)" }}>cam ✓ mic ✓</span>
        </div>
      </div>

      {/* two-column problem + editor */}
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", minHeight: 0 }}>
        {/* problem pane */}
        <div style={{ padding: "28px 30px", overflow: "hidden", borderRight: "1px solid #1d1d26" }}>
          <div style={{ display: "flex", alignItems: "center", gap: 8, marginBottom: 18 }}>
            {[
            { l: "Easy", c: "oklch(78% 0.16 145)" },
            { l: "Array", c: "oklch(78% 0.13 220)" },
            { l: "Hash Table", c: "oklch(78% 0.16 320)" }].
            map((t) =>
            <span key={t.l} style={{
              background: `color-mix(in oklab, ${t.c}, transparent 80%)`,
              color: t.c,
              border: `1px solid color-mix(in oklab, ${t.c}, transparent 60%)`,
              padding: "3px 11px",
              borderRadius: 999,
              fontSize: 11.5,
              fontWeight: 500,
              letterSpacing: 0.3
            }}>{t.l}</span>
            )}
          </div>
          <div style={{
            fontSize: 28, fontWeight: 700, color: "#fafafe",
            marginBottom: 14, letterSpacing: -0.4,
            fontFamily: "'Inter Tight', system-ui, sans-serif"
          }}>
            <span style={{ color: WINGS_ACCENT, marginRight: 10, fontFamily: "'Instrument Serif', serif", fontStyle: "italic", fontWeight: 400 }}>01.</span>
            Two Sum
          </div>
          <div style={{
            fontSize: 14.5, lineHeight: 1.65, color: "#b8bac4",
            textWrap: "pretty", marginBottom: 18
          }}>
            Given an array of integers <code style={{ color: "#e4e4e8" }}>nums</code> and a target integer, return the indices of the two numbers such that they add up to target.
          </div>

          <div style={{
            ...monoStyle, fontSize: 11, letterSpacing: 1.2,
            textTransform: "uppercase", color: "#6b6e78", marginBottom: 7
          }}>example</div>
          <div style={{
            background: "#08080c",
            border: "1px solid #1d1d26",
            borderLeft: `3px solid ${WINGS_ACCENT}`,
            padding: "12px 14px",
            ...monoStyle, fontSize: 13, lineHeight: 1.75,
            marginBottom: 16
          }}>
            <div><span style={{ color: "#6b6e78" }}>input&nbsp;&nbsp;</span><span style={{ color: "oklch(82% 0.16 145)" }}>[2,7,11,15], 9</span></div>
            <div><span style={{ color: "#6b6e78" }}>output&nbsp;</span><span style={{ color: "oklch(82% 0.15 65)" }}>[0,1]</span></div>
          </div>

          <div style={{
            ...monoStyle, fontSize: 11, letterSpacing: 1.2,
            textTransform: "uppercase", color: "#6b6e78", marginBottom: 7
          }}>constraints</div>
          <ul style={{ margin: 0, paddingLeft: 18, fontSize: 13, color: "#9ea1ad", lineHeight: 1.75 }}>
            <li>2 ≤ nums.length ≤ 10⁴</li>
            <li>−10⁹ ≤ nums[i] ≤ 10⁹</li>
            <li>exactly one valid answer</li>
          </ul>
        </div>

        {/* editor pane */}
        <div style={{ display: "grid", gridTemplateRows: "34px 1fr 48px", minHeight: 0 }}>
          <div style={{
            display: "flex", alignItems: "center", gap: 10,
            padding: "0 16px",
            background: "#15151c",
            borderBottom: "1px solid #1d1d26",
            ...monoStyle, fontSize: 12, color: "#8b8e98"
          }}>
            <span style={{ color: "oklch(82% 0.13 205)" }}>● python 3</span>
            <span>·</span>
            <span>two_sum.py</span>
            <span style={{ marginLeft: "auto", color: "#6b6e78" }}>autosaved</span>
          </div>
          <div style={{ padding: "18px 16px 0", overflow: "hidden" }}>
            <div style={{ display: "grid", gridTemplateColumns: "26px 1fr", gap: 12 }}>
              <div style={{ ...monoStyle, fontSize: 13, lineHeight: 1.7, color: "#3e424d", textAlign: "right" }}>
                {Array.from({ length: 8 }, (_, i) => <div key={i}>{i + 1}</div>)}
              </div>
              <pre style={{ ...monoStyle, fontSize: 13, lineHeight: 1.7, margin: 0, whiteSpace: "pre", color: "#e4e4e8" }}>
<span style={{ color: "#6b6e78" }}>{`# your solution\n`}</span>
<span style={{ color: "oklch(75% 0.18 340)" }}>def</span>{` `}<span style={{ color: "oklch(82% 0.13 205)" }}>two_sum</span>{`(nums, target):\n`}
{`    `}<span style={{ color: "#6b6e78" }}>{`# TODO\n`}</span>
{`    `}<span style={{ color: "oklch(75% 0.18 340)" }}>pass</span>
              </pre>
            </div>
          </div>
          <div style={{
            borderTop: "1px solid #1d1d26",
            background: "#08080c",
            display: "flex", alignItems: "center", gap: 10,
            padding: "0 16px"
          }}>
            <div style={{
              padding: "6px 16px", fontSize: 12, fontWeight: 500,
              borderRadius: 6, border: "1px solid #2a2d38", color: "#cfd2dc"
            }}>Run</div>
            <div style={{
              padding: "6px 16px", fontSize: 12, fontWeight: 500,
              borderRadius: 6, background: WINGS_ACCENT, color: "#fff",
              border: `1px solid ${WINGS_ACCENT}`
            }}>Submit</div>
            <div style={{ marginLeft: "auto", ...monoStyle, fontSize: 11, color: "#6b6e78" }}>
              <span style={{ color: "oklch(78% 0.16 145)" }}>●</span> ready
            </div>
          </div>
        </div>
      </div>
    </div>);

}

// ─── the "only you see this" overlay — Wings-branded answer panel ───
function WingsAnswerOverlay() {
  return (
    <div style={{
      width: "100%", height: "100%",
      background: "linear-gradient(180deg, rgba(15,8,22,0.97), rgba(10,5,15,0.97))",
      border: `1px solid ${WINGS_ACCENT}`,
      boxShadow: `0 30px 80px rgba(176,38,255,0.45), 0 0 0 1px rgba(176,38,255,0.25) inset`,
      borderRadius: 8,
      color: "#fff",
      fontFamily: "'Inter Tight', system-ui, sans-serif",
      display: "flex", flexDirection: "column",
      overflow: "hidden"
    }}>
      {/* titlebar */}
      <div style={{
        padding: "10px 14px",
        background: "linear-gradient(180deg, #1a0d28, #0e0518)",
        borderBottom: `1px solid rgba(176,38,255,0.22)`,
        display: "flex", alignItems: "center", gap: 10
      }}>
        <div style={{ display: "flex", gap: 6 }}>
          <span style={{ width: 10, height: 10, borderRadius: "50%", background: "#ff5f57" }} />
          <span style={{ width: 10, height: 10, borderRadius: "50%", background: "#febc2e" }} />
          <span style={{ width: 10, height: 10, borderRadius: "50%", background: "#28c840" }} />
        </div>
        <span style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 12,
          color: "rgba(176,38,255,0.85)",
          marginLeft: 8
        }}>wings · hidden overlay</span>
        <span style={{
          marginLeft: "auto",
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 11.5,
          color: "rgba(255,255,255,0.6)",
          display: "inline-flex", alignItems: "center", gap: 6
        }}>
          <span style={{
            width: 8, height: 8, borderRadius: "50%",
            background: WINGS_ACCENT,
            boxShadow: `0 0 9px ${WINGS_ACCENT}`,
            animation: "wpulse 1.5s ease-in-out infinite"
          }} />
          ghosty
        </span>
      </div>

      {/* body */}
      <div style={{ padding: "16px 18px", flex: 1, minHeight: 0 }}>
        <div style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 11, color: "rgba(255,255,255,0.45)",
          letterSpacing: 0.5, marginBottom: 10
        }}>
          ▸ detected · screen capture · O(n) hash solution
        </div>

        {/* progress bar */}
        <div style={{
          height: 4, borderRadius: 2,
          background: "rgba(255,255,255,0.08)",
          overflow: "hidden", marginBottom: 14
        }}>
          <div style={{
            height: "100%", width: "72%",
            background: `linear-gradient(90deg, ${WINGS_ACCENT}, #6a00b8)`
          }} />
        </div>

        <pre style={{
          margin: 0,
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 13, lineHeight: 1.65,
          whiteSpace: "pre", color: "#e4e4e8"
        }}>
<span style={{ color: "#6b6478" }}>{`# one-pass · O(n)\n`}</span>
<span style={{ color: "#c084fc" }}>def</span>{` `}<span style={{ color: "#79c0ff" }}>twoSum</span>{`(nums, t):\n`}
{`  seen = {}\n`}
{`  `}<span style={{ color: "#c084fc" }}>for</span>{` i, n `}<span style={{ color: "#c084fc" }}>in</span>{` `}<span style={{ color: "#79c0ff" }}>enumerate</span>{`(nums):\n`}
{`    `}<span style={{ color: "#c084fc" }}>if</span>{` t-n `}<span style={{ color: "#c084fc" }}>in</span>{` seen:\n`}
{`      `}<span style={{ color: "#c084fc" }}>return</span>{` [seen[t-n], i]\n`}
{`    seen[n] = i`}
        </pre>

        <div style={{
          marginTop: 16, paddingTop: 12,
          borderTop: "1px solid rgba(255,255,255,0.06)",
          display: "flex", alignItems: "center", gap: 12,
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 11, color: "rgba(255,255,255,0.55)",
          flexWrap: "wrap"
        }}>
          <span><Kbd>⌘</Kbd>+<Kbd>K</Kbd> toggle</span>
          <span><Kbd>⌘</Kbd>+<Kbd>↵</Kbd> insert</span>
          <span style={{ marginLeft: "auto", color: "#2dd47a" }}>● invisible to share</span>
        </div>
      </div>
    </div>);

}

function Kbd({ children, big }) {
  if (big) {
    return (
      <span style={{
        display: "inline-flex", alignItems: "center", justifyContent: "center",
        padding: "3px 9px", minWidth: 26, height: 26,
        borderRadius: 6,
        background: "rgba(255,255,255,0.1)",
        border: "1px solid rgba(255,255,255,0.18)",
        boxShadow: "0 1px 0 rgba(255,255,255,0.1) inset, 0 2px 0 rgba(0,0,0,0.4)",
        color: "#fff",
        fontFamily: "'JetBrains Mono', monospace",
        fontSize: 13, fontWeight: 600
      }}>{children}</span>);

  }
  return (
    <span style={{
      display: "inline-block", padding: "0 5px",
      borderRadius: 3, background: "rgba(255,255,255,0.08)",
      color: "rgba(255,255,255,0.85)",
      fontFamily: "'JetBrains Mono', monospace",
      fontSize: 9.5, margin: "0 1px"
    }}>{children}</span>);

}

// ─── tilted secondary panel — "ghosty log" peeking from behind the MacBook ───
function WingsGhostyLog() {
  return (
    <div style={{
      width: 280, height: 240,
      background: "linear-gradient(180deg, rgba(15,8,22,0.97), rgba(10,5,15,0.97))",
      border: `1px solid ${WINGS_ACCENT}`,
      boxShadow: `0 30px 80px rgba(176,38,255,0.45), 0 0 0 1px rgba(176,38,255,0.25) inset`,
      borderRadius: 10,
      fontFamily: "'Inter Tight', system-ui, sans-serif",
      color: "#fff",
      display: "flex", flexDirection: "column",
      overflow: "hidden"
    }}>
      <div style={{
        padding: "7px 11px",
        background: "linear-gradient(180deg, #1a0d28, #0e0518)",
        borderBottom: `1px solid rgba(176,38,255,0.22)`,
        display: "flex", alignItems: "center", gap: 7
      }}>
        <div style={{ display: "flex", gap: 4 }}>
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#ff5f57" }} />
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#febc2e" }} />
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#28c840" }} />
        </div>
        <span style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 9.5,
          color: "rgba(176,38,255,0.85)"
        }}>ghosty · log</span>
        <span style={{
          marginLeft: "auto",
          width: 6, height: 6, borderRadius: "50%",
          background: WINGS_ACCENT,
          boxShadow: `0 0 6px ${WINGS_ACCENT}`,
          animation: "wpulse 1.5s ease-in-out infinite"
        }} />
      </div>
      <div style={{
        flex: 1, padding: "12px 13px",
        fontFamily: "'JetBrains Mono', monospace",
        fontSize: 11, lineHeight: 1.85,
        color: "rgba(255,255,255,0.7)",
        minHeight: 0
      }}>
        <div><span style={{ color: WINGS_ACCENT }}>▸</span> analysing screen capture…</div>
        <div><span style={{ color: "oklch(78% 0.16 145)" }}>✓</span> detected · leetcode 1</div>
        <div><span style={{ color: "oklch(78% 0.16 145)" }}>✓</span> category · array · hash</div>
        <div><span style={{ color: "oklch(78% 0.16 145)" }}>✓</span> language · python 3</div>
        <div><span style={{ color: WINGS_ACCENT }}>▸</span> generating solution…</div>
        <div style={{ marginTop: 4, color: "rgba(255,255,255,0.45)" }}>
          time <span style={{ color: "#e4e4e8" }}>O(n)</span> · space <span style={{ color: "#e4e4e8" }}>O(n)</span>
        </div>
        <div style={{
          marginTop: 8, paddingTop: 8,
          borderTop: "1px solid rgba(255,255,255,0.07)",
          fontSize: 10,
          display: "flex", alignItems: "center", gap: 6,
          color: "#2dd47a"
        }}>
          <span style={{
            width: 6, height: 6, borderRadius: "50%", background: "#2dd47a",
            boxShadow: "0 0 6px #2dd47a"
          }} />
          ready · press ⌘+↵ to insert
        </div>
      </div>
    </div>);

}

// ─── thumbtack pin — anchors panels to the "wall" (page background) ───
function Pin({ corner = "top-left" }) {
  const pos = {
    "top-left":     { top: -10, left: -10 },
    "top-right":    { top: -10, right: -10 },
    "bottom-left":  { bottom: -10, left: -10 },
    "bottom-right": { bottom: -10, right: -10 },
  }[corner];
  // unique gradient id per corner so multiple pins don't conflict
  const gid = `pinhead-${corner}`;
  return (
    <svg width="34" height="34" viewBox="0 0 34 34" style={{
      position: "absolute",
      ...pos,
      zIndex: 12,
      pointerEvents: "none",
      filter: "drop-shadow(0 5px 8px rgba(0,0,0,0.5))",
    }}>
      <defs>
        <radialGradient id={gid} cx="35%" cy="30%" r="70%">
          <stop offset="0%"  stopColor="#ffe4ff" />
          <stop offset="25%" stopColor={WINGS_ACCENT} />
          <stop offset="100%" stopColor="#4a0080" />
        </radialGradient>
      </defs>
      {/* metal shaft going into wall */}
      <path d="M 19 18 L 23 28 L 18 26 Z" fill="#777" />
      {/* drop shadow ring under head */}
      <ellipse cx="17" cy="17" rx="11" ry="3" fill="rgba(0,0,0,0.25)" />
      {/* head */}
      <circle cx="17" cy="14" r="10" fill={`url(#${gid})`} stroke="rgba(0,0,0,0.4)" strokeWidth="0.6" />
      {/* shine */}
      <ellipse cx="13" cy="10" rx="3" ry="2" fill="rgba(255,255,255,0.65)" />
    </svg>
  );
}

// ─── shortcuts panel — same size as ghosty log, listing hotkeys ───
function WingsShortcutsPanel() {
  return (
    <div style={{
      width: 280, height: 240,
      background: "linear-gradient(180deg, rgba(15,8,22,0.97), rgba(10,5,15,0.97))",
      border: `1px solid ${WINGS_ACCENT}`,
      boxShadow: `0 30px 80px rgba(176,38,255,0.45), 0 0 0 1px rgba(176,38,255,0.25) inset`,
      borderRadius: 10,
      fontFamily: "'Inter Tight', system-ui, sans-serif",
      color: "#fff",
      display: "flex", flexDirection: "column",
      overflow: "hidden",
    }}>
      <div style={{
        padding: "7px 11px",
        background: "linear-gradient(180deg, #1a0d28, #0e0518)",
        borderBottom: `1px solid rgba(176,38,255,0.22)`,
        display: "flex", alignItems: "center", gap: 7,
      }}>
        <div style={{ display: "flex", gap: 4 }}>
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#ff5f57" }} />
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#febc2e" }} />
          <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#28c840" }} />
        </div>
        <span style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 9.5,
          color: "rgba(176,38,255,0.85)",
        }}>shortcuts · hotkeys</span>
      </div>
      <div style={{
        flex: 1, padding: "10px 12px",
        display: "flex", flexDirection: "column", gap: 7,
        minHeight: 0,
      }}>
        <Shortcut keys={["⌘", "K"]}      label="summon overlay" />
        <Shortcut keys={["⌘", "↵"]}      label="capture answer" />
        <Shortcut moveKeys                label="nudge ↑ ↓ ← →" />
        <Shortcut keys={["⌘", "H"]}      label="hide instantly" />
        <Shortcut keys={["⌘", "."]}      label="emergency kill" danger />
      </div>
    </div>
  );
}

function Shortcut({ keys, moveKeys, label, danger }) {
  const KbdSm = ({ children }) => (
    <span style={{
      display: "inline-flex", alignItems: "center", justifyContent: "center",
      padding: "0 6px", minWidth: 22, height: 22,
      borderRadius: 5,
      background: danger ? "rgba(255,77,77,0.18)" : "rgba(255,255,255,0.1)",
      border: `1px solid ${danger ? "rgba(255,77,77,0.5)" : "rgba(255,255,255,0.2)"}`,
      boxShadow: "0 1px 0 rgba(255,255,255,0.08) inset, 0 1px 0 rgba(0,0,0,0.4)",
      color: danger ? "#ffaaaa" : "#fff",
      fontFamily: "'JetBrains Mono', monospace",
      fontSize: 11, fontWeight: 600,
    }}>{children}</span>
  );
  return (
    <div style={{
      display: "flex", alignItems: "center", gap: 6,
      fontFamily: "'Inter Tight', system-ui, sans-serif",
      fontSize: 11.5,
      color: danger ? "#ff9090" : "rgba(255,255,255,0.78)",
    }}>
      {moveKeys ? (
        <div style={{ display: "flex", gap: 3, alignItems: "center" }}>
          <KbdSm>⌘</KbdSm>
          <span style={{ color: "rgba(255,255,255,0.4)", fontSize: 10, margin: "0 1px" }}>+</span>
          <div style={{
            display: "grid",
            gridTemplateColumns: "22px 22px 22px",
            gridTemplateRows: "11px 11px",
            gap: 1,
          }}>
            <span></span>
            <KbdMini>↑</KbdMini>
            <span></span>
            <KbdMini>←</KbdMini>
            <KbdMini>↓</KbdMini>
            <KbdMini>→</KbdMini>
          </div>
        </div>
      ) : (
        <div style={{ display: "flex", gap: 3, alignItems: "center" }}>
          {keys.map((k, i) => (
            <React.Fragment key={i}>
              {i > 0 && <span style={{ color: "rgba(255,255,255,0.4)", fontSize: 10, margin: "0 1px" }}>+</span>}
              <KbdSm>{k}</KbdSm>
            </React.Fragment>
          ))}
        </div>
      )}
      <span style={{
        marginLeft: "auto",
        fontSize: moveKeys ? 10.5 : 11.5,
        fontStyle: danger ? "normal" : "normal",
        whiteSpace: "nowrap",
      }}>{label}</span>
    </div>
  );
}

function KbdMini({ children }) {
  return (
    <span style={{
      display: "inline-flex", alignItems: "center", justifyContent: "center",
      width: 22, height: 11,
      borderRadius: 3,
      background: "rgba(255,255,255,0.08)",
      border: "1px solid rgba(255,255,255,0.18)",
      color: "#fff",
      fontFamily: "'JetBrains Mono', monospace",
      fontSize: 9, lineHeight: 1,
    }}>{children}</span>
  );
}

// ─── the assembled hero animation ───
// Renders the MacBook + reveal slider at a fixed design size, then scales it
// with CSS transform so it always fits its parent container.
function WingsRevealHero() {
  // design size — wider canvas so the two pinned side panels live in the side
  // margins (not behind the MacBook)
  const designW = 1640;
  const designH = 820;

  // MacBook screen size — bigger, so the LeetCode content fits comfortably
  const macScreenW = 1080;
  const macScreenH = 640;

  // container ref → measure → compute scale
  const wrapRef = React.useRef(null);
  const [scale, setScale] = React.useState(1);

  React.useEffect(() => {
    const update = () => {
      const el = wrapRef.current;
      if (!el) return;
      const r = el.getBoundingClientRect();
      const s = Math.min(r.width / designW, r.height / designH);
      setScale(s);
    };
    update();
    const ro = new ResizeObserver(update);
    if (wrapRef.current) ro.observe(wrapRef.current);
    window.addEventListener("resize", update);
    return () => {
      ro.disconnect();
      window.removeEventListener("resize", update);
    };
  }, []);

  return (
    <div
      ref={wrapRef}
      style={{
        position: "relative",
        width: "100%", height: "100%",
        overflow: "visible",
      }}>
      <style>{`@keyframes wpulse{0%,100%{opacity:1}50%{opacity:.45}}@keyframes wbob{0%,100%{transform:translateY(0) rotate(10deg)}50%{transform:translateY(-12px) rotate(6deg)}}`}</style>

      {/* absolute-positioned so it does NOT contribute to parent grid track min-content */}
      <div style={{
          position: "absolute",
          left: "50%", top: "50%",
          width: designW, height: designH,
          transform: `translate(-50%, -50%) scale(${scale})`,
          transformOrigin: "center center",
          display: "flex", alignItems: "center", justifyContent: "center",
        }}>

        {/* ─── MacBook centered, on a middle z-index ─── */}
        <div style={{ position: "relative", zIndex: 2 }}>
          <WMB screenWidth={macScreenW} screenHeight={macScreenH}>
            <WRS
              width={macScreenW}
              height={macScreenH}
              initial={58}
              screenStyle={{ background: "#0d0d12" }}
              background={<WingsCodingScreen />}
              overlay={
                <div style={{ position: "absolute", top: 130, right: 90, width: 540, height: 320 }}>
                  <WingsAnswerOverlay />
                </div>
              }
              accent={WINGS_ACCENT}
              labelFont="'Inter Tight', sans-serif"
              leftLabel="What they see"
              rightLabel="Only you see this" />
          </WMB>
        </div>

        {/* ─── LEFT panel: shortcuts/hotkeys — pinned to the wall ─── */}
        <div style={{
          position: "absolute",
          left: 20, top: 280,
          transform: "rotate(-5deg)",
          transformOrigin: "top left",
          zIndex: 6,
        }}>
          <Pin corner="top-left" />
          <WingsShortcutsPanel />
        </div>

        {/* ─── RIGHT panel: ghosty log — pinned to the wall ─── */}
        <div style={{
          position: "absolute",
          right: 20, top: 250,
          transform: "rotate(6deg)",
          transformOrigin: "top right",
          zIndex: 6,
        }}>
          <Pin corner="top-right" />
          <WingsGhostyLog />
        </div>

        {/* ─── ghosty mascot, floating just above the MacBook lid ─── */}
        <div style={{
          position: "absolute",
          top: 0, left: "50%",
          marginLeft: 300,
          zIndex: 7,
          width: 110, height: 110,
          filter: `drop-shadow(0 12px 30px rgba(176,38,255,0.55))`,
          animation: "wbob 4.5s ease-in-out infinite",
        }}>
          <img src="assets/ghosty.png" alt="" style={{
            width: "100%", height: "100%", objectFit: "contain", display: "block",
          }} />
        </div>

        {/* ─── floating callout labels ─── */}
        <span className="float-label" style={{
          position: "absolute",
          top: -12, left: 340,
          zIndex: 8,
        }}>what they see</span>

        <span className="float-label you" style={{
          position: "absolute",
          top: 170, right: 360,
          zIndex: 8,
        }}>only you see this ✦</span>

        {/* ─── drag hint, sitting in the laptop chin area ─── */}
        <div style={{
          position: "absolute",
          bottom: 6, left: "50%",
          transform: "translateX(-50%)",
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 12,
          letterSpacing: 1.5,
          color: "rgba(255,255,255,0.9)",
          background: "rgba(10,10,15,0.78)",
          backdropFilter: "blur(6px)",
          padding: "7px 16px",
          borderRadius: 999,
          border: `1px solid ${WINGS_ACCENT}`,
          boxShadow: `0 8px 24px rgba(176,38,255,0.4)`,
          pointerEvents: "none",
          zIndex: 8,
          whiteSpace: "nowrap",
        }}>
          ← drag the slider to reveal →
        </div>
      </div>
    </div>
  );
}

window.WingsRevealHero = WingsRevealHero;