type SealProps = {
  size?: number;
  className?: string;
};

export default function Seal({ size = 200, className = "" }: SealProps) {
  return (
    <svg
      viewBox="0 0 220 220"
      width={size}
      height={size}
      className={className}
      role="img"
      aria-label="St. Michael Industrial School official seal"
    >
      <defs>
        <path
          id="seal-top-arc"
          d="M 110,110 m -74,0 a 74,74 0 1,1 148,0"
          fill="none"
        />
        <path
          id="seal-bottom-arc"
          d="M 110,110 m -74,0 a 74,74 0 1,0 148,0"
          fill="none"
        />
        <radialGradient id="seal-core" cx="50%" cy="42%" r="65%">
          <stop offset="0%" stopColor="#f7e7ae" />
          <stop offset="55%" stopColor="#d9b455" />
          <stop offset="100%" stopColor="#8f6a1b" />
        </radialGradient>
        <linearGradient id="seal-ring" x1="0" y1="0" x2="1" y2="1">
          <stop offset="0%" stopColor="#f0d98a" />
          <stop offset="50%" stopColor="#b8912f" />
          <stop offset="100%" stopColor="#7c5c17" />
        </linearGradient>
      </defs>

      {/* rings */}
      <circle cx="110" cy="110" r="104" fill="none" stroke="url(#seal-ring)" strokeWidth="3.5" className="seal-draw" />
      <circle cx="110" cy="110" r="98" fill="none" stroke="url(#seal-ring)" strokeWidth="1.2" />
      <circle cx="110" cy="110" r="58" fill="url(#seal-core)" stroke="url(#seal-ring)" strokeWidth="2.5" />
      <circle cx="110" cy="110" r="52" fill="none" stroke="#5d4413" strokeWidth="0.9" strokeDasharray="3 3" />

      {/* circular text */}
      <text fill="#3a2a0c" fontSize="12.5" fontWeight="700" letterSpacing="2.2" fontFamily="Fraunces, Georgia, serif">
        <textPath href="#seal-top-arc" startOffset="50%" textAnchor="middle">
          ST. MICHAEL INDUSTRIAL SCHOOL
        </textPath>
      </text>
      <text fill="#3a2a0c" fontSize="10.5" fontWeight="600" letterSpacing="2.4" fontFamily="Fraunces, Georgia, serif">
        <textPath href="#seal-bottom-arc" startOffset="50%" textAnchor="middle">
          KALAIYAR · KARAM ·
        </textPath>
      </text>

      {/* center emblem — star + monogram */}
      <g transform="translate(110,110)">
        <polygon
          points="0,-30 7.6,-10.5 28.5,-9.3 12.3,4.1 17.6,24.3 0,13 -17.6,24.3 -12.3,4.1 -28.5,-9.3 -7.6,-10.5"
          fill="#4a2b0b"
        />
        <text
          y="44"
          textAnchor="middle"
          fontSize="9.5"
          fontWeight="700"
          letterSpacing="2.6"
          fill="#4a2b0b"
          fontFamily="Fraunces, Georgia, serif"
        >
          EXAM · 2024-25
        </text>
      </g>

      {/* laurel hints */}
      <g stroke="#5d4413" strokeWidth="2" fill="none" strokeLinecap="round">
        <path d="M 34,150 q 14,26 44,32" opacity="0.85" />
        <path d="M 186,150 q -14,26 -44,32" opacity="0.85" />
      </g>
    </svg>
  );
}
