/* ==========================================================================
   0. Глобальные стили и переменные
   ========================================================================== */

:root {
    --color-background: #0D1117;
    --color-surface: #161B22;
    --color-text: #E6EDF3;
    --color-accent: #2F81F7;
    --color-border: #30363D;

    --font-family-base: 'Inter', sans-serif;
    --font-family-heading: 'Syne', sans-serif;
    
    --container-width: 1200px;
    --container-padding: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* ==========================================================================
   1. Хедер
   ========================================================================== */

.header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background-color: rgba(13, 17, 23, 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-family-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--color-text);
}

.header__nav {
    display: none; /* Скрыто на мобильных */
}

.header__nav-list {
    display: flex;
    gap: 2rem;
}

.header__nav-link {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.5rem;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

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

.header__menu-button {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    display: block; /* Показываем кнопку-бургер на мобильных */
}

/* Адаптивность хедера */
@media (min-width: 768px) {
    .header__nav {
        display: block; /* Показываем навигацию на десктопах */
    }
    .header__menu-button {
        display: none; /* Скрываем кнопку-бургер на десктопах */
    }
}

/* ==========================================================================
   2. Футер
   ========================================================================== */

.footer {
    padding: 4rem 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.footer__container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(1, 1fr); /* 1 колонка на мобильных */
}

.footer__column--logo {
    margin-bottom: 1rem;
}

.footer__logo {
    font-family: var(--font-family-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--color-text);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer__title {
    font-family: var(--font-family-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.footer__list li {
    margin-bottom: 0.5rem;
}

.footer__link,
.footer__address {
    color: var(--color-text);
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer__link:hover {
    opacity: 1;
    color: var(--color-accent);
}

.footer__address {
    line-height: 1.5;
}

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

@media (min-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(4, 1fr); /* 4 колонки на десктопах */
    }
}

/* ==========================================================================
   3. Hero-секция
   ========================================================================== */

.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

.hero__content {
    max-width: 750px;
}

.hero__title {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Эффект курсора для "печатания" текста */
.hero__title::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    color: var(--color-accent);
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
}

.hero__cta {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(47, 129, 247, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(47, 129, 247, 0.3);
    color: #fff;
    opacity: 1;
}

/* Адаптивность Hero */
@media (min-width: 768px) {
    .hero__title {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   4. Секция "Типы ботов"
   ========================================================================== */

.section {
    padding: 5rem 0;
}

.section__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: 1.125rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
    opacity: 0.8;
}

.types__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* 1 колонка по умолчанию */
}

.types__card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.types__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.types__card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(47, 129, 247, 0.1);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.types__card-icon i {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

.types__card-title {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.types__card-text {
    position: relative;
    min-height: 100px; /* Высота для предотвращения "прыжков" */
}

.types__card-short,
.types__card-details {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.types__card-details {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(10px);
}

.types__card:hover .types__card-short {
    opacity: 0;
    transform: translateY(-10px);
}

.types__card:hover .types__card-details {
    opacity: 1;
    transform: translateY(0);
}

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

@media (min-width: 992px) {
    .types__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 768px) {
    .section__title {
        font-size: 2.75rem;
    }
}

/* ==========================================================================
   5. Секция "Технологии"
   ========================================================================== */

.tech {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.tech__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.tech__category {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    padding: 2rem;
    border-radius: 8px;
}

.tech__category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tech__category-title i {
    color: var(--color-accent);
}

.tech__list {
    list-style: none;
    padding-left: 0;
}

.tech__item {
    font-size: 0.95rem;
    line-height: 1.7;
    padding-left: 1.5rem;
    position: relative;
}

.tech__item:not(:last-child) {
    margin-bottom: 1rem;
}

/* Стилизация маркера списка */
.tech__item::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    font-weight: bold;
}

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

/* ==========================================================================
   6. Секция "Кейсы"
   ========================================================================== */

.cases__wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.case {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.case__image-wrapper {
    background-color: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.case__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.case__title {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.case__description {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.case__results {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.case__results-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.case__results-list {
    list-style: none;
    padding: 0;
}

.case__results-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.case__results-list i {
    color: var(--color-accent);
    width: 20px;
    flex-shrink: 0;
}

/* Адаптивность и чередование */
@media (min-width: 992px) {
    .case {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    /* Модификатор для чередования колонок */
    .case.case--reversed .case__image-wrapper {
        order: 2;
    }
    .case.case--reversed .case__content {
        order: 1;
    }
}

/* ==========================================================================
   7. Секция "Процесс"
   ========================================================================== */

.process {
    background-color: var(--color-background); /* Возвращаемся к основному фону */
}

.process__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.process__step {
    position: relative;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    overflow: hidden;
}

.process__step-number {
    position: absolute;
    top: -0.5rem;
    right: 1.5rem;
    font-family: var(--font-family-heading);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    z-index: 1;
    user-select: none;
}

.process__step-content {
    position: relative;
    z-index: 2;
}

.process__step-title {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.process__step-description {
    line-height: 1.7;
    opacity: 0.9;
}

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

@media (min-width: 1200px) {
    .process__wrapper {
       grid-template-columns: repeat(3, 1fr);
    }
    /* Делаем последние 2 карточки на всю ширину для красоты */
    .process__step:nth-child(4) {
        grid-column: 1 / 2;
    }
    .process__step:nth-child(5) {
        grid-column: 2 / 4;
    }
}

/* ==========================================================================
   8. Секция "Контакты"
   ========================================================================== */

.contact {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-group__label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group__input {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.875rem 1rem;
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-family-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.2);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.form-group--checkbox input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.contact__form-button {
    background-color: var(--color-accent);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    transition: opacity 0.3s ease;
}

.contact__form-button:hover {
    opacity: 0.9;
}

.contact__form-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Сообщение об успехе */
.contact__success-message {
    text-align: center;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 3rem 2rem;
}

.contact__success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background-color: rgba(47, 129, 247, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact__success-icon i {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
}

.contact__success-title {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   9. Дополнительные элементы (Cookie Pop-up, Страницы политик)
   ========================================================================== */

/* 9.1 Стили для Cookie Pop-up */
.cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 500px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cookie-popup__button {
    background-color: var(--color-accent);
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    align-self: flex-end;
    transition: opacity 0.3s ease;
}

.cookie-popup__button:hover {
    opacity: 0.9;
}

@media (min-width: 576px) {
    .cookie-popup {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
    .cookie-popup__button {
        align-self: center;
        flex-shrink: 0;
    }
}


/* 9.2 Стили для страниц политик (privacy.html, terms.html и т.д.) */
.pages {
    padding: 4rem 0;
}

.pages h1 {
    font-family: var(--font-family-heading);
    font-size: 2.75rem;
    margin-bottom: 2rem;
}

.pages h2 {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.pages p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.pages li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.pages a {
    text-decoration: underline;
}

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

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