/**
 * НТК-Снаб - Дизайн-система
 * Фирменные цвета, типографика, переменные
 */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    /* Цветовая палитра - основные */
    --color-primary: #1a3a2a;           /* Тёмно-зелёный */
    --color-primary-dark: #0f2419;       /* Ещё темнее */
    --color-primary-light: #2a5a42;      /* Светлее */
    
    /* Акцентные цвета */
    --color-accent: #a4c639;             /* Лаймовый */
    --color-accent-dark: #8db02e;
    --color-accent-light: #b8d653;
    --color-accent-glow: rgba(164, 198, 57, 0.3);
    
    /* Нейтральные */
    --color-cream: #e8dfc6;              /* Кремовый */
    --color-cream-dark: #d4c9a8;
    --color-gray-100: #f8f9fa;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;
    
    /* Семантические цвета */
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;
    --color-info: #17a2b8;
    
    /* Текст */
    --color-text: #1a1a1a;
    --color-text-muted: #6c757d;
    --color-text-light: #ffffff;
    --color-text-on-dark: #e8dfc6;
    
    /* Фоны */
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-bg-dark: #1a3a2a;
    --color-bg-darker: #0f2419;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(164, 198, 57, 0.4);
    --shadow-dark: 0 10px 40px rgba(0, 0, 0, 0.4);
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #1a3a2a 0%, #2a5a42 100%);
    --gradient-accent: linear-gradient(135deg, #a4c639 0%, #8db02e 100%);
    --gradient-dark: linear-gradient(180deg, #1a3a2a 0%, #0f2419 100%);
    --gradient-hero: linear-gradient(135deg, rgba(26, 58, 42, 0.95) 0%, rgba(15, 36, 25, 0.98) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    
    /* Типографика */
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    --font-size-6xl: 3.75rem;    /* 60px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    
    /* Отступы */
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */
    --spacing-20: 5rem;     /* 80px */
    --spacing-24: 6rem;     /* 96px */
    --spacing-32: 8rem;     /* 128px */
    
    /* Скругления */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Размеры */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1400px;
    
    /* Z-индексы */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    
    /* Переходы */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Blur */
    --blur-sm: 4px;
    --blur-md: 8px;
    --blur-lg: 16px;
    --blur-xl: 24px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text);
}

h1 {
    font-size: clamp(2.5rem, 5vw, var(--font-size-6xl));
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: clamp(2rem, 4vw, var(--font-size-5xl));
}

h3 {
    font-size: clamp(1.5rem, 3vw, var(--font-size-3xl));
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--spacing-4);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-accent {
    color: var(--color-accent);
}

.text-light {
    color: var(--color-text-light);
}

.text-cream {
    color: var(--color-cream);
}

/* ============================================
   Container
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding-left: var(--spacing-6);
    padding-right: var(--spacing-6);
}

.container-lg {
    max-width: var(--container-2xl);
}

.container-sm {
    max-width: var(--container-md);
}

/* ============================================
   Section Spacing
   ============================================ */
.section {
    padding-top: var(--spacing-20);
    padding-bottom: var(--spacing-20);
}

.section-lg {
    padding-top: var(--spacing-24);
    padding-bottom: var(--spacing-24);
}

.section-dark {
    background: var(--gradient-dark);
    color: var(--color-text-on-dark);
}

.section-alt {
    background-color: var(--color-bg-alt);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-16);
}

.section-header h2 {
    margin-bottom: var(--spacing-6);
}

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.section-dark .section-header h2 {
    color: var(--color-cream);
}

.section-dark .section-header p {
    color: rgba(232, 223, 198, 0.7);
}

/* ============================================
   Grid System
   ============================================ */
.grid {
    display: grid;
    gap: var(--spacing-8);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding-top: var(--spacing-12);
        padding-bottom: var(--spacing-12);
    }
}

/* ============================================
   Flexbox Utilities
   ============================================ */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 { gap: var(--spacing-1); }
.gap-2 { gap: var(--spacing-2); }
.gap-3 { gap: var(--spacing-3); }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }
.gap-8 { gap: var(--spacing-8); }

/* ============================================
   Visibility
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
