// Titan Kaskı — yandan profil, outline çizim stili
// Tema-duyarlı: `color` CSS değişkeninden (currentColor) miras alır —
// dark'ta slate-50 beyaz, light'ta slate-900 siyah.
// Crista (mavi vurgu) temada sabit kalır.
function TitanHelmet({ size = 32, mono = false }) {
  const sw = 2;                  // ana kalınlık
  const swThin = 1.2;            // ince kalınlık
  // currentColor — hem nav'da hem footer'da doğru kontrast
  const stroke = 'currentColor';
  const strokeThin = 'currentColor';
  // Crista — mavi vurgu (mono modda currentColor)
  const crista = mono ? 'currentColor' : '#3b82f6';
  const cristaFill = mono ? 'none' : 'rgba(59,130,246,0.12)';

  return (
    <svg width={size} height={size} viewBox="0 0 100 100" fill="none" aria-label="Titan" role="img"
         strokeLinecap="round" strokeLinejoin="round" style={{flexShrink:0}}>
      {/* Crista — kubbe üstünde yatay akan fırça */}
      <path d="M 22 28
               Q 30 16 50 16
               Q 70 16 82 22
               Q 78 26 70 26
               L 30 26
               Q 24 26 22 28 Z"
            fill={cristaFill}
            stroke={crista} strokeWidth={sw}/>
      {/* Crista kılları */}
      <path d="M 28 22 L 30 14 M 36 20 L 38 12 M 44 19 L 46 11
               M 52 19 L 54 11 M 60 20 L 62 12 M 68 21 L 70 13 M 74 23 L 76 16"
            stroke={crista} strokeWidth={swThin} opacity="0.85"/>

      {/* Ana kubbe */}
      <path d="M 18 52
               Q 18 36 30 30
               Q 44 26 62 28
               Q 76 30 82 40
               Q 84 46 82 54
               L 82 58
               L 18 58 Z"
            stroke={stroke} strokeWidth={sw}/>

      {/* Kubbe iç konturu */}
      <path d="M 26 44 Q 44 34 72 38"
            stroke={strokeThin} strokeWidth={swThin} opacity="0.55"/>

      {/* Alın bandı */}
      <path d="M 18 58 L 82 58 M 18 65 L 82 65"
            stroke={stroke} strokeWidth={sw}/>
      <path d="M 22 61.5 L 78 61.5"
            stroke={strokeThin} strokeWidth={swThin} opacity="0.45"/>

      {/* Yanak koruyucu */}
      <path d="M 28 65
               Q 26 78 32 86
               Q 38 90 46 87
               L 50 80
               L 50 65"
            stroke={stroke} strokeWidth={sw} fill="none"/>
      <path d="M 34 72 Q 34 80 40 84"
            stroke={strokeThin} strokeWidth={swThin} opacity="0.5"/>

      {/* Burun koruyucu */}
      <path d="M 50 58 L 50 80"
            stroke={stroke} strokeWidth={sw}/>

      {/* Arka boyun koruyucu */}
      <path d="M 78 65 Q 82 72 80 82"
            stroke={stroke} strokeWidth={sw}/>

      {/* Göz boşluğu */}
      <circle cx="38" cy="72" r="1.4" fill={stroke} opacity="0.8"/>
    </svg>
  );
}

// Wordmark (varsa eski kullanım için) — artık hemen hemen kullanılmıyor
function TitanWordmark({ size = 28 }) {
  return (
    <span style={{display:'inline-flex',alignItems:'center',gap:10,color:'var(--ink)'}}>
      <TitanHelmet size={size} />
      <span style={{fontFamily:"'Inter', sans-serif", fontWeight:700, fontSize:size*0.68, letterSpacing:'-0.02em', lineHeight:1, whiteSpace:'nowrap'}}>
        Titan<span style={{color:'var(--ink-mute)',fontWeight:400,marginLeft:'0.2em',letterSpacing:'-0.01em'}}>Hukuk</span>
      </span>
    </span>
  );
}

window.TitanHelmet = TitanHelmet;
window.TitanWordmark = TitanWordmark;
