/* === Сброс и базовые стили === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --bg-elevated: #16162a;
    --border: #1e1e36;
    --text: #e4e4ef;
    --text-muted: #8888a8;
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4a3db5;
    --accent: #00cec9;
    --gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Кнопки === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    padding: 12px 24px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.08);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

/* === Шапка === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

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

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

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

/* === Главный экран === */
.hero {
    padding: 140px 0 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

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

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Окно кода */
.code-window {
    background: #0d0d18;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
    margin-left: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.code-body {
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: auto;
}

.code-body code {
    color: #c8c8e0;
}

.kw { color: #c792ea; }
.cm { color: #546e7a; }
.str { color: #c3e88d; }
.fn { color: #82aaff; }

/* === Возможности === */
.features {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-dark);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* === Тарифы === */
.pricing {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #0e0e1a 100%);
}

.period-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    background: var(--bg-card);
    border-radius: 50px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border);
}

.period-btn {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-btn:hover {
    color: var(--text);
}

.period-btn.active {
    background: var(--primary);
    color: #fff;
}

.badge {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
}

.period-btn.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.15);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: var(--bg-elevated);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 50px;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-header h3 {
    font-size: 22px;
    font-weight: 700;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.plan-price {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.price-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
}

.price-currency {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-muted);
}

.price-period {
    font-size: 14px;
    color: var(--text-muted);
    width: 100%;
}

.price-old {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
    min-height: 20px;
}

.plan-features {
    list-style: none;
    margin-bottom: 28px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.check {
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 24px;
}

/* === Как подключить === */
.howto {
    padding: 100px 0;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-bottom: 48px;
}

.step {
    text-align: center;
    max-width: 260px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 14px;
}

.step-arrow {
    font-size: 24px;
    color: var(--primary);
    margin-top: 14px;
}

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

/* === FAQ === */
.faq {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #0e0e1a 100%);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--bg-card);
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-toggle {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--bg-card);
}

.faq-answer p {
    padding: 0 20px 18px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

/* === Футер === */
.footer {
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding-bottom: 40px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
}

/* === Адаптивность === */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-visual {
        order: -1;
    }

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

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 110px 0 60px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        gap: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 28px;
    }

    .period-switcher {
        flex-direction: column;
        border-radius: var(--radius);
        width: 100%;
        max-width: 300px;
    }

    .period-btn {
        border-radius: var(--radius-sm);
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
