/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --bg-gray: #f8fafc;
    --bg-blue-light: #eff6ff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --white: #ffffff;
    --header-height: 80px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Sora', sans-serif;
}

ul {
    list-style: none;
}

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

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

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn--primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

/* --- HEADER --- */
.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent);
}

.logo__icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    position: relative;
}

.logo__icon::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav__list {
    display: flex;
    gap: 30px;
}

.nav__link {
    font-weight: 500;
    color: var(--text-muted);
}

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

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

/* --- FOOTER --- */
.footer {
    background: #0f172a;
    color: var(--white);
    padding: 80px 0 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer__logo .logo__text {
    color: var(--white);
}

.footer__description {
    margin-top: 20px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer__title {
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: #94a3b8;
}

.footer__links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer__contacts li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    color: #94a3b8;
}

.footer__contacts i {
    color: var(--accent);
    width: 20px;
    flex-shrink: 0;
}

.footer__bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 992px) {
    .nav {
        display: none; /* Logic for JS toggle */
    }
    .burger {
        display: flex;
    }
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
    .header__btn {
        display: none;
    }
}
/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh; /* На весь экран */
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-blue-light) 100%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Canvas на заднем плане */
    pointer-events: none;
}

.hero__container {
    position: relative;
    z-index: 2; /* Контент поверх canvas */
    width: 100%;
}

.hero__content {
    max-width: 700px;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* Градиентный текст для акцента */
.text-gradient {
    background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Вторичная кнопка (прозрачная с рамкой) */
.btn--secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid rgba(30, 41, 59, 0.1);
}

.btn--secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Метрики внизу hero */
.hero__metrics {
    display: flex;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.metric__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric__value {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
}

.metric__icon {
    color: var(--accent);
}

.metric__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Mobile Hero */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }
    .hero__subtitle {
        font-size: 1.1rem;
    }
    .hero__actions {
        flex-direction: column;
        width: 100%;
    }
    .hero__btn--main, .btn--secondary {
        width: 100%;
        text-align: center;
    }
    .hero__metrics {
        flex-direction: column;
        gap: 20px;
    }
}
/* --- TECHNOLOGIES TICKER --- */
.tech {
    background-color: var(--bg-blue-light);
    padding: 40px 0;
    overflow: hidden;
    border-top: 1px solid rgba(37, 99, 235, 0.05);
    border-bottom: 1px solid rgba(37, 99, 235, 0.05);
}

.tech__track {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.tech__track span {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: rgba(30, 41, 59, 0.1); /* Полупрозрачный текст */
    padding: 0 40px;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: default;
}

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

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- PROCESS SECTION --- */
.process {
    padding: 100px 0;
    background-color: var(--bg-gray);
}

.process__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.image-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Карточки шагов */
.process__steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition);
}

.step-card.active {
    background: var(--white);
    border-color: rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.step-card__num {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(37, 99, 235, 0.2);
    margin-top: -4px;
}

.step-card.active .step-card__num {
    color: var(--accent);
}

.step-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 992px) {
    .process__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .process__image-side {
        order: 2;
    }
    .process__content-side {
        order: 1;
    }
}
/* --- SHARED SECTION HEADER --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* --- CASES SECTION --- */
.cases {
    padding: 100px 0;
    background-color: var(--bg-blue-light);
}

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

.case-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.case-card__image {
    position: relative;
    height: 220px;
}

.case-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--white);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
}

.case-card__content {
    padding: 30px;
}

.case-card__content h3 {
    margin-bottom: 12px;
}

.case-card__content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.case-card__tags {
    display: flex;
    gap: 10px;
}

.case-card__tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--bg-blue-light);
    border-radius: 6px;
    color: var(--accent);
    font-weight: 600;
}

/* --- BLOG SECTION (Flip Cards) --- */
.blog {
    padding: 100px 0;
    background-color: var(--bg-gray);
}

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

.flip-card {
    background-color: transparent;
    height: 400px;
    perspective: 1000px; /* Эффект глубины */
}

.flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card:hover .flip-card__inner {
    transform: rotateY(180deg);
}

.flip-card__front, .flip-card__back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.flip-card__front {
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

.flip-card__img {
    height: 60%;
}

.flip-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card__front-body {
    padding: 25px;
    text-align: left;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

/* Обратная сторона */
.flip-card__back {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.flip-card__back h3 {
    margin-bottom: 20px;
}

.flip-card__back p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Mobile responsive fixes */
@media (max-width: 576px) {
    .flip-card {
        height: 350px;
    }
}
/* --- CONTACT SECTION --- */
.contact {
    padding: 100px 0;
    background-color: var(--bg-blue-light);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.contact__list {
    margin-top: 30px;
}

.contact__list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.contact__list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Стили формы */
.contact__form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.form__group {
    margin-bottom: 20px;
    position: relative;
}

.form__input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--bg-gray);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form__error {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
    margin-top: 5px;
}

.form__captcha {
    margin: 25px 0;
    padding: 15px;
    background: var(--bg-blue-light);
    border-radius: 12px;
}

.form__captcha label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.form__checkbox input {
    margin-top: 4px;
}

.form__submit {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Лоадер для кнопки */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Статусы */
.form__status {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.form__status--success {
    background: #dcfce7;
    color: #166534;
}

.form__status--error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 992px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
}
/* --- MOBILE MENU --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    transition: 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu__list {
    text-align: center;
}

.mobile-menu__link {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 25px;
    font-family: 'Sora', sans-serif;
}

/* Изменение бургера при активации */
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- COOKIE POPUP --- */
.cookie-popup {
    position: fixed;
    bottom: -100px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    z-index: 3000;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.cookie-popup.active {
    transform: translateY(-120px);
}

.cookie-popup__container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-popup__icon {
    color: var(--accent);
    flex-shrink: 0;
}

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

.btn--sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- LEGAL PAGES DEFAULT STYLES --- */
.pages {
    padding: 150px 0 100px;
    background: var(--bg-gray);
    min-height: 80vh;
}

.pages h1 { margin-bottom: 40px; font-size: 1.6rem; color: var(--accent); }
.pages h2 { margin: 30px 0 15px; font-size: 1.4rem; }
.pages p { margin-bottom: 15px; color: var(--text-muted); }
.pages ul { margin-bottom: 15px; padding-left: 20px; list-style: disc; }