/* ==========================================================================
   Base — reset, tipografi, temel utility
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: var(--lh-body);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) { body { font-size: 16px; } }

/* ---- Tipografi ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 700; color: var(--color-text);
  line-height: var(--lh-tight); margin: 0 0 .5em; letter-spacing: -.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5, h6 { font-size: var(--fs-md); }
@media (min-width: 768px) { h1 { font-size: var(--fs-4xl); } h2 { font-size: var(--fs-3xl); } }
p { margin: 0 0 1em; }
small { font-size: var(--fs-sm); }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, kbd { font-family: var(--font-mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-5) 0; }

/* Küçük uppercase etiket — letter-spacing yalnızca burada */
.eyebrow, .label-caps {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted);
}

/* ---- Container ---- */
.container-app {
  width: 100%; max-width: var(--container-max); margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) { .container-app { --gutter: 24px; } }

/* ---- App shell ---- */
#app-root { display: flex; flex-direction: column; min-height: 100vh; }
#app-content {
  flex: 1 0 auto;
  padding-top: var(--navbar-h);
  min-height: calc(100vh - var(--navbar-h));
}

/* ---- Section ritmi ---- */
.section { padding: var(--space-7) 0; }
.section--tight { padding: var(--space-6) 0; }
@media (min-width: 768px) { .section { padding: 80px 0; } .section--tight { padding: var(--space-7) 0; } }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-7); }
.section-head .eyebrow {
  color: var(--color-primary); background: var(--color-primary-soft);
  padding: 6px 12px; border-radius: var(--radius-pill); margin-bottom: var(--space-4);
}
.section-head h2 { margin-bottom: var(--space-3); }
.section-head p { color: var(--color-muted); font-size: var(--fs-md); margin: 0; }

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Utility ---- */
.muted { color: var(--color-muted); }
.center { text-align: center; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-xs { gap: var(--space-2); } .gap-sm { gap: var(--space-3); } .gap { gap: var(--space-4); } .gap-lg { gap: var(--space-6); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.text-sm { font-size: var(--fs-sm); } .text-xs { font-size: var(--fs-xs); }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
@media (max-width: 575px) { .w-full-sm { width: 100%; } .hide-sm { display: none !important; } }
@media (max-width: 767px) { .w-full-md { width: 100%; } .hide-md { display: none !important; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: var(--radius-pill); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); background-clip: padding-box; }

/* ---- Erişilebilirlik: focus halkası ---- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0; border-color: var(--color-primary); box-shadow: var(--shadow-ring);
}
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* ---- Mobil dokunma hedefi (44px) — tek yer ----
   Tüm butonlar, chip'ler ve ikon butonlar 44px; küçük varyant (.btn-sm-ls)
   dahil. Satır içi minik kapatma düğmeleri (chip x, galeri x) hariç tutulur. */
/* `body` öneki: sonradan yüklenen dosyalardaki .chip{min-height:36px} gibi
   aynı özgüllükteki tanımları kaynak sırasından bağımsız ezer. */
@media (max-width: 767px) and (pointer: coarse) {
  body button, body .btn-ls, body .chip, body .chip-row .chip, body .pf-nav-chip, body .ad-tab, body .chip-ad, body .plan-pill,
  body .appr-tab, body .ann-chip, body .ad-trig, body .quick-chip { min-height: var(--control-h); }
  body .btn-icon-ls, body .btn-sm-ls.btn-icon-ls, body .icon-btn { width: var(--control-h); height: var(--control-h); min-width: var(--control-h); }
  body .tag-chip button, body .gallery-rm, body .ed-url-copy, body .hm-cell, body .rate-star, body .mobile-tabbar a, body .ad-bottomnav a, body .ad-bottomnav button { min-height: 0; }
  body .seg-opt, body .ad-range-btn, body .qr-tab { min-height: 40px; }
}
@media (pointer: coarse) {
  button:active, .btn-ls:active { transform: scale(.98); transition: transform .08s; }
}

/* iOS zoom önlemi: form kontrolleri 16px (küçük varyantlar da mobilde 16) */
input, select, textarea { font-size: 16px; }
@media (max-width: 767px) { .input-sm, .lf-input, .menu-langs-select, .ad-input, .ad-search input { font-size: 16px; } }

/* Uzun URL / slug / e-posta her yerde kırılabilsin */
.break-anywhere, .biolink-url, .hook-url, .qr-preview-url, .pfp-preview, .pub-dom-row .pdr-host,
.ad-dom-host b, .ins-block-url, .ad-rt-path, .table-ls td:not(.actions):not(.nowrap) { overflow-wrap: anywhere; }

/* Cihaz çentiği / yuvarlak köşe güvenli alanı */
@supports (padding: env(safe-area-inset-left)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}

/* Arka plan kaydırma kilidi: açık menü / modal / sheet */
body.menu-open, body.modal-open, body.preview-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
