// Logo mark — uses real logo image at assets/logo.png
// (placeholder until user uploads their real logo)
function MartenMark({ size = 320, animate = true }) {
  // Resolve logo path relative to page depth — game pages are in games/, others at root
  const depth = window.location.pathname.split("/").filter(Boolean).length;
  const inSubdir = window.location.pathname.includes("/games/");
  const src = inSubdir ? "../assets/logo.png" : "assets/logo.png";
  return (
    <div
      style={{
        width: size,
        height: size,
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
        position: "relative",
      }}
    >
      <img
        src={src}
        alt="Maple Marten Studios"
        style={{
          width: "100%",
          height: "100%",
          objectFit: "contain",
          imageRendering: "auto",
        }}
        onError={(e) => { e.currentTarget.style.opacity = 0.3; }}
      />
    </div>
  );
}

window.MartenMark = MartenMark;
