/* subscribe.css — страница /subscribe.
 * Большинство классов (.pricing-card, .pricing-grid, .faq-item, .nav, .footer)
 * берётся из style.css — здесь только то, чего на лендинге нет:
 * draggable period-slider, models filter tabs, models grid. */

body.sub-page {
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
}

.sub-main {
    padding-top: 56px;     /* отступ под фиксированный nav */
}

.sub-hero-section {
    padding-top: 28px;
    padding-bottom: 12px;
}

/* ── Active link в nav ────────────────────────────────────────────── */
.nav-links a.is-current {
    color: var(--text);
    position: relative;
}
.nav-links a.is-current::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

/* ── Period slider — настоящий draggable input range ──────────────── */
.period-slider-block {
    max-width: 680px;
    margin: 24px auto 40px;
    text-align: center;
}
.period-display {
    margin-bottom: 18px;
}
.period-display-label {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    transition: opacity .15s ease;
    line-height: 1.2;
}
.period-display-savings {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #4ade80;
    min-height: 18px;
    transition: opacity .2s ease;
}

.period-slider-wrap {
    position: relative;
    padding: 0 8px;
}

/* Сам range. Полностью кастомный — без дефолтных нативных стилей. */
.period-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    cursor: pointer;
    outline: none;
    margin: 0;
    padding: 14px 0;            /* увеличиваем hit-area вертикально */
    box-sizing: border-box;
}
/* Track — webkit */
.period-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        var(--gradient-start, #6c5ce7) 0%,
        var(--gradient-end, #00cec9) var(--slider-fill, 60%),
        rgba(124, 137, 246, 0.18) var(--slider-fill, 60%),
        rgba(124, 137, 246, 0.18) 100%);
    transition: background .25s ease;
}
.period-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(124, 137, 246, 0.18);
}
.period-slider::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6c5ce7, #00cec9);
}
/* Thumb — webkit */
.period-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 0;
    margin-top: -8px;            /* центруем относительно 6px track */
    box-shadow:
        0 0 0 6px rgba(108, 92, 231, 0.18),
        0 4px 16px rgba(108, 92, 231, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.10) inset;
    transition: transform .15s ease, box-shadow .25s ease;
    cursor: grab;
}
.period-slider:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.period-slider:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 0 0 8px rgba(108, 92, 231, 0.32),
        0 4px 16px rgba(108, 92, 231, 0.55);
}
/* Thumb — Firefox */
.period-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 0;
    box-shadow:
        0 0 0 6px rgba(108, 92, 231, 0.18),
        0 4px 16px rgba(108, 92, 231, 0.45);
    cursor: grab;
    transition: transform .15s ease;
}
.period-slider:active::-moz-range-thumb { cursor: grabbing; transform: scale(1.1); }

/* Pip-метки под слайдером (1д/3д/7д/30д/90д/180д).
 * Слайдер теперь 1..180 дней по 1 шагу — метки позиционируются абсолютно
 * на пропорциональных позициях (1d=0%, 3d=1.1%, 7d=3.4%, 30d=16.2%, 90d=49.7%, 180d=100%). */
.period-stops {
    position: relative;
    height: 22px;
    margin-top: 4px;
    user-select: none;
}
.period-stop {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.45));
    transition: color .2s ease, transform .2s ease;
    cursor: pointer;
    white-space: nowrap;
}
/* Крайние метки не наезжают на края слайдера */
.period-stop[data-d="1"]   { transform: translateX(0); }
.period-stop[data-d="180"] { transform: translateX(-100%); }
.period-stop:hover { color: var(--text); }
.period-stop.is-active {
    color: var(--text);
    transform: translateX(-50%) translateY(-1px) scale(1.06);
}
.period-stop[data-d="1"].is-active   { transform: translateX(0)     translateY(-1px) scale(1.06); }
.period-stop[data-d="180"].is-active { transform: translateX(-100%) translateY(-1px) scale(1.06); }

/* ── Pricing cards — расширения поверх style.css ──────────────────── */
.pricing-skeleton {
    grid-column: 1 / -1;
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* «Ваш текущий план» — disabled CTA для активного тарифа */
.pricing-btn-current {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
}
body.light-theme .pricing-btn-current {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #6b6b85;
}

/* Плавный fade при смене цены */
.pricing-price,
.pricing-period,
.pricing-usehint {
    transition: opacity .15s ease;
}

/* Дополнительная подсказка под фичами — кратко «сколько даёт» */
.pricing-tokens-line {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 10px;
    text-align: center;
}
.pricing-tokens-line b { color: var(--text); font-weight: 700; }

/* ── Models filter + grid ─────────────────────────────────────────── */
.models-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 4px auto 24px;
    max-width: 720px;
}
.models-filter {
    appearance: none;
    background: rgba(15, 17, 25, 0.55);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
}
.models-filter:hover { color: var(--text); border-color: var(--border-light); }
.models-filter.is-active {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.22), rgba(0, 206, 201, 0.18));
    color: var(--text);
    border-color: rgba(108, 92, 231, 0.55);
}
body.light-theme .models-filter {
    background: #ffffff;
    color: #6b6b85;
}
body.light-theme .models-filter.is-active {
    color: #1a1a2e;
}

.models-grid-sub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.sub-model-card {
    padding: 16px 18px;
    background: rgba(15, 17, 25, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.sub-model-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-light);
    box-shadow: 0 14px 36px -16px rgba(108, 92, 231, 0.32);
}
body.light-theme .sub-model-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .sub-model-logo {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sub-model-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.sub-model-logo {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.sub-brand-ico,
.sub-brand-ico-tile {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: inherit;
    overflow: hidden;
}
.sub-brand-img {
    width: 74%;
    height: 74%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.sub-brand-svg {
    display: block;
    color: #fff;
}
.sub-model-name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sub-model-cost {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
}
.sub-model-tier {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
}
.sub-model-tier[data-tier="basic"]    { background: rgba(74,222,128,.14); color: #4ade80; border-color: rgba(74,222,128,.30); }
.sub-model-tier[data-tier="standard"] { background: rgba(96,165,250,.14); color: #60a5fa; border-color: rgba(96,165,250,.30); }
.sub-model-tier[data-tier="pro"]      { background: rgba(245,158,11,.14); color: #f59e0b; border-color: rgba(245,158,11,.30); }
.sub-model-tier[data-tier="premium"]  { background: rgba(192,132,252,.14); color: #c084fc; border-color: rgba(192,132,252,.30); }

.sub-model-desc {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 4px 0 10px;
}
.sub-model-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sub-model-flag {
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
}
.sub-model-flag-on {
    background: rgba(74,222,128,.08);
    border-color: rgba(74,222,128,.20);
    color: #4ade80;
}

/* ── Payment trust block ──────────────────────────────────────────────
 * 4 коротких карточки между pricing-grid и моделями. Снимают «а как
 * платить?», «возьмут ли деньги повторно?», «дадут ли чек?» — главные
 * стопоры конверсии на /subscribe. Стиль — нейтральный glass, не
 * перетягивает внимание с цен. */
.trust-block {
    margin: 36px auto 8px;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.trust-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    align-items: flex-start;
    transition: border-color .15s ease, background .15s ease;
}
.trust-item:hover {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.05);
}
.trust-ico {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(96,165,250,.10);
    color: #93c5fd;
    border: 1px solid rgba(96,165,250,.22);
}
.trust-meta {
    flex: 1 1 auto;
    min-width: 0;
}
.trust-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}
.trust-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}
.trust-desc a {
    color: #93c5fd;
    text-decoration: none;
    border-bottom: 1px dashed rgba(147,197,253,.4);
}
.trust-desc a:hover { color: #bfdbfe; border-bottom-color: rgba(191,219,254,.7); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .period-display-label { font-size: 22px; }
    .period-slider-block { margin: 20px auto 32px; }
    .models-filter { padding: 7px 12px; font-size: 12px; }
    .sub-model-logo { flex-basis: 32px; width: 32px; height: 32px; }
    .trust-block { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
    .trust-item { padding: 14px 14px; gap: 12px; }
    .trust-ico { flex-basis: 34px; width: 34px; height: 34px; }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pricing-price,
    .pricing-period,
    .pricing-usehint,
    .period-display-label,
    .period-display-savings,
    .period-slider::-webkit-slider-runnable-track,
    .period-slider::-webkit-slider-thumb { transition: none; }
}
