/* ----- Базовые стили (как на zerikc.ru) ----- */
:root {
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ff6b35;
    --accent-hover: #ff5722;
    --card-border: rgba(255, 255, 255, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
    --transition-base: 0.3s ease;
    --transition-fast: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    body {
        transition: none;
    }
    body.lang-switching {
        opacity: 1;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px;
    transition: opacity 0.28s ease;
}

body.lang-switching {
    opacity: 0.55;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-narrow {
    max-width: 828px; /* 780 + horizontal padding */
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ----- Navbar (как на zerikc.ru / portfolio-site) ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    padding: 20px 0;
    /* Solid bar (no backdrop-filter): keeps mobile .nav-menu fixed to the viewport */
    background: rgba(0, 0, 0, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-inner {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    flex-shrink: 0;
}
.logo:hover {
    color: var(--text);
}
.logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-fast);
    white-space: nowrap;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--text);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
    width: 100%;
}

.language-toggle {
    min-width: 40px;
    height: 40px;
    margin-left: 12px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1001;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    user-select: none;
}
.language-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}
.language-toggle:active {
    transform: scale(0.95);
}

/* Discord/SaaS: Log in в шапке — secondary, не конкурирует с download */
.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    position: relative;
    z-index: 1001;
}
.nav-login:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 107, 53, 0.55);
}
.nav-login--bar {
    margin-left: 16px;
}
.nav-menu-login {
    display: none;
}
.nav-login--menu {
    width: 100%;
    margin-top: 8px;
    border-color: rgba(255, 107, 53, 0.45);
    color: var(--accent);
}
.nav-login--menu:hover {
    color: var(--accent-hover);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition-base);
    border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ----- Секции ----- */
section {
    padding: 80px 0;
    border-bottom: 1px solid var(--card-border);
}
section[id] {
    scroll-margin-top: 96px;
}
section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
}

/* ----- Hero ----- */
.hero {
    padding: 100px 0 80px;
    text-align: center;
}
.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.hero h1 span {
    color: var(--accent);
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}
.hero .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

/* Telegram-style: web вторичен под store badges */
.hero-web-login,
.closing-web-login {
    margin-top: 18px;
    text-align: center;
}
.web-login-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.web-login-link:hover {
    color: var(--accent);
    border-bottom-color: rgba(255, 107, 53, 0.45);
}

.store-badge {
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}
.store-badge img {
    display: block;
    height: 40px;
    width: auto;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: var(--text);
    color: var(--bg);
}
.btn:hover {
    background: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--card-border);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

/* ----- Возможности ----- */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 48px;
    margin-top: 40px;
}
.feature-item {
    padding-left: 14px;
    border-left: 2px solid rgba(255, 107, 53, 0.45);
}
.feature-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}
.feature-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ----- История ----- */
.story-block {
    max-width: 780px;
    margin: 0 auto;
}
.story-block p {
    margin-bottom: 16px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}
.story-block .highlight,
.trust-list .highlight {
    color: var(--text);
    font-weight: 500;
}
.story-approach {
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ----- Как устроен ----- */
.trust-list {
    margin-top: 32px;
}
.trust-list p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}
.trust-list p:last-child {
    margin-bottom: 0;
}

.quote-block {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    text-align: center;
}
.quote-block--flush {
    margin-top: 0;
}
.quote-block p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.quote-block .closing-note {
    margin-top: 20px;
    font-size: 0.95rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.closing-cta {
    margin-top: 28px;
}

/* ----- Подвал ----- */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
footer a {
    color: var(--text-secondary);
}
footer a:hover {
    color: var(--text);
}

/* ----- Адаптивность ----- */
@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    section {
        padding: 50px 0;
    }
    .hero {
        padding: 60px 0 40px;
    }
    .features-list {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .nav-toggle {
        display: flex;
    }

    .language-toggle {
        margin-left: 8px;
    }

    /* Mobile: «Войти» всегда в шапке (как Discord Log in), не только в меню */
    .nav-login--bar {
        display: inline-flex;
        margin-left: auto;
        padding: 0 12px;
    }
    .nav-menu-login {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        margin-left: 0;
        background: var(--bg);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 24px 24px 40px;
        gap: 8px;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 14px 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero .cta-buttons,
    .closing-cta {
        flex-direction: column;
        align-items: center;
    }
    .store-badge img {
        height: 40px;
    }
}
