/* ==========================================================================
   Правовой Контур — дополнительные стили и анимации
   Палитра: ink #070B14 · navy #0B1220 · panel #111A2B · line #1E2A3F
            gold #C8A96A · goldsoft #E2CB96 · muted #8FA0B8
   ========================================================================== */

:root {
    --ink: #070B14;
    --navy: #0B1220;
    --panel: #111A2B;
    --line: #1E2A3F;
    --gold: #C8A96A;
    --gold-soft: #E2CB96;
    --muted: #8FA0B8;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    overflow-x: hidden;
}

[x-cloak] {
    display: none !important;
}

/* --------------------------- Скроллбар ---------------------------------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ink);
}

::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 8px;
    border: 2px solid var(--ink);
}

::-webkit-scrollbar-thumb:hover {
    background: #2b3b56;
}

/* --------------------------- Фон HERO ----------------------------------- */
.hero-glow {
    position: absolute;
    top: -18rem;
    left: 50%;
    transform: translateX(-50%);
    width: 78rem;
    max-width: 160vw;
    height: 46rem;
    pointer-events: none;
    background:
        radial-gradient(closest-side, rgba(200, 169, 106, 0.14), transparent 72%),
        radial-gradient(closest-side, rgba(37, 76, 140, 0.20), transparent 70%);
    filter: blur(14px);
    opacity: 0.95;
}

.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(143, 160, 184, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(143, 160, 184, 0.055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* --------------------------- Типографика -------------------------------- */
.text-gradient-gold {
    background: linear-gradient(100deg, #E2CB96 0%, #C8A96A 45%, #9C7F45 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    border-left: 2px solid var(--gold);
    padding-left: 0.75rem;
}

/* --------------------------- Кнопки ------------------------------------- */
.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -120%;
    width: 60%;
    height: 220%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: rotate(18deg);
    transition: left 0.75s ease;
    z-index: -1;
}

.btn-shine:hover::after {
    left: 130%;
}

/* --------------------------- Карточки статистики ------------------------ */
.stat-card {
    border: 1px solid var(--line);
    background: rgba(17, 26, 43, 0.55);
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.stat-card:hover {
    border-color: rgba(200, 169, 106, 0.45);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.stat-label {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--muted);
}

/* --------------------------- Карточки услуг ----------------------------- */
.service-card {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(17, 26, 43, 0.85) 0%, rgba(11, 18, 32, 0.85) 100%);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    border-color: rgba(200, 169, 106, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.9);
}

.service-num {
    position: absolute;
    top: 1.25rem;
    right: 1.4rem;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(200, 169, 106, 0.12);
    letter-spacing: -0.04em;
}

.service-cta {
    margin-top: auto;
    padding-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold);
    transition: gap 0.25s ease, color 0.25s ease;
}

.service-cta:hover {
    gap: 0.85rem;
    color: var(--gold-soft);
}

.feature-li {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.feature-li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    border: 1.5px solid var(--gold);
}

/* --------------------------- Шаги процесса ------------------------------ */
.step-card {
    position: relative;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.6);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.step-card:hover {
    border-color: rgba(200, 169, 106, 0.4);
    transform: translateY(-3px);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(200, 169, 106, 0.45);
    color: var(--gold);
    font-weight: 700;
    font-size: 1rem;
    background: rgba(200, 169, 106, 0.07);
}

/* --------------------------- FAQ ---------------------------------------- */
.faq-item {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: rgba(17, 26, 43, 0.55);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(200, 169, 106, 0.35);
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    padding: 1.15rem 1.25rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.45;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.faq-icon.rotate-45 {
    transform: rotate(45deg);
}

.faq-body {
    padding: 0 1.25rem 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* --------------------------- Формы -------------------------------------- */
.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.form-input {
    width: 100%;
    border-radius: 0.7rem;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.75);
    padding: 0.85rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
    color: #5c6d87;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.16);
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A96A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.15rem;
    padding-right: 2.75rem;
}

.form-select option {
    background: var(--navy);
    color: #fff;
}

/* Honeypot: скрыт от людей, виден ботам */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* --------------------------- Мобильные нюансы --------------------------- */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767px) {
    .service-num {
        font-size: 2.2rem;
    }

    .hero-glow {
        top: -12rem;
        height: 34rem;
    }
}

/* --------------------------- Анимации ----------------------------------- */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
}

.reveal.is-visible {
    animation: fade-up 0.6s ease forwards;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Блоки без лид-формы: обещания, карточка доверия, кейсы, законы, мифы
   ========================================================================== */

/* --------------------------- Список обещаний ---------------------------- */
.promise-li {
    position: relative;
    padding-left: 1.9rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.promise-li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(200, 169, 106, 0.55);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A96A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
        center / 0.7rem no-repeat;
}

/* --------------------------- Карточка доверия --------------------------- */
.card-check {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.card-check::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.85rem;
    height: 0.85rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A96A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

/* --------------------------- Карточки ситуаций -------------------------- */
.pain-card {
    border: 1px solid var(--line);
    border-left: 3px solid rgba(200, 169, 106, 0.55);
    background: rgba(17, 26, 43, 0.5);
    border-radius: 0.9rem;
    padding: 1.35rem 1.4rem;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.pain-card:hover {
    border-color: rgba(200, 169, 106, 0.45);
    border-left-color: var(--gold);
    background: rgba(17, 26, 43, 0.8);
    transform: translateY(-3px);
}

/* --------------------------- Правовые основания ------------------------- */
.legal-group {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(17, 26, 43, 0.5);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.legal-group:hover {
    border-color: rgba(200, 169, 106, 0.35);
}

.legal-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    padding: 1.15rem 1.25rem;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.legal-item {
    border-left: 2px solid var(--line);
    padding-left: 1rem;
    transition: border-color 0.2s ease;
}

.legal-item:hover {
    border-left-color: var(--gold);
}

.legal-norm {
    display: inline-block;
    font-size: 0.7rem;
    line-height: 1.2;
    color: var(--gold);
    border: 1px solid rgba(200, 169, 106, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.legal-table {
    width: 100%;
    min-width: 34rem;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.legal-table th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    color: var(--gold);
    font-weight: 600;
    border-bottom: 1px solid rgba(200, 169, 106, 0.3);
    white-space: nowrap;
}

.legal-table td {
    padding: 0.7rem 0.9rem;
    color: #cbd5e1;
    border-bottom: 1px solid var(--line);
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

.legal-table td:not(:first-child) {
    text-align: center;
    white-space: nowrap;
    color: #fff;
    font-weight: 600;
}

/* --------------------------- Мифы и факты ------------------------------- */
.myth-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(11, 18, 32, 0.6);
}

.myth-row {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem 1.3rem;
}

.myth-false {
    background: rgba(127, 29, 29, 0.12);
    border-bottom: 1px solid var(--line);
}

.myth-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    margin-top: 0.15rem;
}

.myth-tag-false {
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.myth-tag-true {
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

@media (max-width: 640px) {
    .legal-head {
        padding: 1rem;
    }

    .myth-row {
        padding: 0.95rem 1rem;
    }
}

/* ==========================================================================
   Бегущая строка кейсов и блок гарантий
   ========================================================================== */

.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 0.9rem;
    padding: 0.35rem 0;
    animation: marquee-scroll 46s linear infinite;
    will-change: transform;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        /* Трек содержит два одинаковых набора карточек: сдвиг ровно на половину
           даёт бесшовную петлю. Учитываем gap между двумя половинами. */
        transform: translateX(calc(-50% - 0.45rem));
    }
}

.case-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 27rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(17, 26, 43, 0.7);
    padding: 0.65rem 1.2rem 0.65rem 0.7rem;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.case-chip:hover {
    border-color: rgba(200, 169, 106, 0.5);
    background: rgba(17, 26, 43, 0.95);
}

.case-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(200, 169, 106, 0.4);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    background: rgba(200, 169, 106, 0.07);
}

.case-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
    .marquee {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .marquee-track {
        animation: none;
    }
}

/* --------------------------- Гарантии ----------------------------------- */
.guarantee-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(17, 26, 43, 0.8) 0%, rgba(11, 18, 32, 0.8) 100%);
    padding: 1.5rem 1.4rem;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.guarantee-card:hover {
    border-color: rgba(200, 169, 106, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.9);
}

.guarantee-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(200, 169, 106, 0.45);
    background: rgba(200, 169, 106, 0.08);
    color: var(--gold);
}

.guarantee-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* --------------------------------------------------------------------------
   Кнопка личного кабинета в шапке.
   Мягкое золотое свечение: заметна рядом с кнопкой WhatsApp,
   но не спорит с ней за внимание. Затухает после трёх повторов,
   чтобы не мигать всё время, пока человек читает страницу.
   -------------------------------------------------------------------------- */
.cabinet-btn {
    animation: cabinet-glow 2.6s ease-in-out 1.2s 3;
}

@keyframes cabinet-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 169, 106, 0); }
    50%      { box-shadow: 0 0 0 6px rgba(200, 169, 106, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
    .cabinet-btn { animation: none; }
}
