/* =========================================
   1. CORE SETTINGS & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@400;600;700;800&display=swap');

:root {
    /* --- Palette --- */
    /* Trust Blue: Основной цвет доверия и технологий */
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --primary-light: #60A5FA;
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    
    /* Signals: Цвета статусов (Светофор) */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;

    /* Neutrals: Фон и текст */
    --bg-body: #F8FAFC;      /* Очень светло-серый, не белый */
    --bg-surface: #FFFFFF;
    --text-main: #0F172A;    /* Почти черный, глубокий синий */
    --text-muted: #64748B;   /* Спокойный серый для описаний */
    --border-light: #E2E8F0;

    /* --- Effects --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Сложные тени для объема */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3); /* Свечение кнопок */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --blur-val: 12px;
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* Четкие шрифты на Mac */
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif; /* Основной текст читабельный */
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   3. TYPOGRAPHY (Fluid & Selling)
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif; /* Заголовки современные и геометричные */
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

/* Адаптивный размер шрифта: clamp(минимальный, зависящий от ширины, максимальный) */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); 
    margin-bottom: 24px;
    background: linear-gradient(to right, #0F172A 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Градиентный текст */
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 65ch; /* Оптимальная ширина для чтения */
}

/* =========================================
   4. LAYOUT UTILS
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Grid systems */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 30px; }

/* =========================================
   5. UI COMPONENTS (Buttons & Badges)
   ========================================= */
/* Primary CTA Button - Кнопка должна "кричать" нажми меня */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 36px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Блик на кнопке (Shine Effect) */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}
.btn-primary:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

/* Вторичная кнопка */
.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #EFF6FF;
}

/* Badge (Плашка) */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #DBEAFE;
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* =========================================
   6. HEADER & NAVIGATION
   ========================================= */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-val));
    -webkit-backdrop-filter: blur(var(--blur-val));
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 16px 0;
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   7. HERO SECTION (Main Screen)
   ========================================= */
.hero {
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

/* Background blob (Фоновое пятно) */
.hero::before {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(248,250,252,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Блок доверия под кнопками */
.trust-indicators {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.trust-item { display: flex; align-items: center; gap: 6px; }

/* =========================================
   8. WOW ELEMENTS (CSS Only Graphics)
   ========================================= */

/* --- A. CSS Phone Mockup (Чистый CSS, без картинок) --- */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: #1e1e1e; /* Рамка */
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.3);
    position: relative;
    margin: 0 auto;
    border: 4px solid #333;
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover { transform: rotate(0deg) scale(1.02); }

.phone-screen {
    background: #fff;
    width: 100%; height: 100%;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex; flex-direction: column;
}

/* "Челка" телефона */
.phone-notch {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 40%; height: 25px;
    background: #1e1e1e;
    border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
    z-index: 10;
}

/* Внутренности экрана (Фейковый интерфейс) */
.app-nav { height: 60px; background: #fff; border-bottom: 1px solid #f1f5f9; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; font-weight: 700; font-size: 0.9rem; }
.app-body { padding: 20px; background: #F8FAFC; flex-grow: 1; }
.app-card { background: white; padding: 15px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 12px; animation: slideUp 0.6s ease-out forwards; opacity: 0; }
.app-card:nth-child(1) { animation-delay: 0.2s; }
.app-card:nth-child(2) { animation-delay: 0.6s; border-left: 4px solid var(--danger); }

/* --- B. Traffic Light Gauge (Спидометр) --- */
.gauge-wrapper {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    position: relative;
}
.gauge-body {
    width: 200px; height: 100px;
    background: linear-gradient(90deg, #EF4444 0%, #F59E0B 50%, #10B981 100%);
    border-radius: 100px 100px 0 0;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.gauge-needle {
    width: 6px; height: 90px;
    background: #334155;
    position: absolute; bottom: 0; left: 50%;
    transform-origin: bottom center;
    transform: rotate(-90deg); /* Start pos */
    border-radius: 5px;
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}
/* Центр стрелки */
.gauge-body::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 20px; background: #334155; border-radius: 50%;
}

/* --- C. Blur Effect (Freemium) --- */
.blur-card {
    background: white; border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 24px;
    position: relative; overflow: hidden;
}
.blur-text {
    filter: blur(5px);
    user-select: none;
    opacity: 0.6;
}
.blur-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.4);
}
.blur-btn {
    background: var(--text-main); color: white;
    padding: 8px 16px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
}

/* =========================================
   9. SECTIONS STYLES
   ========================================= */

/* Feature Cards (Steps) */
.feature-card {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.feature-icon {
    font-size: 3rem; margin-bottom: 20px; display: block;
}

/* Comparison Table (Responsive) */
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.compare-table {
    width: 100%; border-collapse: collapse; min-width: 600px;
}
.compare-table th, .compare-table td {
    padding: 20px; text-align: left; border-bottom: 1px solid var(--border-light);
}
.compare-table th { background: #F1F5F9; color: var(--text-main); }
.compare-table td:last-child {
    background: #EFF6FF; /* Highlight AI Column */
    font-weight: 600; color: var(--primary-dark);
}

/* SEO Grid */
.seo-link-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px;
    background: white; border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    text-decoration: none; color: var(--text-main);
    transition: 0.2s;
}
.seo-link-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.seo-icon {
    width: 48px; height: 48px;
    background: #F1F5F9; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

/* FAQ / Footer */
details {
    background: white; padding: 20px;
    border-radius: var(--radius-md); margin-bottom: 10px;
    border: 1px solid var(--border-light);
    cursor: pointer; transition: 0.3s;
}
details[open] { border-color: var(--primary); }
summary { font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--primary); }
details[open] summary::after { content: '−'; }

footer {
    background: var(--text-main);
    color: #94A3B8;
    padding: 60px 0;
}
footer a { color: #CBD5E1; text-decoration: none; margin-bottom: 8px; display: block; }
footer a:hover { color: white; }

/* =========================================
   10. ANIMATIONS
   ========================================= */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Класс для запуска анимации JS */
.animate-gauge .gauge-needle {
    transform: rotate(-20deg) !important; /* Move to RED zone */
}

/* =========================================
   11. MEDIA QUERIES (Mobile First override)
   ========================================= */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    
    .hero { text-align: left; }
    .hero-content { align-items: flex-start; }
    
    /* Перестановка блоков на десктопе (текст слева, картинка справа) */
    .reverse-layout { direction: rtl; }
    .reverse-layout > * { direction: ltr; }
}

@media (max-width: 767px) {
    /* На мобилке кнопки на всю ширину */
    .btn { width: 100%; margin-bottom: 10px; }
    .trust-indicators { flex-direction: column; align-items: center; gap: 10px; }
    .phone-mockup { transform: scale(0.9) rotate(0deg); margin-top: 40px; }
}