/* ==========================================================================
   BIO DESIGN - Ortak Okunabilirlik (Kontrast) Katmani
   Tum sayfalarda Tailwind sinif renklerinin ustune guvenli kontrast uygular.
   Acik zeminde koyu, koyu zeminde acik metin kullanimini garanti eder.
   ========================================================================== */

:root {
  --bd-ink: #0f172a;
  --bd-ink-soft: #334155;
  --bd-muted: #475569;
  --bd-muted-light: #64748b;
  --bd-on-dark: #f1f5f9;
  --bd-on-dark-muted: #cbd5e1;
}

html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- ACIK ZEMIN: soluk gri tonlari okunur hale getir ---------- */
.text-slate-300 { color: #94a3b8; }
.text-slate-400:not(:hover) { color: var(--bd-muted-light) !important; }
.text-slate-500:not(:hover) { color: var(--bd-muted) !important; }
.text-slate-600:not(:hover) { color: var(--bd-ink-soft) !important; }
.text-emerald-600 { color: #047857 !important; }
.text-teal-600 { color: #0f766e !important; }
.text-sky-600 { color: #0369a1 !important; }

/* ---------- KOYU ZEMIN: gri tonlari acik renge cevir ---------- */
:is(.bg-slate-800, .bg-slate-900, .bg-slate-950, .bg-black, .bg-biodark, .bg-biomed,
    footer, [class*="from-slate-9"], [class*="from-biodark"], [class*="to-emerald-9"]) {
  color: var(--bd-on-dark);
}
:is(.bg-slate-800, .bg-slate-900, .bg-slate-950, .bg-black, .bg-biodark, .bg-biomed,
    footer, [class*="from-slate-9"], [class*="from-biodark"]) :is(.text-slate-300, .text-slate-400, .text-slate-500, .text-slate-600):not(:hover) {
  color: var(--bd-on-dark-muted) !important;
}
:is(footer, .bg-slate-900, .bg-slate-950) :is(h1, h2, h3, h4, strong) { color: #ffffff; }
:is(.bg-biodark, [class*="from-biodark"]) :is(.text-emerald-100, .text-emerald-200) { color: #d1fae5 !important; }
:is(footer, .bg-slate-900, .bg-slate-950) a:hover { color: #ffffff !important; }

/* ---------- FORM ELEMANLARI: yerlesik acilir liste beyaz-uzerine-beyaz hatasi ---------- */
select, option, optgroup { color: var(--bd-ink); background-color: #ffffff; }
select option { color: var(--bd-ink); background-color: #ffffff; }
input, textarea, select { color: var(--bd-ink); }
input::placeholder, textarea::placeholder { color: #64748b; opacity: 1; }
input:-webkit-autofill { -webkit-text-fill-color: var(--bd-ink); box-shadow: 0 0 0 40px #f8fafc inset; }

/* ---------- ODAK GORUNURLUGU (erisilebilirlik) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(4, 120, 87, .45);
  outline-offset: 2px;
}

/* ---------- RESIM + ROZET OKUNURLUGU ---------- */
/* Gorsel uzerindeki yari saydam rozetler her zaman koyu yazi + opak zemin kullanir */
.bg-white\/90, .bg-white\/80 { color: var(--bd-ink); }
img { max-width: 100%; }
img.object-contain { background-color: transparent; }

/* ---------- ICERIK GORUNURLUGU: JS calismasa bile yazilar gorunsun ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Modern yuzey dokunuslari ---------- */
.platform-card, .carbon-card { border-color: #e2e8f0; }
::selection { background: #047857; color: #ffffff; }
