﻿/* ==========================================================================
   base.css — Sıfırlama, tipografi, düzen, editoryal zemin ve erişilebilirlik
   ========================================================================== */

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

[hidden] {
  display: none !important;
}

/* Inter metriklerine uyarlanmış yerel yedek (CLS önleme) */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Segoe UI'), local('Arial'), local('Helvetica Neue'), local('Roboto'), local('sans-serif');
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.4%;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Editoryal Başlıklar (pear.no zarafeti: heykelsi italik serif) ── */
h1, h2, .section__title, .hero__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  padding-bottom: 0.08em; /* İtalik iniş (descender) harfleri için güvenlik payı */
  text-wrap: balance;
}

h3, h4 {
  font-family: var(--font-sans);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ── Dokunsal Grain Doku (Pear / Awwwards tactile depth) ────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  will-change: transform;
  transform: translateZ(0);
}

[data-theme='light'] .grain-overlay {
  opacity: 0.03;
}

p {
  max-width: var(--measure);
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--accent);
}

ul, ol { list-style: none; }

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

img { height: auto; }

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

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* Odak görünür (klavye gezintisi) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

:focus:not(:focus-visible) { outline: none; }

/* ── Yerleşim ve Ferah Bölüm Dolguları ────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

.section {
  padding-block: var(--section-pad);
  scroll-margin-top: calc(var(--nav-h) + 16px);
  position: relative;
}

/* Başlığın üstündeki boşluk altındaki boşluktan fazla olmalı */
.section__header {
  margin-bottom: clamp(40px, 6vw, 80px);
}

/* ── Bölüm Kicker (küçük etiket, başlığın üstünde) ──────────────── */
.section__kicker {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s3);
}

/* ── Erişilebilirlik yardımcıları ─────────────────────────────────── */

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

.skip-link {
  position: fixed;
  top: var(--s2);
  left: var(--s2);
  z-index: 250;
  padding: var(--s2) var(--s4);
  background: var(--accent-deep);
  color: var(--on-accent);
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--fs-sm);
  transform: translateY(-200%);
  transition: transform var(--t) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Kaydırma çubuğu (editoryal, sakin) ───────────────────────────── */

@media (min-width: 900px) {
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: 4px;
    border: 2px solid var(--bg);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
}

/* ── Hareket azaltma tercihi (prefers-reduced-motion) ─────────────── */

@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .reveal-line { opacity: 1 !important; transform: none !important; }
  .reveal-line-wrap { overflow: visible !important; }
}
