import Link from "next/link";
import Image from "next/image";
import { cn } from "@/lib/utils";

/**
 * BRAND LOCK — DO NOT MODIFY the logo artwork itself (no recoloring, redrawing,
 * cropping, or distortion). The official ROPTS mark lives at /public/brand/ —
 * logo.png on light backgrounds, logo-dark.png on dark backgrounds.
 *
 * `variant="light"` is for placement on the deep-navy footer: it swaps to the
 * logo-dark asset and adds a plain paper backing chip for contrast (the dark
 * asset is currently identical artwork to the default mark — the chip is a
 * container treatment, not an edit to the logo image).
 */
export function Logo({ className, variant = "default" }: { className?: string; variant?: "default" | "light" }) {
  const src = variant === "light" ? "/brand/logo-dark.png" : "/brand/logo.png";

  const image = (
    <Image
      src={src}
      alt="ROPTS Venture Capital"
      width={1536}
      height={1024}
      priority
      className="h-8 w-auto lg:h-11"
    />
  );

  return (
    <Link href="/" aria-label="ROPTS Venture Capital — Home" className={cn("inline-flex items-center", className)}>
      {variant === "light" ? <span className="rounded-md bg-paper/95 px-3 py-2">{image}</span> : image}
    </Link>
  );
}
