/* ============================================================
   V5 BASE — reset, milimetrik kağıt zemini, temel tipografi
   ============================================================ */

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

* {
  margin: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Milimetrik çizim kağıdı: ince ızgara + her 5 karede koyu çizgi */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.55));
}

h1,
h2,
h3 {
  color: var(--text-heading);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-lg);
}

p {
  margin: 0;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul,
ol {
  padding-left: var(--space-5);
}

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

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

a,
button {
  touch-action: manipulation;
}

code {
  font-family: var(--font-mono);
}

table {
  border-collapse: collapse;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--blue-100);
  color: var(--text-heading);
}

/* İçeriğe atla (klavye kullanıcıları) */
.skiplink {
  position: absolute;
  left: var(--space-4);
  top: -48px;
  z-index: 120;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--text-invert);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: top var(--dur) var(--ease);
}

.skiplink:focus-visible {
  top: var(--space-3);
  text-decoration: none;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
