/* ─────────────────────────────────────────────────────────────
   CryVPN — стили всего сайта: главная, «О нас», оплата.
   Тёмная база, крупные градиентные пятна. Прежние styles.css,
   header.css, about.css и payment.css удалены — всё живёт здесь.
   ───────────────────────────────────────────────────────────── */

:root {
    --bg: #0a0b12;
    --bg-soft: #12141f;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.16);

    --text: #f2f4f8;
    --text-dim: rgba(242, 244, 248, 0.62);
    --text-faint: rgba(242, 244, 248, 0.38);

    --cyan: #00d4ff;
    --violet: #7c5cff;
    --gold: #f6c65b;
    --green: #34c759;

    --radius: 18px;
    --radius-sm: 12px;
    --max: 1140px;
    --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ───── Градиентные пятна фона ─────
   Один слой на всю страницу, fixed — дешевле, чем пятна в каждой секции,
   и не дёргается при скролле на мобильных */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60rem 40rem at 12% -5%, rgba(0, 212, 255, 0.16), transparent 60%),
        radial-gradient(50rem 38rem at 92% 8%, rgba(124, 92, 255, 0.15), transparent 62%),
        radial-gradient(48rem 34rem at 50% 108%, rgba(0, 212, 255, 0.08), transparent 60%);
}

.aurora::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(70% 55% at 50% 0%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 30%, transparent 100%);
}

/* ───── Промо-полоса ───── */
.promo-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.14), rgba(124, 92, 255, 0.14));
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.promo-strip a { display: flex; align-items: center; gap: 9px; min-width: 0; }
.promo-strip svg { flex-shrink: 0; }
.promo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-cta {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
    font-size: 12px;
}
.promo-close {
    flex-shrink: 0;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-dim);
    border-radius: 7px;
    padding: 3px 8px;
    cursor: pointer;
    line-height: 1;
}
.promo-close:hover { color: var(--text); border-color: var(--text-faint); }

/* ───── Шапка ───── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(10, 11, 18, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, background 0.25s;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; }

.brand-mark {
    display: block;
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

/* Градиент только на тексте: на .brand он клипался бы вместе с картинкой */
.brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav { display: flex; gap: 22px; margin-left: 12px; font-size: 14px; }
.nav a { color: var(--text-dim); transition: color 0.2s; }
.nav a:hover { color: var(--text); }

/* Бургер: до 900px шапочное меню прячется, и без него со смартфона
   нельзя было попасть ни на «О нас», ни к ценам — только долистав до подвала */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px; height: 38px;
    margin-left: 8px;
    padding: 0 9px;
    border-radius: 10px;
    border: 1px solid var(--border-bright);
    background: var(--surface);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-cta {
    margin-left: auto;
    padding: 9px 17px;
    border-radius: 10px;
    border: 1px solid var(--border-bright);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.header-cta:hover { background: var(--surface-hover); border-color: var(--cyan); }

/* ───── Кнопки ───── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 28px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn-primary {
    background: linear-gradient(120deg, var(--cyan), #0a9fd8);
    color: #04121a;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 212, 255, 0.4); }
.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-bright);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--cyan); }

/* ───── Герой ───── */
.hero { padding: 84px 0 64px; text-align: center; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    margin-bottom: 26px;
    border-radius: 999px;
    border: 1px solid rgba(52, 199, 89, 0.32);
    background: rgba(52, 199, 89, 0.09);
    color: #7ee39b;
    font-size: 13px;
    font-weight: 600;
}
.hero-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.hero h1 {
    font-size: clamp(34px, 6.2vw, 62px);
    font-weight: 800;
    margin-bottom: 20px;
}
.hero h1 .accent {
    background: linear-gradient(120deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    max-width: 620px;
    margin: 0 auto 34px;
    font-size: clamp(15px, 2.2vw, 19px);
    color: var(--text-dim);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--text-faint); }

/* ───── Полоса чисел ───── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 56px;
}
.stat {
    padding: 22px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.stat-num {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* ───── Секции ───── */
section { padding: 76px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; }
.section-head p { margin: 12px auto 0; max-width: 560px; color: var(--text-dim); }

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cyan);
}

/* ───── Карточки возможностей ───── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
    position: relative;
    padding: 26px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--border-bright); background: var(--surface-hover); }
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.22);
    color: var(--cyan);
}
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ───── Карта серверов ─────
   Не географическая карта, а созвездие точек: честнее, чем рисовать
   материки от руки, и легче по весу */
.geo {
    position: relative;
    padding: 34px 24px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border);
    overflow: hidden;
}
.geo-canvas { width: 100%; height: auto; display: block; }
.geo-canvas .link { stroke: rgba(0, 212, 255, 0.28); stroke-width: 1; fill: none; }
.geo-canvas .node-dot { fill: var(--cyan); }
.geo-canvas .node-halo { fill: rgba(0, 212, 255, 0.16); animation: halo 3s ease-in-out infinite; transform-origin: center; }
@keyframes halo { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.8; } }

.geo-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: center;
    margin-top: 26px;
}
.flag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
}
.flag-chip b { color: var(--text); font-weight: 600; }

/* ───── Цены ───── */
.plan-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin: 0 auto 32px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.plan-switch button {
    padding: 9px 22px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.plan-switch button.active { background: rgba(0, 212, 255, 0.16); color: var(--text); }
.plan-switch button.active[data-plan="premium"] { background: rgba(246, 198, 91, 0.18); color: var(--gold); }

.price-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.price-card {
    position: relative;
    padding: 24px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.22s, border-color 0.22s;
}
.price-card:hover { transform: translateY(-4px); border-color: var(--cyan); }
.price-card.best { border-color: rgba(246, 198, 91, 0.45); background: rgba(246, 198, 91, 0.05); }
.price-tag {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--gold);
    color: #221a05;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.price-term { font-size: 13px; color: var(--text-dim); }
.price-total { margin: 8px 0 2px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.price-month { font-size: 12px; color: var(--text-faint); }

.plan-note {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--text-faint);
}

/* ───── Шаги ───── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step {
    position: relative;
    padding: 26px 24px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--cyan), var(--violet));
    color: #04121a;
    font-weight: 800;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 14px; color: var(--text-dim); }
.step a { color: var(--cyan); font-weight: 600; }

/* ───── FAQ ───── */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}
.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 17px 20px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.faq-q::after {
    content: "";
    flex-shrink: 0;
    width: 9px; height: 9px;
    border-right: 2px solid var(--text-faint);
    border-bottom: 2px solid var(--text-faint);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s;
}
.faq-item.open .faq-q::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 420px; }
.faq-a > div { padding: 0 20px 18px; font-size: 14px; color: var(--text-dim); }
.faq-a a { color: var(--cyan); font-weight: 600; }

/* ───── Финальный призыв ───── */
.final {
    text-align: center;
    padding: 54px 26px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(124, 92, 255, 0.12));
    border: 1px solid var(--border-bright);
}
.final h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 12px; }
.final p { margin: 0 auto 26px; max-width: 480px; color: var(--text-dim); }

/* ───── Подвал ───── */
.site-footer {
    padding: 34px 0;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 13px;
}
.footer-inner { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ───── Баннер про куки ───── */
.cookie {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 60;
    display: flex;
    gap: 14px;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(18, 20, 31, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-bright);
    font-size: 12.5px;
    color: var(--text-dim);
}
/* Без этого баннер не закрывается: display: flex выше по приоритету, чем
   браузерное [hidden] { display: none }, и скрипт снимал атрибут впустую */
.cookie[hidden] { display: none; }

.cookie button {
    flex-shrink: 0;
    padding: 9px 18px;
    border: none;
    border-radius: 9px;
    background: var(--cyan);
    color: #04121a;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ───── Появление при скролле ───── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

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

    .nav-toggle { display: flex; }
    .header-cta { margin-left: auto; }

    /* Меню выпадает панелью под шапкой, а не прячется совсем */
    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 6px 20px 14px;
        background: rgba(10, 11, 18, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        font-size: 15px;
        display: none;
    }
    .nav.open { display: flex; }
    .nav a {
        padding: 13px 2px;
        border-bottom: 1px solid var(--border);
        color: var(--text);
    }
    .nav a:last-child { border-bottom: none; }
}

@media (max-width: 620px) {
    .hero { padding: 56px 0 44px; }
    section { padding: 56px 0; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .features, .steps { grid-template-columns: 1fr; }
    .price-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-actions .btn { width: 100%; }
    .promo-name { font-size: 12px; }
    .cookie { flex-direction: column; align-items: stretch; text-align: left; }
}

/* Уважаем системную настройку: анимации выключаются целиком */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-badge .dot, .geo-canvas .node-halo { animation: none; }
    .btn, .feature, .price-card { transition: none; }
}
