/**
 * Design Tokens - Drewniane Theme
 * 3-Tier System: Primitives -> Semantic -> Component
 */

:root {
  /* ========================================
     TIER 1: PRIMITIVES (Raw values)
     ======================================== */

  /* Colors - Raw */
  --raw-brown-900: #592816;
  --raw-brown-800: #4a1f0f;
  --raw-brown-700: #3d1a0e;
  --raw-black: #000000;
  --raw-white: #ffffff;
  --raw-gray-900: #1a1a1a;
  --raw-gray-800: #2c2c2c;
  --raw-gray-700: #333333;
  --raw-gray-600: #666666;
  --raw-gray-500: #777777;
  --raw-gray-400: #999999;
  --raw-gray-300: #e0e0e0;
  --raw-gray-200: #e5e5e5;
  --raw-gray-100: #f5f5f5;
  --raw-gray-50: #f9f9f9;
  --raw-gray-25: #fbfbfb;
  --raw-promo: #e74c3c;

  /* Spacing Scale */
  --space-3xs: 0.25rem;   /* 4px */
  --space-2xs: 0.375rem;  /* 6px */
  --space-xs: 0.5rem;     /* 8px */
  --space-sm: 0.75rem;    /* 12px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 5rem;      /* 80px */

  /* Typography Scale */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 1rem;      /* 16px */
  --text-md: 1.0625rem;   /* 17px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.75rem;    /* 28px */
  --text-4xl: 2rem;       /* 32px */
  --text-5xl: 2.5rem;     /* 40px */
  --text-6xl: 3rem;       /* 48px */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 50px;
  --radius-circle: 50%;

  /* ========================================
     TIER 2: SEMANTIC (Contextual meaning)
     ======================================== */

  /* Brand Colors */
  --color-primary: var(--raw-brown-900);
  --color-primary-hover: var(--raw-brown-800);
  --color-primary-active: var(--raw-brown-700);
  --color-secondary: var(--raw-black);
  --color-secondary-hover: var(--raw-gray-900);

  /* Text Colors */
  --color-text: var(--raw-gray-800);
  --color-text-muted: var(--raw-gray-600);
  --color-text-subtle: var(--raw-gray-500);
  --color-text-inverted: var(--raw-white);

  /* Surface Colors */
  --color-surface: var(--raw-white);
  --color-surface-soft: var(--raw-gray-25);      /* #fbfbfb — jedno źródło dla naprzemiennych teł sekcji i pasm poradnika (ujednolicenie 2026-07-15) */
  --color-surface-raised: var(--raw-gray-50);
  --color-surface-sunken: var(--raw-gray-100);
  --color-surface-inverted: var(--raw-black);

  /* Border */
  --color-border: var(--raw-gray-200);
  --color-border-strong: var(--raw-gray-300);

  /* Feedback */
  --color-promo: var(--raw-promo);

  /* Layout */
  --container-max: 1400px;
  --container-padding: clamp(1rem, 5vw, 3rem);

  /* Spacing - Fluid */
  --gap-flow: var(--space-md);
  --gap-gutter: clamp(var(--space-md), 3vw, var(--space-xl));
  --gap-section: clamp(var(--space-2xl), 6vw, var(--space-4xl));

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Shadows */
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 30px rgba(0, 0, 0, 0.12);

  /* Focus Ring */
  --focus-ring-width: 3px;
  --focus-ring-color: var(--color-primary);
  --focus-ring-offset: 3px;

  /* ========================================
     TIER 3: COMPONENT (Specific contexts)
     ======================================== */

  /* Button */
  --btn-padding-x: clamp(var(--space-lg), 2vw, var(--space-xl));
  --btn-padding-y: clamp(0.875rem, 1vw, var(--space-md));
  --btn-min-height: 48px;
  --btn-font-size: clamp(0.9375rem, 1vw, var(--text-md));
  --btn-radius: var(--radius-sm);

  /* Card */
  --card-padding: clamp(var(--space-md), 2vw, var(--space-lg));
  --card-radius: var(--radius-md);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-lg);

  /* Section */
  --section-padding: var(--gap-section);

  /* Carousel */
  --carousel-gap: clamp(var(--space-md), 2vw, var(--space-lg));
  --carousel-btn-size: 48px;

  /* Hero */
  --hero-min-height: clamp(400px, 50vh, 600px);
}

/* Font family - declared separately for specificity */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
