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

:root {
    --bg: #08080c;
    --text: #e8e8ec;
    --dim: #7a7a85;
    --accent: #4a9eff;
    --accent2: #00d4aa;
    --card: #0e0e14;
    --border: #1c1c24;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ПРЕЛОАДЕР */
#preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s;
}
#preloader.hidden { opacity: 0; pointer-events: none; }
.loader-ring {
    width: 56px; height: 56px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ФОНОВОЕ ВИДЕО */
#bgVideo {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 3s ease;
    pointer-events: none;
}
#bgVideo.active { opacity: 0.1; }
#bgVideo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ЧАСТИЦЫ */
#particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
}
.particle {
    position: absolute;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) scale(1); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-10vh) scale(0.5); opacity: 0; }
}

/* НАВБАР */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(8,8,12,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.3s;
}
#navbar.scrolled { padding: 10px 40px; }
.logo {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 6px;
}
.logo span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
    color: var(--dim);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-login {
    color: #4a9eff !important;
    border: 1px solid #4a9eff;
    padding: 6px 18px;
    border-radius: 4px;
    transition: all 0.3s;
}
.nav-login:hover {
    background: #4a9eff;
    color: #000 !important;
}
.header-clock {
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 2px;
    font-family: 'Consolas', monospace;
}

/* HERO */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
    overflow: hidden;
    z-index: 2;
}
.parallax-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 30%, rgba(74,158,255,0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 70%, rgba(0,212,170,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.parallax-layer2 {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(8,8,12,0.6) 100%);
    pointer-events: none;
}
#typewriter {
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 200;
    letter-spacing: 8px;
    line-height: 1.2;
    z-index: 1;
    min-height: 1.2em;
    color: var(--text);
    text-align: center;
}
#typewriter::after {
    content: '|';
    color: var(--accent);
    animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.hero-sub {
    font-size: 14px;
    color: var(--dim);
    margin-top: 25px;
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 1;
    text-align: center;
}
.hero-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, var(--accent), transparent);
    margin: 40px auto 0;
    z-index: 1;
}
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadePulse 3s infinite;
    z-index: 1;
}
@keyframes fadePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* СЕКЦИИ */
section {
    padding: 120px 40px;
    position: relative;
    z-index: 2;
    text-align: center;
    transition: background 0.8s ease;
}
.section-title {
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 300;
    letter-spacing: 5px;
    text-align: center;
    margin-bottom: 15px;
}
.section-title span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}
.section-line {
    width: 50px;
    height: 1px;
    background: var(--border);
    margin: 0 auto 20px;
}
.section-sub {
    text-align: center;
    color: var(--dim);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 70px;
    text-transform: uppercase;
}

/* ТЕКСТОВЫЕ БЛОКИ */
#about, #people { background: #0a0a10; }
.text-block {
    max-width: 700px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 2;
    color: #9a9aa5;
    font-weight: 300;
    text-align: center;
}
.text-block p { margin-bottom: 25px; }
.text-block .highlight { color: var(--text); font-weight: 500; }

/* КАРТОЧКИ */
#divisions { background: var(--bg); }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 35px 30px;
    transition: all 0.4s ease;
    position: relative;
    text-align: center;
}
.card h3 {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.card p {
    font-size: 13px;
    color: var(--dim);
    line-height: 1.7;
    font-weight: 300;
}
.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width 0.5s;
}
.card:hover::after { width: 100%; }
.card:hover {
    border-color: var(--accent);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

/* ПУЛЬСИРУЮЩИЕ ТОЧКИ */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4a9eff;
    margin-top: 15px;
    animation: pulseBlue 2s infinite;
}
.pulse-green {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d4aa;
    margin-top: 10px;
    animation: pulseGreen 2s infinite;
}
@keyframes pulseBlue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,158,255,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(74,158,255,0); }
}
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,170,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(0,212,170,0); }
}

/* ЭХК */
#ehk { background: #0a0a10; }
.ehk-wrap { max-width: 750px; margin: 0 auto; }
.ehk-progress-text {
    text-align: center;
    font-size: 34px;
    font-weight: 300;
    letter-spacing: 5px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4a9eff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ehk-progress-track {
    width: 100%;
    height: 4px;
    background: #1c1c24;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 55px;
}
.ehk-progress-line {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #00d4aa);
    border-radius: 2px;
    transition: width 1.8s ease;
}
.ehk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 45px;
}
.ehk-block h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding-bottom: 12px;
    border-bottom: 1px solid #1c1c24;
    margin-bottom: 20px;
    text-align: center;
}
.ehk-block.done h3 { color: #00d4aa; }
.ehk-block.work h3 { color: #4a9eff; }
.ehk-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ehk-block li {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #9a9aa5;
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
    text-align: left;
}
.ehk-block.done li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00d4aa;
}
.ehk-block.work li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4a9eff;
    animation: pulseBlue 2s infinite;
}

/* СТАТИСТИКА */
#safety, #stats { background: var(--bg); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}
.stat-item {
    text-align: center;
    padding: 40px 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.4s ease;
}
.stat-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}
.stat-number {
    font-size: 38px;
    font-weight: 200;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}
.stat-label {
    font-size: 10px;
    color: var(--dim);
    margin-top: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ФУТЕР */
#footer {
    background: #050507;
    padding: 80px 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
}
.footer-logo {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 20px;
}
.footer-logo span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}
.footer-text {
    color: #55555f;
    font-size: 11px;
    letter-spacing: 1px;
    line-height: 2;
}

/* АНИМАЦИИ ПОЯВЛЕНИЯ */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: all 1s;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* АВТОРИЗАЦИЯ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.auth-logo {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 10px;
}
.auth-logo span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}
.auth-sub {
    font-size: 12px;
    color: var(--dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-form input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 15px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form button {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    border-radius: 4px;
    padding: 12px;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}
.auth-form button:hover { box-shadow: 0 0 30px rgba(74,158,255,0.4); }
.auth-link {
    margin-top: 15px;
    font-size: 12px;
    color: var(--dim);
}
.auth-link a {
    color: var(--accent);
    text-decoration: none;
}
.auth-link a:hover { text-decoration: underline; }

/* МОБИЛЬНАЯ */
@media (max-width: 768px) {
    #navbar { padding: 14px 20px; }
    #navbar.scrolled { padding: 10px 20px; }
    .nav-links { display: none; }
    .logo { font-size: 18px; letter-spacing: 4px; }
    .header-clock { font-size: 12px; }
    section { padding: 70px 20px; }
    .hero-sub { letter-spacing: 2px; font-size: 11px; }
    #typewriter { letter-spacing: 4px; }
    .ehk-grid { grid-template-columns: 1fr; gap: 30px; }
}