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

/* ===== VARIABLES ===== */
:root {
    --bg: #0f172a;
    --bg-deep: #020617;
    --bg-card: rgba(17, 24, 39, 0.88);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --radius: 16px;
    --radius-lg: 22px;
    --container: 1040px;
    --header-height: 64px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);
}


/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    position: relative;
    font-family: "Golos Text", sans-serif;
    color: #e6e9ee;
    line-height: 1.6;
    background: var(--bg);
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ===== ФИКСИРОВАННЫЙ ФОН (ИСПРАВЛЕННЫЙ) ===== */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    
    background: 
        linear-gradient(rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.52)),
        url("/image/bg.jpg") no-repeat center center;
    background-size: cover;
    
    /* Улучшение производительности */
    transform: translateZ(0);
    will-change: transform;
}

/* ===== МОБИЛЬНЫЕ УСТРОЙСТВА (ИСПРАВЛЕННЫЙ ФОН) ===== */
@media (max-width: 768px) {
    .page-bg {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background-attachment: scroll;
        background-position: center center;
        background-size: cover;
    }
    
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Дополнительный фикс для iOS */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .page-bg {
        height: -webkit-fill-available;
    }
}

/* Остальные элементы выше фона */
#top, 
.site-header, 
main, 
.site-footer, 
#scrollTopBtn {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
}

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

code {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95em;
    color: #d1fae5;
}

h1, h2, h3 {
    font-weight: 600;
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 16px;
}

.logo {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.brand {
    font-weight: 900;
}

/* ===== NAV ===== */
.nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.nav.is-open {
    display: flex;
}

.nav a {
    color: #e6e9ee;
    text-decoration: none;
    padding: 10px 0;
    font-size: 15px;
}

.nav a:hover {
    color: #ffffff;
}

/* ===== MENU BUTTON ===== */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    margin: 5px 0;
    border-radius: 10px;
}

.nav-login {
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-login:hover {
    color: #ffffff;
}

/* ===== HERO ===== */
.hero {
    padding: 72px 0 56px;
}

.hero-inner {
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 720px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #d1fae5;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero h1 {
    font-size: 30px;
    line-height: 1.16;
    margin-bottom: 16px;
    font-weight: 500;
    color: #ffffff;
    text-wrap: balance;
}

.hero-text {
    max-width: 640px;
    color: #e6e9ee;
    margin-bottom: 24px;
    font-size: 16px;
}

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

.hero-note {
    margin-top: 20px;
    font-size: 14px;
    color: #d4e0f1;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 12px 16px;

    border-radius: 4px; /* как в Element */
    text-decoration: none;
    font-weight: 500;

    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

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

/* Регистрация */
.btn-primary {
    background: #0dbd8b;
    color: #fff;
}

.btn-primary:hover {
    background: #0aa678;
}

/* Войти */
.btn-secondary {
    background: #368bd6;
    color: #fff;
}

.btn-secondary:hover {
    background: #2f79bb;
}

/* ===== ICONS ===== */

.btn svg {
    flex-shrink: 0;
}

/* Дверь со стрелкой (упрощённая) */
.btn-icon-login::before {
    content: "→";
    font-size: 16px;
    font-weight: 600;
}


/* ===== SECTIONS ===== */
.section {
    position: relative;
    padding: 56px 0;
}

.section-alt {
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 23, 0.65),
        rgba(2, 6, 23, 0.3)
    );
    backdrop-filter: blur(2px);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #ffffff;
    text-wrap: balance;
}

.section-heading p {
    color: #d4e0f1;
    max-width: 760px;
}

.section-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* ===== SHARED GLASS BLOCKS ===== */
.card,
.feature-item,
.info-box,
.step,
.faq-item,
.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: var(--shadow-soft);
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    gap: 16px;
}

.card {
    padding: 20px;
    border-radius: var(--radius);
}

.card h3 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
}

.card p {
    color: #e6e9ee;
}

/* ===== FEATURES ===== */
.feature-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.feature-item {
    padding: 14px 16px;
    border-radius: var(--radius);
    color: #e2e8f0;
}

/* ===== INFO BOX ===== */
.info-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: var(--radius);
}

.info-box h3 {
    margin-bottom: 8px;
    color: #ffffff;
}

.info-box p + p {
    margin-top: 10px;
}

.warning-box {
    border-color: rgba(245, 158, 11, 0.45);
}

.recovery-box {
    border-color: rgba(34, 197, 94, 0.2);
}

/* ===== COMPARE ===== */
.compare-grid {
    display: grid;
    gap: 16px;
}

/* ===== LIST ===== */
.list {
    list-style: none;
}

.list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 10px;
    color: #e6e9ee;
}

.list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

/* ===== STEPS ===== */
.steps {
    display: grid;
    gap: 16px;
}

.step {
    padding: 18px;
    border-radius: var(--radius);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
    font-weight: 700;
    font-size: 15px;
}

.step h3 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
}

.step p {
    color: #e6e9ee;
}

/* ===== FAQ ===== */
.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    padding: 18px;
    border-radius: var(--radius);
}

.faq-item h3 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.faq-item p {
    color: #e6e9ee;
}

/* ===== CTA ===== */
.cta-section {
    text-align: center;
}

.cta-box {
    padding: 30px 20px;
    border-radius: var(--radius-lg);
}

.cta-box h2 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.2;
}

.cta-box p {
    max-width: 720px;
    margin: 0 auto;
    color: #e6e9ee;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 24px 0 30px;
    text-align: center;
    font-size: 14px;
    color: #d4e0f1;
}


/* ===== TABLET ===== */
@media (min-width: 768px) {
    .nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        width: auto;
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav a {
        padding: 0;
    }

    .menu-toggle {
        display: none;
    }

    .hero {
        padding: 96px 0 72px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-text {
        font-size: 18px;
    }

    .hero-actions,
    .section-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .section {
        padding: 68px 0;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faq-list {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 40px 32px;
    }
}

/* ===== DESKTOP ===== */
@media (min-width: 1024px) {
    .hero h1 {
        font-size: 56px;
        max-width: 820px;
    }

    .section-heading h2 {
        font-size: 34px;
    }

    .cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ===== LARGE DESKTOP ===== */
@media (min-width: 1280px) {
    .hero {
        padding-top: 110px;
        padding-bottom: 100px;
    }
}


.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loaded .fade-in {
    opacity: 1;
    transform: translateY(0);
}

#scrollTopBtn {
    position: fixed;
    right: 20px;
    bottom: 20px;

    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: none; /* убрали обводку */

    background: rgba(17, 24, 39, 0.85);
    color: #ffffff;

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

    cursor: pointer;

    backdrop-filter: blur(6px);

    /* 🔥 тень вместо border */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255,255,255,0.05); /* очень мягкий контур */

    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);

    transition: all 0.25s ease;
    z-index: 1000;
}

#scrollTopBtn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background: rgba(255,255,255,0.08);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255,255,255,0.08);
}

#scrollTopBtn:hover svg {
    transform: translateY(-1px);
}

#scrollTopBtn svg {
    transition: transform 0.2s ease;
}