/* Sıfırlama ve temel tipografi. Bütün diğer CSS dosyaları bunun üzerine kurulur. */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-16);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

/* İkon sprite'ından <use> ile çağrılan <svg>'ler viewBox/width/height taşımıyor; tarayıcı
   varsayılanı (300x150) tanımsız her yerde layout'u bozuyordu. 1em varsayılanı, her bileşenin
   kendi font-size'ına göre makul bir boyut sağlıyor — daha spesifik seçiciler (örn. .btn svg)
   zaten bunu ezip kendi ölçüsünü kullanıyor. */
svg:not(.visually-hidden) {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    color: var(--text);
}

h1 { font-size: var(--fs-52); font-weight: 700; }
h2 { font-size: var(--fs-38); }
h3 { font-size: var(--fs-22); }
h4 { font-size: var(--fs-18); }

p { margin: 0 0 var(--sp-4); color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select { font-family: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

/* Ligatürler kapalı: JetBrains Mono ">=" gibi operatörleri "≥" tek karakterine
   birleştiriyor, TROIA kod örneklerinde operatörlerin harfi harfine görünmesi gerekiyor. */
code, pre, kbd, samp {
    font-family: var(--font-mono);
    font-variant-ligatures: none;
    -webkit-font-feature-settings: "liga" 0, "calt" 0;
    font-feature-settings: "liga" 0, "calt" 0;
}

::selection {
    background: var(--accent);
    color: #06110D;
}

/* Klavye ile gezinme her zaman görünür olmalı */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: 24px;
}

.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;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
