/* ------------------- */
/* 0. GLOBAL STYLES   */
/* ------------------- */
:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --primary-color: #A06CD5;
    --primary-color-hover: #B488E4;
    --text-color: #E0E0E0;
    --text-color-muted: #A0A0A0;
    --border-color: #333333;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

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

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

ul {
    list-style: none;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #ffffff;
    line-height: 1.2;
}

.button {
    display: inline-block;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ------------------- */
/* 1. HEADER          */
/* ------------------- */
.header {
    padding: 20px 0;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    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: 800;
    color: #ffffff;
}
.header__logo:hover {
    color: #ffffff;
}

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

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

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

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

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

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

/* --- Header Media Query --- */
@media (max-width: 992px) {
    .header__nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 100;
    }

    .header__nav.is-active {
        display: flex;
    }
    
    .header__nav-list {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header__nav-link {
        font-size: 24px;
    }
    
    .header__burger {
        display: block;
        z-index: 101;
    }
}


/* ------------------- */
/* 2. FOOTER          */
/* ------------------- */
.footer {
    background-color: var(--surface-color);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer__column--info {
    grid-column: span 1;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    display: block;
}
.footer__logo:hover {
    color: #ffffff;
}

.footer__description {
    color: var(--text-color-muted);
    font-size: 15px;
}

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

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

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.footer__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--text-color-muted);
}
.footer__address {
    font-style: normal;
    color: var(--text-color-muted);
}

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

/* --- Footer Media Query --- */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer__column--info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------- */
/* 3. HERO SECTION     */
/* ------------------- */
.hero {
    padding: 80px 0;
    overflow: hidden; /* Важно для предотвращения выхода элементов за пределы */
}

.hero__container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero__content {
    flex: 1 1 55%;
}

.hero__title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    min-height: 140px; /* Резервируем место под заголовок */
}

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

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

.hero__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 500px;
    margin-bottom: 30px;
    /* Стили для анимации появления */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.hero__cta {
    /* Стили для анимации появления */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.hero__content.is-visible .hero__subtitle,
.hero__content.is-visible .hero__cta {
    opacity: 1;
    transform: translateY(0);
}

.hero__image-wrapper {
    flex: 1 1 45%;
    perspective: 1000px; /* Включаем 3D-пространство для параллакса */
}

.hero__image {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Плавное движение для параллакса */
}

/* --- Hero Media Query --- */
@media (max-width: 992px) {
    .hero__title {
        font-size: 44px;
        min-height: 110px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
        text-align: center;
    }
    .hero__container {
        flex-direction: column;
        gap: 40px;
    }
    .hero__content {
        order: 2; /* Текст будет под картинкой */
    }
    .hero__image-wrapper {
        order: 1;
    }
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ------------------- */
/* 4. CASES SECTION    */
/* ------------------- */
.cases {
    padding: 80px 0;
    background-color: var(--surface-color);
}

.cases__header {
    text-align: center;
    margin-bottom: 60px;
}

.cases__title {
    font-size: 42px;
    margin-bottom: 10px;
}

.cases__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.case-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Стили для анимации появления */
    opacity: 0;
    transform: translateY(30px);
}

.case-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.case-card__link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.case-card__link-wrapper:hover {
    color: inherit;
}

.case-card__image-container {
    overflow: hidden;
}

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

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

.case-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px); /* Чтобы футер был внизу */
}

.case-card__tag {
    display: inline-block;
    background-color: rgba(160, 108, 213, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    align-self: flex-start;
}

.case-card__title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
}

.case-card__description {
    font-size: 15px;
    color: var(--text-color-muted);
    flex-grow: 1; /* Растягиваем описание, чтобы ссылка была внизу */
    margin-bottom: 20px;
}

.case-card__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s ease, gap 0.3s ease;
    align-self: flex-start; /* Чтобы ссылка не растягивалась */
}

.case-card__link:hover {
    color: var(--primary-color-hover);
    gap: 12px;
}

/* ------------------- */
/* 5. TOOLS SECTION    */
/* ------------------- */
.tools {
    padding: 80px 0;
}

.tools__header {
    text-align: center;
    margin-bottom: 60px;
}

.tools__title {
    font-size: 42px;
    margin-bottom: 10px;
}

.tools__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

.tools__scroller {
    max-width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

.tools__scroller:hover .tools__list {
    animation-play-state: paused;
}

.tools__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding-block: 10px;
    width: max-content;
}

/* Анимация скроллинга */
.tools__scroller[data-direction="left"] .tools__list {
    animation: scroll-left 40s linear infinite;
}
.tools__scroller[data-direction="right"] .tools__list {
    animation: scroll-right 40s linear infinite;
}

.tools__list li {
    background-color: var(--surface-color);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tools__list li:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

@keyframes scroll-left {
  to {
    transform: translateX(-50%);
  }
}

@keyframes scroll-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0%);
  }
}

/* --- Tools Media Query --- */
@media (max-width: 768px) {
    .tools__title {
        font-size: 32px;
    }
    .tools__subtitle {
        font-size: 16px;
    }
}
/* ------------------- */
/* 6. EXPERIENCE (TESTIMONIAL) SECTION */
/* ------------------- */
.experience {
    padding: 80px 0;
    background-color: var(--bg-color); /* Снова темный фон для контраста */
}

.experience__header {
    text-align: center;
    margin-bottom: 60px;
}

.experience__title {
    font-size: 42px;
    margin-bottom: 10px;
}

.experience__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

.testimonial {
    display: flex;
    align-items: center;
    gap: 60px;
    background-color: var(--surface-color);
    padding: 50px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    /* Анимация */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial.is-visible {
    opacity: 1;
    transform: scale(1);
}

.testimonial__image-wrapper {
    flex-shrink: 0;
}

.testimonial__image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial__content {
    position: relative;
}

.testimonial__icon {
    position: absolute;
    top: -20px;
    left: -30px;
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.testimonial__text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.testimonial__author-name {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    margin-bottom: 4px;
}

.testimonial__author-title {
    color: var(--text-color-muted);
}


/* --- Experience Media Query --- */
@media (max-width: 992px) {
    .testimonial__text {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .testimonial {
        flex-direction: column;
        text-align: center;
        padding: 40px 25px;
        gap: 30px;
    }
    .testimonial__image {
        width: 120px;
        height: 120px;
    }
    .testimonial__icon {
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 60px;
    }
}

/* ------------------- */
/* 7. CAREER (TIMELINE) SECTION */
/* ------------------- */
.career {
    padding: 80px 0;
    background-color: var(--surface-color);
}

.career__header {
    text-align: center;
    margin-bottom: 80px;
}

.career__title {
    font-size: 42px;
    margin-bottom: 10px;
}

.career__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

.career__timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

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

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    /* Анимация */
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Расположение блоков */
.timeline-item:nth-child(odd) {
    left: 0;
    transform: translateX(-30px);
}
.timeline-item:nth-child(even) {
    left: 50%;
    transform: translateX(30px);
}

/* Точки на линии */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -11px;
    top: 22px;
    background-color: var(--bg-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease;
}

.timeline-item:nth-child(even)::after {
    left: -9px;
}

.timeline-item:hover::after {
    transform: scale(1.2);
}

.timeline-item__content {
    padding: 25px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    position: relative;
    border-radius: 8px;
}

.timeline-item__title {
    font-size: 20px;
    margin-bottom: 10px;
}

.timeline-item__description {
    color: var(--text-color-muted);
    margin-bottom: 15px;
}

.timeline-item__link {
    font-weight: 600;
}

/* --- Career Media Query --- */
@media (max-width: 768px) {
    .career__timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
        left: 0 !important; /* Важно для переопределения */
        transform: translateX(30px);
    }
    .timeline-item:nth-child(even) {
        transform: translateX(30px);
    }
    .timeline-item.is-visible {
        transform: translateX(0);
    }
    .timeline-item::after {
        left: 11px;
    }
}

/* ------------------- */
/* 8. CONTACT SECTION  */
/* ------------------- */
.contact {
    padding: 80px 0;
}

.contact__header {
    text-align: center;
    margin-bottom: 60px;
}

.contact__title {
    font-size: 42px;
    margin-bottom: 10px;
}

.contact__subtitle {
    font-size: 18px;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    background-color: var(--surface-color);
    padding: 50px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

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

.contact__info-text {
    margin-bottom: 30px;
    line-height: 1.7;
    color: var(--text-color-muted);
}

.contact__info-details p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

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

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

.form-group__label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color-muted);
}

.form-group__input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(160, 108, 213, 0.2);
}
.form-group__input::placeholder {
    color: #555;
}

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

.contact__submit {
    margin-top: 10px;
    padding: 14px;
    font-size: 18px;
}
.contact__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none; /* Скрыт по умолчанию */
}
.form-message--success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
    display: block;
}
.form-message--error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    display: block;
}


/* --- Contact Media Query --- */
@media (max-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .contact__wrapper {
        padding: 30px 25px;
    }
    .contact__title {
        font-size: 32px;
    }
}
/* ------------------- */
/* 9. COOKIE POPUP     */
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    z-index: 200;
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-hidden {
    transform: translateY(150%);
}

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

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

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

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


/* ------------------- */
/* 10. STATIC PAGES STYLES */
/* (for privacy.html, terms.html, etc.) */
/* ------------------- */
.pages {
    padding: 60px 0;
}

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

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

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

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

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

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

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