/* ================================================================
   90matik - Temel stiller
   Sifirlama, tipografi ve genel HTML ogeleri.
   ================================================================ */

/* --- Yazi tipi ------------------------------------------------
   Inter kendi sunucumuzda barinir. Boylece Google'a istek gitmez
   (hem daha hizli hem gizlilik acisindan daha temiz).            */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
}


/* --- Sifirlama ------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sabit ust cubuk yuzunden ic baglantilar basligin altinda kalmasin */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Mobil cekmece acikken arka planin kaymasini engeller */
body.is-locked { overflow: hidden; }


/* --- Basliklar -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5, h6 { font-size: var(--fs-base); }


/* --- Metin ------------------------------------------------------ */
p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover { color: var(--brand-ink); }

strong, b { font-weight: var(--fw-semibold); }

small { font-size: var(--fs-xs); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--surface-3);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
  color: var(--brand-ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--sp-6) 0;
}


/* --- Listeler ---------------------------------------------------- */
ul, ol { list-style: none; }

.prose ul, .prose ol {
  list-style: revert;
  padding-left: 1.4em;
  margin: var(--sp-4) 0;
}

.prose p + p { margin-top: var(--sp-4); }


/* --- Medya ------------------------------------------------------- */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg { flex-shrink: 0; }


/* --- Form ogeleri ------------------------------------------------ */
input, textarea, select, button {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

textarea {
  resize: vertical;
  font-family: inherit;
}

/* Tarayicinin otomatik doldurma sarisini koyu temaya uyarla */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-3) inset;
  transition: background-color 5000s ease-in-out 0s;
}


/* --- Odak halkasi ------------------------------------------------
   Klavye ile gezinenler icin gorunur olmali; fare ile tiklamada
   gorunmemeli. :focus-visible tam olarak bunu yapar.               */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}


/* --- Secim rengi -------------------------------------------------- */
::selection {
  background: var(--brand);
  color: var(--on-brand);
}


/* --- Kaydirma cubugu ---------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover { background: #333; }


/* --- Yardimci siniflar -------------------------------------------- */

/* Ekran okuyuculara gorunur, gozle gorunmez */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Klavye kullanicilarinin menuyu atlayip icerige gecmesi icin */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--sp-4);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-md);
  transition: top var(--t-base);
}

.skip-link:focus { top: var(--sp-4); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }

.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-brand { color: var(--brand-ink); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

/* hidden niteligi her zaman kazanmali. Aksi halde display tanimlayan bir
   sinif (orn. .nav__count { display: grid }) gizlemeyi bozar. */
[hidden]       { display: none !important; }

.hide          { display: none !important; }
@media (max-width: 767px)  { .hide-mobile  { display: none !important; } }
@media (min-width: 768px)  { .hide-desktop { display: none !important; } }
/* Sol menu 1080px'den itibaren gorunur; ona bagli ogeler bu esigi kullanir. */
@media (min-width: 1080px) { .hide-lg      { display: none !important; } }
