/*
 * Google Fonts:
 * font-family: 'Inter', sans-serif;
 * font-family: 'Space Grotesk', sans-serif;
*/

:root {
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --color-bg: #121212;
    --color-surface: #1E1E1E;
    --color-text: #EAEAEA;
    --color-text-muted: #A0A0A0;
    --color-primary: #00F5D4; 
    --color-secondary: #9B5DE5; 
    --color-border: #333333;

    --transition-fast: 0.2s ease-in-out;
}

/* --- Глобальные стили --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul {
    list-style: none;
}

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

/* --- Хедер (Header) --- */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background-color: rgba(18, 18, 18, 0.85);
    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(--color-text);
}
.header__logo:hover {
    color: var(--color-primary);
}

.header__nav-list {
    display: flex;
    gap: 30px;
}

.header__nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding-bottom: 5px;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

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

.header__nav-link:hover::after {
    width: 100%;
}

/* --- Футер (Footer) --- */
.footer {
    background-color: var(--color-surface);
    padding-top: 60px;
    margin-top: 80px;
    border-top: 1px solid var(--color-border);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

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

.footer__tagline {
    color: var(--color-text-muted);
    max-width: 200px;
}

.footer__heading {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-primary);
    font-weight: 500;
}

.footer__link {
    color: var(--color-text-muted);
    display: inline-block;
    margin-bottom: 8px;
}

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

.footer__contacts p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--color-text-muted);
}

.footer__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-secondary);
}

.footer__contacts address {
    font-style: normal;
}

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

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* В будущем здесь можно будет сделать бургер-меню */
    }
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__tagline {
        margin: 0 auto;
    }
    .footer__contacts p {
        justify-content: center;
    }
}
/* --- Общий класс для кнопок --- */
.button {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--color-primary);
    color: var(--color-bg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

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

/* --- Hero Section --- */
.hero {
    /* Высота секции равна высоте экрана минус высота хедера */
    min-height: calc(100vh - 81px); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 60px 0;
}

.hero__container {
    max-width: 800px;
}

.hero__title {
    font-size: clamp(2.5rem, 8vw, 5rem); /* Адаптивный размер шрифта */
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
    /* Указываем высоту, чтобы макет не "прыгал" до старта анимации */
    min-height: 110px; 
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--color-text-muted);
    max-width: 65ch; /* Ограничиваем длину строки для читаемости */
    margin-bottom: 40px;
}

/* --- Адаптивность для Hero --- */
@media (max-width: 768px) {
    .hero {
        text-align: center;
        min-height: calc(100vh - 73px);
    }
    .hero__title {
        min-height: 80px; /* Корректировка высоты для мобильных */
    }
    .hero__subtitle {
       margin-left: auto;
       margin-right: auto;
    }
}
/* --- Общий класс для заголовков секций --- */
.section-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
}
.section-title::after {
    content: '.';
    color: var(--color-primary);
}

/* --- Секция Истории --- */
.stories {
    padding: 80px 0;
}

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

.story-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    opacity: 0;
    transform: translateY(20px);
}

.story-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 245, 212, 0.07);
}

.story-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.story-card__image-wrapper {
    overflow: hidden;
    height: 200px;
}

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.story-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.story-card__category {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.story-card__title {
    font-size: 1.25rem;
    line-height: 1.3;
    flex-grow: 1;
    margin-bottom: 15px;
}

.story-card__author {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Модификатор для большой карточки */
@media (min-width: 992px) {
    .story-card--large {
        grid-column: span 2;
    }
    .story-card--large .story-card__title {
        font-size: 1.75rem;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .stories__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Секция Инсайты --- */
.insights {
    padding: 80px 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.insights__slider-wrapper {
    /* Чтобы скрыть горизонтальную прокрутку за пределами контейнера */
    max-width: 100%;
    overflow: hidden;
}

.insights__slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    /* Добавляем padding, чтобы карточки не прилипали к краям на мобильных */
    padding: 20px max(20px, (100% - 1240px) / 2);
    /* Скрываем стандартный скроллбар */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.insights__slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.insight-card {
    flex: 0 0 340px; /* Фиксированная ширина карточки */
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    position: relative;
    transition: border-color var(--transition-fast);
}

.insight-card:hover {
    border-color: var(--color-primary);
}

/* Декоративный элемент - кавычка */
.insight-card::before {
    content: '“';
    font-family: serif;
    font-size: 120px;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -10px;
    left: 20px;
    line-height: 1;
    z-index: 0;
}

.insight-card__quote {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 20px;
    font-style: italic;
    z-index: 1;
    position: relative;
}

.insight-card__author {
    font-style: normal;
    color: var(--color-text-muted);
    font-size: 14px;
    font-family: var(--font-heading);
    z-index: 1;
    position: relative;
}

@media (max-width: 400px) {
    .insight-card {
        flex-basis: 90%; /* Карточки занимают почти всю ширину экрана на маленьких мобильных */
    }
}

/* --- Секция Профессии --- */
.professions {
    padding: 80px 0;
}

.professions__accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-item__trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.accordion-item__title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    color: var(--color-text);
    font-weight: 500;
}

.accordion-item__icon {
    color: var(--color-primary);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: 20px;
}

.accordion-item.is-active .accordion-item__icon {
    transform: rotate(45deg);
}

.accordion-item__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-item__text {
    padding: 0 0 25px;
    max-width: 65ch;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- Секция Контакты --- */
.contact {
    padding: 80px 0;
}

.contact__subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: -40px auto 50px;
}

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.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(--color-text-muted);
}

.form-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 4px;
    transition: border-color var(--transition-fast);
    font-family: var(--font-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.form-checkbox-label {
    font-size: 14px;
    color: var(--color-text-muted);
}
.form-checkbox-label a {
    text-decoration: underline;
}

.contact__submit {
    margin-top: 20px;
    font-size: 18px;
}
.contact__submit:disabled {
    background-color: var(--color-text-muted);
    border-color: var(--color-text-muted);
    cursor: not-allowed;
}

.form-error {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
}
.form-success__icon {
    color: var(--color-primary);
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}
.form-success__title {
    font-size: 2rem;
    margin-bottom: 10px;
}
.form-success__text {
    color: var(--color-text-muted);
}

/* --- Секция Авторы --- */
.authors {
    padding: 80px 0;
    background-color: var(--color-surface);
}

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

.author-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    /* Для анимации появления */
    opacity: 0;
    transform: translateY(20px);
}

.author-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(155, 93, 229, 0.1); /* Тень фиолетового цвета */
}

.author-card__photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--color-border);
}

.author-card__name {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 5px;
}

.author-card__role {
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.author-card__socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.author-card__socials a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.author-card__socials a:hover {
    color: var(--color-primary);
}

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: -200px; /* Изначально скрыт под экраном */
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 40px);
    background-color: var(--color-surface);
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-shown {
    bottom: 20px;
}

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

.cookie-popup__text a {
    text-decoration: underline;
}

.cookie-popup__button {
    padding: 8px 24px;
    flex-shrink: 0;
}

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

/* --- Стили для служебных страниц (Политики и т.д.) --- */
.pages {
    padding: 80px 0;
}

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

.pages h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 40px;
    line-height: 1.2;
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.pages p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--color-text-muted);
}

.pages a {
    text-decoration: underline;
}

.pages ul, .pages ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--color-text-muted);
}

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