/* ==========================================================================
   Yapo Paneli - Tasarim Token'lari (tokens.css)  [T2.4-a, kume 2C1]
   Kaynak: .agent/20261026/30-tokens.css (+ --p-x-* yerlesim primitive'leri, @font-face).
   DTCG 3 katman, CSS custom property olarak:
     1) PRIMITIVE  --p-*   ham deger (yalniz bu dosyada ve tema-*.css'te #hex/px serbest)
     2) SEMANTIC   --*     tema dosyalarinda (tema-<id>.css) primitive'e alias; UI BUNU tuketir
     3) COMPONENT  --c-*   semantic'e alias; bilesen olculeri
   Kural: bilesen.css ve sayfa CSS'inde ham #hex/rgb()/keyfi px YASAK, yalniz var(--...).
   Yukleme sirasi (index.html): tokens.css -> tema-gece.css (varsayilan, :root) -> diger 4 tema -> bilesen.css.
   Yazi tipleri self-host (../fonts/*.woff2, OFL); harici CDN YOK (CSP 'self').
   Hassas veri YOK (yalniz renk/olcu).
   ========================================================================== */

/* ---------- 0) Yazi tipleri (self-host, latin + latin-ext: Turkce ğ ı ş İ) ---------- */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("../fonts/baloo-2-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("../fonts/baloo-2-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1) PRIMITIVE (renk disi; renk primitive'leri tema-*.css'te) ---------- */
:root {
  /* --- Golge/ortak renk primitive --- */
  --p-golge-sert:   rgba(0, 0, 0, 0.45);
  --p-golge-yumusak: rgba(0, 0, 0, 0.30);
  --p-beyaz:        #FFFFFF;   /* yalniz odak halkasi icin */

  /* --- Spacing (4px taban; yalniz bu olcek) --- */
  --p-space-1: 4px;   --p-space-2: 8px;   --p-space-3: 12px;  --p-space-4: 16px;
  --p-space-5: 20px;  --p-space-6: 24px;  --p-space-8: 32px;  --p-space-10: 40px;
  --p-space-12: 48px; --p-space-16: 64px;

  /* --- Radius --- */
  --p-radius-sm: 8px;  --p-radius-md: 14px; --p-radius-lg: 22px;
  --p-radius-xl: 32px; --p-radius-pill: 999px;

  /* --- Tipografi --- */
  --p-font-govde:  "Nunito", "Segoe UI Rounded", "Segoe UI", system-ui, sans-serif;
  --p-font-baslik: "Baloo 2", "Nunito", "Segoe UI", system-ui, sans-serif;
  --p-font-mono:   "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --p-fs-xs: 0.8125rem;  /* 13px: yalniz mono/ipucu, gelistirici */
  --p-fs-sm: 0.9375rem;  /* 15px */
  --p-fs-md: 1.0625rem;  /* 17px */
  --p-fs-lg: 1.25rem;    /* 20px: cocuk etiket alt siniri (11-ux K4) */
  --p-fs-xl: 1.5rem;     /* 24px */
  --p-fs-2xl: 1.875rem;  /* 30px */
  --p-fs-3xl: 2.375rem;  /* 38px */
  --p-fs-4xl: 3rem;      /* 48px */
  --p-fw-normal: 600; --p-fw-bold: 800; --p-fw-black: 900;
  --p-lh-sikis: 1.2; --p-lh-normal: 1.5;

  /* --- Hedef boyutlari (dokunma) --- */
  --p-hedef-wcag: 24px;   /* mutlak alt sinir, WCAG 2.5.8 */
  --p-hedef-yetiskin: 44px;
  --p-hedef-cocuk: 76px;  /* ~2 cm (11-ux K2, NN/g) */
  --p-hedef-bosluk: 8px;  /* hedefler arasi min aralik */

  /* --- Motion --- */
  --p-sure-hizli: 120ms; --p-sure-normal: 200ms; --p-sure-yavas: 360ms;
  --p-ease-cikis:  cubic-bezier(0.22, 1, 0.36, 1);
  --p-ease-ziplama: cubic-bezier(0.34, 1.56, 0.64, 1);   /* yalniz "tamam!" geri bildirimi */

  /* --- Katman (z-index) --- */
  --p-z-nav: 100; --p-z-serit: 200; --p-z-modal: 300; --p-z-toast: 400;

  /* --- Cizgi --- */
  --p-cizgi-ince: 1px; --p-cizgi-normal: 2px; --p-cizgi-kalin: 3px;

  /* --- Yerlesim primitive'leri (--p-x-*; component/bilesen katmani tuketir; 2C1 / T2.4-a) --- */
  --p-x-piksel: 1px;                 /* sr-only gibi gorunmez ogeler */
  --p-x-ikon-sm: 20px; --p-x-ikon-md: 24px; --p-x-ikon-lg: 32px; --p-x-ikon-xl: 48px; --p-x-ikon-2xl: 64px;
  --p-x-menu-genis: 248px;
  --p-x-kart-min: 300px;
  --p-x-icerik-max: 1280px;
  --p-x-modal-genis: 560px;
  --p-x-yuz-genis: 320px;            /* robot ekrani 320x240 YATAY; panelde 4:3 cerceve (51-D1 devri) */
  --p-x-halka: 128px;
  --p-x-grafik-yuk: 120px;
  --p-x-alt-menu-yuk: 72px;
  --p-x-cocuk-kart-yuk: 176px;
  --p-x-log-yuk: 360px;
  --p-x-nokta: 12px;
  --p-x-okunur-genis: 68ch;

}

/* ---------- 2b) SEMANTIC (temadan bagimsiz: tipografi, olcek, rol yogunlugu, motion) ---------- */
:root {
  --font-govde:  var(--p-font-govde);
  --font-baslik: var(--p-font-baslik);
  --font-mono:   var(--p-font-mono);

  --odak-halka:  var(--p-beyaz);            /* >=3:1 tum temalarda (Bolum 8) */
  --golge-1: 0 3px 0 var(--p-golge-sert);   /* "sert cizgi film golgesi" */
  --golge-2: 0 6px 0 var(--p-golge-sert), 0 12px 24px var(--p-golge-yumusak);
  --parilti: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);

  /* Tonlu yuzeyler: yalniz ARKA PLAN; uzerine --text-primary/--text-muted yazilir, --accent metni YAZILMAZ */
  --bg-accent-soft:   color-mix(in srgb, var(--accent) 16%, var(--bg-surface));
  --bg-accent-2-soft: color-mix(in srgb, var(--accent-2) 16%, var(--bg-surface));
  --bg-ok-soft:   color-mix(in srgb, var(--status-ok) 16%, var(--bg-surface));
  --bg-warn-soft: color-mix(in srgb, var(--status-warn) 16%, var(--bg-surface));
  --bg-err-soft:  color-mix(in srgb, var(--status-err) 16%, var(--bg-surface));
  --bg-info-soft: color-mix(in srgb, var(--status-info) 16%, var(--bg-surface));
  --gradyan-yapo: linear-gradient(135deg, var(--accent), var(--accent-2));  /* yalniz dekor; ustune metin YOK */

  --sure-hizli:  var(--p-sure-hizli);
  --sure-normal: var(--p-sure-normal);
  --sure-yavas:  var(--p-sure-yavas);
  --ease-cikis:  var(--p-ease-cikis);
  --ease-ziplama: var(--p-ease-ziplama);

  /* Rol yogunlugu: varsayilan = aile/gelistirici */
  --hedef-min: var(--p-hedef-yetiskin);
  --hedef-bosluk: var(--p-hedef-bosluk);
  --etiket-fs: var(--p-fs-md);
}
[data-rol="cocuk"] {
  --hedef-min: var(--p-hedef-cocuk);
  --hedef-bosluk: var(--p-space-3);
  --etiket-fs: var(--p-fs-lg);
}

/* ---------- 3) COMPONENT (semantic'e alias; temadan bagimsiz) ---------- */
:root {
  /* kart */
  --c-kart-bg: var(--bg-surface);
  --c-kart-border: var(--border-ui);
  --c-kart-radius: var(--p-radius-lg);
  --c-kart-pad: var(--p-space-5);
  --c-kart-golge: var(--golge-1);

  /* buyuk eylem dugmesi */
  --c-dugme-min-h: var(--hedef-min);
  --c-dugme-min-w: var(--hedef-min);
  --c-dugme-radius: var(--p-radius-lg);
  --c-dugme-bg: var(--accent);
  --c-dugme-fg: var(--text-on-accent);
  --c-dugme-bg-2: var(--accent-2);
  --c-dugme-fg-2: var(--text-on-accent-2);
  --c-dugme-golge: var(--golge-2);
  --c-dugme-fs: var(--etiket-fs);
  --c-dugme-ikon: 32px;

  /* durum rozeti (renk + ikon + etiket birlikte) */
  --c-rozet-radius: var(--p-radius-pill);
  --c-rozet-pad-x: var(--p-space-3);
  --c-rozet-min-h: var(--p-hedef-wcag);

  /* kaydirici */
  --c-kaydirici-iz-h: 12px;
  --c-kaydirici-tutac: var(--hedef-min);
  --c-kaydirici-iz-bg: var(--bg-raised);
  --c-kaydirici-dolgu: var(--accent);

  /* joystick / pad */
  --c-pad-boyut: 240px;
  --c-pad-bg: var(--bg-raised);
  --c-pad-tutac: var(--hedef-min);
  --c-pad-sinir-bg: var(--bg-err-soft);   /* servo sinir bolgesi */

  /* canli yayin cercevesi */
  --c-yayin-radius: var(--p-radius-lg);
  --c-yayin-border: var(--p-cizgi-kalin) solid var(--status-err);  /* yayin acikken */
  --c-yayin-serit-bg: var(--status-err);
  --c-yayin-serit-fg: var(--text-on-accent);   /* NOT: tema'ya gore ayri dogrulandi, Bolum 8 */

  /* zaman cizelgesi satiri */
  --c-zaman-min-h: var(--p-hedef-yetiskin);
  --c-zaman-nokta: 14px;
  --c-zaman-cizgi: var(--border-ui);

  /* log satiri */
  --c-log-font: var(--font-mono);
  --c-log-fs: var(--p-fs-xs);
  --c-log-bg: var(--bg-canvas);
  --c-log-satir-pad-y: var(--p-space-1);

  /* tema secici */
  --c-tema-ornek-boyut: 56px;
  --c-tema-ornek-radius: var(--p-radius-md);
  --c-tema-secili-halka: var(--p-cizgi-kalin) solid var(--odak-halka);
}

/* ---------- Temel davranislar (token tuketir) ---------- */
:focus-visible {
  outline: var(--p-cizgi-kalin) solid var(--odak-halka);
  outline-offset: 3px;
}
body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-govde);
  font-weight: var(--p-fw-normal);
  font-size: var(--p-fs-md);
  line-height: var(--p-lh-normal);
}

/* Hareket azaltma: sureler ~0; "ziplama" yerine duz gecis */
@media (prefers-reduced-motion: reduce) {
  :root {
    --sure-hizli: 0.01ms;
    --sure-normal: 0.01ms;
    --sure-yavas: 0.01ms;
    --ease-ziplama: linear;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

