/* ПОДКЛЮЧЕНИЕ ПРЯМОЙ СВЯЗКИ ШРИФТОВ ИЗ ИНТЕРНЕТА (GOOGLE FONTS) */
@import url('https://googleapis.com');


/* БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1c1917;
    color: #f5f5f4;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}

/* ШАПКА САЙТА */
.header {
    border-bottom: 1px solid #2e2a24;
    background-color: rgba(12, 10, 9, 0.85);
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

/* ФИНАЛЬНЫЙ ТЕКСТОВЫЙ ЛОГОТИП */
.logo {
    font-weight: 900;
    font-size: 1.15rem; /* Оптимальный размер для мобильных экранов */
    letter-spacing: 0.05em;
    color: #ffffff; /* Слово ENGINEER будет строго белым */
    text-decoration: none;
    text-transform: uppercase;
}

/* Акцент на бренд */
.logo-accent {
    color: #f59e0b; /* CHERNOBUK загорится фирменным янтарным цветом */
    transition: color 0.25s ease;
}

.logo:hover .logo-accent {
    color: #d97706; /* Эффект при наведении */
}

/* На средних экранах и ПК возвращаем логотипу полный крупный размер */
@media (min-width: 768px) {
    .logo {
        font-size: 1.3rem;
    }
}


.nav-links {
    display: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    color: #a8a29e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover { color: #f59e0b; }

/* БЛОК СВЯЗИ В ШАПКЕ */
.header-phone-block {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.phone-circle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #f59e0b;
    color: #0c0a09;
    border-radius: 50%;
    transition: background-color 0.25s ease;
}

.phone-circle-icon svg { width: 18px; height: 18px; }
.phone-number-text { color: #ffffff; font-weight: 700; font-size: 0.95rem; transition: color 0.25s ease; }
.header-phone-block:hover .phone-circle-icon { background-color: #d97706; }
.header-phone-block:hover .phone-number-text { color: #f59e0b; }

/* ПЕРВЫЙ ЭКРАН */
.hero {
    position: relative;
    padding: 120px 0;
    background-color: #0c0a09;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 75vh;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(12, 10, 9, 0.94), rgba(28, 25, 23, 0.9));
    z-index: 2;
}

.hero-content { position: relative; z-index: 3; }

.hero-badge {
    display: inline-block;
    color: #f59e0b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 6px 16px;
    border-radius: 9999px;
    background-color: rgba(245, 158, 11, 0.03);
    margin-bottom: 28px;
}

.hero h1 { font-size: 2.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 24px; }
.hero h1 span { color: #f59e0b; }
.hero p { color: #a8a29e; font-size: 1.125rem; font-weight: 500; max-width: 46rem; margin-bottom: 44px; }

/* КНОПКИ */
.btn-group { display: flex; flex-direction: column; gap: 16px; }
.btn { display: inline-block; padding: 18px 36px; border-radius: 4px; font-weight: 700; text-align: center; text-decoration: none; transition: all 0.25s ease; cursor: pointer; font-size: 0.85rem; }
.btn-primary { background-color: #f59e0b; color: #0c0a09; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; box-shadow: 0 10px 20px -10px rgba(245, 158, 11, 0.3); }
.btn-primary:hover { background-color: #d97706; transform: translateY(-1px); }
.btn-secondary { border: 1px solid #44403c; color: #f5f5f4;font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.btn-secondary:hover { border-color: #a8a29e; background-color: rgba(255, 255, 255, 0.02); }

/* СЕТКА-ЧЕРТЕЖ */
.blueprint-grid {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    pointer-events: none;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 1;
}

/* СЕКЦИИ ОБЩИЕ */
.section { position: relative; padding: 100px 0; background-color: #1c1917; }
.section-dark { background-color: #0c0a09; }
.section-title { text-align: center; margin-bottom: 72px; position: relative; z-index: 10; }
.section-title h2 { font-size: 1.85rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.3; }
.section-title .line { height: 4px; width: 60px; background-color: #f59e0b; margin: 20px auto 0; }

/* СЕТКА УСЛУГ */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: stretch; position: relative; z-index: 10; }
.service-card { background-color: #0c0a09; border: 1px solid #2e2a24; border-radius: 4px; display: flex; flex-direction: column; height: 100%; transition: all 0.3s ease; }
.service-card:hover { border-color: rgba(245, 158, 11, 0.6); transform: translateY(-5px); box-shadow: 0 16px 30px -15px rgba(245, 158, 11, 0.2); }
.service-card-content { padding: 36px; display: flex; flex-direction: column; height: 100%; flex-grow: 1; }
.card-num { color: #f59e0b; font-weight: 900; font-size: 1.85rem; line-height: 1; margin-bottom: 28px; }
.service-card h3 { font-weight: 700; font-size: 1.15rem; text-transform: uppercase; margin-bottom: 14px; color: #ffffff; }
.service-card p { color: #a8a29e; font-size: 0.875rem; line-height: 1.65; }

/* СТИЛИ ГАЛЕРЕИ */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: stretch; position: relative; z-index: 10; }
.portfolio-item { background-color: #1c1917; border: 1px solid #2e2a24; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.portfolio-img { width: 100%; height: 240px; object-fit: cover; border-bottom: 1px solid #2e2a24; transition: transform 0.4s ease; }
.portfolio-item:hover .portfolio-img { transform: scale(1.03); }
.portfolio-info { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.portfolio-info h4 { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; color: #ffffff; margin-bottom: 4px; border-left: 3px solid #f59e0b; padding-left: 10px; }
.portfolio-info p { font-size: 0.85rem; color: #a8a29e; line-height: 1.5; }
.portfolio-info p strong { color: #f5f5f4; }

/* ТЕХНОЛОГИЧЕСКИЙ ПРОЦЕСС */
.workflow-list { max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; position: relative; z-index: 10; }
.step-item { display: flex; gap: 24px; }
.step-num { background-color: #f59e0b; color: #0c0a09; font-weight: 900; border-radius: 4px; padding: 4px 14px; font-size: 0.85rem; height: fit-content; }
.step-content h4 { font-weight: 700; font-size: 1.15rem; text-transform: uppercase; margin-bottom: 6px; }
.step-content p { color: #a8a29e; font-size: 0.875rem; line-height: 1.6; }

/* ФОРМА РАСЧЕТА */
.footer-content { max-width: 52rem; margin: 0 auto; text-align: center; position: relative; z-index: 10; }
.footer-content p { color: #a8a29e; margin-bottom: 44px; font-size: 0.95rem; }
.contacts-section { border-top: 1px solid #2e2a24; background-color: #1c1917; }
.rf-form { max-width: 550px; margin: 0 auto 32px; display: flex; flex-direction: column; gap: 16px; }
.form-group-row { display: flex; flex-direction: column; gap: 16px; }
.form-input { width: 100%; background-color: #1c1917; border: 1px solid #2e2a24; padding: 18px; border-radius: 4px; color: #ffffff; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s ease; }
.form-input:focus { border-color: #f59e0b; }
.file-upload-wrapper { position: relative; width: 100%; }
.file-upload-label { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; border: 2px dashed #44403c; border-radius: 4px; cursor: pointer; background-color: rgba(255, 255, 255, 0.01); transition: all 0.2s ease; }
.file-upload-label:hover { border-color: #f59e0b; background-color: rgba(245, 158, 11, 0.02); }
.file-icon { font-size: 1.2rem; }
.file-text { font-size: 0.85rem; color: #a8a29e; font-weight: 600; }
.hidden-file-input { display: none; }
.btn-submit { width: 100%; padding: 20px; font-family: 'Montserrat', sans-serif; }
.alternative-contact { font-size: 0.95rem; color: #a8a29e; margin-top: 32px; }
.alternative-contact a { color: #ffffff; font-weight: 700; text-decoration: none; margin: 0 10px; transition: color 0.2s ease; }
.alternative-contact .email-link:hover { color: #f59e0b; }
.alternative-contact .vk-link:hover { color: #0077ff; }
.alternative-contact .divider { color: #44403c; }
.legal-info { margin-top: 56px; font-size: 0.75rem; color: #44403c; display: flex; flex-direction: column; gap: 6px; }

/* АДАПТИВНОСТЬ */
@media (max-width: 410px) { .phone-number-text { display: none; } }
@media (min-width: 500px) { .form-group-row { flex-direction: row; } }
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .hero { padding: 150px 0; }
    .hero h1 { font-size: 3.5rem; }
    .btn-group { flex-direction: row; justify-content: flex-start; }
    .section-title h2 { font-size: 2.25rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1150px) {
    .hero h1 { font-size: 4rem; }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

/* СТИЛИ ДЛЯ ПЛАШЕК ПАРТНЕРОВ */
.brands-section {
    border-top: 1px solid #2e2a24;
    border-bottom: 1px solid #2e2a24;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.brand-item {
    background-color: #0c0a09; /* stone-950 */
    border: 1px solid #2e2a24;
    border-radius: 4px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: all 0.3s ease;
}

.brand-item span {
    font-weight: 900;
    font-size: 1.1rem;
    color: #44403c; /* stone-600 — строгий приглушенный цвет */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.brand-item:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.01);
}

.brand-item:hover span {
    color: #f59e0b; /* При наведении название плавно загорается янтарным */
}

/* Адаптивность для больших экранов — выстраиваем в одну ровную линию */
@media (min-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}
/* МИНИМАЛЬНАЯ ПРАВКА ОТСТУПОВ ДЛЯ СМАРТФОНОВ */
@media (max-width: 767px) {
    .header-body {
        padding-left: 16px !important;  /* Отступ слева для логотипа */
        padding-right: 16px !important; /* Отступ справа для телефона */
    }
}

/* КРУПНЫЙ ТЕКСТ ДЛЯ ЧИТАЕМОСТИ НА ВСЕХ ЭКРАНАХ */
body {
    font-size: 1.05rem; /* Увеличиваем базовый текст сайта */
}

.service-card p, .portfolio-info p, .step-content p {
    font-size: 1.2rem; /* Делаем крупнее описания в карточках, услугах и шагах */
    line-height: 1.35
}
/* КРУПНЫЙ ТЕКСТ ДЛЯ ФОРМЫ ОТПРАВКИ ТЗ */
.form-input {
    font-size: 1.2rem;       /* Увеличили текст, который вводит клиент */
}

.form-input::placeholder {
    font-size: 1.2rem;       /* Увеличили подсказки "Ваше имя", "Номер телефона" */
}

.file-text {
    font-size: 1.15rem;      /* Увеличили надпись "Прикрепить чертеж, модель или ТЗ" */
}

.file-icon {
    font-size: 1.5rem;       /* Сделали иконку скрепки заметнее */
}

.btn-submit {
    font-size: 1.1rem;       /* Увеличили текст на главной кнопке "Получить расчет стоимости" */
    letter-spacing: 0.05em;
}


@media (min-width: 768px) {
    body {
        font-size: 1.1rem; /* На компьютерах делаем текст еще чуть крупнее и солиднее */
    }
}

/* ИДЕАЛЬНЫЙ СТИЛЬ ПОДЗАГОЛОВКА КАК В КАРТОЧКАХ */
.footer-content p {
    font-size: 1.2rem;       /* Точный размер как в карточках услуг */
    line-height: 1.35;       /* Сжатые межстрочные интервалы как в карточках */
    color: #a8a29e;          /* Оставили строгий b2b-цвет */
    max-width: 650px;
    margin: 0 auto 44px;     /* '0 auto' — ЖЕСТКО ВЫРАВНИВАЕТ ТЕКСТ ПО ЦЕНТРУ */
    text-align: center;      /* Гарантирует центрирование строк внутри блока */
}

/* Трендовая подсветка ошибок (мягкое свечение) */
.form-input.invalid, .file-upload-wrapper.invalid {
    border-color: #ff4a4a !important;
    box-shadow: 0 0 10px rgba(255, 74, 74, 0.3) !important;
    animation: shake 0.4s ease-in-out;
}

/* Анимация тряски при ошибке */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Стиль для сообщения об успешной отправке */
.success-message-block {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease-out forwards;
}

.success-message-block h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 600;
}

.success-message-block p {
    color: #a0aec0;
    font-size: 16px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ДОБАВИТЬ В КОНЕЦ ФАЙЛА СТИЛЕЙ (Визуальный дизайн сайта не изменится)
   ========================================================================== */

/* 1. Трендовая неоновая подсветка полей при ошибке валидации */
.form-input.invalid, 
.file-upload-wrapper.invalid {
    border-color: #ff4a4a !important; /* Мягкий красный цвет рамки */
    box-shadow: 0 0 12px rgba(255, 74, 74, 0.4) !important; /* Эффект свечения */
    animation: formShake 0.4s ease-in-out; /* Легкая тряска поля */
}

/* Анимация тряски для привлечения внимания */
@keyframes formShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 2. Стили для B2B-блока "Заявка принята" (вместо скрытой формы) */
.success-message-block {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.03); /* Едва заметная подложка в стиле glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: formFadeIn 0.6s ease-out forwards; /* Плавное появление */
}

/* Заголовок успешной отправки */
.success-message-block h3 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Текст описания для B2B клиента */
.success-message-block p {
    color: #a0aec0; /* Спокойный серый цвет */
    font-size: 16px;
    line-height: 1.6;
}

/* Анимация плавного проявления блока сверху вниз */
@keyframes formFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
/* Трендовое состояние кнопки при ошибке отправки */
.btn-submit.btn-error {
    background: #ff4a4a !important;
    border-color: #ff4a4a !important;
    box-shadow: 0 0 15px rgba(255, 74, 74, 0.5) !important;
    color: #fff !important;
    animation: buttonShake 0.4s ease-in-out;
    transition: all 0.3s ease;
}

/* Анимация тряски только для кнопки */
@keyframes buttonShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
/* Состояние зоны загрузки, когда файл успешно выбран клиентом */
.file-upload-wrapper.file-attached {
    border-color: #f59e0b !important; /* Теплый янтарный цвет рамки */
    background: rgba(245, 158, 11, 0.03) !important; /* Минималистичный оттенок фона */
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important; /* Трендовое мягкое свечение */
    transition: all 0.3s ease;
}

/* Цвет галочки при прикреплении файла */
.file-upload-wrapper.file-attached .file-icon {
    color: #f59e0b !important;
}

/* Изменяем цвет текста внутри активного поля на белый для читаемости */
.file-upload-wrapper.file-attached .file-text {
    color: #ffffff !important;
    font-weight: 500;
}
