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

:root {
    --bg: #050810;
    --bg-card: #0A0F1E;
    --bg-elevated: #0F1528;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 212, 255, 0.3);
    
    --text: #E8ECF4;
    --text-muted: #8892A6;
    --text-dim: #5A6478;
    
    --accent: #00D4FF;
    --accent-2: #7B5CFF;
    --accent-glow: rgba(0, 212, 255, 0.5);
    
    --gradient: linear-gradient(135deg, #00D4FF 0%, #7B5CFF 100%);
    
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    
    --radius: 12px;
    --radius-lg: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ ФОНОВАЯ СЕТКА ============ */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

#particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

/* ============ КОНТЕЙНЕР ============ */
.container {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ HEADER ============ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: var(--gradient);
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: #050810;
    letter-spacing: -0.5px;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
    color: var(--text);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============ HERO ============ */
.hero {
    padding: 24px 0 56px;
    text-align: center;
    animation: fadeUp 0.8s ease both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(123, 92, 255, 0.08);
    border: 1px solid rgba(123, 92, 255, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: #B8A8FF;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.badge-dot {
    width: 5px;
    height: 5px;
    background: #B8A8FF;
    border-radius: 50%;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #050810;
    font-weight: 600;
    box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px -4px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* ============ DECODED ============ */
.decoded {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px 0 64px;
    animation: fadeUp 0.8s 0.2s ease both;
}

.decoded-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.decoded-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.decoded-letter {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.decoded-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============ WHAT ============ */
.what {
    padding: 32px 0 64px;
    text-align: center;
    animation: fadeUp 0.8s 0.3s ease both;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-text {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
}

.section-text strong {
    color: var(--text);
    font-weight: 500;
}

/* ============ WAITLIST ============ */
.waitlist {
    padding: 32px 0 64px;
    animation: fadeUp 0.8s 0.4s ease both;
}

.waitlist-card {
    position: relative;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.waitlist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.waitlist-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.waitlist-desc {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 300;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.form-row input::placeholder {
    color: var(--text-dim);
}

.form-row input:focus {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-row input.error {
    border-color: #FF5C7B;
    background: rgba(255, 92, 123, 0.05);
}

.form-note {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 8px;
}

/* Кнопка с лоадером */
#submit-btn {
    position: relative;
}

.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(5, 8, 16, 0.3);
    border-top-color: #050810;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#submit-btn.loading .btn-text {
    opacity: 0.6;
}

/* Сообщение об успехе */
.success-message {
    text-align: center;
    padding: 20px 0;
    animation: fadeUp 0.5s ease both;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    color: var(--accent);
}

.success-message h4 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.success-message p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 300;
}

/* ============ FOOTER ============ */
.footer {
    margin-top: auto;
    padding-top: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-sep {
    opacity: 0.5;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ MOBILE ============ */
@media (max-width: 640px) {
    .container {
        padding: 20px 16px 40px;
    }
    
    .header {
        padding-bottom: 32px;
    }
    
    .status {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .hero {
        padding: 16px 0 40px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .decoded {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0 48px;
    }
    
    .decoded-item {
        justify-content: center;
    }
    
    .waitlist-card {
        padding: 28px 20px;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #particles {
        display: none;
    }
}