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

type MarkProps = {
  size?: number;
  className?: string;
  title?: string;
};

/**
 * Phoenix sub-mark — ascending bird; wing strata as cloud compute layers;
 * central core as continuity / rebirth.
 */
export function PhoenixMark({ size = 48, className, title = 'Phoenix' }: MarkProps) {
  return (
    <svg
      viewBox="0 0 64 64"
      width={size}
      height={size}
      className={cn('shrink-0 text-sovereign-gold', className)}
      role="img"
      aria-label={title}
    >
      {/* Cloud strata — horizontal compute layers */}
      <g stroke="currentColor" strokeWidth={1} fill="none" opacity={0.5}>
        <path d="M8 44 H56" />
        <path d="M12 48 H52" />
        <path d="M16 52 H48" />
      </g>

      {/* Rising bird silhouette */}
      <path
        d="M32 54 L32 26 M32 26 L22 36 M32 26 L42 36"
        stroke="currentColor"
        strokeWidth={2}
        strokeLinecap="round"
        strokeLinejoin="round"
        fill="none"
      />

      {/* Wing layers — cloud strata */}
      <g fill="currentColor" opacity={0.65}>
        <path d="M14 38 L32 30 L50 38 L32 34 Z" />
        <path d="M18 32 L32 24 L46 32 L32 28 Z" opacity={0.8} />
        <path d="M22 26 L32 18 L42 26 L32 22 Z" opacity={0.95} />
      </g>

      {/* Sun / fire core — uptime continuity */}
      <circle cx={32} cy={14} r={6} fill="currentColor" opacity={0.9} />
      <circle cx={32} cy={14} r={3.5} fill="#0D1B2A" opacity={0.35} />

      {/* Ascent vector */}
      <path
        d="M32 8 V4"
        stroke="currentColor"
        strokeWidth={1.5}
        strokeLinecap="round"
        opacity={0.6}
      />
    </svg>
  );
}
