/* --- CSS ПЕРЕМЕННЫЕ ДЛЯ ДВУХ ТЕМ --- */

/* Переменные Темной темы */
.dark-theme {
    --bg-color: #12141c;
    --bg-hardware: #0f1016;
    --bg-footer: #0b0c10;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-green: #00FF66;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(18, 20, 28, 0.7);
    --nm-shadow-out: 6px 6px 16px #0b0c11, -6px -6px 16px #191c27;
    --nm-shadow-in: inset 4px 4px 8px #0b0c11, inset -4px -4px 8px #191c27;
    --border-service: rgba(255, 255, 255, 0.08);
}

/* Переменные Светлой темы */
.light-theme {
    --bg-color: #f9fafb;       /* Чистый светло-серый */
    --bg-hardware: #f3f4f6;    /* Чуть глубже для блока Hardware */
    --bg-footer: #e5e7eb;
    --text-color: #111827;     /* Глубокий темный текст */
    --text-muted: #6b7280;     /* Серый приглушенный */
    --accent-green: #10B981;   /* Более контрастный изумрудно-зеленый для светлого фона */
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(249, 250, 251, 0.7);
    --nm-shadow-out: 6px 6px 16px #d1d5db, -6px -6px 16px #ffffff;
    --nm-shadow-in: inset 4px 4px 8px #d1d5db, inset -4px -4px 8px #ffffff;
    --border-service: rgba(0, 0, 0, 0.08);
}

/* --- ОБЩИЕ СТИЛИ --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

section {
    padding: 140px 0;
    transition: background-color 0.4s ease;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* --- КНОПКИ И ПОЛЯ ВВОДА --- */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background-color: var(--accent-green);
    color: #000;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
}

.light-theme .btn-primary {
    color: #fff; /* Белый текст на зеленой кнопке в светлой теме */
}

.btn-glass {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.input-nm {
    width: 100%;
    padding: 16px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    box-shadow: var(--nm-shadow-in);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.3s ease, background-color 0.4s ease;
}

.input-nm:focus {
    box-shadow: var(--nm-shadow-in), 0 0 5px var(--accent-green);
}

/* --- БЛОК 1: ШАПКА (HEADER) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.logo span {
    color: var(--accent-green);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 32px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-green);
}

/* Переключатель темы (Кнопка-солнце/луна) */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    margin-left: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.theme-toggle-btn:hover {
    color: var(--accent-green);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Логика отображения иконок */
.dark-theme .sun-icon { display: block; }
.dark-theme .moon-icon { display: none; }
.light-theme .sun-icon { display: none; }
.light-theme .moon-icon { display: block; }


/* --- БЛОК 2: ПЕРВЫЙ ЭКРАН (HERO) --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

/* Неоновое пятно */
.hero::before {
    content: '';
    position: absolute;
    top: 30%;
    right: 10%;
    width: 350px;
    height: 350px;
    background: var(--accent-green);
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    pointer-events: none;
    animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.12; transform: scale(1); }
    100% { opacity: 0.18; transform: scale(1.2); }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hero h2 {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 48px;
}

/* --- БЛОК 3: ЗАПРОС ДОСТУПА --- */
.access-block {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.access-form {
    display: flex;
    gap: 16px;
    max-width: 700px;
    align-items: center;
}

/* --- БЛОК 4: ОСНОВНЫЕ УСЛУГИ --- */
.services-list {
    margin-top: 60px;
}

.service-item {
    border-bottom: 1px solid var(--border-service);
    padding: 24px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-title {
    font-size: 1.35rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.service-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.service-desc {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    color: var(--text-muted);
    font-size: 1rem;
}

.service-item:hover .service-title { color: var(--accent-green); }
.service-item:hover .service-arrow { transform: translateX(8px); color: var(--accent-green); }

.service-item.active .service-desc { max-height: 100px; margin-top: 16px; }
.service-item.active .service-arrow { transform: rotate(90deg); color: var(--accent-green); }

/* --- БЛОКИ ОБРАТНОЙ СВЯЗИ --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.form-group-full { grid-column: 1 / -1; }
textarea.input-nm { min-height: 120px; resize: vertical; }

/* --- БЛОК 6: HARDWARE УСЛУГИ --- */
.hardware {
    background: var(--bg-hardware);
}

.hardware-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.hardware-card {
    background-color: var(--bg-hardware);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--nm-shadow-out);
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    position: relative;
}

.hardware-card:hover {
    transform: translateY(-5px);
}

.hardware-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 20px;
    opacity: 0.7;
}

.hardware-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 12px;
}

/* --- ФУТЕР --- */
footer {
    background-color: var(--bg-footer);
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: background-color 0.4s ease;
}

.footer-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-email {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-email:hover { color: var(--accent-green); }
.footer-nav a { color: var(--text-muted); text-decoration: none; margin-right: 24px; }
.footer-nav a:hover { color: var(--text-color); }
.footer-socials a { color: var(--text-muted); text-decoration: none; margin-left: 16px; transition: color 0.3s ease; }
.footer-socials a:hover { color: var(--accent-green); }
.copyright-row { width: 100%; margin-top: 20px; border-top: 1px solid var(--glass-border); padding-top: 20px; }

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 968px) {
    .hero h1 { font-size: 3rem; }
    section { padding: 90px 0; }
    .access-form { flex-direction: column; align-items: stretch; }
    nav { display: none; }
}
