/**
 * Trouve-KA — wordmark « Trouve » + chip « KA » (signature Groupe KA)
 * Author: Simon-Pierre Boucher
 * Contact: contact@spboucher.ai
 */

import { cn } from "@/lib/utils";

interface WordmarkProps {
  /**
   * `header` : encre sur papier, chip encre/texte lime (hover rotate-0 via
   * `group` sur le lien parent). `footer` : papier sur encre, chip lime.
   * `hero` : géant, pour la homepage.
   */
  variant?: "header" | "footer" | "hero";
  className?: string;
}

export function Wordmark({ variant = "header", className }: WordmarkProps) {
  const base =
    variant === "footer"
      ? "text-[26px] text-paper"
      : variant === "hero"
        ? "text-5xl text-ink sm:text-6xl"
        : "text-[21px] text-ink sm:text-[24px]";

  return (
    <span
      className={cn(
        "gk-display inline-flex items-baseline gap-[5px] font-bold tracking-[-0.04em]",
        base,
        className,
      )}
    >
      Trouve
      {variant === "footer" ? (
        <span className="inline-block -rotate-2 rounded-md bg-lime px-[7px] pb-[2px] text-ink">
          KA
        </span>
      ) : variant === "hero" ? (
        <span className="inline-block -rotate-2 rounded-lg bg-ink px-3 pb-1 text-lime">
          KA
        </span>
      ) : (
        <span className="inline-block -rotate-2 rounded-md bg-ink px-[7px] pb-[2px] text-lime transition-transform duration-200 group-hover:rotate-0">
          KA
        </span>
      )}
    </span>
  );
}
