/* ===== Шрифт Inter (локально, без внешних запросов) ===== */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Переменные темы ===== */
:root {
    color-scheme: dark;
    --bg: #0e1013;
    --bg-soft: #14171c;
    --card: #181c22;
    --card-hover: #1d222a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #eceef2;
    --text-dim: #9aa3b2;
    --accent: #ff7a00;
    --accent-2: #e66a00;
    --accent-soft: rgba(255, 122, 0, 0.14);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    --icon-filter: none;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --bg: #f6f7f9;
        --bg-soft: #eef0f4;
        --card: #ffffff;
        --card-hover: #fafbfc;
        --border: rgba(15, 23, 42, 0.09);
        --border-strong: rgba(15, 23, 42, 0.18);
        --text: #12161c;
        --text-dim: #566070;
        --accent-soft: rgba(255, 122, 0, 0.1);
        --shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
        --icon-filter: invert(1);
    }
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
@media (hover: hover) {
a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

img { display: block; max-width: 100%; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ===== Верхняя панель ===== */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.topbar.scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom-color: var(--border);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 68px;
}
.topbar-inner .lang { justify-self: end; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 650;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: #fff;
}
.topbar.scrolled .brand { color: var(--text); }
@media (hover: hover) {
.brand:hover { text-decoration: none; }
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

/* ===== Выбор языка ===== */
.lang { position: relative; }

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
@media (hover: hover) {
.lang-btn:hover { background: rgba(255, 255, 255, 0.2); }
}
.lang-btn:active { transform: scale(0.97); }
.topbar.scrolled .lang-btn,
.footer .lang-btn {
    color: var(--text);
    background: var(--card);
    border-color: var(--border-strong);
}
@media (hover: hover) {
.topbar.scrolled .lang-btn:hover,
.footer .lang-btn:hover { background: var(--card-hover); }
}
.lang-code { display: none; font-weight: 600; letter-spacing: 0.04em; }
.lang-btn svg { width: 18px; height: 18px; flex: none; }
.lang-btn .chev { width: 14px; height: 14px; transition: transform 0.25s var(--ease); opacity: 0.7; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    padding: 6px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.25s;
}
.lang.open .lang-menu {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s;
}
.lang-menu.up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; transform: translateY(6px) scale(0.98); }
.lang.open .lang-menu.up { transform: none; }

.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: background 0.15s;
}
@media (hover: hover) {
.lang-menu a:hover { background: var(--accent-soft); text-decoration: none; }
}
.lang-menu a[aria-current="true"] { font-weight: 600; color: var(--accent); }
.lang-menu .code { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.lang-menu a[aria-current="true"] .code { color: var(--accent); }

/* ===== Кнопки ===== */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #ff9122 0%, #ff7a00 100%);
    box-shadow: 0 8px 24px rgba(255, 122, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
@media (hover: hover) {
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 122, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
@media (hover: hover) {
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-2px); }
}

.btn svg, .btn img { width: 20px; height: 20px; flex: none; }
.btn img { filter: brightness(0) invert(1); }
.btn .arrow { transition: transform 0.25s var(--ease); }
@media (hover: hover) {
.btn-ghost:hover .arrow { transform: translateY(2px); }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.hero-bg {
    position: absolute;
    inset: -6% 0;
    z-index: -3;
    background: #0b0d10 url("plains4Kdark.jpg") center / cover no-repeat;
    filter: brightness(1.25) saturate(1.1);
    will-change: transform;
    transform: translate3d(0, 0, 0) scale(1.04);
}
.hero::before {            /* затемнение для читаемости текста */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 75%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 35%);
}
.hero::after {             /* плавный переход в фон страницы */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 46%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        color-mix(in srgb, var(--bg) 6%, transparent) 18%,
        color-mix(in srgb, var(--bg) 22%, transparent) 36%,
        color-mix(in srgb, var(--bg) 50%, transparent) 54%,
        color-mix(in srgb, var(--bg) 78%, transparent) 74%,
        color-mix(in srgb, var(--bg) 94%, transparent) 90%,
        var(--bg) 100%
    );
}

.hero-content {
    position: relative;
    padding: 120px 24px 130px;
    max-width: 820px;
    will-change: transform, opacity;
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.hero p {
    max-width: 620px;
    margin: 0 auto 38px;
    font-size: clamp(1.02rem, 2vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }


/* ===== Секции ===== */
section { position: relative; }

.section-head { text-align: center; margin-bottom: 44px; }
.section-title {
    font-size: clamp(1.6rem, 3.4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 10px;
}
.section-sub { color: var(--text-dim); font-size: 1.02rem; max-width: 560px; margin: 0 auto; }

/* ===== Статистика (слегка заходит на hero) ===== */
.stats-section { padding: 0 0 90px; margin-top: -70px; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card {
    background: var(--card);
    padding: 28px 24px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.35s var(--ease), border-color 0.25s;
}
@media (hover: hover) {
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
}
.stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    margin-bottom: 6px;
}
.stat-label { font-size: 0.92rem; color: var(--text-dim); font-weight: 500; }

/* ===== Галерея ===== */
.slider-section { padding: 30px 0 100px; }
.slider {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
}
.slider-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    box-shadow: var(--shadow);
    touch-action: pan-y;
}
.slider-track {
    display: flex;
    transition: transform 0.6s var(--ease);
    will-change: transform;
}
.slider-slide { min-width: 100%; aspect-ratio: 1982 / 1191; background: var(--bg-soft); }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }

.slider-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 17, 21, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.25s, background 0.2s, transform 0.25s var(--ease);
}
.slider-btn:focus-visible { opacity: 1; }
@media (hover: hover) {
.slider:hover .slider-btn { opacity: 1; }
}
@media (hover: hover) {
.slider-btn:hover { background: rgba(15, 17, 21, 0.85); transform: translateY(-50%) scale(1.06); }
}
.slider-btn:active { transform: translateY(-50%) scale(0.95); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-btn svg { width: 22px; height: 22px; }

.slider-meta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 20px; }
.slider-caption { color: var(--text-dim); font-size: 0.95rem; min-height: 1.5em; transition: opacity 0.25s; }
.slider-dots { display: flex; gap: 8px; }
.slider-dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    background: var(--border-strong);
    transition: width 0.35s var(--ease), background 0.25s;
}
.slider-dot.active { width: 26px; background: var(--accent); }

/* ===== Аккордеон (общий для установки и FAQ) ===== */
.accordion { display: flex; flex-direction: column; gap: 12px; margin: 0 auto; }

.acc-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
@media (hover: hover) {
.acc-item:hover { border-color: var(--border-strong); }
}
.acc-item.active {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.acc-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    text-align: left;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: var(--radius);
}
.acc-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.os-icon { width: 26px; height: 26px; object-fit: contain; filter: var(--icon-filter); flex: none; }

.tag-for-you {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.acc-arrow {
    width: 20px; height: 20px;
    flex: none;
    color: var(--text-dim);
    transition: transform 0.45s var(--ease), color 0.25s;
}
.acc-item.active .acc-arrow { transform: rotate(180deg); color: var(--accent); }

/* Плавное раскрытие без «рывков»: анимируем высоту через grid-template-rows */
.acc-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s var(--ease);
}
.acc-item.active .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; min-height: 0; }
.acc-content {
    padding: 4px 22px 22px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.45s var(--ease);
}
.acc-item.active .acc-content { opacity: 1; transform: none; transition-delay: 0.08s; }
.acc-item:not(.active) .acc-content { visibility: hidden; transition: opacity 0.2s ease, transform 0.3s var(--ease), visibility 0s 0.45s; }

.acc-content p { color: var(--text-dim); }
.acc-content p + p { margin-top: 12px; }

/* ===== Установка ===== */
.download-section { padding: 30px 0 100px; }
.download-section .accordion { max-width: 760px; }

.install-btn {
    margin-top: 18px;
    width: 100%;
    padding: 13px 24px;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, #ff9122 0%, #ff7a00 100%);
    box-shadow: 0 6px 18px rgba(255, 122, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.25s var(--ease), box-shadow 0.25s, filter 0.2s;
}
@media (hover: hover) {
.install-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 122, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
.install-btn:active { transform: scale(0.99); }
.install-btn:disabled {
    cursor: not-allowed;
    color: var(--text-dim);
    background: var(--bg-soft);
    box-shadow: inset 0 0 0 1px var(--border);
    transform: none;
}

.test-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.86rem;
    color: #e9a23b;
}
.test-notice svg { width: 16px; height: 16px; flex: none; }

.java-links { list-style: none; display: grid; gap: 10px; margin: 16px 0; }
.java-links li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    flex-wrap: wrap;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.java-links a { font-weight: 600; }
.java-links .desc { font-size: 0.86rem; color: var(--text-dim); }

.tag-opt {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

/* Ссылки, открывающиеся в новой вкладке — значок «внешняя ссылка» */
a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.82em;
    height: 0.82em;
    margin-left: 0.32em;
    vertical-align: -0.04em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s var(--ease);
}
@media (hover: hover) {
a[target="_blank"]:hover { text-decoration: none; }
}
@media (hover: hover) {
a[target="_blank"]:hover::after { transform: translate(1px, -1px); }
}

/* ===== FAQ ===== */
.faq-section { padding: 30px 0 100px; }
.faq-section .accordion { max-width: 800px; }

/* ===== Подвал ===== */
.footer {
    padding: 44px 0 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-dim);
    font-size: 0.82rem;
    text-align: center;
}
.footer-content { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.footer-text { opacity: 0.8; }
.footer-lang { margin-bottom: 8px; }

/* ===== Появление при прокрутке ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Уведомление ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 200;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Адаптив ===== */
@media (max-width: 560px) {
    .topbar-inner { padding: 10px 16px; min-height: 60px; }
    .topbar .lang-name { display: none; }
    .topbar .lang-code { display: inline; }
    .topbar .lang-btn { padding: 8px 10px; gap: 6px; }
    .brand { font-size: 1.1rem; }
    .container { padding: 0 16px; }
    .hero-content { padding: 100px 20px 120px; }
    .java-links li { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; gap: 14px; }
    .stats-section { margin-top: -50px; padding-bottom: 70px; }
    .stat-card { padding: 22px; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 360px; margin: 0 auto; }
    .hero-actions .btn { width: 100%; }
    .slider-btn { opacity: 1; width: 38px; height: 38px; }
    .slider-btn.prev { left: 8px; }
    .slider-btn.next { right: 8px; }
    .acc-header { padding: 16px 18px; }
    .acc-content { padding: 2px 18px 18px; }
    .slider-section, .download-section, .faq-section { padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
    .reveal { opacity: 1; transform: none; }
    .hero-bg { transform: scale(1.04) !important; }
}


/* =====================================================================
   Анимации: единая система движения (плавно, без рывков и «залипания»)
   ===================================================================== */
:root {
    --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);   /* мягкое раскрытие */
    --ease-io:   cubic-bezier(0.45, 0, 0.2, 1);    /* вход-выход */
}

/* ---- Кнопки ---- */
.btn, .install-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.5s var(--ease),
        box-shadow 0.5s var(--ease),
        background-color 0.35s ease,
        border-color 0.35s ease,
        color 0.3s ease;
}
.btn > *, .install-btn > * { position: relative; z-index: 1; }

/* мягкая подсветка при наведении (градиент не анимируется, поэтому слоем) */
.btn-primary::before, .install-btn::before {
    content: "";
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
/* блик, пробегающий по кнопке */
.btn-primary::after, .install-btn::after {
    content: "";
    position: absolute; top: 0; bottom: 0; left: 0; width: 50%; z-index: 0;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.32) 50%, transparent 100%);
    transform: translateX(-160%) skewX(-18deg);
    transition: transform 0.9s var(--ease);
    pointer-events: none;
}
.install-btn:disabled::before, .install-btn:disabled::after { display: none; }

@media (hover: hover) {
    .btn-primary:hover, .install-btn:not(:disabled):hover { transform: translateY(-2px); }
    .btn-primary:hover::before, .install-btn:not(:disabled):hover::before { opacity: 1; }
    .btn-primary:hover::after, .install-btn:not(:disabled):hover::after { transform: translateX(300%) skewX(-18deg); }
    .btn-ghost:hover { transform: translateY(-2px); }
    .btn-ghost:hover .arrow { transform: translateY(3px); }
}
.btn .arrow { transition: transform 0.45s var(--ease); }

/* нажатие — быстрое, отпускание — плавное. Стоит ПОСЛЕ hover, чтобы всегда срабатывать */
.btn:active, .install-btn:not(:disabled):active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.12s, 0.2s, 0.35s, 0.35s, 0.3s;
}

/* ripple от точки нажатия */
.ripple {
    position: absolute; z-index: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    opacity: 1;
    pointer-events: none;
    animation: ripple 0.75s var(--ease) forwards;
}
.btn-ghost .ripple { background: rgba(255, 255, 255, 0.22); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---- Аккордеоны (установка и FAQ) ---- */
.acc-item {
    transition: border-color 0.4s ease, box-shadow 0.5s var(--ease), background-color 0.4s ease;
}
.acc-header {
    transition: background-color 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}
.acc-header:active { background-color: var(--accent-soft); transition-duration: 0.1s; }
@media (hover: hover) {
    .acc-header:hover { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
    .acc-header:hover .acc-arrow { color: var(--text); }
    .acc-item.active .acc-header:hover .acc-arrow { color: var(--accent); }
}
.acc-arrow { transition: transform 0.55s var(--ease-soft), color 0.3s ease; }
.acc-body { transition: grid-template-rows 0.55s var(--ease-soft); }
.acc-content {
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.55s var(--ease-soft);
}
.acc-item.active .acc-content { transition: opacity 0.45s ease 0.12s, transform 0.55s var(--ease-soft) 0.05s; }
.acc-item:not(.active) .acc-content { transition: opacity 0.2s ease, transform 0.4s var(--ease-soft), visibility 0s 0.55s; }

/* ---- Ссылки Java: вся строка кликабельна, без «съезда» ---- */
.java-links li { position: relative; cursor: pointer; }
.java-links a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.java-links a { outline-offset: -2px; }
@media (hover: hover) {
    .java-links li:hover {
        transform: none;
        background-color: color-mix(in srgb, var(--accent) 7%, var(--bg-soft));
        border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
    }
    .java-links li:hover a::after { transform: translate(2px, -2px); }
}
.java-links li:active { background-color: color-mix(in srgb, var(--accent) 12%, var(--bg-soft)); transition-duration: 0.1s; }
a[target="_blank"]::after { transition: transform 0.35s var(--ease); }

/* ---- Язык ---- */
.lang-btn { transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease), color 0.3s ease; }
.lang-btn:active { transform: scale(0.96); transition-duration: 0.1s; }
.lang-btn .chev { transition: transform 0.45s var(--ease-soft); }
.lang-menu {
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.4s var(--ease), visibility 0s 0.4s;
}
.lang.open .lang-menu { transition: opacity 0.25s ease, transform 0.45s var(--ease), visibility 0s; }
.lang-menu li {
    opacity: 0; transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.3s ease;
}
.lang.open .lang-menu li { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.45s var(--ease); }
.lang.open .lang-menu li:nth-child(1) { transition-delay: 0.04s; }
.lang.open .lang-menu li:nth-child(2) { transition-delay: 0.08s; }
.lang.open .lang-menu li:nth-child(3) { transition-delay: 0.12s; }
.lang.open .lang-menu li:nth-child(4) { transition-delay: 0.16s; }
.lang.open .lang-menu li:nth-child(5) { transition-delay: 0.2s; }
.lang-menu a { transition: background-color 0.25s ease, color 0.25s ease; }
.lang-menu a:active { background: var(--accent-soft); }
.lang-menu .code { transition: color 0.25s ease; }

/* ---- Слайдер ---- */
.slider-btn { transition: opacity 0.4s ease, background-color 0.3s ease, transform 0.4s var(--ease); }
.slider-btn:active { transform: translateY(-50%) scale(0.92); transition-duration: 0.1s; }
.slider-track { transition: transform 0.75s var(--ease-soft); }
.slider-dot { transition: width 0.5s var(--ease-soft), background-color 0.35s ease; cursor: pointer; }
.slider-dot { position: relative; }
.slider-dot::after { content: ""; position: absolute; inset: -10px -4px; }   /* большая зона нажатия */
@media (hover: hover) { .slider-dot:not(.active):hover { background: var(--text-dim); } }

/* ---- Карточки статистики ---- */
.stat-card { transition: transform 0.5s var(--ease), border-color 0.35s ease, box-shadow 0.5s var(--ease); }
@media (hover: hover) { .stat-card:hover { transform: translateY(-4px); } }

/* ---- Фокус с анимацией ---- */
:focus-visible { transition: outline-offset 0.2s ease; }

/* ---- Появление при прокрутке: после завершения класс снимается JS-ом,
        чтобы не перебивать собственные transition элементов ---- */
.reveal { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

@media (prefers-reduced-motion: reduce) {
    .btn-primary::after, .install-btn::after, .ripple { display: none; }
}


/* ---- Кнопки: спокойные эффекты (без подъёма, блика и ripple) ---- */
.btn-primary::after, .install-btn::after, .ripple { display: none !important; }
.btn, .install-btn { transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, transform 0.15s ease; }
@media (hover: hover) {
    .btn-primary:hover, .install-btn:not(:disabled):hover,
    .btn-ghost:hover { transform: none; }
    .btn-primary:hover, .install-btn:not(:disabled):hover { filter: brightness(1.07); box-shadow: 0 8px 24px rgba(255, 122, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
    .btn-primary:hover::before, .install-btn:not(:disabled):hover::before { opacity: 0; }
    .btn-ghost:hover .arrow { transform: none; }
}
.btn:active, .install-btn:not(:disabled):active { transform: scale(0.985); transition-duration: 0.1s; }


/* ---- Баннеры-заглушки вместо скриншотов ---- */
.banner {
    position: relative;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background: #14171c;
}
.banner::before, .banner::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.banner::before { width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(255, 122, 0, 0.5), rgba(255, 122, 0, 0) 68%); }
.banner::after { inset: 0; border-radius: 0; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 36px 36px; }
.banner-1::before { left: -15%; top: -35%; }
.banner-2::before { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.banner-3::before { right: -15%; bottom: -35%; }
.banner-badge {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: #ff9122;
    background: rgba(255, 122, 0, 0.14);
    border: 1px solid rgba(255, 122, 0, 0.45);
}
.banner-title { max-width: 560px; font-size: clamp(1.15rem, 3.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.banner-sub { font-size: clamp(0.8rem, 1.6vw, 1rem); color: rgba(255, 255, 255, 0.6); }
