/* КАРТИНКИ */
:root { --hero-bg: url('/images/8-dark.jpg'); }
[data-theme="light"] { --hero-bg: url('/images/8-late.jpg'); }

/* MAIN — без отступов */
.ax-index-main {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* СЕКЦИЯ С ФОНОМ */
.ax-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1688 / 688;
    background-image: var(--hero-bg);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    overflow: hidden; /* Текст физически не вылезет за картинку */
    container-type: size; /* Дает нам cqh (1cqh = 1% высоты картинки) */
}

/* ЛЕВАЯ КОЛОНКА */
.ax-hero__left {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;                    /* Ширина левой колонки (можешь крутить) */
    height: 100%;
    display: flex;
    align-items: flex-start;
    padding-top: 0.1cqw;
    padding-left: 3cqw;            /* Отступ слева от края колонки */
    padding-right: 2cqw;
    box-sizing: border-box;
    container-type: inline-size;   /* МАГИЯ: теперь cqw = 1% от ширины этой колонки */
}

/* КОНТЕНТ — отступы тоже адаптивные (в cqh) */
.ax-hero__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1cqw;                     /* Отступы между блоками (в % от ширины колонки) */
}

/* ЗАГОЛОВОК */
.ax-hero__title {
    padding-top: 2.1cqw;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 9cqw;             /* Размер = 7.5% от ширины колонки */
    line-height: 0.2;
    color: var(--text-primary4);
}

.ax-hero__tagline {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    padding-top: 4.18cqw;
    font-size: 2.3cqw;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-label);
}

.ax-hero__title-accent {
    display: block;
    margin-top: 0.02em;
    font-weight: 400;
    font-size: 6cqw;             /* Размер = 3.2% от ширины колонки */
    line-height: 0.2;
    color: var(--accent-primary);
}

/* КНОПКА И СПИСОК */
.ax-hero__actions {
    display: flex;
    align-items: center;
    margin-top: 16cqw;
    gap: 8cqw;
    flex-wrap: nowrap;
}

.ax-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 2cqw 3cqw;
    background: var(--accent-primary);
    color: var(--text-primary);
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 2.2cqw;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.ax-hero__btn:hover {
    background: var(--accent-primary-hover);
}

.ax-hero__btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ax-hero__btn:hover .ax-hero__btn-arrow {
    transform: translateX(3px);
}

.ax-hero__side-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5cqh;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 2cqh;
    color: var(--text-secondary);
}

.ax-hero__side-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.5cqw;          /* отступ слева, чтобы текст не лип к полоске */
    display: flex;
    flex-direction: column;
    gap: 0.5cqh;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 2cqh;
    color: var(--text-secondary);
    position: relative;             /* нужно для позиционирования ::before */
    border-left: 1px solid var(--border-subtle, rgba(255,255,255,0.15));
}

[data-theme="light"] .ax-hero__side-list {
    border-left-color: rgba(0,0,0,0.12);
}


/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ HERO (≤ 600px)
   ============================================ */
@media (max-width: 600px) {

    /* Убираем картинку и фиксированную пропорцию */
    .ax-hero {
        aspect-ratio: auto;
        background-image: none;
        background-color: var(--bg-primary, #0d0d0d);
        min-height: auto;
        container-type: normal;   /* отключаем cq-контейнер, чтобы не мешал */
        padding: 32px 20px 40px;
        box-sizing: border-box;
    }

    /* Левая колонка больше не absolute, занимает всю ширину */
    .ax-hero__left {
        position: relative;
        width: 100%;
        height: auto;
        padding: 0;
        display: block;
        container-type: normal;   /* отключаем inline-size контейнер */
    }

    /* Контент по центру */
    .ax-hero__content {
        width: 100%;
        gap: 16px;
        text-align: center;
        align-items: center;
    }

    /* Tagline */
    .ax-hero__tagline {
        padding-top: 0;
        font-size: 13px;
        letter-spacing: 0.18em;
    }

    /* Главный заголовок */
    .ax-hero__title {
        padding-top: 0;
        font-size: 32px;
        line-height: 1.15;
    }

    /* Акцентная строка */
    .ax-hero__title-accent {
        display: block;
        margin-top: 8px;
        font-size: 22px;
        line-height: 1.2;
    }

    /* Кнопка + список — вертикально по центру */
    .ax-hero__actions {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-top: 24px;
        gap: 0;
        flex-wrap: nowrap;
    }

    /* Скрываем список на мобильных */
    .ax-hero__side-list {
        display: none;
    }

    /* Кнопка — оставляем как есть (компактная) */
    .ax-hero__btn {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 6px;
        flex-shrink: 0;
    }
}


/* ============================================
   БЛОК: ГОТОВЫЕ ПРОЕКТЫ (ax-projects)
   ============================================ */

.ax-projects {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 24px;
    box-sizing: border-box;
}

/* ----- Шапка ----- */
.ax-projects__header {
    position: relative;
    text-align: center;
    max-width: 1600px;
    margin: 0 auto 10px;
    padding: 38px 28px;
    z-index: 0;
}

.ax-projects__header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
    box-shadow: 0 -8px 28px var(--accent-transparent-015);
    clip-path: inset(-100px 0 0 0);   /* обрезаем снизу, сверху оставляем запас для тени */
    z-index: -1;
    pointer-events: none;
}

.ax-projects__title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 40px;
    line-height: 1.2;
    color: var(--accent-primary);
    margin: 0 0 16px;
}

.ax-projects__subtitle {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* ----- Табы ----- */
.ax-projects__tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 48px;
    padding: 0;
}

.ax-projects__tab {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.ax-projects__tab:hover:not(:disabled) {
    color: var(--text-secondary);
    border-color: var(--border-secondary);
}

.ax-projects__tab.is-active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--accent-transparent-015);
}

.ax-projects__tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ----- Сцена / слайд ----- */
.ax-projects__stage {
    width: 100%;
}

.ax-projects__slide {
    display: none;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}

.ax-projects__slide.is-active {
    display: grid;
}

/* ----- Левая колонка: превью ----- */
.ax-projects__preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ----- Левая колонка: превью ----- */
.ax-projects__preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ax-projects__big {
    width: 100%;
    /* БЕЗ aspect-ratio */
    /* БЕЗ min-height */
    /* БЕЗ display: flex — иначе появится лишняя высота/фон */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.ax-projects__big-img {
    display: block;
    width: 100%;
    height: auto;
    /* БЕЗ object-fit */
    transition: opacity 0.2s ease;
}

/* ----- Миниатюры ----- */
.ax-projects__thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    scroll-snap-type: x proximity;
}

.ax-projects__thumbs::-webkit-scrollbar {
    height: 6px;
}
.ax-projects__thumbs::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}
.ax-projects__thumbs::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}
.ax-projects__thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.ax-projects__thumb {
    flex: 0 0 120px;
    width: 120px;
    aspect-ratio: 16 / 10;
    padding: 0;
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    scroll-snap-align: start;
}

.ax-projects__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ax-projects__thumb:hover {
    border-color: var(--border-secondary);
}

.ax-projects__thumb.is-active {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 2px var(--accent-transparent-02);
}

.ax-projects__thumb:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ----- Правая колонка: текст ----- */
.ax-projects__info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ax-projects__info-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    color: var(--text-primary4);
    margin: 0;
}

.ax-projects__info-text {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.ax-projects__info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: var(--text-muted2);
}

.ax-projects__info-list li {
    position: relative;
    padding-left: 20px;
    line-height: 1.4;
}

.ax-projects__info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.ax-projects__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    align-self: flex-start;
    padding: 12px 24px;
    background: var(--accent-primary);
    color: var(--text-primary);
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.ax-projects__btn:hover {
    background: var(--accent-primary-hover);
}

.ax-projects__btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ax-projects__btn:hover .ax-projects__btn-arrow {
    transform: translateX(3px);
}

/* ----- Адаптив ----- */
@media (max-width: 900px) {
    .ax-projects__slide {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ax-projects__title {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    .ax-projects {
        padding: 48px 16px;
    }

    .ax-projects__title {
        font-size: 26px;
    }

    .ax-projects__subtitle {
        font-size: 15px;
    }

    .ax-projects__tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
        margin-bottom: 32px;
    }
    .ax-projects__tabs::-webkit-scrollbar { display: none; }

    .ax-projects__info-title {
        font-size: 22px;
    }

    .ax-projects__thumb {
        flex: 0 0 96px;
        width: 96px;
    }

    .ax-projects__btn {
        align-self: stretch;
        justify-content: center;
    }
}

/* ============================================
   БЛОК: ИКОНКИ (ax-features)
   ============================================ */

.ax-features {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px;
    box-sizing: border-box;
    z-index: 0;
}

/* Подсветка сверху, без тени снизу — как у .ax-projects__header */
.ax-features::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    box-shadow: 0 -8px 28px var(--accent-transparent-015);
    clip-path: inset(-100px 0 0 0);
    z-index: -1;
    pointer-events: none;
}

.ax-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: start;
}

.ax-features__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.ax-features__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.ax-features__icon svg {
    display: block;
    width: 48px;
    height: 48px;
}

.ax-features__label {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .ax-features__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .ax-features {
        padding: 32px 16px;
    }

    .ax-features__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ax-features__item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        justify-content: flex-start;
        gap: 16px;
    }

    .ax-features__icon svg {
        width: 36px;
        height: 36px;
    }
}