/* Этап 0: Глобальные стили и налаштування */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@600;700&family=Inter:wght@400;500&display=swap');

:root {
    --background-color: #111827;
    --text-color: #F3F4F6;
    --primary-color: #2DD4BF;
    --secondary-color: #4B5563;
    --border-color: #374151;
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Exo 2', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color);
}

ul {
    list-style: none;
}

/* Этап 1: Хедер */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.header__logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav__link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav__link--cta {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 8px 18px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav__link--cta:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

.nav__link--cta::after {
    display: none;
}

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* Этап 2: Футер */
.footer {
    padding: 60px 0 20px;
    background-color: #0d121c;
    border-top: 1px solid var(--border-color);
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer__column--brand {
    display: flex;
    flex-direction: column;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.footer__tagline {
    color: var(--secondary-color);
    font-size: 14px;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.footer__link {
    color: var(--secondary-color);
    font-size: 15px;
}

.footer__link:hover {
    color: var(--primary-color);
}

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
}

.footer__list--contacts .lucide {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.footer__text {
    font-size: 15px;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--secondary-color);
}

/* Адаптивность */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .nav--open {
        display: flex;
    }

    .nav__list {
        flex-direction: column;
        gap: 40px;
    }

    .nav__link {
        font-size: 24px;
    }

    .header__burger-btn {
        display: block;
        z-index: 101; /* Поверх навигации */
    }

    .footer__container {
        grid-template-columns: 1fr;
    }
}

/* --- Общие стили для кнопок --- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 12px 28px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Этап 3: Hero-секция --- */
.hero {
    position: relative;
    min-height: calc(100vh - 81px); /* Высота экрана минус высота хедера */
    display: flex;
    align-items: center;
    padding: 80px 0;
    overflow: hidden; /* Важно для фоновой анимации */
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 750px;
}

.hero__title {
    font-size: 56px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero__description {
    font-size: 20px;
    color: var(--text-color);
    opacity: 0.9;
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- Стили для JS-анимации появления --- */
.anim-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anim-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Фоновая анимация частиц --- */
.hero__bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__bg-shapes span {
    position: absolute;
    list-style: none;
    display: block;
    width: 20px;
    height: 20px;
    background-color: rgba(45, 212, 191, 0.1); /* Прозрачный акцентный цвет */
    border-radius: 50%;
    bottom: -150px;
    animation: floatUp 25s infinite linear;
}

/* Распределяем частицы и задаем им разные размеры и задержки анимации */
.hero__bg-shapes span:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.hero__bg-shapes span:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.hero__bg-shapes span:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.hero__bg-shapes span:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.hero__bg-shapes span:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.hero__bg-shapes span:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.hero__bg-shapes span:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.hero__bg-shapes span:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.hero__bg-shapes span:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.hero__bg-shapes span:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 25%;
    }
}

/* --- Адаптивность для Hero --- */
@media (max-width: 768px) {
    .hero {
        min-height: calc(100vh - 73px);
        padding: 60px 0;
        text-align: center;
    }
    .hero__title {
        font-size: 42px;
    }
    .hero__description {
        font-size: 18px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Общие стили для заголовков секций --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header__title {
    font-size: 42px;
    margin-bottom: 15px;
}

.section-header__subtitle {
    font-size: 18px;
    color: var(--secondary-color);
    line-height: 1.7;
}


/* --- Секция "Направления" (Services) --- */
.services {
    padding: 100px 0;
    background-color: var(--background-color); /* Такой же фон, как у body */
}

.services__grid {
    display: grid;
    gap: 30px;
    /* По умолчанию 1 колонка (mobile-first) */
    grid-template-columns: 1fr;
}

.services__card {
    background-color: #1f2937; /* Чуть светлее основного фона */
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.services__card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -10px rgba(45, 212, 191, 0.15);
}

.services__card-icon {
    margin-bottom: 20px;
}

.services__card-icon .lucide {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
}

.services__card-title {
    font-size: 22px;
    margin-bottom: 10px;
}

.services__card-description {
    font-size: 16px;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* --- Адаптивность для секции "Направления" --- */
@media (min-width: 640px) {
    /* На планшетах и десктопах - 2 колонки */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-header__title {
        font-size: 36px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
}

/* --- Секция "Кейсы" (Cases) --- */
.cases {
    padding: 100px 0;
    background-color: #0d121c; /* Немного другой оттенок фона для визуального разделения */
}

.cases__wrapper {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.case-study {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.case-study__image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.case-study__category {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 15px;
}

.case-study__title {
    font-size: 32px;
    margin-bottom: 20px;
}

.case-study__description {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.case-study__results {
    display: flex;
    gap: 40px;
}

.case-study__result-item {
    display: flex;
    flex-direction: column;
}

.case-study__result-value {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
}

.case-study__result-label {
    font-size: 14px;
    color: var(--secondary-color);
}

/* --- Анимация появления при скролле --- */
.anim-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.anim-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Адаптивность для секции "Кейсы" --- */
@media (min-width: 768px) {
    .case-study {
        grid-template-columns: repeat(2, 1fr);
        gap: 60px;
    }

    /* Модификатор для реверса колонок */
    .case-study--reverse .case-study__image-wrapper {
        order: 2;
    }
}

@media (max-width: 768px) {
    .cases__wrapper {
        gap: 60px;
    }
    .case-study__title {
        font-size: 28px;
    }
    .case-study__result-value {
        font-size: 30px;
    }
}

/* --- Секция "Процесс" (Process) --- */
.process {
    padding: 100px 0;
    background-color: var(--background-color);
}

.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Вертикальная линия таймлайна */
.process__timeline::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 24px;
    bottom: 20px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.process__item {
    position: relative;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-left: 80px; /* Отступ слева для контента */
}

.process__step {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1f2937;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    z-index: 2;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.process__item:hover .process__step {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-color);
}

.process__title {
    font-size: 24px;
    margin-bottom: 10px;
}

.process__description {
    color: var(--secondary-color);
}


/* --- Адаптивность для секции "Процесс" --- */
@media (max-width: 768px) {
    .process__timeline::after {
        left: 20px; /* Сдвигаем линию на мобильных */
    }
    .process__item {
        padding-left: 70px; /* Уменьшаем отступ */
        gap: 20px;
    }
    .process__step {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .process__title {
        font-size: 20px;
    }
}

/* --- Секция "Блог" (Blog) --- */
.blog {
    padding: 100px 0;
    background-color: var(--background-color);
}

.blog__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.blog-card {
    background-color: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0, 0.2);
}

.blog-card__image-wrapper {
    overflow: hidden;
}

.blog-card__image-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image-wrapper img {
    transform: scale(1.05);
}

.blog-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Чтобы карточки были одной высоты */
}

.blog-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.blog-card__category {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
}

.blog-card__title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1; /* Чтобы ссылка "Читать далее" была внизу */
}

.blog-card__title a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title a {
    color: var(--primary-color);
}

.blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-color);
    align-self: flex-start; /* Прижимаем к левому краю */
    transition: color 0.3s ease;
}

.blog-card__read-more .lucide {
    width: 18px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__read-more {
    color: var(--primary-color);
}

.blog-card:hover .blog-card__read-more .lucide {
    transform: translateX(5px);
}

.blog__cta {
    text-align: center;
    margin-top: 60px;
}

/* --- Адаптивность для секции "Блог" --- */
@media (min-width: 640px) {
    .blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Секция "Контакты" (Contact) --- */
.contact {
    padding: 100px 0;
    background-color: #0d121c;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.contact__info-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.contact__info-text {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact__info-list .lucide {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact__info-list a, .contact__info-list span {
    color: var(--secondary-color);
    font-size: 16px;
    transition: color 0.3s ease;
}

.contact__info-list a:hover {
    color: var(--primary-color);
}

/* --- Стили формы --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--secondary-color);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: #1f2937;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}

.form-input.is-invalid, .form-textarea.is-invalid {
    border-color: #ef4444;
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--secondary-color);
}
.form-group--checkbox a {
    text-decoration: underline;
}

.contact-form__button {
    margin-top: 10px;
    width: 100%;
}

.contact-form__success-message {
    background-color: #1f2937;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.contact-form__success-message .lucide {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.contact-form__success-message h4 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* --- Адаптивность для секции "Контакты" --- */
@media (min-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr 1.5fr;
    }
}

/* --- Этап 5.1: Cookie Pop-up --- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1f2937;
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    z-index: 200;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cookie-popup.is-active {
    transform: translateY(0);
}

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-popup p {
    color: var(--secondary-color);
}
.cookie-popup p a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-popup__btn {
    padding: 10px 25px;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Этап 5.2: Стилизация страниц политик --- */
.pages {
    padding: 80px 0;
}

.pages .container {
    max-width: 800px; /* Делаем контентную область уже для лучшей читаемости */
}

.pages h1 {
    font-size: 42px;
    margin-bottom: 30px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 20px;
}

.pages ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.8;
}

.pages a {
    color: var(--primary-color);
    text-decoration: underline;
}

.pages a:hover {
    text-decoration: none;
}

.pages strong {
    color: var(--text-color);
    font-weight: 600;
}