/* ==================== GOOGLE FONTS ==================== */
/* Импорт уже сделан в HTML через <link> */

/* ==================== CSS-ПЕРЕМЕННЫЕ ==================== */
:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --primary-color: #4DD0E1; /* Cyan */
    --text-color: #EAEAEA;
    --muted-text-color: #757575;

    --header-height: 4.5rem;

    --font-body: 'Inter', sans-serif;
    --font-heading: 'Roboto Mono', monospace;
}

/* ==================== ГЛОБАЛЬНЫЕ СТИЛИ ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
}

/* ==================== ХЕДЕР ==================== */
.header {
    width: 100%;
    background-color: var(--bg-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid var(--surface-color);
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: color 0.3s;
}

.header__logo:hover {
    color: var(--text-color);
}

.header__burger {
    display: none; /* Скрыт по умолчанию на десктопе */
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

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

.header__nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted-text-color);
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.25rem;
}

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

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

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

/* ==================== ФУТЕР ==================== */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 0 2rem;
    margin-top: 5rem; /* Отступ от последнего контент-блока */
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
    color: var(--muted-text-color);
    max-width: 250px;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__list--contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__contact-icon {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

.footer__link, .footer__text {
    font-size: 0.9rem;
    color: var(--muted-text-color);
    transition: color 0.3s;
}

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

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-color);
    font-size: 0.85rem;
    color: var(--muted-text-color);
}

/* ==================== АДАПТИВНОСТЬ (Mobile First) ==================== */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Скрыть навигацию, позже будем управлять через JS */
    }
    .header__burger {
        display: block; /* Показать бургер */
    }
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .footer__column--brand {
        text-align: center;
    }
    .footer__tagline {
        margin: 0 auto;
    }
    .footer__title {
        text-align: center;
    }
    .footer__list {
        align-items: center;
    }
}

/* ==================== КНОПКИ (ОБЩИЕ) ==================== */
.button {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
    border: 2px solid transparent;
}

.button:hover {
    transform: translateY(-3px);
}

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

.button--primary:hover {
    background-color: #84ffff; /* Более светлый оттенок бирюзы */
    border-color: #84ffff;
}

.button--outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.button--outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}


/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-height); /* Отступ для фиксированного хедера */
}

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

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

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero__title {
    font-size: 3rem;
    line-height: 1.2;
    max-width: 800px;
}

.hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--muted-text-color);
    max-width: 650px;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ==================== АДАПТИВНОСТЬ HERO ==================== */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.25rem;
    }
    .hero__subtitle {
        font-size: 1rem;
    }
    .hero__actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .button {
        width: 100%;
    }
}
/* ==================== ОБЩИЕ СТИЛИ СЕКЦИЙ ==================== */
.section {
    padding: 6rem 0 4rem;
}

.section__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    font-family: var(--font-heading);
}

/* ==================== СЕКЦИЯ ИСТОРИЙ ==================== */
.stories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.story-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.story-card__image-wrapper {
    position: relative;
    overflow: hidden;
}

.story-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.story-card:hover .story-card__image {
    transform: scale(1.05);
}

.story-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    gap: 0.5rem;
}

.story-card:hover .story-card__overlay {
    opacity: 1;
}

.story-card__overlay-icon {
    width: 32px;
    height: 32px;
}

.story-card__content {
    padding: 1.5rem;
    flex-grow: 1; /* Позволяет контенту занимать все доступное место */
}

.story-card__category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.story-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.story-card__excerpt {
    font-size: 0.9rem;
    color: var(--muted-text-color);
    line-height: 1.6;
}

.story-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--bg-color);
    margin-top: 1.5rem;
}

.story-card__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.story-card__author-name {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.story-card__author-role {
    display: block;
    font-size: 0.8rem;
    color: var(--muted-text-color);
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0 2rem;
    }
    .section__title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
}

/* ==================== СЕКЦИЯ ИНСАЙТОВ ==================== */
.insights {
    background-color: var(--surface-color);
}

.insights__container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--bg-color);
    padding: 1.25rem 0;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.accordion-item__title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
}

.accordion-item__icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Предотвращает сжатие иконки */
}

.accordion-item__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding-top 0.3s ease-out;
}

.accordion-item__text {
    color: var(--muted-text-color);
    line-height: 1.7;
    padding-right: 2rem; /* Чтобы текст не прилипал к краю */
}

.accordion-item__text strong,
.accordion-item__text em {
    color: var(--text-color);
}

/* Стили для активного состояния */
.accordion-item.accordion-open .accordion-item__icon {
    transform: rotate(180deg);
}

.accordion-item.accordion-open .accordion-item__content {
    padding-top: 1rem;
    /* max-height устанавливается через JS */
}

/* ==================== СЕКЦИЯ КАРЬЕРЫ ==================== */
.career__timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Центральная линия */
.career__timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--surface-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Расположение блоков по сторонам */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* Стрелочка-указатель для контентного блока */
.timeline-item__content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    border: medium solid var(--surface-color);
}

.timeline-item:nth-child(odd) .timeline-item__content::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--surface-color);
}

.timeline-item:nth-child(even) .timeline-item__content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--surface-color) transparent transparent;
}

/* Точки на центральной линии */
.timeline-item__point {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 15px;
    background-color: var(--bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.timeline-item:nth-child(odd) .timeline-item__point {
    right: -20px;
}

.timeline-item:nth-child(even) .timeline-item__point {
    left: -20px;
}

.timeline-item__content {
    padding: 20px 30px;
    background-color: var(--surface-color);
    position: relative;
    border-radius: 8px;
    transition: transform 0.3s;
}

.timeline-item__content:hover {
    transform: scale(1.03);
}

.timeline-item__title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-item__description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted-text-color);
}

/* Адаптивность для Timeline */
@media (max-width: 900px) {
    .career__timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 10px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .timeline-item__point {
        left: 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-item__point,
    .timeline-item:nth-child(even) .timeline-item__point {
        left: 0;
    }

    .timeline-item__content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--surface-color) transparent transparent;
    }
}

/* ==================== СЕКЦИЯ ИНСТРУМЕНТОВ ==================== */
.tools {
    background-color: var(--bg-color); /* Возвращаемся к основному фону */
}

.tools__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tool-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tool-card__logo {
    width: 60px; /* Фиксированный размер для единообразия */
    height: 60px;
    object-fit: contain;
}

.tool-card__name {
    font-family: var(--font-heading);
    color: var(--muted-text-color);
    font-size: 1rem;
}

/* ==================== СЕКЦИЯ КОНТАКТОВ ==================== */
.contact {
    background-color: var(--surface-color);
}

.section__subtitle {
    max-width: 500px;
    margin: -3rem auto 3rem;
    text-align: center;
    color: var(--muted-text-color);
    line-height: 1.6;
}

.contact__container {
    max-width: 700px;
    margin: 0 auto;
}

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

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-weight: 500;
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--surface-color);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(77, 208, 225, 0.2);
}

/* Стили для невалидных полей */
.form__input.is-invalid {
    border-color: #E57373; /* Red color for error */
}

.form__group--captcha {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form__group--checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.5rem;
}

.form__checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

.form__checkbox-label {
    font-size: 0.9rem;
    color: var(--muted-text-color);
}

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

.contact__button {
    margin-top: 1rem;
    padding: 1rem;
}

.form__message {
    text-align: center;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none; /* Скрыто по умолчанию */
}

.form__message--success {
    background-color: rgba(77, 208, 225, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.form__message--error {
    background-color: rgba(229, 115, 115, 0.1);
    border: 1px solid #E57373;
    color: #E57373;
}
/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid var(--bg-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

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

.cookie-popup__text {
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

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

.cookie-popup__button {
    padding: 0.7rem 1.5rem;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

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

/* ==================== СТРАНИЦЫ ПОЛИТИК ==================== */
.pages {
    padding: 5rem 0;
    background-color: var(--surface-color);
    min-height: calc(100vh - var(--header-height) - 300px); /* Примерная высота футера */
}

.pages .container {
    max-width: 800px;
    margin: 0 auto;
}

.pages h1, .pages h2 {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
}

.pages h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--bg-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
}

.pages p, .pages li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--muted-text-color);
    margin-bottom: 1rem;
}

.pages ul, .pages ol {
    padding-left: 25px;
    margin-bottom: 1.5rem;
}

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

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

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

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