/* ==========================================================================
   Стилевая система: n8n DevOps (Dark Cyber / Modern Tech UI)
   ========================================================================== */

:root {
    --bg-main: #0b1120;
    --bg-surface: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #10b981;       /* Emerald Green (n8n & OK status) */
    --color-primary-glow: rgba(16, 185, 129, 0.4);
    --color-accent: #3b82f6;        /* Tech Blue */
    --color-accent-glow: rgba(59, 130, 246, 0.4);
    --color-danger: #ef4444;        /* Alert Red */
    --color-warning: #f59e0b;       /* Warning Orange */
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(16, 185, 129, 0.5);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Типографика и Утилиты
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.highlight-gradient {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

code {
    font-family: var(--font-mono);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #38bdf8;
}

/* Баджи */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-accent {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-align: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-glow {
    animation: btnGlow 3s infinite alternate;
}

@keyframes btnGlow {
    0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8), 0 0 40px rgba(59, 130, 246, 0.3); }
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(16, 185, 129, 0.05);
}

/* ==========================================================================
   Навигация (Header)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

/* ==========================================================================
   Главный экран (Hero Section)
   ========================================================================== */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1f 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.2rem;
    margin: 20px 0;
    font-weight: 800;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-guarantee {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.check-icon {
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 6px;
}

/* Интерактивный терминал */
.terminal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.1);
    overflow: hidden;
    font-family: var(--font-mono);
}

.terminal-header {
    background: #1e293b;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 24px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.term-prompt {
    color: #38bdf8;
    margin-right: 8px;
    font-weight: bold;
}

.term-green { color: #34d399; }
.term-info { color: #94a3b8; }
.term-success {
    color: #fbbf24;
    font-weight: 600;
    margin-top: 10px;
    display: block;
}

.typing-cursor::after {
    content: '█';
    animation: blink 1s infinite;
    color: #10b981;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   Секции общие
   ========================================================================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-tag {
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Сравнение (Проблема vs Решение)
   ========================================================================== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.card-bad {
    border-color: rgba(239, 68, 68, 0.3);
}

.card-bad:hover {
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-5px);
}

.card-good {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(16, 185, 129, 0.05) 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
}

.card-good:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2);
}

.card-header-bad h3 { color: #f87171; font-size: 1.4rem; }
.card-header-good h3 { color: #34d399; font-size: 1.4rem; }

.sub-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 24px;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    right: 40px;
    background: var(--color-primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.comparison-list {
    list-style: none;
    flex-grow: 1;
}

.comparison-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.comparison-list li strong {
    color: var(--text-primary);
}

.card-bad .comparison-list li::before {
    content: '✕';
    position: absolute;
    left: 0;
    top: 2px;
    color: #ef4444;
    font-weight: bold;
}

.card-good .comparison-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: #10b981;
    font-weight: bold;
}

.card-footer-bad, .card-footer-good {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.card-footer-bad { color: #fca5a5; }
.card-footer-good { color: #6ee7b7; }

/* ==========================================================================
   Шаги (Чек-лист)
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.step-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 15px;
    right: 20px;
    line-height: 1;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #fff;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Воронка (Блок-магнит)
   ========================================================================== */
.cta-funnel-section {
    padding: 40px 0;
}

.funnel-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15);
}

.funnel-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.funnel-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.funnel-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.funnel-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.funnel-btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.guarantee-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Тарифы (Pricing)
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.pricing-grid-2col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 860px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-featured {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(16, 185, 129, 0.08) 100%);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15);
    transform: scale(1.03);
}

.pricing-featured:hover {
    transform: scale(1.03) translateY(-5px);
}

.featured-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.pricing-title {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.pricing-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 40px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-top: 15px;
}

.currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.pricing-features li strong {
    color: var(--text-primary);
}

.pricing-footer {
    margin-top: auto;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active {
    border-color: rgba(255, 255, 255, 0.3);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Подвал (Footer)
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    background: #080d1a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer-right {
    text-align: right;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* ==========================================================================
   Модальное окно Воронки
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #1e293b;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.15);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #fff;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.messenger-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.modal-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 24px;
    line-height: 1.4;
}

/* ==========================================================================
   Адаптивность (Responsive)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 36px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-guarantee {
        justify-content: center;
    }
    
    .comparison-grid,
    .pricing-grid,
    .pricing-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        text-align: center;
    }
}

/* ==========================================================================
   Кнопка «Наверх»
   ========================================================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}
