﻿/* =========================
   Base / Theme
   ========================= */

:root {
    --font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

    /* Dark (default) */
    --bg: #0a0a0f;
    --bg2: #0f1220;
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.65);
    --muted2: rgba(255, 255, 255, 0.45);

    --card: rgba(30, 28, 39, 0.72);
    --panel: rgba(18, 16, 26, 0.72);
    --border: rgba(255, 255, 255, 0.10);

    --primary: #6366f1;
    --primary2: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.55);

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;

    --focus: 0 0 0 3px rgba(99, 102, 241, 0.35);

    /* Component tokens (default = dark) */
    --visual-bg: linear-gradient(to bottom right, rgba(99, 102, 241, 0.35), rgba(10, 10, 15, 0.90)),
    url("dark_hero.webp");
    --visual-title: rgba(255, 255, 255, 0.96);
    --visual-subtitle: rgba(255, 255, 255, 0.75);
    --modal-backdrop: rgba(10, 10, 15, 0.70);

    /* Close button tokens (default = dark) */
    --close-bg: rgba(255, 255, 255, 0.04);
    --close-bg-hover: rgba(255, 255, 255, 0.08);
    --close-border: rgba(255, 255, 255, 0.10);
    --close-icon: rgba(255, 255, 255, 0.92);

    /* Modal layout token */
    --modal-pad: 28px;

    /* =========================
       Visual bottom dim (default = dark)
       ЯВНЫЙ слой затемнения снизу (левая картинка)
       ========================= */
    /* 50% снизу: градиент от низа до середины */
    --visual-dim: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.28) 35%,
            transparent 55%
    );

    /* =========================
       Badge tokens (default = dark) — оставляем твой вид
       ========================= */
    --badge-bg: rgba(255, 255, 255, 0.16);
    --badge-border: rgba(255, 255, 255, 0.18);
    --badge-text: rgba(255, 255, 255, 0.96);
    --badge-dot: #34d399;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f8fafc;
        --bg2: #eef2ff;
        --text: rgba(10, 10, 15, 0.92);
        --muted: rgba(10, 10, 15, 0.62);
        --muted2: rgba(10, 10, 15, 0.48);

        --card: rgba(255, 255, 255, 0.85);
        --panel: rgba(255, 255, 255, 0.90);
        --border: rgba(10, 10, 15, 0.10);

        --shadow: rgba(15, 23, 42, 0.18);

        /* Component tokens for light */
        --visual-bg: linear-gradient(to bottom right, rgba(99, 102, 241, 0.18), rgba(248, 250, 252, 0.85)),
        url("light_hero.webp");
        --visual-title: rgba(10, 10, 15, 0.88);
        --visual-subtitle: rgba(10, 10, 15, 0.65);
        --modal-backdrop: rgba(15, 23, 42, 0.30);

        --visual-dim: linear-gradient(
                to top,
                rgba(248, 250, 252, 0.75) 0%,
                rgba(248, 250, 252, 0.35) 35%,
                transparent 55%
        );

        /* Close button tokens for light */
        --close-bg: rgba(10, 10, 15, 0.04);
        --close-bg-hover: rgba(10, 10, 15, 0.07);
        --close-border: rgba(10, 10, 15, 0.12);
        --close-icon: rgba(10, 10, 15, 0.82);

        --modal-pad: 28px;

        /* Badge in light (более контрастный) */
        --badge-bg: rgba(255, 255, 255, 0.85);
        --badge-border: rgba(99, 102, 241, 0.15);
        --badge-text: rgba(10, 10, 15, 0.88);
        --badge-dot: #10b981;
    }
}

/*!* Manual light theme override *!
:root[data-theme="light"] {
    --bg: #f8fafc;
    --bg2: #eef2ff;
    --text: rgba(10, 10, 15, 0.92);
    --muted: rgba(10, 10, 15, 0.62);
    --muted2: rgba(10, 10, 15, 0.48);

    --card: rgba(255, 255, 255, 0.85);
    --panel: rgba(255, 255, 255, 0.90);
    --border: rgba(10, 10, 15, 0.10);

    --shadow: rgba(15, 23, 42, 0.18);

    !* Component tokens for light *!
    --visual-bg:
            linear-gradient(to bottom right, rgba(99, 102, 241, 0.18), rgba(248, 250, 252, 0.85)),
            url("light_hero.webp");
    --visual-title: rgba(10, 10, 15, 0.88);
    --visual-subtitle: rgba(10, 10, 15, 0.65);
    --modal-backdrop: rgba(15, 23, 42, 0.30);

    --visual-dim: linear-gradient(
            to top,
            rgba(248, 250, 252, 0.75) 0%,
            rgba(248, 250, 252, 0.35) 35%,
            transparent 55%
    );

    !* Close button tokens for light *!
    --close-bg: rgba(10, 10, 15, 0.04);
    --close-bg-hover: rgba(10, 10, 15, 0.07);
    --close-border: rgba(10, 10, 15, 0.12);
    --close-icon: rgba(10, 10, 15, 0.82);

    --modal-pad: 28px;

    !* Badge in light *!
    --badge-bg: rgba(255, 255, 255, 0.85);
    --badge-border: rgba(99, 102, 241, 0.15);
    --badge-text: rgba(10, 10, 15, 0.88);
    --badge-dot: #10b981;
}

!* Manual dark theme override *!
:root[data-theme="dark"] {
    --bg: #0a0a0f;
    --bg2: #0f1220;
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.65);
    --muted2: rgba(255, 255, 255, 0.45);

    --card: rgba(30, 28, 39, 0.72);
    --panel: rgba(18, 16, 26, 0.72);
    --border: rgba(255, 255, 255, 0.10);

    --shadow: rgba(0, 0, 0, 0.55);

    !* Component tokens for dark *!
    --visual-bg:
            linear-gradient(to bottom right, rgba(99, 102, 241, 0.35), rgba(10, 10, 15, 0.90)),
            url("dark_hero.webp");
    --visual-title: rgba(255, 255, 255, 0.96);
    --visual-subtitle: rgba(255, 255, 255, 0.75);
    --modal-backdrop: rgba(10, 10, 15, 0.70);

    !* Dark dim — как в root (сильнее) *!
    --visual-dim: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.28) 35%,
            transparent 55%
    );

    !* Badge — как у тебя *!
    --badge-bg: rgba(255, 255, 255, 0.16);
    --badge-border: rgba(255, 255, 255, 0.18);
    --badge-text: rgba(255, 255, 255, 0.96);
    --badge-dot: #34d399;

    !* Close button tokens for dark *!
    --close-bg: rgba(255, 255, 255, 0.04);
    --close-bg-hover: rgba(255, 255, 255, 0.08);
    --close-border: rgba(255, 255, 255, 0.10);
    --close-icon: rgba(255, 255, 255, 0.92);

    --modal-pad: 28px;
}*/

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

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Фоновые пятна/свечение */
.bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(900px at 15% 15%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(800px at 80% 85%, rgba(139, 92, 246, 0.18), transparent 58%),
    radial-gradient(520px at 70% 10%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
    filter: saturate(1.05);
    transition: background 0.3s ease;
}

/* =========================
   Theme Switcher
   ========================= */

/*.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px var(--shadow);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}

.theme-btn .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: "wght" 400, "FILL" 0, "opsz" 20;
}

.theme-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.theme-btn.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.theme-btn:focus-visible {
    box-shadow: var(--focus);
}

@media (max-width: 640px) {
    .theme-switcher {
        top: 12px;
        right: 12px;
        gap: 4px;
        padding: 4px;
    }

    .theme-btn {
        width: 36px;
        height: 36px;
    }
}*/

/* =========================
   Layout
   ========================= */

.page {
    min-height: 100vh; /* fallback */
    min-height: 100dvh; /* iOS/современные браузеры — корректно с панелями */

    display: flex;
    align-items: center;
    justify-content: center;

    padding-top: calc(24px + env(safe-area-inset-top));
    padding-right: calc(24px + env(safe-area-inset-right));
    padding-left: calc(24px + env(safe-area-inset-left));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}


/* Модификатор для страниц с длинным контентом (политика, FAQ и т.д.) */
.page--content {
    flex-direction: column;
}

.card {
    width: min(1024px, 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 30px 90px var(--shadow);
    backdrop-filter: blur(14px);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
    .card {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .page--content {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* =========================
   Left Visual
   ========================= */

.visual {
    position: relative;
    min-height: 500px;
    background-image: var(--visual-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* ВАЖНО: отдельный слой затемнения снизу (50% снизу) */
.visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--visual-dim);
    pointer-events: none;
    z-index: 0;
}

/* твои "пятна" оставляю, но они теперь поверх dim */
.visual__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px at 20% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
    radial-gradient(700px at 70% 90%, rgba(0, 0, 0, 0.25), transparent 60%);
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

.visual__content {
    position: relative;
    z-index: 2; /* над dim и overlay */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
}

.material-symbols-outlined {
    visibility: hidden;
}

.fonts-loaded .material-symbols-outlined {
    visibility: visible;
}


@media (max-width: 860px) {
    .visual {
        min-height: clamp(230px, 36vh, 440px); /* меньше */
    }

    .visual__content {
        padding: 32px;
    }
}

/* Badge — как у тебя в dark (через токены) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--badge-text);
}

.badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--badge-dot);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.visual__title {
    margin: 8px 0 0 0;
    font-size: clamp(36px, 4.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 900;
    color: var(--visual-title);
}

.visual__subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--visual-subtitle);
    max-width: 36ch;
}

/* =========================
   Right Panel
   ========================= */

.panel {
    background: var(--panel);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 860px) {
    .panel {
        padding: 32px 24px;
    }
}

.panel__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.brand__logo {
    width: 32px;
    height: 32px;

    display: block;
    object-fit: contain;
}


.brand__text {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.panel__subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.4;
}

/* =========================
   Role Switch (pill)
   ========================= */

.role-switch {
    /* единые параметры, чтобы не ломалось от padding/gap */
    --pad: 5px;
    --gap: 8px;

    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    padding: var(--pad);

    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--border);

    overflow: hidden;
    isolation: isolate;
}

.role-switch__pill {
    position: absolute;
    top: var(--pad);
    bottom: var(--pad);
    left: var(--pad);

    width: calc((100% - (var(--pad) * 2) - var(--gap)) / 2);

    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary2));

    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.28);
    z-index: 0;
}

.role-switch[data-role="seller"] .role-switch__pill {
    transform: translateX(calc(100% + var(--gap)));
}

.role-switch__btn {
    position: relative;
    z-index: 1;

    border: 0;
    background: transparent;

    color: var(--muted);
    font-weight: 800;
    font-size: 16px;

    padding: 12px 12px;
    cursor: pointer;

    border-radius: 999px;
    outline: none;

    transition: color 0.2s ease, opacity 0.2s ease;
}

.role-switch__btn.is-active {
    color: rgba(255, 255, 255, 0.96);
    opacity: 1;
}

.role-switch__btn:not(.is-active) {
    opacity: 0.8;
}

.role-switch__btn:focus-visible {
    box-shadow: var(--focus);
}

@media (max-width: 480px) {
    .role-switch {
        --pad: 5px;
        --gap: 6px;
    }

    .role-switch__btn {
        padding: 14px 10px;
        font-size: 14px;
    }
}

/* =========================
   Benefits (cards)
   ========================= */

.benefit-list {
    display: grid;
    gap: 16px;
    margin-top: 4px;
}

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

.benefit__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.24);
}

.material-symbols-outlined {
    font-variation-settings: "wght" 500, "FILL" 0, "opsz" 24;
    font-size: 24px;
    line-height: 1;
}

.benefit__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.benefit__title {
    margin: 0;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.benefit__text {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* =========================
   CTA / Hint / Footer
   ========================= */

.hint {
    margin: 8px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
}

.cta {
    margin-top: 8px;
    width: 100%;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 18px 20px;
    font-size: clamp(14px, 3.8vw, 16px);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    box-shadow: 0 16px 50px rgba(99, 102, 241, 0.30);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35);
}

.cta:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.cta:focus-visible {
    box-shadow: var(--focus), 0 16px 50px rgba(99, 102, 241, 0.30);
}

.cta[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.cta--modal {
    border-radius: 18px;
}

.fineprint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--muted2);
    text-align: center;
    line-height: 1.4;
}

.fineprint a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer {
    padding: 20px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    color: var(--muted2);
}

.footer__nav {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer__nav a {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

.footer__nav a:hover {
    text-decoration: underline;
    color: var(--muted);
}

/* =========================
   Modal
   ========================= */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: var(--modal-backdrop);
    backdrop-filter: blur(12px);
    z-index: 50;
    animation: fadeIn 0.2s ease;
}

.modal.is-open {
    display: grid;
}

.modal__box {
    width: min(440px, 100%);
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 40px 130px rgba(0, 0, 0, 0.6);

    position: relative;

    /* Give the title real breathing room under the close button */
    padding: 28px;

    /* Better small-screen behavior */
    max-height: calc(100dvh - 32px);
    overflow: auto;

    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal__close {
    position: absolute;
    top: var(--modal-pad);
    right: var(--modal-pad);

    width: 44px;
    height: 44px;
    border-radius: 16px;

    display: grid;
    place-items: center;

    border: 1px solid var(--close-border);
    background: var(--close-bg);
    color: var(--close-icon);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.08s ease;
}

.modal__close:hover {
    background: var(--close-bg-hover);
}

.modal__close:active {
    transform: scale(0.98);
}

.modal__close:focus-visible {
    box-shadow: var(--focus);
}

.modal__title {
    margin: 0 0 10px 0;
    font-size: clamp(24px, 5vw, 32px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.02em;
    padding-right: 40px;
}

.modal__subtitle {
    margin: 0 0 24px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.field {
    display: grid;
    gap: 8px;
    margin: 0 0 16px 0;
}

.field__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

input[type="email"] {
    width: 100%;
    padding: 16px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    outline: none;
    font-size: 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="email"]::placeholder {
    color: var(--muted2);
}

input[type="email"]:focus-visible {
    box-shadow: var(--focus);
    border-color: var(--primary);
}

.checkbox {
    position: relative; /* чтобы hidden input не улетал */
    display: flex;
    align-items: flex-start;
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 20px; /* вместо 1.4 (19.6px) */
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox span {
    position: relative;
    padding-left: 26px;
    flex: 1;
}

/* квадрат */
.checkbox input[type="checkbox"] + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    box-sizing: border-box; /* КЛЮЧЕВО: border входит в размер */
    border-radius: 5px;
    border: 2px solid var(--border); /* лучше целое, чем 1.5 */
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

/* checked квадрат */
.checkbox input[type="checkbox"]:checked + span::before {
    background: transparent;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* галочка — центрируем от квадрата, а не "на глаз" */
.checkbox input[type="checkbox"]:checked + span::after {
    content: "";
    position: absolute;
    left: 9px; /* центр квадрата по X: 18/2 */
    top: 9px; /* top(2px) + 18/2 */
    width: 4px;
    height: 8px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* hover/focus */
.checkbox:hover input[type="checkbox"] + span::before {
    border-color: var(--primary);
    background: transparent;
}

.checkbox input[type="checkbox"]:focus-visible + span::before {
    box-shadow: var(--focus);
}

.checkbox a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox a:hover {
    text-decoration: underline;
}


/* Success state */
.success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    border: 2px solid rgba(52, 211, 153, 0.25);
    display: grid;
    place-items: center;
}

.success__icon .material-symbols-outlined {
    font-size: 48px;
    color: #34d399;
    font-variation-settings: "wght" 600, "FILL" 1, "opsz" 48;
}

.success .modal__title {
    text-align: center;
}

.success .modal__subtitle {
    text-align: center;
}

/* =========================
   Toasts
   ========================= */

.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: grid;
    gap: 12px;
    z-index: 100;
    max-width: 380px;
}

@media (max-width: 520px) {
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

.toast {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast--success {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.08);
}

.toast--error {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

.toast--info {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.toast__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
}

.toast--success .toast__icon {
    color: #34d399;
}

.toast--error .toast__icon {
    color: #ef4444;
}

.toast--info .toast__icon {
    color: var(--primary);
}

.toast__msg {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.toast__close {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s ease;
}

.toast__close:hover {
    color: var(--text);
}

.toast.is-hiding {
    animation: toastOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastIn {
    from {
        transform: translateY(12px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastOut {
    to {
        transform: translateY(12px) scale(0.95);
        opacity: 0;
    }
}

/* =========================
   Mobile compact spacing (ADAPTIVE)
   ========================= */

/* Планшет/малые ноуты: чуть плотнее */
@media (max-width: 860px) {
    .panel {
        gap: 16px;
    }
}

/* Телефоны: ощутимо плотнее */
@media (max-width: 640px) {
    .page {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .page--content {
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .card {
        border-radius: 20px;
    }

    .visual {
        min-height: clamp(180px, 28vh, 300px);
    }

    .visual__content {
        padding: 16px;
        gap: 10px;
        justify-content: center;
    }

    .badge {
        padding: 8px 12px;
        font-size: 12px;
    }

    .visual__title {
        margin-top: 4px;
        font-size: clamp(28px, 7.2vw, 40px);
        line-height: 1.06;
    }

    .visual__subtitle {
        font-size: 16px;
        line-height: 1.4;
        max-width: 42ch;
    }

    .panel {
        padding: 22px;
        gap: 14px;
    }

    .panel__header {
        gap: 8px;
    }

    .brand__logo {
        width: 26px;
        height: 26px;
    }

    .brand__text {
        font-size: 26px;
    }

    .panel__subtitle {
        font-size: 14px;
        line-height: 1.35;
    }

    .benefit-list {
        gap: 12px;
    }

    .benefit {
        grid-template-columns: 44px 1fr;
        gap: 12px;
    }

    .benefit__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .benefit__title {
        font-size: 16px;
    }

    .benefit__text {
        font-size: 14px;
        line-height: 1.45;
    }

    .cta {
        padding: 16px 18px;
    }

    .fineprint {
        margin-top: 10px;
        font-size: 11px;
        line-height: 1.45;
    }

    .footer {
        padding: 16px 18px;
    }

    .footer__nav {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .modal {
        padding: 12px;
        align-items: center;
    }

    .modal__box {
        padding: 20px;
        border-radius: 24px;
        max-height: calc(100dvh - 24px);
        width: 100%;
    }

    .modal__close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 22px;
    }

    .modal__title {
        margin-bottom: 8px;
        padding-right: 40px;
    }

    .modal__subtitle {
        margin-bottom: 20px;
        font-size: 14px;
        line-height: 1.45;
    }

    input[type="email"] {
        padding: 14px;
        font-size: 15px;
        border-radius: 12px;
    }

    .checkbox {
        font-size: 13px;
        line-height: 18px;
        margin-bottom: 16px;
    }

    .checkbox span {
        padding-left: 24px;
    }

    .checkbox input[type="checkbox"] + span::before {
        top: 2px;
        width: 16px;
        height: 16px;
        box-sizing: border-box;
        border-radius: 4px;
        border-width: 2px;
    }

    .checkbox input[type="checkbox"]:checked + span::after {
        left: 8px; /* 16/2 */
        top: 9px; /* 2 + 16/2 */
        width: 4px;
        height: 7px;
        border-width: 0 2px 2px 0;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .footer__nav a {
        font-size: 12px;
    }
}

/* =========================
   Privacy Page
   ========================= */

.privacy-content {
    max-width: 680px;
    margin: 0 auto 40px;
    line-height: 1.65;
    font-size: 15px;
    color: var(--text);
    padding: 20px 20px;
}

.privacy-content h1 {
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 800;
    text-align: center;
    margin: 0 0 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.privacy-content h2,
.privacy-content h3 {
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text);
}

.privacy-content h2 {
    font-size: 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.privacy-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.privacy-content h3 {
    font-size: 19px;
    font-weight: 600;
}

.privacy-content p {
    margin-bottom: 16px;
    color: var(--muted);
}

.privacy-content ul {
    padding-left: 24px;
    margin-bottom: 20px;
}

.privacy-content li {
    margin-bottom: 10px;
    position: relative;
    color: var(--muted);
}

.privacy-content li::marker {
    color: var(--primary);
}

.privacy-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.privacy-content a:hover {
    color: var(--primary2);
    text-decoration-thickness: 2px;
}

.privacy-content strong {
    color: var(--text);
    font-weight: 600;
}

.privacy-content code {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.back-button {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 14px 32px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    text-decoration: none;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.back-button:active {
    transform: translateY(0);
}

.back-button:focus-visible {
    box-shadow: var(--focus), 0 8px 24px rgba(99, 102, 241, 0.25);
}

/* Privacy page mobile */
@media (max-width: 640px) {
    .privacy-content {
        padding: 0 16px;
        font-size: 14px;
        margin-bottom: 32px;
    }

    .privacy-content h1 {
        font-size: clamp(24px, 8vw, 32px);
        margin-bottom: 24px;
    }

    .privacy-content h2 {
        font-size: 20px;
        margin-top: 36px;
        padding-top: 20px;
    }

    .privacy-content h3 {
        font-size: 17px;
    }

    .privacy-content ul {
        padding-left: 20px;
    }

    .back-button {
        margin-bottom: 32px;
        padding: 12px 28px;
        font-size: 15px;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 380px) {
    .visual__content {
        padding: 16px;
    }

    .panel {
        padding: 16px;
    }

    .brand__text {
        font-size: 24px;
    }

    .cta {
        padding: 14px;
        font-size: 15px;
    }

    .modal__box {
        padding: 16px;
    }

    .modal__close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .checkbox {
        font-size: 12px;
    }
}

/* =========================
   404 Page
   (под разметку: .page.page--content + .badge + h1 + .subtitle + .back-button)
   ========================= */

.page--404 {
    flex-direction: column;
    text-align: center;
    gap: 18px;
    max-width: 720px;
    margin: 0 auto;
}

/* Бейдж "Ошибка 404" — компактный, без точки */
.page--404 > .badge {
    margin: 0 auto;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* Заголовок 404 */
.page--404 h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    font-weight: 900;
    margin: 0;
    color: var(--text);
}

/* Подзаголовок */
.subtitle {
    font-size: 16px;
    line-height: 1.55;
    color: var(--muted);
}

/* Кнопка "назад" — как CTA, но спокойнее по размеру */


/* Мобилка */
@media (max-width: 640px) {
    .page--404 {
        gap: 14px;
    }

    .subtitle {
        font-size: 15px;
    }
}

