/* ============================================================
   kayacuneyt.com — Design Tokens v0.1
   Tek kaynak: renk, tipografi, boşluk, layout, hareket.
   Tailwind config ve CI4 bileşenleri bu token'ları kullanır.
   ============================================================ */

:root {
  color-scheme: light;

  /* ---- Raw palette ---- */
  --prussian-900: #00243d;
  --prussian-700: #003153;
  --prussian-500: #1b4f72;
  --prussian-300: #8fb3cc;
  --paper: #f7f2e8;
  --paper-raised: #fcfaf5;
  --paper-deep: #efe7d8;
  --ink: #14202b;
  --ink-muted: #5b6770;
  --ink-subtle: #7c858c;
  --line: #ded5c6;
  --line-strong: #c8bda9;
  --clay: #a9573b;
  --clay-soft: #e8d2c8;
  --sage: #7e8f72;
  --sage-soft: #dde4d7;

  /* ---- Semantic: light ---- */
  --bg: var(--paper);
  --bg-surface: var(--paper-raised);
  --bg-sunken: var(--paper-deep);
  --bg-inverse: var(--prussian-900);
  --text: var(--ink);
  --text-muted: var(--ink-muted);
  --text-subtle: var(--ink-subtle);
  --text-inverse: #f7f2e8;
  --text-on-brand: #fcfaf5;
  --border: var(--line);
  --border-strong: var(--line-strong);
  --brand: var(--prussian-700);
  --brand-strong: var(--prussian-900);
  --brand-soft: #e6edf3;
  --link: var(--prussian-700);
  --link-hover: var(--clay);
  --accent: var(--clay);
  --accent-soft: var(--clay-soft);
  --focus: var(--clay);
  --selection: #d9c3b6;

  /* ---- Typography ---- */
  --font-display: "Aleo", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Roboto Slab", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-md: 1.125rem;   /* 18px */
  --fs-lg: 1.375rem;   /* 22px */
  --fs-xl: 1.75rem;    /* 28px */
  --fs-2xl: 2.25rem;   /* 36px */
  --fs-3xl: 3rem;      /* 48px */
  --fs-4xl: 4rem;      /* 64px */

  --fs-display: clamp(2.5rem, 5.2vw, 4.25rem);
  --fs-h1: clamp(2rem, 4.2vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-lead: clamp(1.0625rem, 1.4vw, 1.25rem);

  --lh-tight: 1.06;
  --lh-display: 1.02;
  --lh-heading: 1.16;
  --lh-body: 1.7;
  --lh-ui: 1.4;
  --lh-mono: 1.5;

  --tracking-display: -0.025em;
  --tracking-heading: -0.015em;
  --tracking-body: 0;
  --tracking-mono: 0.02em;

  /* ---- Spacing ---- */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-7: 2rem;     /* 32 */
  --space-8: 2.5rem;   /* 40 */
  --space-9: 3rem;     /* 48 */
  --space-10: 4rem;    /* 64 */
  --space-11: 5rem;    /* 80 */
  --space-12: 6rem;    /* 96 */

  --section-space: clamp(4rem, 8vw, 7rem);
  --stack-space: 1.5rem;

  /* ---- Layout ---- */
  --container-wide: 1160px;
  --container-text: 700px;
  --container-narrow: 560px;
  --rail-width: 260px;
  --rail-gap: clamp(2.5rem, 5vw, 4rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --grid-gap: clamp(1.5rem, 3vw, 2.5rem);
  --page-top: clamp(3rem, 6vw, 5rem);

  --footer-bg: #00243d;
  --footer-fg: #f7f2e8;
  --footer-muted: rgba(247, 242, 232, 0.62);
  --footer-line: rgba(247, 242, 232, 0.14);

  /* ---- Radius ---- */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* ---- Elevation ---- */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(20, 32, 43, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 32, 43, 0.08);
  --shadow-focus: 0 0 0 3px rgba(169, 87, 59, 0.28);

  /* ---- Motion ---- */
  --duration-instant: 120ms;
  --duration-fast: 160ms;
  --duration-normal: 220ms;
  --duration-slow: 320ms;
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Layers ---- */
  --z-header: 40;
  --z-overlay: 60;
  --z-skip: 80;
}

/* ---- Semantic: dark (siyah değil, koyu lacivert) ---- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a1a26;
  --bg-surface: #102a3a;
  --bg-sunken: #07141d;
  --bg-inverse: #f1ece2;
  --text: #f1ece2;
  --text-muted: #b8c0c6;
  --text-subtle: #8fa0aa;
  --text-inverse: #0a1a26;
  --text-on-brand: #0a1a26;
  --border: #24404f;
  --border-strong: #315064;
  --brand: #8fb3cc;
  --brand-strong: #c3d9e8;
  --brand-soft: #142f3f;
  --link: #a9c9de;
  --link-hover: #d98a63;
  --accent: #d98a63;
  --accent-soft: #3a2a22;
  --focus: #d98a63;
  --selection: #264657;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-focus: 0 0 0 3px rgba(217, 138, 99, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0a1a26;
    --bg-surface: #102a3a;
    --bg-sunken: #07141d;
    --bg-inverse: #f1ece2;
    --text: #f1ece2;
    --text-muted: #b8c0c6;
    --text-subtle: #8fa0aa;
    --text-inverse: #0a1a26;
    --text-on-brand: #0a1a26;
    --border: #24404f;
    --border-strong: #315064;
    --brand: #8fb3cc;
    --brand-strong: #c3d9e8;
    --brand-soft: #142f3f;
    --link: #a9c9de;
    --link-hover: #d98a63;
    --accent: #d98a63;
    --accent-soft: #3a2a22;
    --focus: #d98a63;
    --selection: #264657;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-focus: 0 0 0 3px rgba(217, 138, 99, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
}
