/* ------------------- */
/* GLOBAL STYLES       */
/* ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@600;700&display=swap');

:root {
    --font-primary: 'Inter', sans-serif;
    --font-headings: 'Poppins', sans-serif;

    --color-background: #FFFFFF;
    --color-text-primary: #111827;
    --color-text-secondary: #6B7280;
    --color-accent: #4F46E5;
    --color-border: #E5E7EB;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-text-primary);
    line-height: 1.2;
}

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

a:hover {
    color: #3730A3;
}

ul {
    list-style: none;
}

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

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

/* ------------------- */
/* HEADER              */
/* ------------------- */
.header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

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

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

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

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

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

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

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

/* ------------------- */
/* FOOTER              */
/* ------------------- */
.footer {
    background-color: #F9FAFB;
    color: var(--color-text-secondary);
    padding-top: 4rem;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    padding-bottom: 4rem;
}

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

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

.footer__description {
    font-size: 0.95rem;
    max-width: 250px;
}

.footer__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

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

.footer__link {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

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

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer__contact-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.footer__bottom {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
}

.footer__copyright {
    text-align: center;
    font-size: 0.9rem;
}


/* ------------------- */
/* ADAPTIVE STYLES     */
/* ------------------- */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will be handled by JS for mobile menu */
    }

    .header__menu-button {
        display: block;
    }
}

/* ... (предыдущие стили для Global, Header, Footer) ... */

/* ------------------- */
/* BUTTONS             */
/* ------------------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.button--primary:hover {
    background-color: #3730A3;
    color: var(--color-background);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button--primary i {
    transition: transform 0.3s ease;
}

.button--primary:hover i {
    transform: translateX(4px);
}

/* ------------------- */
/* HERO                */
/* ------------------- */
.hero {
    padding: 6rem 0;
    min-height: calc(100vh - 70px); /* 70px - примерная высота хедера */
    display: flex;
    align-items: center;
}

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

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    min-height: 180px; /* Резервируем место под 3 строки текста, чтобы макет не "прыгал" */
}

.hero__title--animated {
    color: var(--color-accent);
}

.hero__title--cursor {
    display: inline-block;
    width: 3px;
    height: 3.5rem;
    background-color: var(--color-accent);
    margin-left: 8px;
    animation: blink 0.7s infinite;
    vertical-align: bottom;
}

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

.hero__description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero__image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    width: 100%;
    max-width: 500px;
    border-radius: 1rem;
    object-fit: cover;
}


/* ------------------- */
/* ADAPTIVE STYLES     */
/* ------------------- */
@media (max-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        order: 2;
    }
    
    .hero__image-wrapper {
        order: 1;
        margin-bottom: 3rem;
    }

    .hero__title {
        font-size: 2.5rem;
        min-height: 140px;
    }
    
    .hero__title--cursor {
       height: 2.5rem;
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    /* ... (предыдущие адаптивные стили для хедера) ... */

    .hero {
        padding: 4rem 0;
    }
}

/* ------------------- */
/* FEATURES            */
/* ------------------- */
.features {
    padding: 6rem 0;
    background-color: #F9FAFB; /* Slightly different background to separate sections */
}

.features__header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.features__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.features__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.features__card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.features__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.features__card-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    background-color: #EEF2FF; /* Light accent background */
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.features__card-icon i {
    width: 28px;
    height: 28px;
}

.features__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.features__card-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- ADAPTIVE FOR FEATURES --- */
@media (max-width: 992px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features {
        padding: 4rem 0;
    }
    
    .features__title {
        font-size: 2rem;
    }
    
    .features__grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------- */
/* PROCESS             */
/* ------------------- */
.process {
    padding: 6rem 0;
    background-color: var(--color-background);
}

.process__header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 5rem;
}

.process__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.process__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process__timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--color-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.process__item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}

.process__item:nth-child(odd) {
    left: 0;
}

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

.process__item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-background);
    border: 4px solid var(--color-accent);
    top: 28px;
    border-radius: 50%;
    z-index: 1;
}

.process__item:nth-child(even)::after {
    left: -10px;
}

.process__item-content {
    padding: 1.5rem;
    background-color: #F9FAFB;
    border: 1px solid var(--color-border);
    position: relative;
    border-radius: 0.5rem;
}

.process__item-number {
    position: absolute;
    top: 15px;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-border);
    z-index: -1;
}

.process__item:nth-child(odd) .process__item-number {
   right: 3rem;
}

.process__item:nth-child(even) .process__item-number {
   left: 3rem;
}

.process__item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.process__item-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}


/* --- ADAPTIVE FOR PROCESS --- */
@media screen and (max-width: 768px) {
    .process {
        padding: 4rem 0;
    }

    .process__title {
        font-size: 2rem;
    }

    .process__timeline::after {
        left: 20px;
    }

    .process__item {
        width: 100%;
        padding-left: 50px;
        padding-right: 1rem;
    }

    .process__item:nth-child(odd),
    .process__item:nth-child(even) {
        left: 0;
    }

    .process__item::after {
        left: 10px;
    }
}

/* ------------------- */
/* STACK               */
/* ------------------- */
.stack {
    padding: 6rem 0;
    background-color: #F9FAFB;
}

.stack__header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.stack__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.stack__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.stack__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.stack__item {
    height: 50px;
}

.stack__logo {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.stack__logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- ADAPTIVE FOR STACK --- */
@media screen and (max-width: 768px) {
    .stack {
        padding: 4rem 0;
    }

    .stack__title {
        font-size: 2rem;
    }
    
    .stack__grid {
        gap: 2.5rem;
    }
    
    .stack__item {
        height: 40px;
    }
}

/* ------------------- */
/* CASES               */
/* ------------------- */
.cases {
    padding: 6rem 0;
    background-color: var(--color-background);
}

.cases__header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.cases__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cases__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cases__card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.cases__card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.cases__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cases__card-category {
    display: inline-block;
    background-color: #EEF2FF;
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.cases__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.cases__card-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cases__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-top: auto;
}

.cases__card-link i {
    transition: transform 0.3s ease;
}

.cases__card-link:hover i {
    transform: translateX(4px);
}


/* --- ADAPTIVE FOR CASES --- */
@media (max-width: 992px) {
    .cases__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .cases {
        padding: 4rem 0;
    }

    .cases__title {
        font-size: 2rem;
    }

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

/* ------------------- */
/* CONTACT             */
/* ------------------- */
.contact {
    padding: 6rem 0;
    background-color: #F9FAFB;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 4rem;
}

.contact__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.contact__info-item a {
    color: var(--color-text-primary);
    font-weight: 500;
}
.contact__info-item a:hover {
    color: var(--color-accent);
}

.contact__form-wrapper {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.form__group--checkbox input {
    margin-top: 4px;
    flex-shrink: 0;
}

.form__group--checkbox label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}
.form__group--checkbox a {
    text-decoration: underline;
}

#submit-button {
    width: 100%;
}

.form__message {
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}
.form__message--success {
    background-color: #F0FDF4;
    color: #166534;
    border: 1px solid #A7F3D0;
}
.form__message--error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

/* --- ADAPTIVE FOR CONTACT --- */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .contact {
        padding: 4rem 0;
    }
    .contact__title {
        font-size: 2rem;
    }
    .contact__form-wrapper {
        padding: 1.5rem;
    }
}

/* ------------------- */
/* COOKIE POPUP        */
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-background);
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    z-index: 200;
}

.cookie-popup__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-popup__text {
    color: var(--color-text-secondary);
}

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

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

/* ------------------- */
/* PAGES (PRIVACY, ETC)*/
/* ------------------- */
.pages {
    padding: 4rem 0;
}

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

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

.pages h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.pages p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

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

.pages li {
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
}

.pages a {
    text-decoration: underline;
}

.pages a:hover {
    color: #3730A3;
}

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