/* КАРТИНКИ */
: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: 12cqw;
    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;
        /* ▼ ВЕРТИКАЛЬНЫЕ ОТСТУПЫ СЕКЦИИ — РЕДАКТИРУЙ ЗДЕСЬ */
        padding: 32px 20px 40px;      /* верх | бока | низ */
        box-sizing: border-box;
    }

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

    .ax-hero__content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;          /* центрируем дочерние блоки */
        /* ▼ ВЕРТИКАЛЬНЫЙ ОТСТУП МЕЖДУ БЛОКАМИ (tagline → title → фичи → кнопка) */
        gap: 0;                       /* отступы задаём точечно ниже */
    }

    /* ---- LLaiM ---- */
    .ax-hero__tagline {
        padding-top: 0;
        font-size: 13px;
        letter-spacing: 0.18em;
        /* ▼ ОТСТУП ПОД "LLaiM" ДО ЗАГОЛОВКА */
        margin-bottom: 16px;
        text-align: center;
    }

    /* ---- AI-платформа ---- */
    .ax-hero__title {
        padding-top: 0;
        font-size: 34px;
        line-height: 1.15;
        text-align: center;
        /* ▼ ОТСТУП ПОД "AI-платформа" ДО АКЦЕНТНОЙ СТРОКИ */
        margin-bottom: 8px;
    }

    /* ---- для дизайна, контента и вдохновения ---- */
    .ax-hero__title-accent {
        display: block;
        margin-top: 0;
        font-size: 24px;
        line-height: 1.25;
        text-align: center;
        /* ▼ ОТСТУП ПОД АКЦЕНТНОЙ СТРОКОЙ ДО ИКОНОК */
        margin-bottom: 28px;
    }

    /* ---- Иконки друг под другом, текст крупнее ---- */
    .ax-hero__mini-features {
        display: flex;
        flex-direction: column;       /* друг под другом */
        align-items: flex-start;      /* выравнивание по левому краю (иконка + текст) */
        justify-content: flex-start;
        gap: 16px;                    /* ▼ ОТСТУП МЕЖДУ ИКОНКАМИ */
        width: 100%;
        max-width: 320px;             /* чтобы блок не растягивался на всю ширину */
        margin: 0 auto;               /* центрируем сам блок */
        /* ▼ ОТСТУП ПОД БЛОКОМ ИКОНОК ДО КНОПКИ */
        margin-bottom: 28px;
    }

    .ax-hero__mini-feature {
        display: flex;
        flex-direction: row;
        align-items: center;          /* иконка по центру строки текста */
        margin-top: 0;                /* сбрасываем cqw-отступ с десктопа */
        gap: 12px;
        flex: none;
        min-width: 0;                 /* сбрасываем 180px с десктопа */
        width: 100%;
        text-align: left;
    }

    .ax-hero__mini-icon svg {
        width: 28px;                  /* иконки как есть */
        height: 28px;
    }

    .ax-hero__mini-label {
        font-size: 17px;              /* ▼ КРУПНЕЕ ТЕКСТ (было 13px) */
        line-height: 1.3;
    }

    .ax-hero__mini-desc {
        font-size: 15px;
        max-width: 100%;
        text-align: left;
    }

    /* ---- Кнопка как есть, по центру ---- */
    .ax-hero__actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 30px;                /* отступ уже задан через margin-bottom у фич */
        gap: 0;
        flex-wrap: nowrap;
        width: 100%;
    }

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

    .ax-hero__btn {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 6px;
        flex-shrink: 0;
    }

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


/* ============================================
   БЛОК: ГОТОВЫЕ ПРОЕКТЫ (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 {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    /* ▼ ВЕРТИКАЛЬНЫЕ ОТСТУПЫ СЕКЦИИ — РЕДАКТИРУЙ ЗДЕСЬ */
    padding: 60px 24px 64px;   /* верх | бока | низ */
    box-sizing: border-box;
}

.ax-features__header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 28px;        /* ▼ ОТСТУП ПОД ШАПКОЙ ДО СЕТКИ */
}

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

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

/* ----- Сетка карточек ----- */
.ax-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;                  /* ▼ ОТСТУП МЕЖДУ КАРТОЧКАМИ */
}

.ax-features__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* ▼ ВНУТРЕННИЕ ОТСТУПЫ КАРТОЧКИ */
    padding: 32px 28px;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    background: var(--bg-tertiary, transparent);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Иконка + заголовок в одну строку */
.ax-features__card-head {
    display: flex;
    align-items: center;          /* иконка по центру строки с заголовком */
    gap: 12px;                    /* ▼ ОТСТУП МЕЖДУ ИКОНКОЙ И ЗАГОЛОВКОМ */
    margin-bottom: 16px;          /* ▼ ОТСТУП ОТ СТРОКИ (иконка+заголовок) ДО ТЕКСТА */
}

/* У иконки убираем нижний отступ — теперь отступ задаёт card-head */
.ax-features__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0;             /* было 20px — теперь 0 */
    color: var(--accent-primary);
    border-radius: 10px;
    background: var(--accent-transparent-015, rgba(0,0,0,0.04));
    flex-shrink: 0;               /* иконка не сжимается, если заголовок длинный */
}

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

/* У заголовка убираем нижний отступ — теперь он внутри card-head */
.ax-features__card-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.25;
    color: var(--text-primary4);
    margin: 0;                    /* было 0 0 12px — теперь 0 */
}

.ax-features__card:hover {
    border-color: var(--border-accent, var(--accent-primary));
    box-shadow: 0 4px 20px var(--accent-transparent-015, rgba(0,0,0,0.15));
}

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

/* ----- Акцентная строка под сеткой ----- */
.ax-features__accent {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 22px;
    line-height: 1.4;
    text-align: center;
    color: var(--text-primary4);
    max-width: 820px;
    margin: 48px auto 0;        /* ▼ ОТСТУП ОТ СЕТКИ ДО АКЦЕНТА */
    /* ▲ ОТСТУП ПОД АКЦЕНТОМ ДО СЛЕДУЮЩЕЙ СЕКЦИИ = padding-bottom у .ax-features */
}

.ax-features__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 28px;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;             /* чтобы картинка не вылезала за скругления */
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* НЕ добавляем hover — по твоей просьбе */
}

/* Картинки для каждой карточки — РЕДАКТИРУЙ ПУТИ ЗДЕСЬ */

.ax-features__card--canvas {
    background-image: url('/images/feature-canvas.webp');
}

.ax-features__card--style {
    background-image: url('/images/feature-style.jpg');
}

.ax-features__card--export {
    background-image: url('/images/feature-export.jpg');
}

/* Весь контент карточки — поверх подложки */
.ax-features__card > * {
    position: relative;
    z-index: 1;
}

.ax-features {
    position: relative;
}

.ax-features {
    position: relative;
    overflow: hidden;             /* чтобы блик не вылезал за секцию */
}

.ax-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;                              /* ▼ ТОЛЩИНА */
    background: var(--bg-secondary);
    pointer-events: none;
}

/* Бегущий блик поверх полоски */
.ax-features::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10%;                    /* старт за левым краем */
    width: 30%;                    /* ▼ ШИРИНА БЛИКА */
    height: 8px;                   /* = толщине полоски */
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--accent-primary, #fff) 50%,
        transparent 100%
    );
    opacity: 0.8;                  /* ▼ ЯРКОСТЬ БЛИКА */
    animation: axFeaturesSweep 5s ease-in-out infinite;   /* ▼ СКОРОСТЬ */
    pointer-events: none;
}

@keyframes axFeaturesSweep {
    0%   { left: -30%; }
    100% { left: 100%; }
}

/* ----- Адаптив ----- */
@media (max-width: 900px) {
    .ax-features {
        padding: 64px 20px 48px;
    }

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

    .ax-features__grid {
        grid-template-columns: 1fr;   /* на планшете/мобиле — в колонку */
    }

    .ax-features__accent {
        font-size: 19px;
    }
}

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

    .ax-features__header {
        margin-bottom: 28px;
    }

    .ax-features__title {
        font-size: 22px !important;
    }

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

    .ax-features__card {
        padding: 24px 20px;
    }

    .ax-features__card-title {
        font-size: 18px;
    }

    .ax-features__accent {
        font-size: 17px;
        margin-top: 32px;
    }
}