/* ==========================================================================
   base.css — Reset + tipografi + temel öğeler
   Düşük specificity, token tabanlı. Bileşen stilleri buranın üstüne biner.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

/* Sayfa hareketsizken (drawer/sheet açık) kaydırmayı kilitle */
body.is-locked { overflow: hidden; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: none; cursor: pointer; padding: 0; }

ul, ol { list-style: none; padding: 0; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--teal-press); }

/* --- Başlıklar --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); letter-spacing: var(--tracking-snug); }
h5 { font-size: var(--fs-md); letter-spacing: var(--tracking-snug); }
h6 { font-size: var(--fs-base); letter-spacing: var(--tracking-snug); }

p { line-height: var(--lh-base); text-wrap: pretty; }
p + p { margin-top: var(--sp-4); }

strong, b { font-weight: var(--fw-semibold); }

small { font-size: var(--fs-sm); }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-6) 0;
}

blockquote {
  border-left: 3px solid var(--teal-soft);
  padding-left: var(--sp-4);
  color: var(--ink-2);
  font-style: italic;
}

code, pre, kbd {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--mist-2);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-xs);
}

/* --- Seçim --- */
::selection { background: var(--teal); color: #fff; }

/* --- Erişilebilir odak halkası (klavye) --- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:where(a, button):focus:not(:focus-visible) { outline: none; }

/* --- Skip link (erişilebilirlik) --- */
.skip-link {
  position: absolute;
  left: 8px; top: -64px;
  z-index: var(--z-toast);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: 8px; color: #fff; }

/* --- Ekran-okuyucu için gizli, görsel olarak yok --- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  top: 12px; left: 12px;
  width: auto; height: auto;
  clip: auto;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: var(--z-toast);
}

/* --- Görsel-gizli yardımcı (etiketler için) --- */
.u-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* prefers-reduced-motion: tüm dekoratif geçişleri sustur */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
