/* ============================================================
   base.css — Reset, tipografi, yardımcı sınıflar
   ============================================================ */
/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-ink);
  background-color: var(--color-bgpage);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow-x: hidden;
}

/* ── Başlıklar ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-ink);
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* ── Bağlantılar ─────────────────────────────────────────── */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-hover); }

/* ── Medya ───────────────────────────────────────────────── */
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }

/* ── Form Reset ──────────────────────────────────────────── */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
button { cursor: pointer; background: none; border: none; }
input, textarea, select { outline: none; }
textarea { resize: vertical; }

/* ── Focus (Erişilebilirlik) ─────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Seçim ───────────────────────────────────────────────── */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-ink);
}

/* ── Scrollbar (Standard W3C Baseline) ──────────────────── */
html, body, * {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--color-ink-muted); }
}

/* ── "İçeriğe Atla" — Erişilebilirlik ───────────────────── */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--color-accent);
  color: var(--color-ink-inverse);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}
.skip-to-main:focus { top: var(--sp-4); }

/* ── Ekran Okuyucu Yardımcı ──────────────────────────────── */
.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;
}

/* ── Metin Yardımcıları ──────────────────────────────────── */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-heading  { font-family: var(--font-heading); }
.font-mono     { font-family: var(--font-mono); }

.text-ink        { color: var(--color-ink); }
.text-secondary  { color: var(--color-ink-secondary); }
.text-muted      { color: var(--color-ink-muted); }
.text-success    { color: var(--color-success); }
.text-warning    { color: var(--color-warning); }
.text-danger     { color: var(--color-danger); }
.text-info       { color: var(--color-info); }
.text-accent     { color: var(--color-accent); }
.text-inverse    { color: var(--color-ink-inverse); }
.text-left       { text-align: left; }
.text-center     { text-align: center; }
.text-right      { text-align: right; }

/* ── Görüntü / Flex / Grid ───────────────────────────────── */
.hidden      { display: none !important; }
.block       { display: block; }
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.grid        { display: grid; }

.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1 1 0%; }
.flex-none    { flex: none; }
.shrink-0     { flex-shrink: 0; }

.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.self-start  { align-self: flex-start; }
.self-center { align-self: center; }
.self-end    { align-self: flex-end; }

.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ── Pozisyon ────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

/* ── Overflow ────────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ── Genişlik / Yükseklik ────────────────────────────────── */
.w-full       { width: 100%; }
.h-full       { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-full   { max-width: 100%; }

/* ── Opaklık ─────────────────────────────────────────────── */
.opacity-0   { opacity: 0; }
.opacity-50  { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* ── İmleç ───────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* ── Kenarlık Yarıçapı ───────────────────────────────────── */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ── Padding Kısayolları ─────────────────────────────────── */
.p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }
.p-4  { padding: var(--sp-4); }
.p-5  { padding: var(--sp-5); }
.p-6  { padding: var(--sp-6); }
.px-2 { padding-left: var(--sp-2); padding-right: var(--sp-2); }
.px-3 { padding-left: var(--sp-3); padding-right: var(--sp-3); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.py-1 { padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.py-2 { padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.py-3 { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }

/* ── Margin Kısayolları ──────────────────────────────────── */
.m-0   { margin: 0; }
.mb-1  { margin-bottom: var(--sp-1); }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-3  { margin-bottom: var(--sp-3); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mt-1  { margin-top: var(--sp-1); }
.mt-2  { margin-top: var(--sp-2); }
.mt-4  { margin-top: var(--sp-4); }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

/* ── Pointer Events ──────────────────────────────────────── */
.pointer-events-none { pointer-events: none; }

/* ── Display Utilities ───────────────────────────────────── */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
