/* ===== Шрифты ===== */

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "bootstrap-icons";
    src: url("../fonts/bootstrap-icons.woff2") format("woff2");
    font-display: block;
}

/* ===== Цвета и размеры (те же, что в программе: src/ui/theme.py) ===== */

:root {
    --bg: #111117;
    --surface: #16161e;
    --card: #1b1b25;
    --border: #272735;
    --border-strong: #363648;
    --control: #232330;
    --control-hover: #2c2c3c;
    --text: #ececf3;
    --muted: #8c8ca3;
    --accent: #9b7bf7;
    --accent-hover: #ac91f9;
    --accent-pressed: #8a67f0;
    --accent-soft: rgba(155, 123, 247, 0.14);
    --success: #4cc38a;
    /* Кнопка с белым текстом: тот же фиолетовый, но темнее, чтобы контраст был не ниже 4.5:1 */
    --accent-fill: #7a5ae6;
    --accent-fill-hover: #8464e9;
    --accent-fill-pressed: #6f4fdc;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --radius: 14px;
    --radius-small: 10px;
    --container: 1160px;
    --gutter: 24px;
    --header-height: 68px;

    color-scheme: dark;
}

/* ===== Основа ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Подвал прижат к низу окна и на коротких страницах (ключ, оплата, ошибка) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
}

.bi {
    font-family: "bootstrap-icons";
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline-block;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container--narrow {
    max-width: 820px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ===== Кнопки ===== */

.btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    /* <button> не наследует шрифт сам — без этого «Купить PRO» рисуется системным Arial */
    font-family: inherit;
    font-weight: 500;
    line-height: 24px;
    white-space: nowrap;
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--accent-fill);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-fill-hover);
}

.btn--primary:active {
    background: var(--accent-fill-pressed);
}

.btn--ghost {
    background: var(--control);
    border-color: var(--border-strong);
}

.btn--ghost:hover {
    background: var(--control-hover);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn--primary:disabled:hover {
    background: var(--accent-fill);
}

.btn--small {
    padding: 6px 16px;
    font-size: 14px;
    line-height: 22px;
}

.btn--large {
    padding: 12px 24px;
    font-size: 16px;
}

/* ===== Шапка ===== */

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: var(--header-height);
    background: rgba(17, 17, 23, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
}

.brand__logo {
    border-radius: 50%;
}

.nav {
    display: flex;
    gap: 28px;
    margin-right: auto;
    font-size: 15px;
    color: var(--muted);
}

.nav a {
    white-space: nowrap;
}

.nav a {
    transition: color 0.15s var(--ease);
}

.nav a:hover {
    color: var(--text);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.lang-switch button {
    padding: 2px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.lang-switch button:hover {
    color: var(--text);
}

.lang-switch button[aria-pressed="true"] {
    background: var(--control-hover);
    color: var(--text);
}

/* ===== Первый экран ===== */

.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 64px;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 56px;
}

/* Тихая подпись над заголовком: просто текст, без плашки */
.eyebrow {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}

.hero__title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.hero__lead {
    margin-top: 20px;
    max-width: 520px;
    color: var(--muted);
    font-size: 18px;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* Версия и требования: моноширинная мета, как пути файлов в сценах */
.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 16px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

/* ===== Схематичное окно программы ===== */

.mock {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    font-size: 13px;
    user-select: none;
}

.mock__titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.mock__titlebar img {
    border-radius: 50%;
}

.mock__body {
    display: grid;
    grid-template-columns: 196px 1fr;
    min-height: 330px;
}

.mock__sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 8px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.mock__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock__item .bi {
    font-size: 14px;
}

.mock__item--active {
    background: var(--accent-soft);
    color: var(--text);
}

.mock__item--active .bi {
    color: var(--accent);
}

.mock__item--bottom {
    margin-top: auto;
}

.mock__main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.mock__title {
    font-size: 18px;
    font-weight: 600;
}

.mock__drop {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-small);
}

.mock__drop > .bi {
    font-size: 24px;
    color: var(--accent);
}

.mock__file {
    font-weight: 500;
}

.mock__hint {
    color: var(--muted);
    font-size: 12px;
}

.mock__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.mock__label {
    color: var(--muted);
}

.mock__chip {
    padding: 2px 10px;
    background: var(--control);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.mock__progress {
    margin-top: auto;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.mock__progress-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mock__count {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mock__bar {
    height: 6px;
    background: var(--control);
    border-radius: 999px;
    overflow: hidden;
}

/* Прогресс анимируется через transform, а не width: без перерасчёта раскладки */
.mock__bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: inherit;
    transform: scaleX(0.74);
    transform-origin: left center;
    animation: progress 6s var(--ease) infinite;
}

@keyframes progress {
    0% { transform: scaleX(0.18); }
    70% { transform: scaleX(0.96); }
    100% { transform: scaleX(0.96); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .mock__bar-fill {
        animation: none;
    }
}

/* ===== Секции ===== */

.section {
    padding: 96px 0;
}

.section--alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section__title {
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    text-wrap: balance;
}

.section__lead {
    max-width: 600px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 17px;
    text-align: center;
}

/* ===== Возможности: ряды «текст + сцена», стороны чередуются ===== */

/* Свечение за сценами не должно давать горизонтальный скролл на узких экранах */
#features {
    overflow-x: clip;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 96px;
    margin-top: 64px;
}

.feature {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 64px;
}

/* В чётных рядах текст справа, сцена слева */
.feature:nth-child(even) {
    grid-template-columns: 1.15fr 1fr;
}

.feature:nth-child(even) .feature__content {
    order: 2;
}

.feature__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Иконка возможности: тихая, цвета вторичного текста, без плитки */
.feature__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--muted);
    font-size: 20px;
}

.feature__title {
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.25;
    font-weight: 600;
}

.feature__text {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16px;
}

.feature__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.feature__list li {
    display: flex;
    gap: 10px;
}

.feature__list .bi {
    margin-top: 4px;
    color: var(--muted);
}

/* ----- Сцена: схематичный кусок интерфейса ----- */

.scene {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    user-select: none;
}

.scene__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 13px;
}

/* Счётчик в шапке сцены: тихий моноширинный текст, а не пилюля */
.scene__chip {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.scene__chip--accent {
    color: var(--accent-hover);
}

/* Сцена «что-то → результат»: два блока и стрелка между ними */
.scene--flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.scene__arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: var(--control);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: 50%;
    font-size: 18px;
}

/* Перевод мода: карточки модов */
.mod-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px;
    background: var(--bg);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-small);
}

.mod-card--result {
    border: 1px solid rgba(155, 123, 247, 0.45);
}

.mod-card__tile {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    background: var(--control);
    color: var(--muted);
    border-radius: 10px;
    font-size: 20px;
}

.mod-card--result .mod-card__tile {
    background: var(--accent-soft);
}

.mod-card__tile img {
    border-radius: 50%;
}

.mod-card__name {
    font-weight: 600;
    line-height: 1.35;
}

.mod-card__meta {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.mod-card__files {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.mod-card__files li {
    display: flex;
    gap: 6px;
    overflow-wrap: anywhere;
}

.mod-card__files .bi {
    margin-top: 2px;
    color: var(--success);
}

/* Глоссарий: таблица терминов */
.terms {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.terms li {
    display: grid;
    grid-template-columns: 96px 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.terms__type {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
}

.terms__from {
    color: var(--muted);
}

.terms__arrow {
    color: var(--muted);
}

.terms__to {
    font-weight: 500;
}

/* Обновление: строки файла, новые подсвечены */
.diff {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.diff li {
    display: grid;
    grid-template-columns: 18px minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
}

.diff code,
.code {
    font-family: var(--mono);
    font-size: 12px;
}

.diff code,
.diff li > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diff__mark {
    color: var(--muted);
    font-weight: 500;
    text-align: center;
}

.diff li.diff__new {
    background: var(--accent-soft);
    border-color: rgba(155, 123, 247, 0.4);
    color: var(--text);
}

.diff__new .diff__mark {
    color: var(--accent-hover);
    font-size: 16px;
    line-height: 1;
}

/* Извлечение: дерево файлов и строки оригинала */
.scene--split {
    display: grid;
    gap: 16px;
}

.tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tree li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px calc(8px + var(--depth, 0) * 20px);
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

.tree .bi {
    color: var(--muted);
    font-size: 14px;
}

.tree__active .bi {
    color: var(--accent);
}

.tree__root {
    color: var(--text) !important;
    font-weight: 500;
}

.tree__active {
    background: var(--accent-soft);
    color: var(--text) !important;
}

.code {
    margin: 0;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.code__tag {
    color: var(--accent-hover);
}

.code__str {
    color: var(--success);
}

/* Текст из DLL: те же строки в интерфейсе игры */
.game-ui {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
}

.game-ui__caption {
    width: 100%;
    color: var(--muted);
    font-size: 12px;
}

.game-ui__label {
    width: 100%;
    font-weight: 500;
    font-size: 14px;
}

.game-ui__button {
    padding: 4px 12px;
    background: var(--control);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-weight: 500;
}

.game-ui__message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--control);
    border-radius: 6px;
    color: var(--text);
    font-weight: 500;
}

.game-ui__message .bi {
    color: var(--success);
}

/* Картинки: до и после */
.shot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
}

.shot figcaption {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.shot__art {
    position: relative;
    display: grid;
    place-items: end center;
    aspect-ratio: 4 / 3;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    /* Условный пейзаж с превью мода: пыльный закат над холмами рубежа */
    background:
        radial-gradient(circle at 74% 30%, #f1c584 0 9%, transparent 10%),
        radial-gradient(ellipse 70% 40% at 20% 100%, #2a2522 0 98%, transparent 100%),
        radial-gradient(ellipse 80% 45% at 85% 105%, #1f1c1b 0 98%, transparent 100%),
        linear-gradient(180deg, #2c2e36 0%, #5e4b44 55%, #b4835a 100%);
}

.shot__caption {
    padding: 5px 10px;
    background: rgba(17, 17, 23, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.shot--after .shot__art {
    border-color: rgba(155, 123, 247, 0.6);
}

.shot--after .shot__caption {
    border-color: rgba(155, 123, 247, 0.6);
    color: #fff;
}

/* Общая карточка: на сайте больше не используется, но на неё опирается админка (admin.css) */
.card {
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.card__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card__title {
    font-size: 17px;
    line-height: 1.3;
    font-weight: 600;
}

/* На узких экранах сцена встаёт под текст */
@media (max-width: 900px) {
    .features {
        gap: 72px;
        margin-top: 48px;
    }

    .feature,
    .feature:nth-child(even) {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .feature:nth-child(even) .feature__content {
        order: 0;
    }
}

@media (max-width: 480px) {
    .scene {
        padding: 16px;
    }

    .scene--flow {
        gap: 8px;
    }

    .scene__arrow {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .mod-card {
        padding: 12px;
    }

    /* Карточки модов друг под другом, стрелка вниз */
    .scene--mods {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
    }

    .scene--mods .scene__arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .shot__art {
        padding: 8px;
    }

    .shot__caption {
        padding: 4px 6px;
        font-size: 10px;
        letter-spacing: 0.02em;
        white-space: normal;
        text-align: center;
    }

    .terms li {
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
        padding: 8px 12px;
    }

    .terms__type {
        display: none;
    }

    .diff li {
        grid-template-columns: 14px minmax(0, 1fr);
        gap: 4px 10px;
    }

    .diff li > span:last-child {
        grid-column: 2;
    }
}

/* ===== Шаги ===== */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

/* Номер стоит в одной строке с заголовком, описание — под ними на всю ширину */
.step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    align-content: start;
    column-gap: 12px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Номер шага: моноширинная цифра в тонком кольце */
.step__num {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: 50%;
    font-family: var(--mono);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.step__title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.step__text {
    grid-column: 1 / -1;
    margin-top: 12px;
    color: var(--muted);
    font-size: 15px;
}

/* Плашка о бесплатных моделях под шагами */
.free-note {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

.free-note__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 10px;
    font-size: 20px;
}

.free-note__title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.free-note__text {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}

.free-note__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.free-note__list li {
    display: flex;
    gap: 10px;
}

.free-note__list .bi {
    margin-top: 4px;
    color: var(--muted);
}

@media (max-width: 560px) {
    .free-note {
        flex-direction: column;
        gap: 16px;
    }
}

/* ===== Преимущества ===== */

.perks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.perk {
    display: flex;
    gap: 16px;
}

.perk__icon {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--muted);
    font-size: 20px;
}

.perk__title {
    font-size: 17px;
    font-weight: 600;
}

.perk__text {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}

/* ===== Языки ===== */

.languages {
    margin-top: 64px;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.languages__title {
    font-size: 18px;
    font-weight: 600;
}

.languages__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.languages__list li {
    padding: 4px 12px;
    background: var(--control);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}

/* ===== Вопросы ===== */

.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}

.faq__item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.faq__item[open] {
    border-color: var(--border-strong);
}

.faq__item summary {
    position: relative;
    padding: 16px 52px 16px 20px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

/* Стрелка chevron-down из Bootstrap Icons */
.faq__item summary::after {
    content: "\f282";
    position: absolute;
    top: 50%;
    right: 20px;
    font-family: "bootstrap-icons";
    color: var(--muted);
    transform: translateY(-50%);
    transition: transform 0.2s var(--ease);
}

.faq__item[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq__item p {
    padding: 0 20px 16px;
    color: var(--muted);
    font-size: 15px;
}

/* ===== Призыв скачать ===== */

.cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.cta__title {
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* ===== Подвал ===== */

.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.footer__links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer__links a,
.footer__legal a {
    transition: color 0.15s var(--ease);
}

.footer__links a:hover {
    color: var(--text);
}

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.footer__legal a:hover {
    color: var(--text);
}

/* ===== PRO ===== */

/* Метка PRO у возможности: тихий текст в тонкой рамке */
.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 0 6px;
    border: 1px solid var(--border-strong);
    color: var(--muted);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    vertical-align: middle;
}

.currency-switch {
    display: flex;
    width: fit-content;
    margin: 32px auto 0;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.currency-switch label {
    position: relative;
    cursor: pointer;
}

/* Сама радиокнопка скрыта визуально, но остаётся доступной с клавиатуры */
.currency-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.currency-switch span {
    display: block;
    padding: 4px 16px;
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.currency-switch label:hover span {
    color: var(--text);
}

.currency-switch input:checked + span {
    background: var(--control-hover);
    color: var(--text);
}

.currency-switch input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 380px));
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.plan {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.plan--pro {
    border-color: var(--accent);
}

.plan__name {
    font-size: 20px;
    font-weight: 600;
}

.plan__price {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.plan__once {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
}

.plan__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 auto;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.plan__list li {
    display: flex;
    gap: 10px;
}

.plan__list .bi {
    margin-top: 4px;
    color: var(--muted);
}

.plan form,
.plan .btn {
    width: 100%;
}

.pro__note {
    max-width: 600px;
    margin: 24px auto 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

/* ===== Страницы покупки ===== */

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.panel__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
    font-size: 26px;
}

.panel__icon--success {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
}

.panel__title {
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.2;
    font-weight: 600;
    text-wrap: balance;
}

.panel__text {
    color: var(--muted);
}

.panel__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--control);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
}

.license-key {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: var(--bg);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-small);
}

.license-key__value {
    font-family: var(--mono);
    font-size: clamp(17px, 4.4vw, 22px);
    font-weight: 600;
    letter-spacing: 0.06em;
    user-select: all;
    overflow-wrap: anywhere;
}

.notice {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: var(--radius-small);
    color: #f5d97a;
    font-size: 14px;
    text-align: left;
}

.notice .bi {
    flex-shrink: 0;
    margin-top: 3px;
}

/* ===== Контакты, политика, оферта ===== */

/* Юридический текст хранится на двух языках, показывается версия выбранного (lang у html ставит main.js) */
html:not([lang="ru"]) .only-ru,
html[lang="ru"] .only-en {
    display: none;
}

.plan__legal {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.plan__email {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    text-align: left;
}

.plan__email-label {
    font-size: 14px;
    font-weight: 500;
}

.plan__email input {
    width: 100%;
    padding: 12px 16px;
    background: var(--control);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    line-height: 22px;
    transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.plan__email input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.plan__email input:hover {
    background: var(--control-hover);
}

.plan__email input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.plan__email input:user-invalid {
    border-color: #f87171;
}

.plan__email-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.plan__legal input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.plan__legal a,
.legal a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.plan__legal a:hover,
.legal a:hover {
    color: var(--accent-hover);
}

.legal {
    overflow-wrap: break-word;
}

.legal__title {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 600;
    text-wrap: balance;
}

.legal__lead,
.legal__updated {
    margin-top: 12px;
    color: var(--muted);
}

.legal__updated {
    font-size: 14px;
}

.legal h2 {
    margin: 36px 0 12px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
    margin-top: 12px;
}

.legal ul {
    margin: 0;
    padding-left: 22px;
}

.legal li + li {
    margin-top: 6px;
}

.legal code {
    padding: 1px 6px;
    background: var(--control);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.9em;
}

.legal__note {
    margin-top: 24px;
    color: var(--muted);
    font-size: 14px;
}

.legal__details {
    display: grid;
    gap: 1px;
    margin: 32px 0 0;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.legal__details div {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 1fr;
    gap: 4px 16px;
    padding: 14px 20px;
    background: var(--card);
}

.legal__details dt {
    color: var(--muted);
}

.legal__details dd {
    margin: 0;
    font-weight: 600;
}

.legal__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 24px;
}

@media (max-width: 480px) {
    .legal__details div {
        grid-template-columns: 1fr;
    }
}

/* ===== Адаптивность ===== */

@media (max-width: 1024px) {
    .header__inner {
        gap: 20px;
    }

    .nav {
        gap: 18px;
        font-size: 14px;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero__text {
        text-align: center;
    }

    .hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__buttons,
    .hero__meta {
        justify-content: center;
    }

    .mock {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
    }
}

/* Пока навигация видна, кнопке «Скачать» в шапке хватает иконки */
@media (min-width: 761px) and (max-width: 900px) {
    .header__inner {
        gap: 16px;
    }

    .nav {
        gap: 14px;
        font-size: 13px;
    }

    .header .btn--small span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 760px) {
    :root {
        --gutter: 16px;
        --header-height: 60px;
    }

    .nav {
        display: none;
    }

    .header__inner {
        justify-content: space-between;
        gap: 12px;
    }

    .hero {
        padding: 56px 0 48px;
    }

    .section {
        padding: 64px 0;
    }

    .steps,
    .perks,
    .plans {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 32px 20px;
    }

    .mock__body {
        grid-template-columns: 1fr;
    }

    .mock__sidebar {
        display: none;
    }

    .languages {
        padding: 24px 16px;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .header__inner,
    .header__actions {
        gap: 8px;
    }

    .brand {
        gap: 8px;
        font-size: 16px;
    }

    .lang-switch button {
        padding: 4px 8px;
    }

    .plans {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan {
        padding: 24px 20px;
    }

    .plan .btn {
        white-space: normal;
    }

    /* На узких экранах в шапке остаётся только иконка скачивания */
    .header .btn--small span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .hero__buttons .btn {
        width: 100%;
    }
}

/* Совсем узкие экраны: от бренда в шапке остаётся логотип */
@media (max-width: 340px) {
    .brand__name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
