/* ============================================================================
   tokens.css — Vefa Özel Eğitim / tasarım belirteçleri (§30 DesignSystem)
   ----------------------------------------------------------------------------
   NEDEN: Ekran dosyasında sabit görsel değer (hex, piksel) yasaktır. Renk,
   boşluk, yarıçap, gölge, tipografi ve süre burada TEK KAYNAKtan tanımlanır;
   aydınlık ve karanlık tema AYNI belirteç kümesinden türer. Marka rengi
   değişirse yalnızca bu dosya değişir, hiçbir sayfa dosyası elleşmez.

   Renk tohumu (appBrandSeed) kurumun logosundan ölçülmüştür:
   madalyon mavisi · zemin açık mavisi · "V" kırmızısı.
   §30: aile kırmızısı YALNIZCA marka vurgusudur, hata rengi DEĞİLDİR.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- Marka tohumu / brand seed (tema-bağımsız ham değerler) ------------- */
  --seed-blue-900: #072d5c;
  --seed-blue-700: #0b3d78;
  --seed-blue-500: #1257a5;
  --seed-blue-300: #58a6e8;
  --seed-sky-400:  #8fd3ef;
  --seed-sky-100:  #e3f4fb;
  --seed-red-600:  #b3261e;
  --seed-red-500:  #d32f2f;
  --seed-red-200:  #ff8a80;
  --seed-ink-900:  #0c1620;
  --seed-ink-800:  #111f2c;
  --seed-ink-700:  #16273a;
  --seed-ink-600:  #24394b;

  /* --- Anlamsal renkler / semantic (AYDINLIK tema) ------------------------ */
  --color-bg:            #ffffff;
  --color-bg-soft:       #f4f9fc;
  --color-bg-inverse:    var(--seed-blue-900);
  --color-surface:       #ffffff;
  --color-surface-raised:#ffffff;
  --color-border:        #dbe6ef;
  --color-border-strong: #b9cbdb;

  --color-text:          #0f2136;
  --color-text-muted:    #4d6579;
  --color-text-inverse:  #ffffff;

  --color-brand:         var(--seed-blue-500);
  --color-brand-deep:    var(--seed-blue-700);
  --color-brand-soft:    var(--seed-sky-100);
  --color-brand-sky:     var(--seed-sky-400);
  --color-accent:        var(--seed-red-500);   /* marka vurgusu — hata DEĞİL */
  --color-accent-strong: var(--seed-red-600);   /* beyaz üstü metin/buton */
  --color-on-brand:      #ffffff;
  --color-on-accent:     #ffffff;

  /* Durum renkleri marka ailesinden AYRI tutulur (§30) */
  --color-danger:  #b3261e;
  --color-warning: #8a5300;
  --color-success: #14663f;

  --color-focus:   #0b3d78;

  /* --- Boşluk ölçeği / spacing ------------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.25rem;
  --space-xl:  3.5rem;
  --space-2xl: 5rem;
  --space-3xl: 7rem;

  /* --- Yarıçap / radius --------------------------------------------------- */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 999px;

  /* --- Gölge / elevation -------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(15, 33, 54, .06), 0 2px 6px rgba(15, 33, 54, .05);
  --shadow-md: 0 4px 12px rgba(15, 33, 54, .08), 0 12px 28px rgba(15, 33, 54, .07);
  --shadow-lg: 0 10px 24px rgba(15, 33, 54, .10), 0 28px 60px rgba(15, 33, 54, .10);

  /* --- Tipografi / type ---------------------------------------------------
     NOT/NOTE: Yazı tipi yüklenemezse ürün OKUNUR kalır — yedek yığın zorunlu (§30). */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   clamp(1.35rem, 1.1rem + 0.9vw, 1.6rem);
  --text-2xl:  clamp(1.7rem,  1.3rem + 1.6vw, 2.35rem);
  --text-3xl:  clamp(2.1rem,  1.5rem + 2.6vw, 3.15rem);
  --text-4xl:  clamp(2.5rem,  1.6rem + 3.8vw, 4rem);

  --leading-tight: 1.15;
  --leading-snug:  1.35;
  --leading-body:  1.65;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* --- Hareket / motion ---------------------------------------------------- */
  --duration-fast: 120ms;
  --duration-base: 220ms;
  --duration-slow: 420ms;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);

  /* --- Yerleşim / layout --------------------------------------------------- */
  --measure: 68ch;          /* okunabilir satır uzunluğu */
  --container: 1140px;
  --container-narrow: 780px;
  --tap-min: 44px;          /* §15: dokunma hedefi en az 44x44 */
  --header-h: 72px;
}

/* --- KARANLIK tema — aynı belirteçler, ayrı çözümleme (§15 · §30) --------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg:            var(--seed-ink-900);
    --color-bg-soft:       var(--seed-ink-800);
    --color-bg-inverse:    #05203f;
    --color-surface:       var(--seed-ink-700);
    --color-surface-raised:#1b2f45;
    --color-border:        var(--seed-ink-600);
    --color-border-strong: #35506a;

    --color-text:          #e9f1f8;
    --color-text-muted:    #a7bccd;
    --color-text-inverse:  #0f2136;

    --color-brand:         var(--seed-blue-300);
    --color-brand-deep:    #8cc4f2;
    --color-brand-soft:    #12314f;
    --color-brand-sky:     #6fb9db;
    --color-accent:        var(--seed-red-200);
    --color-accent-strong: #ff9d94;
    --color-on-brand:      #06192e;
    --color-on-accent:     #3a0b07;

    --color-danger:  #ff8a80;
    --color-warning: #f0b652;
    --color-success: #6ede9f;
    --color-focus:   #8cc4f2;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .5);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .55);
  }
}

/* Kullanıcı temayı elle seçtiyse medya sorgusu ezilir */
:root[data-theme="dark"] {
  --color-bg:            var(--seed-ink-900);
  --color-bg-soft:       var(--seed-ink-800);
  --color-bg-inverse:    #05203f;
  --color-surface:       var(--seed-ink-700);
  --color-surface-raised:#1b2f45;
  --color-border:        var(--seed-ink-600);
  --color-border-strong: #35506a;

  --color-text:          #e9f1f8;
  --color-text-muted:    #a7bccd;
  --color-text-inverse:  #0f2136;

  --color-brand:         var(--seed-blue-300);
  --color-brand-deep:    #8cc4f2;
  --color-brand-soft:    #12314f;
  --color-brand-sky:     #6fb9db;
  --color-accent:        var(--seed-red-200);
  --color-accent-strong: #ff9d94;
  --color-on-brand:      #06192e;
  --color-on-accent:     #3a0b07;

  --color-danger:  #ff8a80;
  --color-warning: #f0b652;
  --color-success: #6ede9f;
  --color-focus:   #8cc4f2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .5);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, .55);
}

/* §15: işletim sisteminin "hareketi azalt" ayarına uyulur */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 1ms;
    --duration-base: 1ms;
    --duration-slow: 1ms;
  }
}
