/* ═══════════════════════════════════════════════════════════════
   BARIŞ DESIGN KIT — components.css
   Önce tokens.css ve fonts.css yüklenir. Sınıf adları genel: .btn, .panel, .tabs...
   !important YOK: kaynak kuralı düzelt, ezme katmanı yazma.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

/* ── Yerleşim ─────────────────────────────────────────────────── */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--fluid-pad); }
.stack { display: flex; flex-direction: column; gap: var(--fluid-gap); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--fluid-gap); }
@media (max-width: 1024px) { .grid-2 { grid-template-columns: 1fr; } }

/* Roman akışı: bölüm %76.4 odak, sonraki bölümün üstü %23.6 görünür */
.story-section { min-height: calc(100dvh * (1 - 0.236)); padding: var(--s-5) 0; }

/* ── Tipografi ────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); color: var(--text-white); line-height: 1.15; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--text); }
.muted { color: var(--text-muted); }

/* Kanonik sayfa başlığı: 1–2 kelime, sola dayalı, Montserrat Bold Italic */
.page-title { font-family: var(--font-heading); font-style: italic; font-weight: 700; text-align: left; font-size: var(--fs-h1); color: var(--text-white); }
/* Altındaki açıklama: tek kısa cümle */
.page-sub { margin-top: var(--s-2); color: var(--text-muted); font-size: var(--fs-body); }
/* Aspirasyonel büyük cümle (insanilik) */
.statement { font-family: var(--font-human); font-size: var(--fs-h2); color: var(--text-white); }
.tabular { font-variant-numeric: tabular-nums; }

/* ── Simge/emoji: daima monokrom ──────────────────────────────── */
.icon, svg.icon, .emoji, [data-emoji], span[role="img"] { filter: grayscale(100%); }

/* ── Panel / kart ─────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: var(--s-4);
  box-shadow: var(--shadow);
  transition: border-color var(--t-normal) ease-out;
}
.panel:hover { border-color: rgba(var(--ov-rgb), 0.16); }

/* ── Butonlar: ÇERÇEVESİZ BUTON İLKESİ ────────────────────────────
   Varsayılan buton = çerçevesiz metin. Çerçeve/dolgu yalnız:
   (a) görünüm başına TEK birincil CTA, (b) yıkıcı onay, (c) form girdileri.
   Hap/kapsül (999px, 50%) yasak. Hover = renk + alt çizgi, kutu değil. */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-btn);
  color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500; white-space: nowrap;
  transition: color var(--t-fast) ease;
}
.btn:hover, .btn:focus-visible { color: var(--text-white); text-decoration: underline; text-underline-offset: 4px; }
.btn:focus-visible { outline: 1px solid rgba(var(--ov-rgb), 0.35); outline-offset: 4px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

/* Birincil: 4 eksenli mat gradient. Sayfada TEK tane. */
.btn-primary {
  background-color: var(--accent-surface);
  background-image:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.14) 0%, transparent 60%),
    linear-gradient(0deg,   rgba(var(--brand-rgb), 0.08) 0%, transparent 60%),
    linear-gradient(90deg,  rgba(var(--brand-rgb), 0.11) 0%, transparent 50%),
    linear-gradient(270deg, rgba(var(--brand-rgb), 0.11) 0%, transparent 50%);
  border: 1px solid rgba(var(--brand-rgb), 0.20);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-k))), inset 0 0 10px rgba(var(--brand-rgb), 0.11);
  transition: transform 100ms var(--ease-out), background-color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background-color: var(--accent-surface-hover);
  border-color: rgba(var(--brand-rgb), 0.35);
  color: var(--on-accent);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(var(--shadow-rgb), calc(0.6 * var(--shadow-k))), inset 0 0 14px rgba(var(--brand-rgb), 0.17);
}
.btn-primary:active { transform: translateY(1px) scale(0.98); }

/* Yıkıcı onay: ikinci (ve son) çerçeveli öğe olabilir */
.btn-danger { border: 1px solid var(--danger); color: var(--danger-text); }
.btn-danger:hover { background: rgba(var(--ov-rgb), 0.04); color: var(--danger-text); text-decoration: none; }

/* Harici kimlik butonları (Apple/Google HIG gereği çerçeveli) */
.btn-outline { border: 1px solid var(--border); color: var(--text-white); }

/* ── Sekme: çerçevesiz, seçili = 2px alt çubuk ────────────────── */
.tabs { display: flex; gap: var(--s-3); border-bottom: 1px solid var(--border); }
.tab { padding: var(--s-2) 0; color: var(--text-muted); font-size: 0.9rem; border-radius: 0; box-shadow: inset 0 -2px 0 transparent; transition: color var(--t-fast) ease; }
.tab:hover { color: var(--text-white); }
.tab[aria-selected="true"], .tab.is-active { color: var(--text-white); box-shadow: inset 0 -2px 0 currentColor; }

/* ── Çip/etiket: çerçevesiz, hap değil ────────────────────────── */
.chip { color: var(--text-muted); font-size: 0.8rem; padding: var(--s-1) var(--s-2); border-radius: var(--radius-btn); }
.chip:hover, .chip.is-active { color: var(--text-white); box-shadow: inset 0 -1px 0 currentColor; }

/* ── Form girdileri: çerçeve girdinin kimliğidir ──────────────── */
.input, .select, .textarea {
  width: 100%; padding: var(--s-2) var(--s-3);
  background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-input);
  font: inherit; font-size: 16px; /* iOS yakınlaştırmasını önler */
  transition: border-color var(--t-fast) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgba(var(--brand-rgb), 0.5); }
.label { display: block; margin-bottom: var(--s-1); color: var(--text-muted); font-size: 0.75rem; }

/* ── Durum göstergeleri (mat, bağırmaz) ───────────────────────── */
.status { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 0.8rem; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.status-good::before { background: var(--success); }
.status-bad::before  { background: var(--danger); }
.status-good { color: var(--good-text); } .status-bad { color: var(--danger-text); }

/* ── Tablo ────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; color: var(--text-muted); font-weight: 500; font-size: 0.75rem; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); }
.table td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid rgba(var(--ov-rgb), 0.05); }
.table tr:hover td { background: rgba(var(--ov-rgb), 0.03); }

/* ── Üst bar: 3 noktalı (logo · linkler · aksiyon), tek satır ──── */
.navbar {
  position: relative; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; white-space: nowrap;
  max-width: 1400px; margin: 0 auto; padding: var(--s-3) var(--s-4);
}
.navbar-logo { height: 40px; }
.nav-links { display: flex; align-items: center; gap: var(--s-2); font-size: 0.94rem; font-weight: 500; }
.nav-links > a, .nav-group > button { padding: var(--s-2) var(--s-3); color: var(--text-muted); border-radius: var(--radius-btn); transition: color var(--t-fast) ease; }
.nav-links > a:hover, .nav-group:hover > button, .nav-group:focus-within > button { color: var(--text-white); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1024px) { .nav-links { display: none; } } /* → mobil çekmece */

/* ── Mega panel (OpenAI tarzı): tam genişlik, büyük linkler + küçük listeler ──
   Fare 80 ms niyet gecikmesiyle açılır, 350 ms toleransla kapanır; klavye 0s. Animasyon yok. */
.nav-group { position: static; display: inline-flex; }
.mega {
  position: absolute; top: 100%; left: 0; width: 100%;
  background: var(--bg); border-bottom: 1px solid var(--border);
  visibility: hidden; opacity: 0;
  transition: visibility 0s linear 350ms, opacity 0s linear 350ms;
}
.nav-group:hover > .mega { visibility: visible; opacity: 1; transition-delay: 80ms; }
.nav-group:focus-within > .mega { visibility: visible; opacity: 1; transition: none; }
.mega-inner { display: flex; gap: var(--s-6); max-width: 1400px; margin: 0 auto; padding: var(--s-5) var(--s-4) var(--s-6); }
.mega-main { display: flex; flex-direction: column; flex: 0 0 clamp(260px, 42%, 560px); }
.mega-label { margin-bottom: var(--s-4); color: var(--text-muted); font-size: 0.88rem; font-weight: 500; }
.mega-link { padding: var(--s-2) 0; color: var(--text-white); font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-h2); line-height: 1.25; }
.mega-main:hover .mega-link:not(:hover) { color: var(--text-muted); }   /* odak: diğerleri soluklaşır */
.mega-col { display: flex; flex-direction: column; min-width: 180px; }
.mega-col h4 { margin-bottom: var(--s-3); color: var(--text-muted); font-size: 0.8rem; font-weight: 500; }
.mega-sub { padding: 6px 0; color: var(--text-white); font-size: 0.94rem; font-weight: 500; }
.mega-sub:hover { color: var(--text-muted); }
/* Sayfa menü açılınca bulanır */
body:has(.nav-group:hover)::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(13px);
}

/* ── Güven şeridi: kutusuz, kenarlıksız monokrom logo akışı ───── */
.trust-strip { text-align: center; }
.trust-strip h5 { color: #94a3b8; font-size: 15px; font-weight: 600; margin-bottom: var(--s-4); }
.trust-logos { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-5); filter: grayscale(100%); opacity: 0.8; }
.trust-note { margin-top: var(--s-4); color: var(--text-muted); font-size: 12.5px; }

/* ── Klavye / yüksek frekans: animasyonsuz ────────────────────── */
.command-palette, [data-keyboard-action], kbd { transition: none; animation: none; }
kbd { font-family: var(--font-mono); font-size: 0.75rem; padding: 1px 6px; border: 1px solid var(--border); border-radius: var(--radius-btn); color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation: none !important; } }
