/* Modern Design System для ТГ Кейс */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Brand Colors */
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-50: #f0f4ff;
    --primary-100: #e0e7ff;
    
    /* Secondary Colors */
    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;
    --secondary-700: #6d28d9;
    
    /* Accent Colors */
    --accent-500: #06b6d4;
    --accent-600: #0891b2;
    --accent-700: #0e7490;
    
    /* Success/Error Colors */
    --success-500: #10b981;
    --success-600: #059669;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    /* Neutral Colors */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px rgb(99 102 241 / 0.4);
    
    /* Spacing Scale */
    --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;
    --space-32: 8rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: 'Inter', system-ui, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Layout */
    --header-height: 80px;
    --sidebar-width: 280px;
    --container-width: 1280px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    color: var(--neutral-800);
    background-color: var(--neutral-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === LOGO STYLES === */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-large img {
    height: 60px;
}

.logo-small img {
    height: 32px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--neutral-900);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: var(--font-weight-semibold);
}

p {
    margin-bottom: var(--space-4);
    color: var(--neutral-600);
    line-height: 1.7;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-700);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--neutral-700);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--neutral-600);
    border: none;
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--neutral-100);
    color: var(--neutral-800);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === CARDS === */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--neutral-200);
    background: var(--neutral-50);
}

/* === FORMS === */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
    color: var(--neutral-700);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: 0.875rem;
    background: white;
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

.form-input::placeholder {
    color: var(--neutral-400);
}

/* === ALERTS === */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
    border-left: 4px solid;
}

.alert-error {
    background: rgb(254 242 242);
    color: var(--error-600);
    border-left-color: var(--error-500);
}

.alert-success {
    background: rgb(240 253 244);
    color: var(--success-600);
    border-left-color: var(--success-500);
}

.alert-warning {
    background: rgb(255 251 235);
    color: var(--warning-600);
    border-left-color: var(--warning-500);
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neutral-200);
    transition: all var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-8);
    align-items: center;
}

.nav-link {
    color: var(--neutral-600);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
}

.nav-link.active {
    color: var(--primary-600);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--neutral-600);
}

/* === HERO SECTION === */
.hero {
    padding-top: calc(var(--header-height) + var(--space-20));
    padding-bottom: var(--space-24);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-600);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: var(--font-weight-black);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--neutral-600);
    margin-bottom: var(--space-8);
    line-height: 1.7;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    animation: fadeInUp 1.2s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    animation: fadeInUp 1.4s ease 0.8s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--neutral-500);
}

.hero-visual {
    position: relative;
    animation: fadeInRight 1s ease 0.4s both;
}

.hero-dashboard {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--space-6);
    transform: none;
    transition: all var(--transition-base);
    cursor: pointer;
}

.hero-dashboard:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* === SECTIONS === */
.section {
    padding: var(--space-24) 0;
}

.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-4);
}

.section-badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-600);
}

.section-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-600);
}

.section-badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-600);
}

/* === GRID LAYOUTS === */
.grid {
    display: grid;
    gap: var(--space-8);
}

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

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

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.scale-in {
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
}

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* === UTILITY CLASSES === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-primary { color: var(--primary-600); }
.text-secondary { color: var(--neutral-600); }
.text-muted { color: var(--neutral-500); }

.bg-primary { background: var(--gradient-primary); }
.bg-white { background: white; }
.bg-gray { background: var(--neutral-50); }

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    :root {
        --container-width: 100%;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .hero-dashboard {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: var(--space-6);
        box-shadow: var(--shadow-xl);
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        gap: var(--space-4);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        padding-top: calc(var(--header-height) + var(--space-12));
        padding-bottom: var(--space-16);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-6);
    }
    
    .section {
        padding: var(--space-16) 0;
    }
    
    .grid-auto {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 var(--space-4);
    }
    
    .section-container {
        padding: 0 var(--space-4);
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}