/* ==========================================================================
   GIBRIN — BASE / RESET
   Tarayıcı varsayılanlarını sıfırlar, temel tipografi ve erişilebilirlik
   kurallarını tanımlar. Bileşene özel stiller components.css içindedir.
   ========================================================================== */

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

* {
  margin: 0;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Header sticky (76px) olduğu için, "İçeriğe geç" atlama linkiyle
   (bkz. .skip-link) #main-content'e atlanınca sayfanın en üstü
   header'ın altında gizlenmesin diye bir üst boşluk payı bırakılır. */
#main-content {
  scroll-margin-top: 96px;
}

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

input, textarea, select {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------------------------------
   Erişilebilirlik: klavye odağı her zaman görünür olmalı.
   -------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

::selection {
  background-color: var(--color-primary-soft-strong);
  color: var(--color-heading);
}

/* Yalnızca ekran okuyucular için gizleme */
.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;
}

/* İçeriğe atla bağlantısı (klavye erişilebilirliği) */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  z-index: var(--z-modal);
  background: var(--color-surface-dark);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}
