:root {
    --bg-dark: #0b0e14;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --accent: #10b981;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    /* Паттерн сетки */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    
    /* ВАЖНО: Отступ сверху, чтобы контент не перекрывался закрепленным меню */
    padding-top: 80px; 
}

/* --- Навигация (Sticky Navbar) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 14, 20, 0.85); /* Полупрозрачный фон */
    backdrop-filter: blur(12px); /* Размытие фона */
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

/* Комбинируем с классом .container в HTML для выравнивания */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* --- Основные стили --- */

/* Фоновое свечение */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: none;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    color: #fff;
    font-weight: 700;
}

h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; margin-top: 0; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* Hero Section */
.hero {
    padding: 6rem 0 6rem; /* Немного уменьшил padding сверху из-за меню */
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text { flex: 1; }
.hero-visual { flex: 1; display: flex; justify-content: center; }

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(90deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons { display: flex; gap: 1rem; }

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(5px);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: white;
}

/* Code Window */
.code-window {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: 'Fira Code', monospace;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}
.code-window:hover { transform: perspective(1000px) rotateY(0deg); }

.window-header {
    background: #0d1117;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #30363d;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.code-content { padding: 20px; color: #e6edf3; font-size: 0.9rem; }
.keyword { color: #ff7b72; }
.function { color: #d2a8ff; }
.string { color: #a5d6ff; }
.number { color: #79c0ff; }
.comment { color: #8b949e; font-style: italic; }

/* Sections */
section { padding: 6rem 0; }

.cards, .steps-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

/* Glass Cards */
.card, .step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    width: 300px;
    transition: all 0.3s ease;
    text-align: left;
}

.card:hover, .step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.2);
}

.card i, .step-card i {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
}

.card p, .step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Specific Card Colors */
.highlight {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.contact {
    text-align: center;
}

.contact p {
    max-width: 600px; 
    margin: 0 auto 2rem auto;
    color: var(--text-muted);
}

/* Form */
.contact form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    text-align: left;
}

input, textarea {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #30363d;
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
    width: 100%; /* Исправление ширины полей */
    box-sizing: border-box; /* Чтобы padding не ломал ширину */
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

button[type="submit"] {
    padding: 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button[type="submit"]:hover { background: #059669; }

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-container { flex-direction: column; text-align: center; }
    .hero-text { text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .card, .step-card { width: 100%; }
    h1 { font-size: 2.5rem; }
    
    /* Адаптация меню для мобильных */
    .nav-links { gap: 1rem; }
}

/* Case Study Styles */
.case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.case-card {
    margin-bottom: 2rem;
}

.case-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.highlight-border {
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    align-items: flex-start;
}

.tech-list i {
    color: var(--primary);
    margin-top: 5px;
}

.case-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Browser Mockup */
.browser-mockup {
    background: var(--bg-dark);
    border-radius: 12px;
    border: 1px solid #30363d;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.browser-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.browser-header {
    background: #0d1117;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #30363d;
}

.address-bar {
    background: #000;
    color: #666;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-left: 10px;
    flex: 1;
    opacity: 0.5;
}

.browser-content {
    min-height: 300px; /* Замени на height: auto когда вставишь картинку */
}
.browser-content img {
    width: 100%;
    display: block;
}

.tech-stack-badges {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tech-stack-badges span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .case-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .browser-mockup {
        transform: none;
    }
}

/* --- Phone Mockup Styles --- */

/* Переворачиваем сетку для чередования кейсов */
.reverse-grid {
    direction: rtl; /* Хак для смены порядка колонок */
}
.reverse-grid > * {
    direction: ltr; /* Возвращаем текст в норму */
}

/* Сам телефон */
.phone-mockup {
    width: 300px;
    height: 580px;
    background: #000;
    border-radius: 40px;
    border: 8px solid #333;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #0f172a; /* Фон чата */
}

/* "Челка" телефона */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #333;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

/* Интерфейс чата */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'Inter', sans-serif;
}

.chat-header {
    background: #1e293b;
    padding: 35px 15px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #334155;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-name { font-weight: 600; font-size: 14px; color: #fff; }
.chat-status { font-size: 12px; color: #94a3b8; }

.chat-messages {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Сообщения */
.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
}

.message.bot {
    background: #1e293b;
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}

.message.user {
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

.message.notification {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    text-align: center;
    align-self: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.msg-time {
    font-size: 10px;
    opacity: 0.7;
    text-align: right;
    margin-top: 4px;
}

/* Кнопки в чате */
.message-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.grid-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.msg-btn {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    cursor: default;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.msg-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

@media (max-width: 900px) {
    .reverse-grid { direction: ltr; }
    .phone-mockup { width: 100%; height: 500px; }
}

/* --- Юридические страницы (Privacy & Terms) --- */
.legal-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    line-height: 1.8;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(90deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.legal-content h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #60a5fa;
}

.legal-content p, .legal-content ul {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.legal-content ul {
    padding-left: 1.5rem;
    list-style-type: square;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.legal-content a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* --- Всплывающий Cookie-баннер --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 380px;
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 20px;
    border-radius: 16px;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: none; /* Контролируется JS */
    animation: cookieFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.cookie-container p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.cookie-container a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-container a:hover {
    color: var(--primary);
}

.cookie-container button {
    align-self: stretch;
}

@media (max-width: 480px) {
    .cookie-banner {
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
}