/* ==========================================================================
   dl-enhance.css — визуальные улучшения лендинга diglabel.moscow
   Подключается ПОСЛЕ style.css темы. Ничего не меняет в структуре и текстах:
   только типографика, адаптив, закреплённая шапка, мобильный док, карусели и анимации.
   Все собственные сущности имеют префикс dlx-.
   ========================================================================== */

:root {
    --dlx-red: #ce1a30;
    --dlx-red-soft: #ff5b6f;
    --dlx-blue: #00457c;
    --dlx-ink: #333;
    --dlx-bg: #f3f1f1;
    --dlx-ease: cubic-bezier(.22, .8, .24, 1);
    --dlx-ease-io: cubic-bezier(.65, 0, .35, 1);
    --dlx-spring: cubic-bezier(.3, 1.18, .45, 1); /* едва заметный «доводчик», без пружинного отскока */
    --dlx-dock-h: 62px;
    --dlx-dock-gap: 10px;
}

.dlx-hidden { display: none !important; }

/* ==========================================================================
   1. ТИПОГРАФИКА: переносы, межстрочные интервалы, отступы
   ========================================================================== */

/* Ровные заголовки без «висячих» слов; абзацы без одинокого последнего слова */
.type__cart-title,
.guide-download__title,
.dl-cases__title,
.about__cart-item-title,
.type__block-item-title,
.stage__cart-item-title,
.payment__cart-item-title,
.mini__form-form-title,
.dl-case-card__title,
.factory__cart-item-text {
    text-wrap: balance;
}

.cover-title-text,
.type__cart-txt,
.stage__cart-txt,
.about__cart-item-text,
.type__block-item-text,
.factory__cart-item-text-mini,
.payment__cart-item-text,
.faq-answer-text,
.guide-download__text,
.dl-cases__intro,
.dl-case-card__summary,
.best__block-item-p,
.type__cart-item-nine-text,
.map-box-title p,
.footer-main-column-txt {
    text-wrap: pretty;
}

/* Ссылки в тексте: подчёркивание больше не перечёркивает следующую строку на мобильных */
.dl-inline-link {
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
    text-decoration-color: rgba(0, 69, 124, .45);
    transition: color .3s ease, text-decoration-color .3s ease;
}
.dl-inline-link--light { text-decoration-color: rgba(53, 181, 238, .6); }
.dl-inline-link:hover,
.dl-inline-link:focus-visible { text-decoration-color: currentColor; }

/* короткая плашка в заголовке не дробится на две (класс ставит JS, если плашка помещается в строку) */
.cover-title-color.dlx-plate-solid { white-space: nowrap; }

/* «Закажите звонок» не рвётся на две строки */
.cover-title-buttons-p-btn { white-space: nowrap; }

/* Карточки «О нас»: заголовок не наезжает на картинку */
.about__cart-item-second .about__cart-item-title { max-width: min(220px, calc(100% - 132px)); }
.about__cart-item-third .about__cart-item-title { max-width: min(196px, calc(100% - 148px)); }
/* «Экспертиза этикетки»: заголовку хватает ширины текстовой колонки — две ровные строки вместо трёх-четырёх */
.about__cart-item-five .about__cart-item-title { max-width: 100%; }

@media (min-width: 1101px) {
    /* заголовок «…и подскажем решение» упирался в правый край белой плашки */
    #big__form .form-block-titlebox { max-width: 390px; padding-right: 28px; }
}

@media (max-width: 1279px) {
    /* в первом экране два абзаца слипались в один */
    .cover-title > .cover-title-text-2 { margin-top: 12px; }

    /* заголовки секций: был фиксированный интерлиньяж 44.8px при кегле 22–26px */
    .type__cart-title,
    .stage__cart-title { line-height: 1.36; }

    /* плашка в заголовке обнимает каждую строку, а не превращается в кирпич */
    .type__cart-title .cover-title-color {
        display: inline;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
        line-height: 1.84;
        padding: 3px 9px 4px;
        border-radius: 12px;
    }

    .cover-title-h1 .cover-title-color { line-height: 1.74; }
}

@media (max-width: 767px) {
    .cover-title-h1 { line-height: 1.32; }
    .cover-title-h1 .cover-title-color { line-height: 1.8; padding: 2px 8px 3px; border-radius: 12px; }
    .cover-title > .cover-title-text { margin-top: 14px; }
    .cover-title > .cover-title-text-2 { margin-top: 10px; margin-bottom: 16px; }
    .cover-title .type__cart-txt { margin-bottom: 24px; }

    /* фото на первом экране: тема задаёт ширину 392px при высоте до 300px — бутылку сплющивало */
    .cover-pic-img { width: auto; height: auto; }
}

/* --------------------------------------------------------------------------
   Первый экран на телефоне. Содержимое и порядок прежние, меняется только раскладка:
   заголовок → факты списком («состав на этикетке») рядом с фото продукта целиком →
   подводка → кнопки во всю ширину. Обёртки .dlx-fact ставит ранний скрипт (dl-enhance-early.js).
   -------------------------------------------------------------------------- */
@media (max-width: 620px) {
    .cover {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(108px, 34vw, 190px);
        grid-template-rows: auto auto 1fr auto auto;
        gap: 0 12px;
        align-items: start;
        min-height: 0;
    }
    .cover-title { display: contents; }

    .cover-title-h1 {
        grid-area: 1 / 1 / 2 / -1;
        margin-bottom: 18px;
        font-size: clamp(22px, 6.9vw, 30px);
        letter-spacing: -.01em;
    }

    /* факты */
    .cover-title > .cover-title-text {
        grid-column: 1;
        grid-row: 2;
        max-width: none;
        margin: 0;
        font-size: clamp(13.5px, 3.87vw, 15px);
        font-weight: 500;
        line-height: 1.32;
        color: #1f1f1f;
    }
    .cover-title > .cover-title-text-2 { grid-row: 3; margin: 0; }
    .dlx-facts br { display: none; }
    .dlx-fact {
        display: block;
        padding: 10px 0 11px;
        border-top: 1px solid rgba(51, 51, 51, .16);
    }
    .cover-title-text-2 .dlx-fact:last-child { border-bottom: 1px solid rgba(51, 51, 51, .16); }

    /* подводка перед кнопками */
    .cover-title > .cover-title-text.type__cart-txt {
        grid-area: 4 / 1 / 5 / -1;
        margin: 16px 0 0;
        font-size: 15px;
        font-weight: 400;
        line-height: 1.42;
        color: #5b5555;
    }

    /* фото продукта: стоит целиком на белой плашке с фирменным бегущим текстом */
    .cover-pic {
        grid-area: 2 / 2 / 4 / 3;
        position: relative;
        left: auto;
        bottom: auto;
        align-self: stretch;
        width: auto;
        height: 100%;
        min-height: 178px;
        max-height: none;
    }
    .cover-pic-slide__text {
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 0;
        justify-content: flex-start;
        gap: 1px;
        width: 100%;
        height: auto;
        padding-top: 5px;
        border-radius: 18px;
        background: #fff;
    }
    .cover-pic .marquee__content { font-size: 14px; line-height: 19px; }
    .cover-pic picture {
        position: absolute;
        inset: -14px -10px 0;
        z-index: 1;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        pointer-events: none;
    }
    .cover-pic-img {
        position: static;
        z-index: auto;
        width: auto;
        max-width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
        object-position: 50% 100%;
    }

    /* кнопки: главная — во всю ширину, вторая — контурная, подписи по центру */
    .cover-title-buttons { grid-area: 5 / 1 / 6 / -1; gap: 12px; margin-top: 18px; }
    .cover .cover-title-buttons-block { gap: 5px; width: 100%; }
    .cover .cover-title-button { width: 100%; padding: 17px 20px 18px; }
    .cover .cover-title-black { background-color: transparent; box-shadow: inset 0 0 0 1.5px #333; color: #333; }
    .cover .cover-title-black:hover,
    .cover .cover-title-black:active { background-color: #333; color: #fff; }
    .cover .cover-title-buttons-block-p { line-height: 1.4; text-align: center; color: #5b5555; }
    .cover .cover-title-buttons-p { max-width: none; margin: 2px 0 0; text-align: center; }
}

/* ==========================================================================
   2. ПРАВКИ АДАПТИВА (то, что вылезало и наезжало)
   ========================================================================== */

@media (max-width: 767px) {
    /* Технологии: карточки были шире экрана на 360–375px */
    .factory__cart-list { grid-template-columns: minmax(0, 1fr); }
    .factory__cart-item { min-width: 0; }

    /* Этапы: вторая колонка уезжала за экран, номера 2/4/6 обрезались, слова рвались */
    .stage__cart { margin-left: 0; margin-right: 0; }
    .stage__cart-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stage__cart-item { min-width: 0; padding: 60px 16px 18px; gap: 10px; }
    .stage__cart-item::after {
        top: 16px;
        left: 16px;
        right: auto;
        width: 32px;
        height: 32px;
        font-size: 15px;
        transform: none;
    }
    .stage__cart-item-seven { padding-top: 22px; }
    .stage__cart-item-title {
        font-size: 18px;
        line-height: 1.25;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    .stage__cart-item-item { overflow-wrap: break-word; }

    /* «Не уверены…»: одна из трёх карточек была на 100px выше соседних */
    .best__block-item-3 { min-height: 0; }

    /* подписи в карточках «Типовые задачи»: интерлиньяж 100% слипал строки */
    .type__block-item-text { line-height: 1.3; }
}

@media (max-width: 1279px) {
    /* «Типовые задачи»: на узких карточках картинки закрывали заголовки и подписи */
    .type__block-item-img {
        width: auto;
        max-width: 92%;
        max-height: 54%;
        object-fit: contain;
        object-position: 50% 100%;
    }
}
@media (min-width: 1024px) and (max-width: 1279px) {
    .type__block-item-2 .type__block-item-title,
    .type__block-item-2 .type__block-item-text { max-width: calc(100% - 240px); }
}
@media (max-width: 1023px) {
    .type__block-item-img { max-height: 50%; }
    .type__block-item-2 .type__block-item-img { right: 12px; }
}

@media (min-width: 621px) and (max-width: 980px) {
    /* Технологии на планшете: длинные слова вылезали из узких карточек, кнопка обрезалась */
    .factory__cart-item-text { font-size: 20px; line-height: 1.25; }
    .factory__cart-item-third .type__cart-item-nine-url { padding-left: 18px; padding-right: 18px; }
}

@media (min-width: 432px) and (max-width: 1279px) {
    /* «Экспертиза этикетки»: на узких карточках текст лежал поверх светлой ленты.
       Картинка остаётся на своём месте (её края совпадают с краями карточки, без «срезов»),
       а лента уезжает влево ровно настолько, чтобы не заходить под текстовую колонку.
       Если карточка достаточно широкая, сдвиг равен нулю — вид как в оригинале. */
    .about__cart-item-five {
        background-size: auto max(100%, 272px);
        background-position: min(0px, calc(100% - 21px)) center;
    }
}
@media (min-width: 432px) and (max-width: 620px) {
    .about__cart-item-five { min-height: 260px; }
}
@media (min-width: 621px) {
    /* «Качество, близкое к офсетной печати»: когда карточка шире картинки, коробка обрезалась
       по вертикали посреди карточки. Прижимаем картинку к правому краю; на десктопе вид прежний. */
    .factory__cart-item-seven { background-position: max(0px, 100%) 100%; }
}

@media (max-width: 767px) {
    /* подвал: «Политика конфиденциальности» и «Политика cookie» лежали друг на друге */
    .footer-bot { grid-template-areas: "A A B B" "E E E E" "C C D D"; row-gap: 14px; }
    .footer-bot-second ~ .footer-bot-second { grid-area: E; }
}
@media (max-width: 620px) {
    .footer-bot { grid-template-areas: "A A" "E E" "B B" "C D"; }
}

@media (max-width: 389px) {
    .stage__cart-item-title { font-size: 16px; }
}
@media (max-width: 359px) {
    .stage__cart-item { padding-left: 12px; padding-right: 12px; }
    .stage__cart-item::after { left: 12px; }
    .stage__cart-item-title { font-size: 15px; }
}

@media (max-width: 620px) {
    /* «Печать в среднем 4–5 дней» / «Много SKU?» — картинка компактнее, текст в своей колонке */
    .about__cart-item-second { background-size: 118px; background-position: right 14px top 0; }
    .about__cart-item-third { background-size: 132px; background-position: right 14px top 0; }
    .about__cart-item-second .about__cart-item-title { max-width: calc(100% - 118px); }
    .about__cart-item-third .about__cart-item-title { max-width: calc(100% - 128px); }

    /* «Экспертиза этикетки»: высота карточки по содержимому (см. ниже) */
    .about__cart {
        grid-template-rows: 500px repeat(3, 260px) auto;
    }

    /* «Качество, близкое к офсетной печати»: лента шла прямо под текстом.
       Картинка остаётся в своём размере и прижата к низу карточки (без «срезов»), но сдвинута вправо:
       лента проходит правее последней строки, а коробка уходит за правый край. */
    .factory__cart-list { grid-template-rows: 280px 245px 400px 210px 275px 252px auto 225px 262px; }
    .factory__cart-item-seven {
        max-height: none;
        min-height: 252px;
        /* 100% = карточка шире картинки: тогда картинка прижата к правому краю, как задумано */
        background-position: max(16px, 100%) 100%;
    }
}

@media (max-width: 431px) {
    /* «Экспертиза этикетки» на телефоне: белый текст лежал поверх светлой ленты.
       Текст сверху, под ним — лента целиком: она выходит из левого и нижнего края карточки,
       а её верх мягко растворяется в фоне (без ровного «среза» посреди карточки). */
    .about__cart-item-five {
        --dlx-five-w: clamp(360px, 112vw, 470px);
        --dlx-five-h: calc(var(--dlx-five-w) * .5397); /* пропорции картинки 504×272 */
        position: relative;
        align-items: flex-start;
        justify-content: flex-start;
        padding-bottom: calc(var(--dlx-five-h) - 30px);
        background-size: var(--dlx-five-w) auto;
        background-position: left bottom;
    }
    .about__cart-item-five::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(var(--dlx-five-h) * .42);
        height: calc(var(--dlx-five-h) * .58 + 2px);
        background: linear-gradient(to bottom, #333 0, #333 24%, rgba(51, 51, 51, .86) 40%, rgba(51, 51, 51, .55) 62%, rgba(51, 51, 51, .2) 84%, rgba(51, 51, 51, 0) 100%);
        pointer-events: none;
    }
    .about__cart-item-five .about__cart-item-top { position: relative; z-index: 1; max-width: 100%; gap: 12px; }

    /* «Качество, близкое к офсетной печати» на телефоне: запас под лентой, чтобы она не касалась последней строки */
    .factory__cart-item-seven { padding-bottom: 64px; background-position: 4px 100%; }
}

/* ==========================================================================
   3. ЗАКРЕПЛЁННАЯ ОБЛЕГЧЁННАЯ ШАПКА (планшет и десктоп)
   ========================================================================== */

@media (min-width: 768px) {
    html { scroll-padding-top: 92px; }

    .header {
        height: 80px;
        min-height: 80px;
    }

    .header .header__menu {
        position: fixed;
        z-index: 900;
        top: 24px;
        left: 0;
        right: 0;
        width: min(1280px, calc(100% - 48px));
        max-width: none;
        margin: 0 auto;
        isolation: isolate;
        transition:
            top .5s var(--dlx-ease),
            width .5s var(--dlx-ease),
            min-height .5s var(--dlx-ease),
            padding .5s var(--dlx-ease),
            border-radius .5s var(--dlx-ease),
            border-color .4s ease,
            background-color .4s ease,
            box-shadow .5s var(--dlx-ease);
    }

    body.admin-bar .header .header__menu { top: 56px; }

    /* стеклянная подложка — отдельным слоем, чтобы не ломать fixed-панель мобильного меню */
    .header .header__menu::before {
        content: "";
        position: absolute;
        inset: -1px;
        z-index: -1;
        border-radius: inherit;
        background: rgba(255, 255, 255, .72);
        -webkit-backdrop-filter: blur(18px) saturate(1.7);
        backdrop-filter: blur(18px) saturate(1.7);
        opacity: 0;
        transition: opacity .4s ease;
        pointer-events: none;
    }

    /* индикатор прокрутки страницы */
    .header .header__menu::after {
        content: "";
        position: absolute;
        left: 22px;
        right: 22px;
        bottom: -1px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--dlx-red), var(--dlx-red-soft));
        transform: scaleX(var(--dlx-progress, 0));
        transform-origin: 0 50%;
        opacity: 0;
        transition: opacity .4s ease;
        pointer-events: none;
    }

    .header .header__brand { transition: flex-basis .5s var(--dlx-ease), width .5s var(--dlx-ease); }

    /* --- состояние «прилипла» --- */
    .header.dlx-stuck .header__menu {
        top: 12px;
        width: min(1180px, calc(100% - 48px));
        min-height: 60px;
        padding: 8px 12px 8px 18px;
        border-radius: 20px;
        border-color: rgba(255, 255, 255, .75);
        background-color: transparent;
        box-shadow: 0 14px 40px -14px rgba(46, 26, 26, .28), 0 2px 8px rgba(46, 26, 26, .06);
    }
    body.admin-bar .header.dlx-stuck .header__menu { top: 44px; }
    .header.dlx-stuck .header__menu::before,
    .header.dlx-stuck .header__menu::after { opacity: 1; }
    .header.dlx-stuck .header__brand { flex-basis: 142px; width: 142px; }
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
    .header .header__menu::before { background: rgba(255, 255, 255, .96); }
}

/* Десктопное меню: скользящая подсветка пункта и CTA в прилипшей шапке */
@media (min-width: 1201px) {
    .header .header__menu-list { position: relative; }
    .header .header__menu-list > .header__menu-item { position: relative; z-index: 1; }

    .dlx-nav-pill {
        position: absolute;
        z-index: 0;
        left: 0;
        top: 50%;
        width: var(--dlx-pill-w, 0);
        height: 34px;
        margin: -17px 0 0;
        padding: 0;
        list-style: none;
        border-radius: 10px;
        background: #f1eeee;
        opacity: 0;
        transform: translateX(var(--dlx-pill-x, 0));
        transition: transform .42s var(--dlx-ease), width .42s var(--dlx-ease), opacity .25s ease, background-color .3s ease;
        pointer-events: none;
    }
    .header__menu-list.dlx-pill-on .dlx-nav-pill { opacity: 1; }
    .header__menu-list.dlx-pill-active .dlx-nav-pill { background: rgba(206, 26, 48, .09); }
    .header.dlx-stuck .dlx-nav-pill { background: rgba(51, 51, 51, .07); }
    .header.dlx-stuck .header__menu-list.dlx-pill-active .dlx-nav-pill { background: rgba(206, 26, 48, .1); }

    .header .header__menu-item.dlx-active > .header__menu-item-url:not([href*="/guide"]) { color: var(--dlx-red); }

    .header .header__social-list {
        max-width: 140px;
        transition: max-width .5s var(--dlx-ease), opacity .3s ease, margin .5s var(--dlx-ease);
    }
    .header.dlx-stuck .header__social-list {
        max-width: 0;
        margin-right: -14px;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .dlx-header-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        height: 44px;
        max-width: 0;
        margin-left: -14px;
        padding: 0;
        overflow: hidden;
        border-radius: 14px;
        background: var(--dlx-red);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition:
            max-width .5s var(--dlx-ease),
            padding .5s var(--dlx-ease),
            margin .5s var(--dlx-ease),
            opacity .3s ease,
            visibility 0s linear .5s,
            background-color .3s ease,
            box-shadow .3s ease;
    }
    .header.dlx-stuck .dlx-header-cta {
        max-width: 230px;
        margin-left: 0;
        padding: 0 20px;
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }
    .dlx-header-cta:hover { background: #e02a41; color: #fff; }
    .dlx-header-cta:focus-visible { outline: 2px solid var(--dlx-blue); outline-offset: 3px; }
}

@media (max-width: 1200px) {
    .dlx-header-cta,
    .dlx-nav-pill { display: none; }
}

/* ==========================================================================
   4. МОБИЛЬНЫЙ ДОК: закреплённая стеклянная подложка внизу экрана
   ========================================================================== */

.dlx-dock { display: none; }

@media (max-width: 767px) {
    .dlx-dock {
        position: fixed;
        z-index: 850;
        left: max(var(--dlx-dock-gap), env(safe-area-inset-left, 0px));
        right: max(var(--dlx-dock-gap), env(safe-area-inset-right, 0px));
        bottom: calc(var(--dlx-dock-gap) + env(safe-area-inset-bottom, 0px));
        display: flex;
        align-items: center;
        gap: 6px;
        box-sizing: border-box;
        height: var(--dlx-dock-h);
        padding: 8px;
        border-radius: 22px;
        font-family: inherit;
        isolation: isolate;
        opacity: 0;
        visibility: hidden;
        transform: translate3d(0, calc(100% + 30px), 0);
        transition: transform .6s var(--dlx-spring), opacity .3s ease, visibility 0s linear .6s;
        -webkit-tap-highlight-color: transparent;
    }

    .dlx-dock::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        border: 1px solid rgba(255, 255, 255, .8);
        background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(250, 247, 247, .7));
        -webkit-backdrop-filter: blur(22px) saturate(1.8);
        backdrop-filter: blur(22px) saturate(1.8);
        box-shadow:
            0 16px 44px -10px rgba(34, 20, 20, .34),
            0 3px 10px rgba(34, 20, 20, .08),
            inset 0 1px 0 rgba(255, 255, 255, .95);
    }

    html.dlx-dock-on .dlx-dock {
        opacity: 1;
        visibility: visible;
        transform: translate3d(0, 0, 0);
        transition-delay: 0s;
    }

    .dlx-dock__cta,
    .dlx-dock__btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        height: 46px;
        margin: 0;
        border: 0;
        border-radius: 15px;
        font-family: inherit;
        text-decoration: none;
        cursor: pointer;
        transition: transform .25s var(--dlx-ease), background-color .25s ease, box-shadow .25s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .dlx-dock__cta {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 10px;
        overflow: hidden;
        background: var(--dlx-red);
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: -.005em;
        white-space: nowrap;
    }
    .dlx-dock__btn {
        flex: 0 0 46px;
        width: 46px;
        padding: 0;
        background: rgba(51, 51, 51, .065);
        color: var(--dlx-ink);
    }
    .dlx-dock__btn svg { display: block; width: 22px; height: 22px; }
    .dlx-dock__btn--chat { background: var(--dlx-blue); color: #fff; }
    .dlx-dock__btn--chat.is-attention svg { animation: dlx-dock-wiggle .9s ease-in-out 1; }

    .dlx-dock__cta:active,
    .dlx-dock__btn:active { transform: scale(.94); }
    .dlx-dock__cta:focus-visible,
    .dlx-dock__btn:focus-visible { outline: 2px solid var(--dlx-blue); outline-offset: 2px; }

    /* бургер внутри дока превращается в крестик, пока открыто меню */
    .dlx-dock__burger { position: relative; display: block; width: 20px; height: 14px; }
    .dlx-dock__burger i {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .35s var(--dlx-ease), opacity .2s ease, width .35s var(--dlx-ease);
    }
    .dlx-dock__burger i:nth-child(1) { top: 0; }
    .dlx-dock__burger i:nth-child(2) { top: 6px; width: 70%; }
    .dlx-dock__burger i:nth-child(3) { top: 12px; }

    /* плавающая кнопка мессенджеров «встраивается» в док */
    .dl-messengers__toggle {
        transition: opacity .3s ease, scale .45s var(--dlx-ease), transform .2s ease, visibility 0s linear 0s, box-shadow .2s ease;
    }
    html.dlx-dock-on .dl-messengers {
        right: var(--dlx-chat-right, 15px);
        bottom: calc(var(--dlx-dock-gap) + var(--dlx-dock-h) + 10px - var(--dl-messenger-size) - 12px + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
    }
    html.dlx-dock-on .dl-messengers__toggle {
        opacity: 0;
        scale: .4;
        visibility: hidden;
        pointer-events: none;
        transition-delay: 0s, 0s, 0s, .45s, 0s;
    }
    html.dlx-dock-on .dl-messengers.is-open .dl-messengers__options { pointer-events: auto; }

    /* кнопка повторной настройки cookie не прячется под доком */
    html.dlx-dock-on #tcm-revoke-container {
        bottom: calc(var(--dlx-dock-gap) + var(--dlx-dock-h) + 10px + env(safe-area-inset-bottom, 0px)) !important;
        transition: bottom .4s var(--dlx-ease);
    }

    /* чтобы док не закрывал последние строки подвала */
    .footer { padding-bottom: calc(var(--dlx-dock-h) + var(--dlx-dock-gap) + 14px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 359px) {
    .dlx-dock { gap: 4px; padding: 7px; }
    .dlx-dock__cta { font-size: 13px; padding: 0 6px; }
    .dlx-dock__btn { flex-basis: 42px; width: 42px; }
}

@keyframes dlx-dock-wiggle {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-14deg) scale(1.08); }
    45% { transform: rotate(11deg) scale(1.08); }
    70% { transform: rotate(-6deg); }
}

/* ==========================================================================
   5. КАРУСЕЛИ: бесшовная лента без «срезанных» плашек
   ========================================================================== */

.dlx-marquee {
    --dlx-fade: clamp(18px, 7vw, 170px);
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin: -18px 0;
    padding: 18px 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--dlx-fade), #000 calc(100% - var(--dlx-fade)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--dlx-fade), #000 calc(100% - var(--dlx-fade)), transparent 100%);
}

.dlx-marquee__track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    will-change: transform;
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
.dlx-marquee__track.is-dragging { cursor: grabbing; }
.dlx-marquee__track img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

.dlx-marquee__group {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: none !important;
}

/* --- плашки с преимуществами --- */
.dlx-marquee--plates .dlx-marquee__track,
.dlx-marquee--plates .dlx-marquee__group { gap: 8px; }

.dlx-marquee--plates .line__slide-item {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 320px;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(46, 26, 26, .03);
    transition: translate .45s var(--dlx-ease), box-shadow .45s var(--dlx-ease);
}
.dlx-marquee--plates .line__slide-item-txt { text-wrap: balance; }
.dlx-marquee--plates .line__slide-item-img,
.dlx-marquee--plates .dlx-ink {
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    max-width: 45px;
    max-height: 45px;
}

@media (max-width: 767px) {
    .dlx-marquee--plates .line__slide-item { width: 286px; }
}
@media (max-width: 480px) {
    .dlx-marquee--plates .line__slide-item { width: 256px; }
    .dlx-marquee--plates .line__slide-item-img,
    .dlx-marquee--plates .dlx-ink { width: 36px; height: 36px; max-width: 36px; max-height: 36px; }
}

/* --- лента фотографий --- */
.dlx-marquee--pics { --dlx-fade: 0px; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
.dlx-marquee--pics .dlx-marquee__track,
.dlx-marquee--pics .dlx-marquee__group { gap: 0; }
.dlx-marquee--pics .line__pic-item {
    flex: 0 0 auto;
    display: block;
    width: auto;
    max-width: none;
    height: 420px;
    max-height: none;
    object-fit: cover;
}
@media (max-width: 980px) { .dlx-marquee--pics .line__pic-item { height: 360px; } }
@media (max-width: 620px) { .dlx-marquee--pics .line__pic-item { height: 320px; } }

/* --- бегущие теги материалов внутри карточки: мягкие края вместо обрезания --- */
.factory__cart-item-sliding {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}

/* --- лента логотипов партнёров: такие же мягкие края --- */
.partners__cart--carousel.is-ready .partners__cart-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
@media (max-width: 767px) {
    .partners__cart--carousel.is-ready .partners__cart-viewport {
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    }
}
.partners__cart--carousel.is-ready .partners__cart-viewport:focus-within {
    -webkit-mask-image: none;
    mask-image: none;
}

/* ==========================================================================
   6. ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ
   (скрытое состояние включается только когда JS жив: html.dlx-anim)
   ========================================================================== */

html.dlx-anim [data-dlx-reveal] {
    opacity: 0;
    translate: 0 30px;
}
html.dlx-anim [data-dlx-reveal="scale"] { translate: 0 20px; scale: .96; }
html.dlx-anim [data-dlx-reveal="fade"] { translate: none; }
html.dlx-anim [data-dlx-reveal="tags"],
html.dlx-anim [data-dlx-reveal="none"] { opacity: 1; translate: none; }

html.dlx-anim [data-dlx-reveal].dlx-in {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    transition:
        opacity .75s var(--dlx-ease) var(--dlx-d, 0ms),
        translate .95s var(--dlx-ease) var(--dlx-d, 0ms),
        scale .95s var(--dlx-ease) var(--dlx-d, 0ms);
}

/* плашка в заголовке «наклеивается» слева направо (через фон — корректно для многострочных плашек) */
html.dlx-anim [data-dlx-reveal] .cover-title-color {
    background-color: transparent;
    background-image: linear-gradient(var(--dlx-blue), var(--dlx-blue));
    background-repeat: no-repeat;
    background-size: 0% 100%;
    color: inherit;
}
html.dlx-anim [data-dlx-reveal].dlx-in .cover-title-color {
    background-size: 100% 100%;
    color: #fff;
    transition:
        background-size .9s var(--dlx-ease) calc(var(--dlx-d, 0ms) + 260ms),
        color .5s ease calc(var(--dlx-d, 0ms) + 430ms);
}

/* теги-отрасли выскакивают по одному */
html.dlx-anim [data-dlx-reveal="tags"] .type__cart-item-url { opacity: 0; scale: .6; }
html.dlx-anim [data-dlx-reveal="tags"].dlx-in .type__cart-item-url {
    opacity: 1;
    scale: 1;
    transition:
        opacity .35s ease calc(var(--dlx-i, 0) * 26ms),
        scale .6s var(--dlx-spring) calc(var(--dlx-i, 0) * 26ms);
}

/* номера этапов «выстреливают» после появления карточки */
html.dlx-anim .stage__cart-item[data-dlx-reveal]::after { scale: 0; }
html.dlx-anim .stage__cart-item[data-dlx-reveal].dlx-in::after {
    scale: 1;
    transition: scale .7s var(--dlx-spring) calc(var(--dlx-d, 0ms) + 380ms);
}

/* ==========================================================================
   7. ПЕРВЫЙ ЭКРАН
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .cover-title-h1 { animation: dlx-hero-slide 1s var(--dlx-ease) both; }
    .cover-title-h1 .cover-title-color {
        background-image: linear-gradient(var(--dlx-blue), var(--dlx-blue));
        background-repeat: no-repeat;
        background-size: 100% 100%;
        animation: dlx-plate-wipe 1s var(--dlx-ease) .28s both;
    }

    .cover-title > .cover-title-text,
    .cover-title-buttons > * { animation: dlx-hero-fade .85s var(--dlx-ease) both; }
    .cover-title > .cover-title-text:nth-of-type(1) { animation-delay: .2s; }
    .cover-title > .cover-title-text:nth-of-type(2) { animation-delay: .28s; }
    .cover-title > .cover-title-text:nth-of-type(3) { animation-delay: .36s; }
    .cover-title-buttons > :nth-child(1) { animation-delay: .46s; }
    .cover-title-buttons > :nth-child(2) { animation-delay: .54s; }
    .cover-title-buttons > :nth-child(3) { animation-delay: .62s; }

    .cover-pic-img {
        transform: translate3d(var(--dlx-px, 0px), var(--dlx-py, 0px), 0) rotate(var(--dlx-pr, 0deg));
        transform-origin: 50% 80%;
        animation: dlx-hero-img 1.4s var(--dlx-ease) .08s both;
        will-change: transform;
    }
    .cover-pic-slide__text {
        animation: dlx-fade-in 1.4s ease .25s both;
        translate: var(--dlx-bx, 0px) var(--dlx-by, 0px);
    }
}

@keyframes dlx-hero-slide { from { translate: 0 22px; } to { translate: 0 0; } }
@keyframes dlx-hero-fade { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes dlx-plate-wipe {
    from { background-color: transparent; background-size: 0% 100%; color: #222; }
    60% { color: #fff; }
    to { background-color: transparent; background-size: 100% 100%; color: #fff; }
}
@keyframes dlx-hero-img {
    from { translate: 0 46px; rotate: 3.5deg; scale: .95; }
    to { translate: 0 0; rotate: 0deg; scale: 1; }
}
@keyframes dlx-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   8. МИКРОАНИМАЦИИ: кнопки, карточки, картинки, иконки
   ========================================================================== */

/* --- «прорисовка» иконок --- */
.dlx-ink { display: block; overflow: visible; }
.dlx-ink__p { stroke-dasharray: 1; stroke-dashoffset: 0; stroke-opacity: 0; }
.dlx-ink.is-drawing .dlx-ink__p { animation: dlx-ink 1.35s var(--dlx-ease-io) both; animation-delay: calc(var(--dlx-pi, 0) * 70ms); }
@keyframes dlx-ink {
    0% { stroke-dashoffset: 1; stroke-opacity: 1; fill-opacity: 0; }
    62% { stroke-dashoffset: 0; stroke-opacity: 1; fill-opacity: 0; }
    100% { stroke-dashoffset: 0; stroke-opacity: 0; fill-opacity: 1; }
}

/* --- FAQ: ответ мягко раскрывается --- */
@media (prefers-reduced-motion: no-preference) {
    .faq-item.active .faq-answer { animation: dlx-faq-in .45s var(--dlx-ease) both; }
}
@keyframes dlx-faq-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }

/* --- кольцо в блоке оплаты вращается вместе с прокруткой --- */
.payment__cart-item-line-img { rotate: var(--dlx-ring, 0deg); will-change: rotate; }

@media (hover: hover) and (pointer: fine) {
    /* кнопки: цвет при наведении задаёт тема; здесь только отклик на нажатие */
    .cover-title-button,
    .type__cart-item-nine-url,
    .guide-download__button,
    .footer-main-column-btn,
    .dl-case-dialog__cta { transition: background-color .3s ease, color .3s ease, scale .2s ease; }
    .cover-title-button:active,
    .type__cart-item-nine-url:active,
    .guide-download__button:active,
    .footer-main-column-btn:active { scale: .98; }

    /* плашки в ленте */
    .dlx-marquee--plates .line__slide-item:hover { box-shadow: 0 14px 26px -18px rgba(46, 26, 26, .3); }

    /* карточки-преимущества: картинки-фоны не трогаем (анимация размера фона идёт рывками) */
    .about__cart-item { transition: box-shadow .45s var(--dlx-ease); }
    .about__cart-item:hover { box-shadow: 0 18px 34px -22px rgba(46, 26, 26, .34); }

    /* «Не уверены, какая этикетка…» */
    .best__block-item { transition: box-shadow .45s var(--dlx-ease); }
    .best__block-item-2:hover,
    .best__block-item-3:hover,
    .best__block-item-4:hover,
    .best__block-item-5:hover { box-shadow: 0 18px 34px -22px rgba(46, 26, 26, .32); }
    .best__block-item-right,
    .best__block-item-bot-img { transition: scale .8s var(--dlx-ease), rotate .8s var(--dlx-ease), translate .8s var(--dlx-ease); transform-origin: 50% 100%; }
    .best__block-item:hover .best__block-item-right { scale: 1.04; rotate: -2deg; }
    .best__block-item:hover .best__block-item-bot-img { scale: 1.04; }

    /* «Типовые задачи» */
    .type__block-item { transition: box-shadow .45s var(--dlx-ease), opacity .4s ease; }
    .type__block-item:hover { opacity: 1; box-shadow: 0 20px 38px -24px rgba(46, 26, 26, .4); }
    .type__block-item-img { transition: scale .8s var(--dlx-ease); transform-origin: 50% 100%; }
    .type__block-item:hover .type__block-item-img { scale: 1.05; }
    .type__block-item svg { transition: transform .5s var(--dlx-spring), scale .5s var(--dlx-spring); }
    .type__block-item:hover svg { scale: 1.12; }

    /* витрина бутылок */
    .type__cart-item-hover { overflow: hidden; }
    .type__cart-item-hover .type__cart-item-img { transition: scale 1s var(--dlx-ease); }
    .type__cart-item-hover:hover .type__cart-item-img { scale: 1.05; }
    .type__cart-item-hover .type__cart-item-text { translate: 0 12px; transition: opacity .5s ease, translate .6s var(--dlx-ease); }
    .type__cart-item-hover:hover .type__cart-item-text { translate: 0 0; }
    .type__cart-item-second .type__cart-item-url { transition: color .3s ease, background-color .3s ease; }

    /* технологии */
    .factory__cart-item { transition: box-shadow .45s var(--dlx-ease); }
    .factory__cart-item:hover { box-shadow: 0 18px 34px -22px rgba(46, 26, 26, .32); }
    .factory__cart-item > svg { transition: rotate .7s var(--dlx-spring), scale .7s var(--dlx-spring); transform-origin: 50% 50%; }
    .factory__cart-item:hover > svg:first-child { rotate: -8deg; scale: 1.1; }
    .factory__cart-item-text-red { transition: letter-spacing .6s var(--dlx-ease), scale .6s var(--dlx-spring); transform-origin: 0 60%; }
    .factory__cart-item:hover .factory__cart-item-text-red { scale: 1.08; }

    /* этапы */
    .stage__cart-item::after { transition: scale .5s var(--dlx-spring), background-color .3s ease; }
    .stage__cart-item:hover::after { scale: 1.14; }

    /* оплата и доставка */
    .payment__cart-item-second,
    .payment__cart-item-third,
    .payment__cart-item-four { transition: box-shadow .45s var(--dlx-ease); }
    .payment__cart-item-second:hover,
    .payment__cart-item-third:hover,
    .payment__cart-item-four:hover { box-shadow: 0 18px 34px -22px rgba(46, 26, 26, .32); }

    /* FAQ */
    .faq-question { transition: background-color .3s ease; }
    .faq-question:hover { background-color: #d9233a; }

    /* логотипы партнёров */
    .partners__cart-logo img { transition: scale .6s var(--dlx-ease); }
    .partners__cart-logo:hover img { scale: 1.09; }
    .partners__cart--carousel.is-ready .partners__cart-viewport:hover .partners__cart-track { animation-play-state: paused; }

    /* соцсети в шапке и подвале */
    .header__social-item-url,
    .footer-main-column-social-url { transition: scale .3s var(--dlx-ease); }
    .header__social-item-url:hover,
    .footer-main-column-social-url:hover { scale: 1.08; }

    /* логотип */
    .header__brand .header__logo { transition: scale .5s var(--dlx-spring); transform-origin: 12% 50%; }
    .header__brand:hover .header__logo { scale: 1.035; }
}

/* ==========================================================================
   9. ПЕЧАТЬ И «УМЕНЬШИТЬ ДВИЖЕНИЕ»
   ========================================================================== */

@media print {
    html.dlx-anim [data-dlx-reveal],
    html.dlx-anim [data-dlx-reveal="tags"] .type__cart-item-url {
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
    }
    html.dlx-anim [data-dlx-reveal] .cover-title-color { background-size: 100% 100% !important; color: #fff !important; }
    .dlx-dock { display: none !important; }
    .header .header__menu { position: static !important; }
}

@media (prefers-reduced-motion: reduce) {
    html.dlx-anim [data-dlx-reveal],
    html.dlx-anim [data-dlx-reveal="tags"] .type__cart-item-url {
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
        transition: none !important;
    }
    html.dlx-anim [data-dlx-reveal] .cover-title-color {
        background-size: 100% 100% !important;
        color: #fff !important;
        transition: none !important;
    }
    html.dlx-anim .stage__cart-item[data-dlx-reveal]::after { scale: 1 !important; }
    .dlx-dock,
    .dlx-dock *,
    .dlx-dock *::after,
    .header .header__menu,
    .header .header__menu::before,
    .dlx-nav-pill,
    .dlx-header-cta,
    .dlx-ink__p { transition: none !important; animation: none !important; }
    .payment__cart-item-line-img { rotate: none; }
}
