/* === LANDING.CSS ===
   assets/css/landing.css
   НАЗНАЧЕНИЕ: Landing page - Cosmic Dark theme, Space Grotesk + Inter
   СВЯЗИ: index.php, landing-responsive.css, main.css (CSS variables)
   РАЗМЕР: ~500 строк */

/* -- Cosmic Dark palette (standalone - main.css not loaded on landing) -- */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #1f2b4d;
    --card-bg: #16213e;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --color-primary: #e94560;
    --color-secondary: #ff6b6b;
    --color-success: #4ade80;
    --color-danger: #ef4444;
    --color-info: #60a5fa;
    --color-primary-bg: hsla(350, 80%, 55%, 0.15);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(255, 255, 255, 0.05);
    --hover-bg: #1f2b4d;
    --gradient-primary: linear-gradient(135deg, #e94560, #ff6b6b);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* Light theme override */
html.light-theme {
    --bg-primary: #f0f0f5;
    --bg-secondary: #e8e8f0;
    --bg-tertiary: #d8d8e5;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a95;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.05);
    --hover-bg: #e0e0ea;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* -- Reset & Base (landing scope) -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Noise/grain texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
    opacity: 0.025;
    pointer-events: none;
    z-index: 9999;
}

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

.mb-section { padding: 100px 0; }

.mb-section__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* -- Animations -- */
[data-animate] .mb-stat-card,
[data-animate] .mb-step,
[data-animate] .mb-feature-card,
[data-animate] .mb-compare__col,
[data-animate] .mb-faq__item,
[data-animate] .mb-cta__inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible .mb-stat-card,
[data-animate].visible .mb-step,
[data-animate].visible .mb-feature-card,
[data-animate].visible .mb-compare__col,
[data-animate].visible .mb-faq__item,
[data-animate].visible .mb-cta__inner {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
[data-animate].visible .mb-stat-card:nth-child(2),
[data-animate].visible .mb-step:nth-child(2),
[data-animate].visible .mb-feature-card:nth-child(2) { transition-delay: 0.1s; }
[data-animate].visible .mb-stat-card:nth-child(3),
[data-animate].visible .mb-step:nth-child(3),
[data-animate].visible .mb-feature-card:nth-child(3) { transition-delay: 0.2s; }
[data-animate].visible .mb-stat-card:nth-child(4),
[data-animate].visible .mb-feature-card:nth-child(4) { transition-delay: 0.3s; }
[data-animate].visible .mb-feature-card:nth-child(5) { transition-delay: 0.4s; }
[data-animate].visible .mb-feature-card:nth-child(6) { transition-delay: 0.5s; }
[data-animate].visible .mb-compare__col:nth-child(2) { transition-delay: 0.15s; }
[data-animate].visible .mb-faq__item:nth-child(2) { transition-delay: 0.1s; }
[data-animate].visible .mb-faq__item:nth-child(3) { transition-delay: 0.2s; }
[data-animate].visible .mb-faq__item:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    [data-animate] .mb-stat-card,
    [data-animate] .mb-step,
    [data-animate] .mb-feature-card,
    [data-animate] .mb-compare__col,
    [data-animate] .mb-faq__item,
    [data-animate] .mb-cta__inner {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* -- Header -- */
.mb-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}

.mb-header.scrolled {
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mb-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mb-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.mb-logo span { color: var(--color-primary); }

.mb-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.mb-nav__link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
}

.mb-nav__link:hover { color: var(--color-primary); }

.mb-lang {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.mb-lang__item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mb-lang__item.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.mb-lang__item:hover:not(.active) { color: var(--text-primary); }

/* -- Button -- */
.mb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--gradient-primary);
    color: #fff;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.mb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
    text-decoration: none;
}

.mb-btn--sm { padding: 6px 18px; font-size: 0.85rem; }

.mb-btn--lg { padding: 14px 36px; font-size: 1.05rem; }

.mb-btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.mb-btn--ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: none;
    transform: translateY(-2px);
}

.mb-btn--glow {
    box-shadow: 0 0 40px rgba(233, 69, 96, 0.25), 0 0 80px rgba(233, 69, 96, 0.08);
}

.mb-btn--glow:hover {
    box-shadow: 0 0 50px rgba(233, 69, 96, 0.4), 0 0 100px rgba(233, 69, 96, 0.15);
}

/* -- Hamburger -- */
.mb-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mb-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mb-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mb-burger.open span:nth-child(2) { opacity: 0; }
.mb-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* -- Hero -- */
.mb-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.mb-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(22, 33, 62, 0.6) 0%, transparent 70%);
    pointer-events: none;
}

.mb-hero__content { position: relative; z-index: 1; max-width: 720px; }

.mb-hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.mb-hero__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.mb-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* -- Stats -- */
.mb-stats { padding: 60px 0; }

.mb-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mb-stat-card {
    background: rgba(22, 33, 62, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mb-stat-card:hover {
    border-color: rgba(233, 69, 96, 0.3);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.08);
}

.mb-stat-card__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    line-height: 1.2;
}

.mb-stat-card__label {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
    letter-spacing: 0.02em;
}

.mb-stats__note {
    text-align: center;
    opacity: 0.5;
    font-size: 12px;
    margin-top: 10px;
    color: var(--text-muted);
}

/* -- How it works -- */
.mb-how__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.mb-step {
    flex: 0 0 280px;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.mb-step__num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.mb-step__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--color-primary);
    transition: background 0.3s ease;
}

.mb-step:hover .mb-step__icon {
    background: rgba(233, 69, 96, 0.18);
}

.mb-step__icon svg { width: 26px; height: 26px; }

.mb-step__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.mb-step__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.mb-step__line {
    flex: 0 0 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(233, 69, 96, 0.3), var(--color-primary));
    margin-top: 60px;
    border-radius: 1px;
}

/* -- Features -- */
.mb-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

.mb-feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.15);
}

.mb-feature-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(233, 69, 96, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-primary);
    transition: background 0.3s ease;
}

.mb-feature-card:hover .mb-feature-card__icon {
    background: rgba(233, 69, 96, 0.2);
}

.mb-feature-card__icon svg { width: 24px; height: 24px; }

.mb-feature-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.mb-feature-card__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* -- Comparison -- */
.mb-compare__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.mb-compare__col {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: border-color 0.3s ease;
}

.mb-compare__header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 16px 20px;
    text-align: center;
}

.mb-compare__col--bad .mb-compare__header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.05));
    color: var(--color-danger);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.mb-compare__col--good .mb-compare__header {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.12), rgba(74, 222, 128, 0.05));
    color: var(--color-success);
    border-bottom: 1px solid rgba(74, 222, 128, 0.15);
}

.mb-compare__col--bad:hover {
    border-color: rgba(239, 68, 68, 0.25);
}

.mb-compare__col--good:hover {
    border-color: rgba(74, 222, 128, 0.25);
}

.mb-compare__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color-light);
    color: var(--text-secondary);
}

.mb-compare__row:last-child { border-bottom: none; }

.mb-compare__icon { flex: 0 0 auto; }
.mb-compare__icon svg { width: 18px; height: 18px; }
.mb-compare__icon--bad { color: var(--color-danger); }
.mb-compare__icon--good { color: var(--color-success); }

/* -- FAQ -- */
.mb-faq__list {
    max-width: 720px;
    margin: 0 auto;
}

.mb-faq__item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--card-bg);
    transition: border-color 0.3s ease;
}

.mb-faq__item:hover {
    border-color: rgba(233, 69, 96, 0.2);
}

.mb-faq__item.open {
    border-color: rgba(233, 69, 96, 0.3);
}

.mb-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: color 0.2s ease;
}

.mb-faq__question:hover {
    color: var(--color-primary);
}

.mb-faq__arrow {
    flex: 0 0 auto;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.mb-faq__arrow svg { width: 20px; height: 20px; }

.mb-faq__item.open .mb-faq__arrow {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.mb-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.mb-faq__answer p {
    padding: 0 20px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.mb-faq__item.open .mb-faq__answer {
    max-height: 300px;
}

/* -- CTA -- */
.mb-cta {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.mb-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(255, 107, 107, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.mb-cta__inner {
    text-align: center;
    position: relative;
    z-index: 1;
}

.mb-cta__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* -- Footer -- */
.mb-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.mb-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.mb-logo--footer { font-size: 1.2rem; }

.mb-footer__links {
    display: flex;
    gap: 24px;
}

.mb-footer__links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mb-footer__links a:hover { color: var(--color-primary); }

.mb-footer__copy {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* -- Focus visible -- */
.mb-btn:focus-visible,
.mb-faq__question:focus-visible,
.mb-nav__link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
