@font-face {
    font-family: 'Max Sans';
    font-weight: 300;
    font-display: block;
    src: url(fonts/MaxSans-Light.woff2) format("woff2"), url(fonts/MaxSans-Light.woff) format("woff");
}

@font-face {
    font-family: 'Max Sans';
    font-weight: 400;
    font-display: block;
    src: url(fonts/MaxSans-Regular.woff2) format("woff2"), url(fonts/MaxSans-Regular.woff) format("woff");
}

@font-face {
    font-family: 'Max Sans';
    font-weight: 500;
    font-display: block;
    src: url(fonts/MaxSans-Medium.woff2) format("woff2"), url(fonts/MaxSans-Medium.woff) format("woff");
}

@font-face {
    font-family: 'Max Sans';
    font-weight: 600;
    font-display: block;
    src: url(fonts/MaxSans-DemiBold.woff2) format("woff2"), url(fonts/MaxSans-DemiBold.woff) format("woff");
}

@font-face {
    font-family: 'Max Sans';
    font-weight: 700;
    font-display: block;
    src: url(fonts/MaxSans-Bold.woff2) format("woff2"), url(fonts/MaxSans-Bold.woff) format("woff");
}

html {
    scroll-behavior: smooth;
}

:root {
    --font: 'Max Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --primary-bg: #0d0d0d;
    --secondary-bg: #1c1c1e;
    --primary-text: #ffffff;
    --secondary-text: #8b8b8b;
    --accent-grad-1: #161f8a;
    --accent-grad-2: #2d085f;
    --accent-color: #3a8dff;
}

body {
    margin: 0;
    font-family: var(--font);
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    padding-top: 120px;
    /* Увеличиваем отступ для нового хедера */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    max-width: 1260px;
    margin: 0 auto;
    z-index: 1000;
    border-radius: 32px;
    background: #281d39cb;
    /* Новый фон */
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 25px #0000001a, 0 5px 10px #0000001a;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 88px;
    padding: 0 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-text);
}

.logo-svg {
    height: 32px;
    width: auto;
    color: var(--primary-text);
}

.logo-text {
    font-size: 1.4em;
    font-weight: 600;
    margin-left: 12px;
    color: var(--secondary-text);
}

.header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.header nav ul li {
    margin-left: 30px;
}

.header nav a {
    color: #b5b5b5;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.header nav a:hover {
    color: var(--primary-text);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(45, 8, 95, 0.3), transparent 70%);
    transform: translateX(-50%);
    z-index: -1;
}

.hero h1 {
    font-size: 3.8em;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.3em;
    color: var(--secondary-text);
    max-width: 650px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-block;
    padding: 16px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--accent-grad-1), var(--accent-grad-2));
    color: var(--primary-text);
    box-shadow: 0 5px 15px rgba(45, 8, 95, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 8, 95, 0.6);
}

/* Services Section */
.services {
    padding: 100px 0;
}

.services h2,
.tech h2,
.contact h2 {
    text-align: center;
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 70px;
}

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

.service-card {
    background-color: var(--secondary-bg);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid #222;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.service-card h3 {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary-text);
    margin-top: 0;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--secondary-text);
}

#ai-service-card {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 16px;
}

#ai-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -2px;
    /* Ширина рамки */
    border-radius: inherit;
    /* Наследование скругления */
    background: linear-gradient(to right, var(--accent-grad-1), var(--accent-grad-2));
}

#ai-service-card h3 {
    color: #fff;
    /* Делаем заголовок ярче */
}

/* Tech Section */
.tech {
    padding: 100px 0;
    background-color: #111;
}

.tech p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--secondary-text);
    font-size: 1.2em;
}

.tech ul {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 0 auto;
}

.tech ul li {
    background-color: var(--secondary-bg);
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    font-weight: 500;
}

/* Cases Section */
.cases {
    padding: 100px 0;
    background-color: #111;
}

.cases h2 {
    text-align: center;
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 50px;
}

.case-card {
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #222;
    max-width: 800px;
    margin: 0 auto;
}

.case-card h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 20px;
}

.case-card p {
    color: var(--secondary-text);
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 25px;
}

.case-status {
    margin-top: 20px;
}

.status-badge {
    display: inline-block;
    background: linear-gradient(to right, var(--accent-grad-1), var(--accent-grad-2));
    color: var(--primary-text);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Call to Action Section */
.call-to-action {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.call-to-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(45, 8, 95, 0.4), transparent 60%);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-logo {
    margin-bottom: 40px;
}

.cta-logo img {
    max-width: 150px;
    opacity: 0.8;
}

.cta-title {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 1.2em;
    color: var(--secondary-text);
    max-width: 500px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.cta-buttons .btn {
    min-width: 200px;
    flex: 0 0 auto;
}

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    border: 2px solid #333;
}

.btn-secondary:hover {
    background-color: #333;
    border-color: #555;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}


/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #333;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    font-family: var(--font);
    font-size: 1em;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    align-self: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
    border-top: 1px solid #222;
    color: var(--secondary-text);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
        /* Корректируем отступ для мобильного хедера */
    }

    .header {
        left: 15px;
        right: 15px;
    }

    .header-container {
        height: auto;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .header nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    .header nav ul li {
        margin: 0 10px;
        /* Горизонтальные отступы */
    }

    .header nav a {
        font-size: 16px;
        /* Уменьшаем шрифт */
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .services h2,
    .tech h2,
    .cta-title {
        font-size: 2.2em;
    }

    .service-card h3 {
        font-size: 1.4em;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: none;
        margin: 0;
        text-align: center;
        box-sizing: border-box;
    }
}