/* bfcs · Base
   Sıfırlama, gövde, tipografi sınıfları ve Capacitor (mobil uygulama) davranışı.
   Diğer tüm bileşen dosyalarından ÖNCE, tokens.css'ten SONRA yüklenir.

   HTML başı (mobil uygulama için viewport-fit=cover şart: çentik ve alt çubuk güvenli alanları):
     <html lang="tr" data-theme="dark">
     <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
*/

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }      /* bileşenlerin display kuralları hidden'ı ezmesin */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm);
}
h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
i.ti { font-size: var(--icon-md); line-height: 1; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* tipografi */
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--tr-display); font-weight: var(--fw-display); }
.t-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--tr-h1); font-weight: var(--fw-h1); }
.t-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--tr-h2); font-weight: var(--fw-h2); }
.t-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--tr-h3); font-weight: var(--fw-h3); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--tr-h4); font-weight: var(--fw-h4); }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); }
.t-caption { font-size: var(--fs-caption); line-height: var(--lh-caption); }
.overline { font-size: var(--fs-overline); letter-spacing: var(--tr-overline); font-weight: var(--fw-overline); text-transform: uppercase; color: var(--text-muted); }
.t-num { font-variant-numeric: tabular-nums; }      /* fiyat ve tablolar: Bricolage eşit genişlikli rakamlar (Geist Mono'da ₺ yok) */
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }

/* erişilebilirlik: görünmez ama ekran okuyucu okur */
.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; }

/* güvenli alanlar (çentik, alt çubuk) */
.safe-top    { padding-top: env(safe-area-inset-top, 0px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
.has-tabbar  { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px)); }

/* Capacitor içinde (bfcs.js <html>'e .is-native ekler): web sayfası değil, uygulama gibi davran */
.is-native, .is-native body { overscroll-behavior: none; }
.is-native body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;         /* uzun basınca "kopyala / bağlantıyı aç" menüsü çıkmasın */
  -webkit-tap-highlight-color: transparent;
}
.is-native :is(input, textarea, [contenteditable], .selectable) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.is-native a { -webkit-touch-callout: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
