/* ===== Основы ===== */
:root {
    --bg: #0a0e17;
    --bg-soft: #0f1522;
    --surface: #141b2b;
    --text: #e8ecf4;
    --text-muted: #8a94a7;
    --accent: #4d9fff;
    --accent-strong: #2f7fe0;
    --accent-glow: rgba(77, 159, 255, 0.35);
    --line: rgba(255, 255, 255, 0.08);
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --font-grotesk: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* ===== Доступность ===== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--white);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Шапка ===== */
.header {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    pointer-events: none;
}

.header__inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1120px;
    padding: 10px 16px;
    background: rgba(15, 21, 34, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 20px var(--accent-glow);
}

.header__logo {
    font-family: var(--font-grotesk);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.header__cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--white);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.header__cta:hover {
    background: var(--accent-strong);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 15px 30px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn__arrow {
    transition: transform 0.25s ease;
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

.btn--primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--white);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn--primary:hover::before {
    transform: translateX(100%);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--accent-glow);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Первый экран ===== */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 100px;
    overflow: hidden;
    background: var(--bg);
}

.hero__content {
    position: relative;
    z-index: 3;
    max-width: 820px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    margin-bottom: 32px;
    background: rgba(15, 21, 34, 0.5);
    backdrop-filter: blur(8px);
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 10px #3ddc84;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero__title {
    font-family: var(--font-grotesk);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero__lead {
    margin: 0 auto 40px;
    max-width: 560px;
    color: var(--text-muted);
    font-size: 1.15rem;
}

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

.hero__scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 26px;
    height: 42px;
    border: 2px solid var(--line);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.hero__scroll span {
    width: 4px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    animation: scroll 1.8s ease-in-out infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ===== Three.js сцена (только в hero) ===== */
.scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.scene__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(10, 14, 23, 0.25) 0%,
        rgba(10, 14, 23, 0.65) 70%,
        var(--bg) 100%);
}

/* ===== Секции ===== */
.section {
    position: relative;
    z-index: 2;
    padding: 120px 20px;
}

.section__inner {
    max-width: 1120px;
    margin: 0 auto;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section__title {
    font-family: var(--font-grotesk);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

.section__intro {
    max-width: 640px;
    color: var(--text-muted);
    margin-bottom: 56px;
}

/* ===== Преимущества ===== */
.features {
    background: var(--bg);
}

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

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    border-color: rgba(77, 159, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--accent);
    background: rgba(77, 159, 255, 0.12);
    margin-bottom: 20px;
}

.feature h3 {
    font-family: var(--font-grotesk);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ===== Отзывы ===== */
.testimonials {
    background: var(--bg);
}

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

.testimonial {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
    border-color: rgba(77, 159, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.testimonial__quote {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}

.testimonial__author {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* ===== Статусы дела ===== */
.statuses {
    background: var(--bg);
}

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

.status {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.status:hover {
    border-color: rgba(77, 159, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.status__pill {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.status__pill--progress {
    color: #f0b429;
    background: rgba(240, 180, 41, 0.12);
    border-color: rgba(240, 180, 41, 0.35);
}

.status__pill--approved {
    color: #3ddc84;
    background: rgba(61, 220, 132, 0.12);
    border-color: rgba(61, 220, 132, 0.35);
}

.status__pill--precaria {
    color: var(--accent);
    background: rgba(77, 159, 255, 0.12);
    border-color: rgba(77, 159, 255, 0.35);
}

.status__text {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ===== Как это работает ===== */
.how {
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.how__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.step.is-active {
    background: rgba(15, 21, 34, 0.8);
    border-color: rgba(77, 159, 255, 0.3);
    box-shadow: var(--shadow);
    transform: translateX(6px);
}

.step__num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    flex-shrink: 0;
    padding-top: 4px;
}

.step h3 {
    font-family: var(--font-grotesk);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

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

/* ===== Чат ===== */
.chat {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.chat__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(15, 21, 34, 0.8);
    border-bottom: 1px solid var(--line);
}

.chat__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--white);
    font-family: var(--font-grotesk);
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-glow);
}

.chat__name {
    display: block;
    font-family: var(--font-grotesk);
    font-weight: 600;
    font-size: 0.95rem;
}

.chat__status {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #3ddc84;
}

.chat__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.chat__item {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.chat__item--bot {
    background: #1b2437;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat__item--user {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat__item--result {
    background: rgba(77, 159, 255, 0.12);
    border: 1px solid rgba(77, 159, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat__result-title {
    font-weight: 600;
    color: var(--text);
}

.chat__result-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

.how__footer {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.how__note {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Доверие и FAQ ===== */
.trust {
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.trust__text {
    max-width: 720px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.faq {
    margin-top: 64px;
    max-width: 720px;
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__item:first-of-type {
    border-top: 1px solid var(--line);
}

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

.faq__icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.faq__icon::before {
    top: 8px;
    left: 0;
    width: 18px;
    height: 2px;
}

.faq__icon::after {
    left: 8px;
    top: 0;
    width: 2px;
    height: 18px;
}

.faq__trigger[aria-expanded="true"] .faq__icon::after {
    transform: scaleY(0);
}

.faq__panel {
    overflow: hidden;
}

.faq__panel p {
    padding-bottom: 22px;
    color: var(--text-muted);
}

/* ===== Материалы (контент-хаб) ===== */
.materials {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

.materials__title {
    font-family: var(--font-grotesk);
    font-size: 1.15rem;
    margin-bottom: 16px;
}

.materials__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.materials__list a {
    color: var(--accent);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.materials__list a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

/* ===== Подвал ===== */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer__copy,
.footer__made {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer__nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer__nav a:hover {
    color: var(--accent);
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .how__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .chat {
        position: static;
    }
}

@media (max-width: 640px) {
    .header__inner {
        padding: 8px 12px;
    }

    .hero {
        padding: 100px 16px 80px;
        min-height: auto;
    }

    .section {
        padding: 80px 16px;
    }

    .step {
        padding: 16px;
    }

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

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__nav {
        gap: 16px;
    }
}