/* =============================================================================
   TEMEL: sıfırlama, tipografi, düzen ilkelleri
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-900);
    font-family: var(--font-text);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-display);
    text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); font-weight: 800; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); letter-spacing: -0.015em; }

p  { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--navy-600);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-600); }

ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li + li { margin-top: 0.35em; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--sp-6) 0;
}

strong, b { font-weight: 700; }
small { font-size: var(--fs-xs); }

/* Rakamlar her yerde eşit genişlikte: fiyat/km sütunları hizalı dursun */
.num, table, .price, input[type="number"] { font-variant-numeric: tabular-nums; }

::selection { background: var(--navy-700); color: #fff; }

:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--ring);
    border-radius: var(--radius-sm);
}

/* Klavye kullanıcıları için içeriğe atlama bağlantısı */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--navy-700);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}
.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

@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;
    }
}

/* --- Düzen ilkelleri ------------------------------------------------------ */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow { max-width: 52rem; }
.container--wide   { max-width: 88rem; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }
.section--surface { background: var(--surface); }
.section--navy {
    background: var(--navy-800);
    color: #E8EEF6;
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--line-top { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--flow, 1rem); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 62rem) {
    .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
}

.between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

/* --- Metin yardımcıları --------------------------------------------------- */

/* Bölüm üstündeki küçük büyük-harf etiket — "editoryal" imza detayımız */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: var(--fs-micro);
    font-weight: 700;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--accent-600);
    margin-bottom: var(--sp-3);
}
.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    background: currentColor;
    flex: none;
}
.section--navy .eyebrow { color: var(--accent-500); }

.lead {
    font-size: var(--fs-lg);
    color: var(--ink-600);
    max-width: 60ch;
}
.section--navy .lead { color: #B9C7D9; }

.muted { color: var(--ink-600); }
.small { font-size: var(--fs-sm); }
.micro { font-size: var(--fs-micro); }
.upper {
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    font-size: var(--fs-micro);
    font-weight: 700;
}
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.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;
}

.icon {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Zengin metin alanları (panelden girilen içerik) */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--fs-2xl); margin-top: 2em; margin-bottom: 0.5em; }
.prose h3 { font-size: var(--fs-xl); margin-top: 1.8em; margin-bottom: 0.4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li::marker { color: var(--accent-600); }
.prose a { font-weight: 600; }
.prose blockquote {
    margin: 1.5em 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--accent-600);
    color: var(--ink-700);
    font-size: var(--fs-lg);
}

/* Panelden HTML olarak yapıştırılan tablolar (donanım listesi, ekspertiz vb.) */
.prose-table {
    margin: 1.5em 0;
    overflow-x: auto;
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--paper);
}
.prose-table table {
    width: 100%;
    min-width: 24rem;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.prose-table caption {
    padding: 0.75rem 0.9rem;
    border-bottom: var(--border);
    color: var(--ink-600);
    font-weight: 600;
    text-align: left;
}
.prose-table th,
.prose-table td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}
.prose-table th {
    background: var(--surface);
    color: var(--ink-900);
    font-weight: 700;
    white-space: nowrap;
}
.prose-table tr:last-child th,
.prose-table tr:last-child td { border-bottom: 0; }
/* Tablo içeren zengin metin 68ch'e sıkışmasın. */
.prose:has(.prose-table) { max-width: none; }
