/* ============================================================
   Simpletools — Design Tokens
   Editorial Utility · simpletools.pl
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ---------- Color: Backgrounds ---------- */
  --color-bg:        #F7F4EF;
  --color-surface:   #FFFFFF;
  --color-surface-2: #F0EDE7;
  --color-surface-3: #E8E4DC;

  /* ---------- Color: Borders ---------- */
  --color-border:        #D9D4CA;
  --color-border-strong: #B8B0A4;

  /* ---------- Color: Text ---------- */
  --color-text:           #1C1A17;
  --color-text-secondary: #6B6560;
  --color-text-tertiary:  #9E9891;

  /* ---------- Color: Primary (Forest Green) ---------- */
  --color-primary:        #2D6A4F;
  --color-primary-hover:  #235840;
  --color-primary-light:  #EAF4EF;
  --color-primary-mid:    #74C49A;

  /* ---------- Color: Action (Amber) ---------- */
  --color-action:         #D4870A;
  --color-action-hover:   #B8720A;
  --color-action-light:   #FEF3DC;
  --color-action-bright:  #F5A623;

  /* ---------- Color: Semantic ---------- */
  --color-success:    #1E7A4A;
  --color-success-bg: #E8F5EE;
  --color-error:      #C0392B;
  --color-error-bg:   #FDECEB;
  --color-warning:    #E07B39;
  --color-warning-bg: #FEF0E6;
  --color-info:       #2471A3;
  --color-info-bg:    #EBF5FB;

  /* ---------- Typography ---------- */
  --font-serif: 'Lora', 'Source Serif Pro', Georgia, serif;
  --font-sans:  'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Menlo', 'Consolas', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  --leading-tight:   1.2;
  --leading-snug:    1.375;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.06em;
  --tracking-wider:  0.12em;

  /* ---------- Spacing ---------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---------- Layout ---------- */
  --container-max:     1200px;
  --container-padding: var(--space-6);
  --layout-content:    720px;
  --layout-sidebar:    300px;
  --layout-gap:        var(--space-10);

  /* ---------- Radius ---------- */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-full: 9999px;

  /* ---------- Shadows ---------- */
  --shadow-sm:    0 1px 2px rgba(28, 26, 23, 0.06);
  --shadow-md:    0 2px 8px rgba(28, 26, 23, 0.08), 0 1px 2px rgba(28, 26, 23, 0.04);
  --shadow-lg:    0 8px 24px rgba(28, 26, 23, 0.10), 0 2px 6px rgba(28, 26, 23, 0.06);
  --shadow-focus: 0 0 0 3px rgba(45, 106, 79, 0.25);

  /* ---------- Transitions ---------- */
  --transition-fast: 150ms ease;
  --transition:      180ms ease;
  --transition-slow: 250ms ease;
}

/* ---------- Dark mode overrides ---------- */
body.dark-mode {
  --color-bg:             #18181B;
  --color-surface:        #1F1F23;
  --color-surface-2:      #27272A;
  --color-surface-3:      #2F2F33;
  --color-border:         #3F3F46;
  --color-border-strong:  #52525B;
  --color-text:           #F4F4F5;
  --color-text-secondary: #A1A1AA;
  --color-text-tertiary:  #71717A;
  --color-primary-light:  rgba(45, 106, 79, 0.2);
  --color-action-light:   rgba(212, 135, 10, 0.15);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

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