:root {
    --bg:         #0b0b0f;
    --bg2:        #111118;
    --bg3:        #1a1a24;
    --border:     #22222e;
    --accent:     #7b68ee;
    --accent-dim: rgba(123, 104, 238, 0.12);
    --accent-mid: rgba(123, 104, 238, 0.25);
    --text:       #e2e2ee;
    --text-dim:   #6a6a90;
    --text-muted: #38384a;
    --green:      #4caf88;
    --r:          12px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ─────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 56px;
    background: rgba(11, 11, 15, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 22px;
    flex: 1;
}

.nav-links a {
    color: var(--text-dim);
    font-size: 14px;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-tg {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    transition: color 0.15s;
}
.nav-tg:hover { color: #29b6f6; }

/* ── LANG SWITCHER ───────────────────────────────── */
.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

/* мост между кнопкой и дропдауном — заполняет 7px зазор */
.lang-switcher::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 7px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 9px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.lang-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 5px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
    z-index: 200;
}
.lang-switcher:hover .lang-dropdown { display: flex; }

.lang-option {
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-dim);
    transition: background 0.12s, color 0.12s;
}
.lang-option:hover { background: var(--bg3); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }

/* ── NAV LOGIN ───────────────────────────────────── */
.nav-login {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    transition: color 0.15s;
    white-space: nowrap;
}
.nav-login:hover { color: var(--text); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover {
    background: #8f7ef5;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(123, 104, 238, 0.35);
}

.btn-ghost {
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm { padding: 6px 13px; font-size: 13px; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
    padding: 110px 24px 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
    align-items: center;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.accent { color: var(--accent); }

.hero-sub {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 430px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    padding: 3px 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 12px;
    color: var(--text-dim);
}

/* ── SCREENSHOT CARDS ─────────────────────────────── */
.card-deck {
    position: relative;
    width: 100%;
    /* высота подстраивается под карточку: при ширине ~570px карточка ~530×346px */
    aspect-ratio: 800 / 525;
}

.screen-card {
    position: absolute;
    width: calc(100% - 56px);
    aspect-ratio: 800 / 525;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 14px;
    overflow: hidden;
    background: #0c0c18;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 60px rgba(0,0,0,0.65);
    transition: box-shadow 0.22s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: default;
}

.card-l { left: 0;   z-index: 3; }
.card-c { left: 28px; z-index: 2; }
.card-r { left: 56px; z-index: 1; }

.screen-card:hover {
    z-index: 99;
    box-shadow: 0 20px 80px rgba(0,0,0,0.85), 0 0 0 2px rgba(123,104,238,0.6);
}

.card-scroll {
    width: 100%;
    height: 100%;
    overflow: auto;
    scrollbar-width: none;
}
.card-scroll::-webkit-scrollbar { display: none; }

.screen-card img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* ── SECTIONS ─────────────────────────────────────── */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.section-sub {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 40px;
}

.section-sub a { color: var(--accent); }
.section-sub strong { color: var(--text); }

/* ── FEATURES ─────────────────────────────────────── */
.features { border-top: 1px solid var(--border); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 22px;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(123, 104, 238, 0.35);
    transform: translateY(-2px);
}

.feature-card-soon { opacity: 0.65; }
.feature-card-soon:hover { opacity: 0.85; }

.feature-icon {
    width: 38px; height: 38px;
    background: var(--accent-dim);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.65;
}

.badge-soon {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    border-radius: 4px;
    color: var(--accent);
}

/* ── DOWNLOAD ─────────────────────────────────────── */
.download { border-top: 1px solid var(--border); }

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 40px;
}

.download-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 28px 22px;
    text-align: center;
}

.platform-icon {
    display: flex;
    justify-content: center;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.download-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.coming-note {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}


/* ── CHANGELOG PAGE ───────────────────────────────── */
.cl-list-wrap,
.cl-version-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

/* Список версий */
.cl-list-heading { margin-bottom: 36px; }
.cl-list-heading h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.cl-list-sub { font-size: 14px; color: var(--text-muted); }

.cl-card {
    display: block;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 22px 24px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, transform 0.18s;
}
.cl-card:hover {
    border-color: rgba(123, 104, 238, 0.4);
    transform: translateY(-2px);
}
.cl-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.cl-card-version { font-size: 15px; font-weight: 800; color: var(--accent); }
.cl-card-codename { font-size: 13px; color: var(--text-dim); }
.cl-card-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.cl-card-preview { font-size: 13px; color: var(--text-dim); line-height: 1.65; margin-bottom: 12px; }
.cl-card-read { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Значок latest */
.cl-version-badge {
    font-size: 10px; font-weight: 600;
    padding: 1px 6px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    border-radius: 3px;
    color: var(--accent);
}

/* Страница версии */
.cl-breadcrumb {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    transition: color 0.15s;
}
.cl-breadcrumb:hover { color: var(--accent); }

.cl-release-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.cl-release-version {
    font-size: 30px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
    margin-bottom: 10px;
}
.cl-release-codename { font-size: 20px; color: var(--text-dim); font-weight: 400; }
.cl-release-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cl-release-date { font-size: 13px; color: var(--text-muted); }
.cl-gh-link { font-size: 12px; color: var(--accent); margin-left: auto; transition: opacity 0.15s; }
.cl-gh-link:hover { opacity: 0.7; }

/* Markdown body */
.cl-body { color: var(--text-dim); font-size: 14px; line-height: 1.75; }
.cl-body h1 { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; margin: 36px 0 12px; }
.cl-body h2 { font-size: 17px; font-weight: 700; color: var(--text); margin: 28px 0 10px; }
.cl-body h3 { font-size: 14px; font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.cl-body h4 { font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 6px; }
.cl-body p { margin-bottom: 12px; }
.cl-body ul,.cl-body ol { padding-left: 22px; margin-bottom: 12px; }
.cl-body li { margin-bottom: 4px; line-height: 1.65; }
.cl-body li > ul,.cl-body li > ol { margin-top: 4px; margin-bottom: 0; }
.cl-body strong { color: var(--text); font-weight: 600; }
.cl-body em { font-style: italic; }
.cl-body a { color: var(--accent); }
.cl-body a:hover { text-decoration: underline; }
.cl-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.cl-body code {
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--accent);
}
.cl-body pre {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 14px 0;
}
.cl-body pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 13px; }
.cl-body blockquote {
    border-left: 3px solid var(--accent-mid);
    padding: 2px 16px;
    margin: 14px 0;
    color: var(--text-muted);
    font-style: italic;
}
.cl-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.cl-body th { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; }
.cl-body td { padding: 8px 12px; border-bottom: 1px solid var(--border); }

.cl-loading,.cl-error { color: var(--text-muted); font-size: 14px; }
.cl-error a { color: var(--accent); }

.nav-link-active { color: var(--text) !important; }

@media (max-width: 700px) {
    .cl-list-wrap,.cl-version-wrap { padding: 32px 16px 60px; }
    .cl-card-date { margin-left: 0; }
}

/* ── FOOTER ───────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── PROSE (privacy, etc.) ────────────────────────── */
.prose-wrap {
    padding: 100px 24px 80px;
    min-height: calc(100vh - 120px);
}

.prose {
    max-width: 680px;
    margin: 0 auto;
}

.prose h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.prose-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.prose h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 32px 0 10px;
    color: var(--text);
}

.prose p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.75;
    margin-bottom: 12px;
}

.prose ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.prose li {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.75;
    margin-bottom: 4px;
}

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

.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }

/* ── HAMBURGER BUTTON ─────────────────────────────────── */
.nav-burger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.nav-burger:hover { background: var(--bg3); }

/* ── MOBILE MENU ──────────────────────────────────────── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    z-index: 90;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--border);
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-body {
    padding: 8px 24px 48px;
    display: flex;
    flex-direction: column;
}

.mobile-link {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    transition: color 0.15s;
}
.mobile-link:hover { color: var(--text); }

.mobile-sep {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.mobile-lang-row {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.mobile-lang {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.mobile-lang:hover { color: var(--text); border-color: rgba(255,255,255,.18); }
.mobile-lang.active { color: var(--accent); border-color: var(--accent); }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
    .features-grid,
    .download-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    /* Nav */
    .nav-links,
    .nav-login,
    .nav-cta,
    .lang-switcher { display: none; }

    .nav-logo { margin-right: auto; }
    .nav-inner { gap: 12px; }
    .nav-burger { display: flex; }
    .mobile-menu { display: block; }

    /* Hero */
    .hero { padding: 90px 20px 60px; min-height: auto; }
    .hero-inner { grid-template-columns: 1fr; gap: 0; }
    .hero-mockup { display: none; }
    .hero-text h1 { font-size: 38px; letter-spacing: -1px; }
    .hero-sub { font-size: 15px; }

    /* Sections */
    .section-inner { padding: 60px 20px; }

    /* Grids */
    .features-grid,
    .download-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-inner { flex-wrap: wrap; gap: 16px; }
    .footer-links { flex-wrap: wrap; gap: 12px; }
    .footer-copy { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
    .hero-text h1 { font-size: 32px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { text-align: center; justify-content: center; }
    .nav-inner { padding: 0 16px; }
    .section-inner { padding: 48px 16px; }
}
