:root {
    --bg: #06060a;
    --accent: #3574F4;
    --accent-dark: #1f57e9;
    --glass: rgba(22, 22, 31, 0.85);
    --border: rgba(53, 116, 244, 0.25);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.65);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== THREE.JS CANVAS ========== */
#three-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Лёгкий дополнительный glow */
#bg-glow {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--accent-dark) 0%, transparent 70%);
    filter: blur(120px);
    opacity: 0.12;
    z-index: -1;
    animation: pulse 12s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.08; }
    100% { opacity: 0.18; }
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(6, 6, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 10000;
    padding: 18px 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-glow-nav {
    font-size: 28px;
    animation: logoPulse 3s infinite alternate;
}

.nav-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
}

.nav-title span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 32px;
    font-weight: 500;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-1px);
}

.nav-reg {
    color: var(--accent) !important;
    font-weight: 600;
}

.btn-nav {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(53, 116, 244, 0.3);
}

.btn-nav:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(53, 116, 244, 0.5);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 90px;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(53, 116, 244, 0.15);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1.05;
    margin-bottom: 16px;
}

.title span { color: var(--accent); }

.subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-main {
    background: var(--accent);
    color: white;
    padding: 20px 42px;
    border-radius: 9999px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(53, 116, 244, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-main:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 25px 45px rgba(53, 116, 244, 0.5);
}

.btn-secondary {
    padding: 20px 34px;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
}

.hero-trust {
    display: flex;
    gap: 24px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

.trust-icon {
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(53, 116, 244, 0.15);
    border-radius: 50%;
}

.hero-app-preview {
    flex: 1;
    min-width: 320px;
    display: flex;
    justify-content: center;
}

.glass-card.floating {
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* ========== СЕКЦИИ ========== */
.section {
    padding: 120px 40px;
    max-width: 1280px;
    margin: 0 auto;
}

.bg-dark {
    background: #0a0a12;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(53, 116, 244, 0.25);
}

.feature-icon {
    width: 78px;
    height: 78px;
    margin-bottom: 24px;
    border-radius: 20px;
    object-fit: contain;
}

/* Steps */
.steps-container {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;     /* Изменено: выравнивание по левому краю */
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.step {
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 320px;
    min-height: 340px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px 28px;
    position: relative;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.step:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 32px;
    background: var(--accent);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.45rem;
    box-shadow: 0 0 0 6px #06060a;
    z-index: 2;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-content h4 {
    margin: 32px 0 14px;
    font-size: 1.38rem;
    line-height: 1.3;
}

.step-img {
    width: 100%;
    max-height: 145px;
    object-fit: contain;
    margin-bottom: 22px;
    border-radius: 18px;
}

/* Коннекторы между шагами */
.step-connector {
    flex: 0 0 70px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    align-self: center;
    margin-top: 40px;   /* поднимаем коннектор */
}

/* App preview */
.app-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.preview-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    padding: 14px;
    transition: all 0.4s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;           /* минимальная высота карточки */
}

.preview-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.preview-image {
    width: 100%;
    height: auto;
    max-height: 520px;           /* ограничиваем максимальную высоту */
    object-fit: contain;         /* главное изменение: contain вместо cover */
    border-radius: 18px;
    display: block;
}

/* На широких экранах — 3 в ряд */
@media (min-width: 1150px) {
    .app-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* На мобильных — один под другим */
@media (max-width: 1149px) {
    .preview-card {
        min-height: 340px;
    }
}

@media (max-width: 900px) {
    .app-preview-grid { grid-template-columns: 1fr; }
}

.glass-card.big { grid-column: span 2; }
.glass-card { transition: all 0.4s ease; }

.glass-card:hover {
    transform: scale(1.03);
}

.last-tx { margin-top: 20px; font-size: 0.95rem; opacity: 0.8; }

.qr-big-placeholder {
    font-size: 4.5rem;
    text-align: center;
    padding: 60px 0;
    background: rgba(0,0,0,0.3);
    border-radius: 24px;
    margin-bottom: 20px;
}

.stats {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    text-align: center;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, #1f57e9, #3574F4);
    padding: 110px 40px;
    text-align: center;
    color: white;
}

.cta-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;                    /* главное исправление — отступы */
}

.cta-content h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 0;
}

.cta-content p {
    font-size: 1.35rem;
    opacity: 0.95;
    max-width: 520px;
}

.btn-main.big {
    margin-top: 10px;             /* убрал большой отступ */
    padding: 24px 60px;
    font-size: 1.5rem;
}

.cta-small {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 8px;
}

/* FOOTER */
.footer {
    background: #0a0a12;
    padding: 90px 40px 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer h4 {
    margin-bottom: 20px;
    color: var(--accent);
}

.footer a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer a:hover { color: white; }

.footer-bottom {
    max-width: 1280px;
    margin: 80px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6,6,10,0.92);
    backdrop-filter: blur(12px);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #16161f;
    width: 92%;
    max-width: 960px;
    max-height: 92vh;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(53, 116, 244, 0.6);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 32px;
    max-height: calc(92vh - 80px);
    overflow-y: auto;
    line-height: 1.75;
    font-size: 0.97rem;
    color: #ddd;
}

.modal-body h1, .modal-body h2, .modal-body h3 {
    color: white;
    margin: 28px 0 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding: 100px 20px 60px; gap: 40px; }
    .steps-container { flex-direction: column; }
    .step-connector { display: none; }
}

@media (max-width: 1024px) {
    .steps-container {
        flex-direction: column;
        gap: 50px;
    }
    .step-connector {
        display: none; /* на мобильных коннекторы прячем */
    }
    .step {
        min-height: auto;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}