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

/* Hero должен оставаться прозрачным поверх фоновых слоёв */
section.hero,
section.hero .container,
section.hero .hero-content,
section.hero * {
    background: transparent !important;
    background-color: transparent !important;
}
section.hero,
section.hero * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}


:root {
    --bg-dark: #1a1a1a;
    --bg-card: rgba(30, 30, 30, 0.9);
    --bg-card-solid: #262626;
    --accent: #b0b0b0;
    --accent-soft: #e0e0e0;
    --text: #ffffff;
    --text-muted: #e0e0e0;
    --text-dim: #b0b0b0;
    --border: rgba(255, 255, 255, 0.06);
    --gradient-title: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #c0c0c0 100%);
    --check: #6b6b6b;
    --neuron-glow: rgba(255, 255, 255, 0.35);
    /* scroll-driven background (updated by JS) */
    --scroll-progress: 0;
    --scroll-glow-y: 20;
    --scroll-glow-y2: 80;
    --scroll-shift: 0;
}

html {
    scroll-behavior: smooth;
    background: #1a1a1a;
    scrollbar-color: #444 #1a1a1a;
}

/* Тёмный скроллбар — чтобы справа не было белой полосы */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: transparent;
    min-height: 100vh;
    position: relative;
}

/* Scroll-driven background layer */
.bg-scroll {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: 0 calc(var(--scroll-shift) * 1px) 0, 0 calc(var(--scroll-shift) * 0.7px) 0;
}

.bg-scroll::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        180deg,
        #1a1a1a 0%,
        #222 35%,
        #262626 70%,
        #1a1a1a 100%
    );
}

.bg-scroll::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(
            ellipse 90% 55% at 50% calc(var(--scroll-glow-y) * 1%),
            rgba(255,255,255, calc(0.04 - var(--scroll-progress) * 0.02)),
            transparent 55%
        ),
        radial-gradient(
            ellipse 70% 45% at 50% calc(var(--scroll-glow-y2) * 1%),
            rgba(255,255,255, calc(0.03 + var(--scroll-progress) * 0.02)),
            transparent 50%
        );
}

/* Золотая нейросеть на фоне (canvas) */
.bg-neurons {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Safari/WebKit fallback:
   отключаем только fallback canvas, 3D-сферу оставляем включенной. */
html.is-webkit #neurons-canvas,
html.is-webkit .hero-3d-fallback {
    display: none !important;
}

/* Apple WebKit white-block artifact guard:
   даём секциям минимальный ненулевой тёмный фон, чтобы слой не заливался белым. */
html.is-webkit section.hero,
html.is-webkit section.hero > .container,
html.is-webkit section.problem,
html.is-webkit section.problem > .container {
    background-color: rgba(20, 20, 20, 0.01) !important;
    background-image: none !important;
}

/* Apple WebKit stacking fix:
   фиксированные фоновые слои иногда поднимаются над контентом.
   Жёстко опускаем фон и поднимаем контент. */
html.is-webkit .bg-scroll {
    z-index: -30 !important;
}

html.is-webkit .bg-neurons {
    z-index: -20 !important;
    opacity: 0.78;
    filter: brightness(0.82) contrast(1.08);
}

/* Возвращаем "глубину" тёмного фона на Apple без возврата белого артефакта */
html.is-webkit .bg-neurons::after {
    display: none !important;
}

html.is-webkit body::before {
    display: none !important;
}

html.is-webkit .bg-scroll::before {
    background: linear-gradient(
        180deg,
        #020203 0%,
        #040508 35%,
        #05060a 70%,
        #020203 100%
    ) !important;
}

html.is-webkit .bg-scroll {
    display: none !important;
}

html.is-webkit .bg-scroll::after {
    display: none !important;
}

html.is-webkit header,
html.is-webkit section,
html.is-webkit footer {
    position: relative;
    z-index: 10;
}

/* Контейнер для 3D hero-анимации (энергетическая сфера) */
.hero-3d-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Когда 3D активен, скрываем fallback canvas */
.bg-neurons.has-hero-3d .hero-3d-fallback {
    display: none;
}

#neurons-canvas,
.hero-3d-fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Сетка только под фоном — не над контентом (фикс белого блока) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-color: transparent;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Весь контент страницы — один слой поверх фона, без белого */
.page-content {
    position: relative;
    z-index: 1;
    background: transparent !important;
    background-color: transparent !important;
}

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

/* ----- Header ----- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header .container {
    padding-left: 24px;
    padding-right: 24px;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 300;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #b0b0b0;
    letter-spacing: 0.5px;
    margin: 0;
    margin-left: 0;
}

.nav {
    margin-right: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 300;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #b0b0b0;
    letter-spacing: 0.5px;
    margin: 0;
    margin-left: -12px;
}

.nav {
    margin-right: -12px;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
    mix-blend-mode: lighten;
    filter: contrast(1.5) brightness(1.3);
}

.logo span {
    text-transform: none;
}

.logo span::first-letter {
    text-transform: uppercase;
}

.btn-nav {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(38, 38, 38, 0.95);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s;
}

.btn-nav:hover {
    background: rgba(48, 48, 48, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ----- Buttons ----- */
.btn-hero {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 999px;
    background: rgba(26, 31, 42, 0.42);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: background 0.25s, transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn-hero:hover {
    background: rgba(33, 39, 53, 0.56);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 24px rgba(255, 190, 70, 0.12);
    transform: translateY(-2px);
}

.btn-tariff-primary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    transition: background 0.2s, transform 0.2s;
    margin-top: auto;
    width: fit-content;
}

.btn-tariff-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.btn-tariff-outline {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid var(--border);
    transition: border-color 0.2s, background 0.2s;
    margin-top: auto;
    width: fit-content;
}

.btn-tariff-outline:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

/* ----- Hero ----- */
.hero {
    padding: 100px 0 120px;
    text-align: center;
    overflow: hidden;
    background: transparent !important;
    background-color: transparent !important;
}

.hero-label {
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.hero-clients {
    margin-top: 56px;
}

.clients-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.clients-logos {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.clients-logos span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ----- Section labels & titles ----- */
.section-label {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.02em;
}

section {
    padding: 88px 0;
}

/* ----- Problem ----- */
.problem .section-subtitle {
    text-align: left;
}

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

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-soft);
    margin-bottom: 12px;
    line-height: 1.2;
}

.stat-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ----- Solution (features) ----- */
.solution .section-subtitle {
    text-align: left;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.feature-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.feature-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ----- Cases ----- */
.cases .section-subtitle {
    text-align: left;
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 44px;
    margin-bottom: 32px;
}

.case-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.case-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.case-category {
    font-size: 15px;
    color: var(--text-muted);
}

.case-description {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.case-features {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.case-features li {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.case-results {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.case-results strong {
    display: block;
    margin-bottom: 14px;
    font-size: 1rem;
    color: var(--text);
}

.case-results ul {
    list-style: none;
    padding-left: 0;
}

.case-results li {
    padding: 8px 0;
    padding-left: 22px;
    position: relative;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

.case-results li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-weight: bold;
}

/* ----- Tariffs ----- */
.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.tariff-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 28px 34px;
    position: relative;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.tariff-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.tariff-popular {
    border-color: rgba(255, 255, 255, 0.2);
}

.tariff-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-soft);
    color: var(--bg-dark);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tariff-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    min-height: 40px;
    text-align: center;
    width: 100%;
}

.tariff-price {
    font-size: 1.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    min-height: 44px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
}

.tariff-features {
    list-style: none;
    margin-bottom: 0;
    flex-grow: 1;
    padding-bottom: 40px;
}

.tariff-features li {
    padding: 9px 0;
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
}

.tariff-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--check);
    font-weight: bold;
    font-size: 1rem;
}

.tariff-support {
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
}

/* ----- Process ----- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

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

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

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

.step-link {
    color: var(--accent-soft);
    text-decoration: underline;
}

.step-link:hover {
    color: #ffffff;
}

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

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.faq-item:first-child {
    border-top: 1px solid var(--border);
}

.faq-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.faq-toggle {
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.faq-answer {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 14px;
    padding-right: 2rem;
}

.faq-item.is-closed .faq-answer {
    display: none;
}

/* ----- Author ----- */
.author {
    text-align: center;
}

.author-text {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 16px;
}

/* ----- Partners ----- */
.partners {
    text-align: center;
}

.partners-text {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.partners-text strong {
    color: var(--text);
}

.partners-benefits {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 28px;
}

/* ----- CTA ----- */
.cta {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(15, 18, 32, 0.6) 0%, var(--bg-dark) 100%);
}

.cta-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.cta-text {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 36px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-soft);
    margin-bottom: 8px;
}

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

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

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-dim);
}

.footer-cookies {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.btn-cookie {
    background: var(--bg-card-solid);
    color: var(--text);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.btn-cookie:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Ускорение первого рендера без потери качества: offscreen-секции рисуем по мере прокрутки. */
@supports (content-visibility: auto) {
    .cases,
    .tariffs,
    .process,
    .faq,
    .author,
    .partners,
    .cta,
    .footer {
        content-visibility: auto;
        contain-intrinsic-size: 1px 900px;
    }
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .tariffs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .problem-stats {
        grid-template-columns: 1fr;
    }

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

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

    .process-steps {
        grid-template-columns: 1fr;
    }

    .problem .section-subtitle,
    .solution .section-subtitle,
    .cases .section-subtitle {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 64px 0;
    }

    .hero {
        padding: 72px 0 88px;
    }

    .case-card {
        padding: 28px 24px;
    }

    .tariff-card {
        padding: 28px 22px;
    }
}

