/* ============================================================
   BASE — Reset, Tipografi, Temel Elementler
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Global Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-neutral-100); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb { background: var(--color-neutral-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-400); }

/* ── Selection ── */
::selection { background: var(--color-primary-200); color: var(--color-primary-900); }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Links ── */
a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-700); text-decoration: underline; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--color-neutral-900);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* ── Text ── */
p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--text-sm); }
strong { font-weight: var(--font-semibold); }
em { font-style: italic; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-neutral-100);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--color-primary-700);
}

/* ── Lists ── */
ul, ol { list-style: none; }

/* ── Images ── */
img, svg, video {
  display: block;
  max-width: 100%;
}

/* ── Form Elements Reset ── */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Table Reset ── */
table { border-collapse: collapse; width: 100%; }

/* ── HR ── */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-6) 0;
}

/* ── Utility: Hidden ── */
.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;
}

/* ── Text Utilities ── */
.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-base   { font-size: var(--text-base); }
.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: var(--font-normal); }
.font-medium   { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold     { font-weight: var(--font-bold); }

.text-primary   { color: var(--color-primary-600); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-success   { color: var(--color-success-600); }
.text-warning   { color: var(--color-warning-600); }
.text-danger    { color: var(--color-danger-600); }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ── Flex Utilities ── */
.flex-1       { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-col        { flex-direction: column; }
.flex-wrap       { flex-wrap: wrap; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── Spacing Utilities ── */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }

/* ── Width Utilities ── */
.w-full   { width: 100%; }
.w-auto   { width: auto; }
.min-w-0  { min-width: 0; }

/* ── Cursor ── */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* ── Opacity ── */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
