/* ============================================================
 *  DICOM TEAM — ДИЗАЙН-СИСТЕМА
 *  Все стили строятся на CSS-переменных (см. :root ниже).
 *  Применимо ко всем страницам сайта.
 *
 *  ОСНОВНЫЕ ПРИНЦИПЫ:
 *    1. Секции чередуются по типу фона: --light → --dark → --gray
 *    2. Карточки — единый компонент .card с модификаторами
 *    3. Заголовки секций: подзаголовок с синей чертой, цифра (01/02/03/04)
 *    4. На тёмных секциях инвертируются: цифра становится синей, eyebrow белым
 * ============================================================ */

:root {
    /* ---- цвета ---- */
    --c-text:        #181431;
    --c-text-soft:   #5B5B6B;
    --c-text-muted:  #818181;
    --c-bg:          #FFFFFF;
    --c-bg-gray:     #F6F7F9;
    --c-bg-dark:     #0F1B33;
    --c-line:        #E5E7EB;
    --c-accent:      #0D75B2;
    --c-accent-d:    #0B6396;
    --c-accent-soft: #DDEAF5;

    /* ============================================================
     *  ЦВЕТА НАПРАВЛЕНИЙ
     *
     *  Используются через классы-модификаторы .dir-bitrix24 / .dir-ai /
     *  .dir-web, которые локально переопределяют --c-accent (см. ниже).
     *  Базовый цвет сайта остаётся оранжевый (--c-accent в общем стеке
     *  где он используется как бренд), а здесь — палитра направлений.
     *
     *  Применение:
     *    <body class="dir-bitrix24"> ... </body>
     *    или
     *    <section class="dir-ai"> ... </section>
     *
     *  Всё внутри (бейджи, номера, кнопки, ссылки, sticky-полосы и т.д.)
     *  что использует --c-accent — окрасится автоматически.
     * ============================================================ */
    --c-dir-bitrix:      #0DACE5;   /* cyan — Битрикс24 */
    --c-dir-bitrix-d:    #0A85B0;
    --c-dir-bitrix-soft: #DBF1F9;
    --c-dir-ai:          #0891B2;   /* приглушённый cyan — ИИ */
    --c-dir-ai-d:        #06738F;
    --c-dir-ai-soft:     #CEE9EE;
    --c-dir-web:         #475569;   /* графит — Разработка приложений */
    --c-dir-web-d:       #334155;
    --c-dir-web-soft:    #E2E6EA;
    --c-dir-design:      #BE185D;   /* бургунди-роуз — Дизайн */
    --c-dir-design-d:    #9D1450;
    --c-dir-design-soft: #FAE3EC;

    /* CTA-кнопка остаётся фирменным синим всегда, не зависит от dir-* скоупа */
    --c-cta-primary:     #0D75B2;
    --c-cta-primary-d:   #0B6396;
    --c-number-light:#EEF0F4;   /* цифры 01-04 на светлых секциях */
    --c-number-dark: rgba(13,117,178,.18);  /* цифры на тёмных секциях */

    /* ---- RGB-варианты для использования внутри rgba() ----
     * CSS-переменная не работает напрямую внутри rgba(var(--x), .2),
     * поэтому для теней, glow-эффектов и полупрозрачных подложек
     * нужны отдельные переменные с тройкой R,G,B. Они переопределяются
     * в .dir-* классах ниже — тогда тени автоматически окрашиваются
     * в цвет направления. Использование: rgba(var(--c-accent-rgb), .2) */
    --c-accent-rgb:      13, 117, 178;   /* #0D75B2 — дефолтный синий */
    --c-dir-bitrix-rgb:  13, 172, 229;   /* #0DACE5 */
    --c-dir-ai-rgb:      8, 145, 178;    /* #0891B2 */
    --c-dir-web-rgb:     71, 85, 105;    /* #475569 */
    --c-dir-design-rgb:  190, 24, 93;    /* #BE185D */

    /* Готовая полупрозрачная тень акцента (для filter: drop-shadow).
     * Синтаксис rgba(var(...), opacity) внутри drop-shadow иногда
     * парсится криво в некоторых движках — поэтому держим готовое
     * значение целиком, оно надёжнее переопределяется через .dir-*. */
    --c-accent-shadow:   rgba(13, 117, 178, .18);

    /* ---- сетка ---- */
    --max:           1440px;
    --gutter:        clamp(20px, 5vw, 100px);
    --section-pad:   clamp(64px, 10vw, 140px);
    --gap-island:    clamp(24px, 4vw, 48px);   /* вертикальный отступ между секциями-островами */
    --gutter-h:      clamp(0px, 2vw, 24px);    /* горизонтальный отступ от края экрана для островов */
    --r-island:      clamp(20px, 2.5vw, 32px); /* радиус скругления островов */

    /* ---- тени ---- */
    --shadow-sm: 0 2px 8px rgba(24,20,49,.04);
    --shadow:    0 4px 24px rgba(24,20,49,.06);
    --shadow-md: 0 12px 32px rgba(24,20,49,.10);
    --shadow-lg: 0 24px 60px -20px rgba(24,20,49,.18);

    /* ---- радиусы ---- */
    --r-sm: 6px;
    --r:    16px;
    --r-lg: 24px;

    /* ---- timing ---- */
    --t: 220ms cubic-bezier(.4,0,.2,1);

    /* ---- шрифты ---- */
    --f-body: 'Roboto', system-ui, sans-serif;
}

/* ----------- reset ----------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--c-text);
    /* Серый фон — основа страницы. Контентные секции "плавают" поверх него. */
    background: var(--c-bg-gray);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ============================================================
 *  ФОНОВЫЕ КВАДРАТЫ (декорация)
 * ============================================================ */
.bg-squares {
    position: fixed; inset: 0; z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bg-squares .square {
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.18);
    opacity: 0;
    transition: opacity 4s ease-in-out;
}
@media (max-width: 767px) { .bg-squares { display: none; } }

/* ============================================================
 *  ПЕЙДЖ-ОБЁРТКА
 *  Прозрачная, чтобы серый фон body просвечивал между секциями.
 * ============================================================ */
.page {
    max-width: var(--max);
    margin: 0 auto;
    background: transparent;
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}

/* ============================================================
 *  HEADER
 *  Прозрачный на сером фоне; при скролле приобретает белую плашку.
 * ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px var(--gutter);
    gap: 32px;
    background: rgba(246,247,249,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background var(--t), border-color var(--t);
}
.site-header.is-scrolled {
    background: rgba(255,255,255,.92);
    border-bottom-color: var(--c-line);
}

.site-header__left { display: flex; align-items: center; gap: 40px; flex: 1; }
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.logo img { width: 130px; height: auto; flex-shrink: 0; }
.logo__tagline {
    display: none;
    font-size: 11px;
    color: var(--c-text-muted);
    line-height: 1.2;
    letter-spacing: 0.02em;
    max-width: 120px;
    padding-left: 12px;
    border-left: 1px solid var(--c-line);
}
.logo__tagline b {
    color: var(--c-accent);
    font-weight: 700;
}
/* Тэглайн рядом с лого показываем только на широких экранах */
@media (min-width: 1100px) {
    .logo__tagline { display: inline-block; }
}

/* nav */
.nav__list { display: flex; align-items: center; gap: 28px; }
.nav__link {
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    color: var(--c-text);
}
.nav__link:hover { color: var(--c-accent); }

.nav__item--submenu { position: relative; }
.nav__item--submenu > .nav__link::after {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    margin-left: 6px;
    transition: transform var(--t);
}
.nav__item--submenu:hover > .nav__link::after { transform: translateY(0) rotate(-135deg); }

.nav__submenu {
    position: absolute;
    top: calc(100% + 12px);
    left: -20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 28px;
    min-width: 640px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--r);
    box-shadow: var(--shadow-md);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.nav__submenu::before {
    /* Невидимая зона над меню, чтобы при ховере не "проваливалось" */
    content: '';
    position: absolute;
    top: -12px; left: 0; right: 0;
    height: 12px;
}
.nav__item--submenu:hover .nav__submenu,
.nav__item--submenu:focus-within .nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav__submenu-section { display: flex; flex-direction: column; gap: 14px; }
.nav__submenu-title {
    font-size: 11px;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.nav__submenu-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    margin: -10px -12px;
    border-radius: var(--r-sm);
    transition: background var(--t);
}
.nav__submenu-link span { font-weight: 600; font-size: 15px; transition: color var(--t); }
.nav__submenu-link em { font-style: normal; font-size: 13px; color: var(--c-text-muted); line-height: 1.4; }
.nav__submenu-link:hover { background: var(--c-bg-gray); }
.nav__submenu-link:hover span { color: var(--c-accent); }

.site-header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
    gap: 2px;
}
.site-header__right a:first-child { font-weight: 600; }
.site-header__right a:last-child  { color: var(--c-text-soft); }

/* burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px; height: 22px;
    padding: 0;
}
.burger span { display: block; width: 100%; height: 2px; background: var(--c-text); transition: transform var(--t), opacity var(--t); }
.burger.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ============================================================
 *  BADGES (универсальные плашки)
 * ============================================================ */
.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: 999px;
}
.badge--soft {
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

/* На тёмной секции — инвертированный variant */
.section--dark .badge--soft {
    color: #fff;
    background: rgba(255,255,255,.12);
}

/* ============================================================
 *  BUTTONS
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--t);
    white-space: nowrap;
    cursor: pointer;
}
/* .btn--primary использует --c-accent — на страницах направлений
 * (где body имеет класс .dir-*) кнопка автоматически окрашивается
 * в цвет своего направления. На нейтральных страницах остаётся
 * фирменный синий (#0D75B2 — дефолт --c-accent в :root). */
.btn--primary {
    background: var(--c-accent);
    color: #fff;
}
.btn--primary:hover {
    background: var(--c-accent-d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn--ghost {
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--c-line);
}
.btn--ghost:hover { border-color: var(--c-text); color: var(--c-text); background: var(--c-bg-gray); }
.btn--wide { width: 100%; padding: 16px 28px; margin-top: 16px; }

/* На тёмной секции ghost-кнопка светлеет */
.section--dark .btn--ghost {
    color: #fff;
    border-color: rgba(255,255,255,.3);
}
.section--dark .btn--ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }

/* ============================================================
 *  HERO
 *  Лежит прямо на сером фоне страницы (без "острова"),
 *  чтобы плавно перетекать из шапки.
 * ============================================================ */
.hero {
    position: relative;
    padding: 60px var(--gutter) 100px;
    margin: 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: transparent;
}
/* Слайды в hero-слайдере лежат друг на друге через position:absolute
 * (см. hero.css). Здесь повторяем этот override двойным селектором
 * (.hero.hero-slide → specificity 0,2,0), чтобы он гарантированно
 * перебил дубликат .hero выше — даже когда CSS Битрикса склеит файлы
 * в произвольном порядке. */
.hero.hero-slide {
    position: absolute;
    inset: 0;
}
.hero__text .badge { margin-bottom: 28px; }
.hero__title {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.hero__tagline {
    font-size: clamp(18px, 2.4vw, 26px);
    font-weight: 400;
    color: var(--c-text-muted);
    margin-bottom: 28px;
    letter-spacing: 0.02em;
    font-family: var(--f-body);
}
.hero__tagline b {
    color: var(--c-accent);
    font-weight: 700;
}
.hero__desc {
    font-size: clamp(16px, 1.8vw, 20px);
    color: var(--c-text-soft);
    margin-bottom: 36px;
    max-width: 580px;
    line-height: 1.55;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
/* См. hero.css — дубликат для случая когда dicom-design.css
 * грузится без hero.css. Картинка вписывается через contain
 * на всю высоту правой колонки .hero. */
.hero__image {
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 320px;
    background-image: var(--hero-bg);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============================================================
 *  ТИПЫ СЕКЦИЙ — фоны
 *  Каждая секция — "остров" на сером фоне страницы:
 *    - радиусы по 4 углам
 *    - вертикальные отступы между секциями (var(--gap-island))
 *    - горизонтальные отступы (var(--gutter-h))
 *    - hero сверху без отступов и радиусов (примыкает к шапке)
 *
 *  Все три типа (light, gray, dark) выглядят одинаково в плане
 *  раскладки — отличаются только фоном.
 * ============================================================ */
.section {
    position: relative;
    padding: var(--section-pad) var(--gutter);
    margin: var(--gap-island) var(--gutter-h);
    border-radius: var(--r-island);
}
.section--light { background: var(--c-bg);      box-shadow: var(--shadow-sm); }
.section--gray  { background: #ECEEF2; }     /* чуть темнее body-фона, чтобы остров был виден */
.section--dark  { background: var(--c-bg-dark); color: #fff; }
.section--dark a { color: #fff; }

/* ============================================================
 *  SECTION-HEAD (шапка секции)
 *  - подзаголовок с синей вертикальной чертой
 *  - заголовок крупный
 *  - цифра 01/02/03/04 как декоративный акцент
 * ============================================================ */
.section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: end;
    margin-bottom: 64px;
}
.section-head__text { min-width: 0; }
.section-head__sub {
    position: relative;
    display: inline-block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-accent);
    padding-left: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}
.section-head__sub::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 8px; height: 2px;
    background: var(--c-accent);
    transform: translateY(-50%);
}
.section-head__title {
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    max-width: 720px;
}
.section-head__number {
    font-size: clamp(80px, 12vw, 160px);
    font-weight: 700;
    color: var(--c-number-light);
    line-height: 0.9;
    letter-spacing: -0.04em;
    user-select: none;
    transition: color var(--t);
}
/* На тёмных секциях — цифры синие (как «акцент в темноте») */
.section--dark .section-head__number { color: var(--c-number-dark); }
.section--dark .section-head__sub    { color: #fff; }
.section--dark .section-head__sub::before { background: var(--c-accent); }
.section--dark .section-head__title  { color: #fff; }

/* Right vs Left позиционирование */
.section-head--right .section-head__text   { order: 2; }
.section-head--right .section-head__number { order: 1; justify-self: start; }
.section-head--left  .section-head__number { justify-self: end; }

/* ============================================================
 *  GRID-N (сетки для карточек)
 * ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.grid-2 .card--wide { grid-column: 1 / -1; }

/* ============================================================
 *  CARD (универсальная карточка)
 *  Используется для: услуги (01), форматы (04), и далее везде
 * ============================================================ */
.card {
    position: relative;
    background: #fff;
    border-radius: var(--r);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    display: flex;
    flex-direction: column;
    gap: 16px;
    isolation: isolate;
    overflow: hidden;
}
.card::before {
    /* Тонкая декоративная полоска сверху, расширяется на hover */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 48px; height: 3px;
    background: var(--c-accent);
    border-radius: 0 0 3px 0;
    transition: width var(--t);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.card:hover::before { width: 100%; border-radius: 0; }

.card__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    background: var(--c-accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    align-self: flex-start;
}
.card__tag--accent {
    background: var(--c-accent);
    color: #fff;
}
.card__title {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.card__text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--c-text-soft);
    flex: 1;
}
.card__meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--c-line);
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
}

/* Акцентная карточка — тёмная, инвертированная */
.card--accent {
    background: var(--c-bg-dark);
    color: #fff;
    border-color: var(--c-bg-dark);
}
.card--accent .card__text { color: rgba(255,255,255,.75); }
.card--accent .card__tag {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.card--accent .card__meta {
    color: #fff;
    border-top-color: rgba(255,255,255,.15);
}
.card--accent::before {
    background: #fff;
}

/* Внутри тёмной секции обычные .card остаются белыми (контраст) */
.section--dark .card {
    box-shadow: var(--shadow-lg);
}

/* ============================================================
 *  02. О НАС (тёмная секция, особая раскладка)
 * ============================================================ */
.about {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}
.about__decor {
    position: absolute;
    width: 280px; height: 280px;
    border-radius: 32px;
    z-index: 0;
    opacity: .15;
    pointer-events: none;
}
.about__decor--top-left {
    top: -40px; left: -40px;
    background: linear-gradient(135deg, var(--c-accent), #4FA3D1);
}
.about__decor--bottom-right {
    bottom: -60px; right: -40px;
    background: linear-gradient(135deg, #B8DBF0, transparent);
}
.about__list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 18px;
    line-height: 1.55;
    max-width: 520px;
    color: #fff;
}
.about__list li {
    position: relative;
    padding-left: 28px;
}
.about__list li::before {
    content: '';
    position: absolute;
    left: 0; top: 12px;
    width: 16px; height: 2px;
    background: var(--c-accent);
}
.about__list li b { font-weight: 600; color: #fff; }
.about__visual {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
}
.about__visual img {
    max-width: 360px;
    width: 100%;
    filter: drop-shadow(0 24px 48px rgba(0,0,0,.4));
}

/* ============================================================
 *  03. КЕЙСЫ (серая секция, карточки на белом)
 * ============================================================ */
.cases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.case {
    background: #fff;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--t), box-shadow var(--t);
    display: flex;
    flex-direction: column;
}
.case:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.case__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--c-bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}
.case__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}
.case:hover .case__image img { transform: scale(1.04); }
.case__body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.case__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    background: var(--c-accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    align-self: flex-start;
}
.case__title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.case__body p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--c-text-soft);
    flex: 1;
}
.link-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-weight: 600;
    color: var(--c-accent);
    transition: gap var(--t);
}
.link-more:hover { gap: 10px; color: var(--c-accent-d); }

/* ============================================================
 *  ФОРМА (светлая секция-остров)
 *  .form-card — прозрачный grid внутри секции, без своего фона/тени,
 *  потому что сама секция уже белый остров.
 * ============================================================ */
.section--form {
    padding-top: var(--section-pad);
    padding-bottom: var(--section-pad);
    overflow: hidden;
}
.section--form::before {
    /* Декоративный мягкий синий "блик" в правом верхнем углу секции,
       чтобы белый остров не выглядел пустым после смены с тёмного фона. */
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--c-accent-soft) 0%, transparent 70%);
    opacity: .6;
    pointer-events: none;
    z-index: 0;
}
.form-card {
    position: relative;
    z-index: 1;
    background: transparent;
    border-radius: 0;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 0;
    box-shadow: none;
}
.form-card__left .badge { margin-bottom: 24px; }
.form-card__left h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.form-card__left p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--c-text-soft);
    margin-bottom: 12px;
}
.form-card__note {
    font-size: 14px !important;
    color: var(--c-text-muted) !important;
    padding-top: 16px;
    border-top: 1px solid var(--c-line);
}

.form-card__right { display: flex; flex-direction: column; gap: 0; }
.form-card__right input,
.form-card__right textarea {
    border: 0;
    border-bottom: 1px solid var(--c-line);
    padding: 14px 0 10px;
    margin-bottom: 8px;
    font-size: 16px;
    background: transparent;
    width: 100%;
    transition: border-color var(--t);
    resize: none;
    font-family: inherit;
    color: var(--c-text);
}
.form-card__right input::placeholder,
.form-card__right textarea::placeholder { color: var(--c-text-muted); }
.form-card__right input:focus,
.form-card__right textarea:focus {
    outline: none;
    border-bottom-color: var(--c-accent);
}
.form-card__terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--c-text-muted);
    cursor: pointer;
    /* Контейнер на всю ширину родителя и не растягивается контентом */
    width: 100%;
    max-width: 100%;
    /* Перенос длинных слов / URL — иначе ссылка «соглашения» может вылезти */
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.form-card__terms input {
    margin-top: 2px;
    accent-color: var(--c-accent);
    /* Чекбокс — фиксированной ширины, не сжимается */
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.form-card__terms span {
    /* Текст занимает оставшееся место и сжимается */
    flex: 1 1 auto;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.form-card__terms a { color: var(--c-accent); text-decoration: underline; }

/* ============================================================
 *  FOOTER (продолжает тёмную секцию формы)
 *  Тёмный остров, примыкает к низу экрана (только верхние радиусы).
 * ============================================================ */
.site-footer {
    background: var(--c-bg-dark);
    color: #fff;
    padding: 80px var(--gutter) 60px;
    margin: var(--gap-island) var(--gutter-h) 0;
    border-radius: var(--r-island) var(--r-island) 0 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 12px; }
.logo--footer img { width: 130px; filter: brightness(0) invert(1); }
.site-footer__tagline {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin-top: 12px;
    letter-spacing: 0.02em;
}
.site-footer__tagline b {
    color: var(--c-accent-soft);
    font-weight: 700;
}
.site-footer__partner {
    font-size: 14px;
    color: rgba(255,255,255,.65);
    margin-top: 12px;
}
.site-footer__copy {
    font-size: 14px;
    color: rgba(255,255,255,.4);
    margin-top: 4px;
}
.site-footer__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,.5);
    margin-bottom: 8px;
}
.site-footer ul { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.site-footer a:hover { color: var(--c-accent-soft); }

/* ============================================================
 *  RESPONSIVE
 * ============================================================ */

/* ≥1100 — десктоп (по умолчанию выше) */

/* <1100 — планшет крупный */
@media (max-width: 1099px) {
    .hero { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero__cta { justify-content: center; }
    .hero__image { max-width: 480px; margin: 0 auto; }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 .card--wide { grid-column: auto; }
    .cases { grid-template-columns: repeat(2, 1fr); }
    .about { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .about__list { max-width: 100%; }
    .about__visual { justify-content: center; }
    .about__list li { padding-left: 0; }
    .about__list li::before { display: none; }
}

/* <900 — планшет малый / большой телефон */
@media (max-width: 899px) {
    .nav { display: none; }
    .burger { display: flex; }
    .site-header__right { display: none; }

    .section-head {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 40px;
    }
    .section-head__number { order: -1; justify-self: start !important; }
    .section-head--right .section-head__number,
    .section-head--left  .section-head__number { justify-self: start !important; }

    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .cases  { grid-template-columns: 1fr; }

    .form-card {
        grid-template-columns: 1fr;
        padding: 32px 24px;
        gap: 32px;
        /* Страховка от вылета */
        max-width: 100%;
        overflow: hidden;
    }
    .form-card__right input,
    .form-card__right textarea {
        /* На мобильном текст с большим шрифтом, и инпут должен помещаться */
        /*width: 100%; */
        max-width: 100%;
        box-sizing: border-box;
    }

    .site-footer { grid-template-columns: 1fr; gap: 32px; padding: 60px var(--gutter); }
}

/* <640 — мобильный */
@media (max-width: 639px) {
    .site-header { padding: 16px 20px; }
    .hero { padding: 40px var(--gutter) 60px; }
    .card { padding: 24px; }
    .section-head__title { font-size: 32px; }
    .section-head__number { font-size: 72px; }

    /* На мобильных острова растягиваются на всю ширину
       (без боковых отступов и почти без радиуса) */
    .section { margin-left: 0; margin-right: 0; border-radius: 0; }
    .site-footer { margin-left: 0; margin-right: 0; border-radius: var(--r) var(--r) 0 0; }
}

/* Мобильное меню (раскрытое) */
.nav.is-open {
    display: block;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: #fff;
    padding: 24px var(--gutter);
    z-index: 99;
    border-top: 1px solid var(--c-line);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}
.nav.is-open .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
.nav.is-open .nav__link {
    padding: 16px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--c-line);
    display: block;
}
/* Пункт меню с подменю: индикатор-шеврон, который вращается при раскрытии */
.nav.is-open .nav__item--submenu > .nav__link {
    position: relative;
}
.nav.is-open .nav__item--submenu > .nav__link::after {
    /* Перебиваем десктопный шеврон от .nav__item--submenu > .nav__link::after */
    transform: translateY(-2px) rotate(45deg);
    margin-left: auto;
    position: absolute;
    right: 4px;
    top: 50%;
    transition: transform 0.2s;
}
.nav.is-open .nav__item--submenu.is-expanded > .nav__link::after {
    transform: translateY(-6px) rotate(-135deg);
}

/* Подменю по умолчанию свёрнуто на мобильных, раскрывается через .is-expanded */
.nav.is-open .nav__submenu {
    /* Перебиваем скрытие подменю от десктопного hover-эффекта */
    opacity: 1;
    visibility: visible;
    transform: none;
    /* Но саму высоту прячем через max-height */
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    grid-template-columns: 1fr;
    min-width: 0;
    background: var(--c-bg-gray);
    border-radius: var(--r-sm);
    margin: 0;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.nav.is-open .nav__item--submenu.is-expanded > .nav__submenu {
    max-height: 1000px;
    padding: 12px 16px 16px;
    margin: 8px 0;
}
.nav.is-open .nav__submenu::before {
    /* На мобильных подменю не должно иметь невидимую зону для hover —
       она перехватывает клики */
    display: none;
}
.nav.is-open .nav__submenu-section { gap: 8px; }
.nav.is-open .nav__submenu-title {
    margin-top: 8px;
    margin-bottom: 4px;
}
.nav.is-open .nav__submenu-link {
    padding: 12px;
    margin: 0;
    border-radius: var(--r-sm);
}
.nav.is-open .nav__submenu-link:hover { background: #fff; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .bg-squares { display: none; }
}

/* ============================================================
 *  MEDIA-ROW — блок «картинка + текст»
 *  Универсальный компонент: на 2 колонки, картинка с одной стороны,
 *  текст с другой. Модификаторы задают расположение картинки.
 *
 *  Базовая разметка:
 *  <article class="media-row">
 *    <div class="media-row__image"><img src=""></div>
 *    <div class="media-row__body">
 *      <div class="media-row__tag">Категория</div>
 *      <h3 class="media-row__title">Заголовок</h3>
 *      <p class="media-row__text">Описание.</p>
 *      <ul class="media-row__list"><li>Пункт</li></ul>
 *      <a class="link-more">Подробнее →</a>
 *    </div>
 *  </article>
 *
 *  Модификаторы:
 *    .media-row--image-right  — картинка справа (по умолчанию для нечётных)
 *    .media-row--image-left   — картинка слева
 *
 *  Шахматка:
 *    Оборачиваем серию media-row в .media-rows — внутри одиночные блоки
 *    автоматически чередуются (1-й image-right, 2-й image-left и т.д.).
 * ============================================================ */

.media-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}
.media-row__image {
    border-radius: var(--r);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--c-bg-gray);
    box-shadow: var(--shadow);
    transition: transform var(--t), box-shadow var(--t);
}
.media-row__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}
.media-row:hover .media-row__image { box-shadow: var(--shadow-md); }
.media-row:hover .media-row__image img { transform: scale(1.03); }

.media-row__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.media-row__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    background: var(--c-accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    align-self: flex-start;
}
.media-row__title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.media-row__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text-soft);
}
.media-row__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.media-row__list li {
    position: relative;
    padding-left: 22px;
    color: var(--c-text-soft);
    font-size: 15px;
    line-height: 1.55;
}
.media-row__list li::before {
    content: '';
    position: absolute;
    left: 0; top: 10px;
    width: 12px; height: 2px;
    background: var(--c-accent);
}

/* Модификаторы: какая сторона показывает картинку */
.media-row--image-right .media-row__body  { order: 1; }
.media-row--image-right .media-row__image { order: 2; }
.media-row--image-left  .media-row__image { order: 1; }
.media-row--image-left  .media-row__body  { order: 2; }

/* На тёмной секции — инвертируем цвета текста */
.section--dark .media-row__title { color: #fff; }
.section--dark .media-row__text,
.section--dark .media-row__list li { color: rgba(255,255,255,.75); }
.section--dark .media-row__tag {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* ШАХМАТКА: серия media-row внутри .media-rows автоматически чередуется */
.media-rows {
    display: flex;
    flex-direction: column;
    gap: clamp(48px, 8vw, 100px);
}
.media-rows .media-row:nth-child(odd)  .media-row__body  { order: 1; }
.media-rows .media-row:nth-child(odd)  .media-row__image { order: 2; }
.media-rows .media-row:nth-child(even) .media-row__image { order: 1; }
.media-rows .media-row:nth-child(even) .media-row__body  { order: 2; }

/* Адаптив media-row */
@media (max-width: 899px) {
    .media-row { grid-template-columns: 1fr; gap: 24px; }
    /* На мобильных картинка всегда сверху, независимо от модификатора */
    .media-row .media-row__image,
    .media-rows .media-row:nth-child(odd)  .media-row__image,
    .media-rows .media-row:nth-child(even) .media-row__image { order: 1 !important; }
    .media-row .media-row__body,
    .media-rows .media-row:nth-child(odd)  .media-row__body,
    .media-rows .media-row:nth-child(even) .media-row__body  { order: 2 !important; }
}


/* ============================================================
 *  STATS — 4 крупные цифры в ряд
 *
 *  <div class="stats">
 *    <div class="stat">
 *      <div class="stat__value">50<span>+</span></div>
 *      <div class="stat__label">Внедрений Битрикс24</div>
 *    </div>
 *    ...
 *  </div>
 * ============================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat {
    padding: 24px 8px;
    text-align: left;
    border-left: 2px solid var(--c-accent);
    padding-left: 24px;
}
.stat__value {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    color: var(--c-text);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.stat__value span {
    font-size: 0.6em;
    color: var(--c-accent);
    margin-left: 2px;
}
.stat__label {
    font-size: 14px;
    color: var(--c-text-soft);
    line-height: 1.4;
}
.section--dark .stat__value { color: #fff; }
.section--dark .stat__label { color: rgba(255,255,255,.7); }

@media (max-width: 899px) {
    .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
}


/* ============================================================
 *  PROCESS / TIMELINE — этапы работы
 *
 *  <ol class="process">
 *    <li class="process__step">
 *      <div class="process__num">1</div>
 *      <div class="process__body">
 *        <h4 class="process__title">Аудит</h4>
 *        <p>Описание шага</p>
 *      </div>
 *    </li>
 *    ...
 *  </ol>
 * ============================================================ */
.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    counter-reset: step;
}
.process__step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.process__step:not(:last-child)::after {
    /* Соединительная линия между шагами */
    content: '';
    position: absolute;
    top: 22px; left: 56px; right: -12px;
    height: 2px;
    background: var(--c-line);
    z-index: 0;
}
.process__num {
    position: relative;
    z-index: 1;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t), color var(--t), transform var(--t);
}
.process__step:hover .process__num {
    background: var(--c-accent);
    color: #fff;
    transform: scale(1.05);
}
.process__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.process__body p {
    font-size: 14px;
    color: var(--c-text-soft);
    line-height: 1.5;
}
.section--dark .process__num { background: rgba(255,255,255,.1); color: #fff; }
.section--dark .process__step:not(:last-child)::after { background: rgba(255,255,255,.15); }
.section--dark .process__body p { color: rgba(255,255,255,.7); }

@media (max-width: 899px) {
    .process { grid-template-columns: 1fr; gap: 20px; }
    .process__step { flex-direction: row; gap: 16px; align-items: flex-start; }
    .process__step:not(:last-child)::after {
        left: 22px; top: 44px; bottom: -20px; right: auto;
        width: 2px; height: auto;
    }
    .process__num { flex-shrink: 0; }
}


/* ============================================================
 *  ACCORDION / FAQ
 *
 *  <div class="accordion">
 *    <details class="accordion__item">
 *      <summary class="accordion__head">
 *        <span>Вопрос?</span>
 *        <span class="accordion__icon"></span>
 *      </summary>
 *      <div class="accordion__body">
 *        <p>Ответ.</p>
 *      </div>
 *    </details>
 *    ...
 *  </div>
 *
 *  Использует нативный <details>/<summary> — без JS.
 * ============================================================ */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
}
.accordion__item {
    background: #fff;
    border-radius: var(--r);
    border: 1px solid var(--c-line);
    overflow: hidden;
    transition: border-color var(--t), box-shadow var(--t);
}
.accordion__item[open] {
    border-color: var(--c-accent);
    box-shadow: var(--shadow);
}
.accordion__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    cursor: pointer;
    list-style: none;
    font-size: 17px;
    font-weight: 600;
    color: var(--c-text);
    transition: color var(--t);
}
.accordion__head::-webkit-details-marker { display: none; }
.accordion__head:hover { color: var(--c-accent); }
.accordion__icon {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    position: relative;
    transition: background var(--t), transform var(--t);
}
.accordion__icon::before,
.accordion__icon::after {
    content: '';
    position: absolute;
    background: var(--c-accent);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity var(--t);
}
.accordion__icon::before { width: 10px; height: 2px; }
.accordion__icon::after  { width: 2px; height: 10px; }
.accordion__item[open] .accordion__icon { background: var(--c-accent); transform: rotate(180deg); }
.accordion__item[open] .accordion__icon::before { background: #fff; }
.accordion__item[open] .accordion__icon::after  { opacity: 0; }
.accordion__body {
    padding: 0 28px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text-soft);
}
.accordion__body p + p { margin-top: 8px; }
.section--dark .accordion__item {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.1);
}
.section--dark .accordion__head { color: #fff; }
.section--dark .accordion__body { color: rgba(255,255,255,.75); }


/* ============================================================
 *  TABS — вкладки
 *
 *  <div class="tabs" role="tablist">
 *    <button class="tabs__btn is-active" data-tab="t1">Битрикс24</button>
 *    <button class="tabs__btn" data-tab="t2">ИИ</button>
 *    ...
 *  </div>
 *  <div class="tabs-panels">
 *    <div class="tabs-panel is-active" id="t1">...</div>
 *    <div class="tabs-panel" id="t2">...</div>
 *  </div>
 *
 *  Активация через JS (main.js: .tabs__btn[data-tab] → .tabs-panel[id])
 * ============================================================ */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid var(--c-line);
    margin-bottom: 32px;
}
.tabs__btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text-muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--t), border-color var(--t);
}
.tabs__btn:hover { color: var(--c-text); }
.tabs__btn.is-active {
    color: var(--c-accent);
    border-bottom-color: var(--c-accent);
}
.tabs-panels { position: relative; }
.tabs-panel { display: none; animation: fadeIn 300ms ease; }
.tabs-panel.is-active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tabs__btn { white-space: nowrap; padding: 12px 16px; }
}


/* ============================================================
 *  PRICING TABLE — таблица тарифов
 *
 *  <div class="pricing">
 *    <div class="pricing__col">
 *      <div class="pricing__head">
 *        <div class="pricing__tier">Bronze</div>
 *        <div class="pricing__price">15%</div>
 *        <div class="pricing__sub">скидка</div>
 *      </div>
 *      <ul class="pricing__list">
 *        <li>Приоритетная очередь</li>
 *        <li>Выделенный менеджер</li>
 *        <li class="pricing__no">White Label</li>
 *      </ul>
 *      <a class="btn btn--ghost">Подробнее</a>
 *    </div>
 *    <div class="pricing__col pricing__col--featured">...</div>
 *    ...
 *  </div>
 * ============================================================ */
.pricing {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.pricing__col {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--r);
    padding: 32px 24px;
    border: 1px solid var(--c-line);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.pricing__col:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-accent);
}
.pricing__col--featured {
    background: var(--c-bg-dark);
    color: #fff;
    border-color: var(--c-bg-dark);
    position: relative;
}
.pricing__col--featured::before {
    content: 'Популярный';
    position: absolute;
    top: -10px; right: 16px;
    background: var(--c-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
}
.pricing__head {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--c-line);
}
.pricing__col--featured .pricing__head { border-bottom-color: rgba(255,255,255,.15); }
.pricing__tier {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    font-weight: 700;
    margin-bottom: 12px;
}
.pricing__col--featured .pricing__tier { color: rgba(255,255,255,.7); }
.pricing__price {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.pricing__sub {
    font-size: 14px;
    color: var(--c-text-muted);
}
.pricing__col--featured .pricing__sub { color: rgba(255,255,255,.6); }
.pricing__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.4;
}
.pricing__list li {
    position: relative;
    padding-left: 24px;
}
.pricing__list li::before {
    content: '';
    position: absolute;
    left: 0; top: 5px;
    width: 14px; height: 8px;
    border-left: 2px solid var(--c-accent);
    border-bottom: 2px solid var(--c-accent);
    transform: rotate(-45deg);
}
.pricing__col--featured .pricing__list li::before { border-color: #fff; }
.pricing__list .pricing__no {
    color: var(--c-text-muted);
    text-decoration: line-through;
}
.pricing__list .pricing__no::before {
    border-color: var(--c-text-muted);
    transform: none;
    width: 10px; height: 2px;
    border-left: 0; border-top: 2px solid var(--c-text-muted);
    border-bottom: 0;
    top: 8px;
    left: 0;
}

@media (max-width: 1099px) {
    .pricing { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .pricing { grid-template-columns: 1fr; }
}


/* ============================================================
 *  LOGO CLOUD — ряд логотипов клиентов
 *
 *  <div class="logo-cloud">
 *    <div class="logo-cloud__item"><img src="..." alt="Client"></div>
 *    ...
 *  </div>
 * ============================================================ */
.logo-cloud {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    align-items: center;
}
.logo-cloud__item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 8px;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter var(--t), opacity var(--t);
}
.logo-cloud__item:hover {
    filter: grayscale(0);
    opacity: 1;
}
.logo-cloud__item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    object-fit: contain;
}
/* Текстовая заглушка вместо логотипа */
.logo-cloud__placeholder {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--c-text-soft);
    padding: 12px 16px;
    border: 1px dashed var(--c-line);
    border-radius: var(--r-sm);
    width: 100%;
    text-align: center;
}

@media (max-width: 899px) {
    .logo-cloud { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .logo-cloud { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
 *  IMAGE GRID — сетка картинок с hover-оверлеем
 *
 *  При наведении на картинку сверху наплывает тёмный полупрозрачный
 *  слой с заголовком и описанием.
 *
 *  <div class="image-grid image-grid--cols-5" style="--ig-ratio: 1/1;">
 *    <div class="image-grid__item">           ← или <a>, если кликабельно
 *      <img class="image-grid__img" src="">
 *      <div class="image-grid__overlay">
 *        <h4 class="image-grid__title">Название</h4>
 *        <p class="image-grid__text">Описание из анонса</p>
 *      </div>
 *    </div>
 *    ...
 *  </div>
 * ============================================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.image-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.image-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.image-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.image-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

.image-grid__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--r);
    aspect-ratio: var(--ig-ratio, 1/1);
    background: var(--c-bg-gray);
    cursor: default;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t), transform var(--t);
}
a.image-grid__item { cursor: pointer; }
.image-grid__item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.image-grid__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms ease, filter var(--t);
}
.image-grid__item:hover .image-grid__img {
    transform: scale(1.05);
    filter: brightness(0.6);
}

.image-grid__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 27, 51, 0.92) 0%, rgba(15, 27, 51, 0.6) 50%, rgba(15, 27, 51, 0) 100%);
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--t), transform var(--t);
    pointer-events: none;
}
.image-grid__item:hover .image-grid__overlay {
    opacity: 1;
    transform: translateY(0);
}
.image-grid__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 6px;
    color: #fff;
}
.image-grid__text {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,.85);
    /* Ограничиваем 3 строками, остальное скрываем */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Адаптив: на планшете 3 в ряд, на телефоне 2, на маленьком 1 */
@media (max-width: 1099px) {
    .image-grid,
    .image-grid--cols-4,
    .image-grid--cols-5,
    .image-grid--cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 640px) {
    .image-grid,
    .image-grid--cols-3,
    .image-grid--cols-4,
    .image-grid--cols-5,
    .image-grid--cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    /* На мобильных оверлей всегда виден — touch-устройства не умеют hover */
    .image-grid__overlay { opacity: 1; transform: translateY(0); }
    .image-grid__img { filter: brightness(0.6); }
    /* Но в plain-режиме оверлея нет и затемнения тоже не нужно */
    .image-grid--plain .image-grid__img { filter: none; }
}

/* Plain-режим: простая сетка картинок без затемнения и оверлея.
   Используется для логотипов клиентов, сертификатов и т.д., где
   важно показать саму картинку, а не текст поверх неё. */
.image-grid--plain .image-grid__item {
    background: #fff;
    padding: 12px;
    /* Чтобы белый сертификат на белом фоне был виден */
    border: 1px solid var(--c-line);
}
.image-grid--plain .image-grid__img {
    object-fit: contain;  /* В обычном режиме cover режет края, здесь нужно показывать целиком */
    transition: transform var(--t);
}
.image-grid--plain .image-grid__item:hover .image-grid__img {
    transform: scale(1.04);
    filter: none;  /* Перебиваем общее затемнение */
}
.image-grid--plain .image-grid__item:hover {
    border-color: var(--c-accent);
}

/* Auto-режим: высота плитки подстраивается под пропорции картинки.
   Используется для сертификатов с разной ориентацией (портрет и альбом).
   Все плитки одного ряда выравниваются по верху; плитки могут быть разной
   высоты — это нормально, белого пустого пространства не остаётся. */
.image-grid--auto {
    align-items: start;  /* плитки выравниваются по верху, а не растягиваются */
}
.image-grid--auto .image-grid__item {
    aspect-ratio: auto;  /* отменяем фиксированное соотношение */
    height: auto;        /* высота — естественная, по содержимому */
}
.image-grid--auto .image-grid__img {
    width: 100%;
    height: auto;        /* картинка показывается в естественных пропорциях */
    object-fit: contain;
    display: block;
}
/* В auto-режиме всегда есть padding вокруг картинки (как в plain), 
   потому что чаще всего auto = сертификаты или другие "документы" */
.image-grid--auto:not(.image-grid--plain) .image-grid__item {
    padding: 0;  /* для overlay-режима без отступов, картинка во всю плитку */
}


/* ============================================================
 *  CONTACT BLOCK — большие плитки контактов
 *
 *  Для страницы /contacts/:
 *    <div class="contact-grid">
 *      <div class="contact-card">
 *        <div class="contact-card__label">Общие вопросы</div>
 *        <h3 class="contact-card__title">Линия поддержки</h3>
 *        <a class="contact-card__email">info@dicom.team</a>
 *        <a class="contact-card__phone">+7 (960) 311-21-05</a>
 *      </div>
 *    </div>
 * ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.contact-card {
    background: #fff;
    border-radius: var(--r);
    padding: 40px 36px;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-card:hover {
    border-color: var(--c-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.contact-card__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    margin-bottom: 4px;
}
.contact-card__title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.contact-card__email,
.contact-card__phone {
    display: block;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--c-text);
    text-decoration: none;
    padding: 4px 0;
    transition: color var(--t);
}
.contact-card__email:hover,
.contact-card__phone:hover {
    color: var(--c-accent);
}
.contact-card__note {
    margin-top: 12px;
    font-size: 14px;
    color: var(--c-text-muted);
    line-height: 1.5;
}

@media (max-width: 899px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-card { padding: 28px 24px; }
    .contact-card__title { font-size: 20px; }
    .contact-card__email, .contact-card__phone { font-size: 18px; }
}


/* ============================================================
 *  CHANNELS — кружки мессенджеров/соцсетей в ряд
 *
 *  <div class="channels">
 *    <a class="channel" href="https://t.me/...">
 *      <span class="channel__icon">📱</span>  ← или SVG
 *      <span class="channel__label">Telegram</span>
 *    </a>
 *  </div>
 * ============================================================ */
.channels {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    text-decoration: none;
    color: var(--c-text);
    font-weight: 500;
    font-size: 15px;
    transition: border-color var(--t), background var(--t), transform var(--t), color var(--t);
}
.channel:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    transform: translateY(-2px);
}
.channel__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.channel__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.channel__label { white-space: nowrap; }


/* ============================================================
 *  ПАМЯТКА ПО ПРИМЕНЕНИЮ НА ДРУГИХ СТРАНИЦАХ
 *  ============================================================
 *
 *  СЕКЦИЯ:
 *    <section class="section section--light">  светлая (белый)
 *    <section class="section section--gray">   серая  (#F6F7F9)
 *    <section class="section section--dark">   тёмная (#0F1B33)
 *
 *  ШАПКА СЕКЦИИ:
 *    <div class="section-head section-head--left">  цифра справа
 *    <div class="section-head section-head--right"> цифра слева
 *
 *  СЕТКИ:
 *    .grid-2, .grid-3  (для карточек)
 *
 *  КАРТОЧКА:
 *    <article class="card">                              обычная
 *    <article class="card card--accent">                 тёмная
 *    <article class="card card--wide">                   2 колонки шириной
 *      .card__tag — плашка категории
 *      .card__title — заголовок
 *      .card__text — описание
 *      .card__meta — цена/мета снизу
 *
 *  КНОПКА:
 *    <a class="btn btn--primary">  синяя
 *    <a class="btn btn--ghost">    прозрачная с рамкой
 *
 *  BADGE:
 *    <div class="badge badge--soft">  светлый пилюлёобразный
 *
 *  ССЫЛКА "ПОДРОБНЕЕ":
 *    <a class="link-more">Подробнее →</a>
 *
 *  MEDIA-ROW (картинка + текст):
 *    <article class="media-row media-row--image-right"> ... </article>
 *    <article class="media-row media-row--image-left">  ... </article>
 *
 *  Шахматка (серия media-row автоматически чередуется):
 *    <div class="media-rows">
 *      <article class="media-row">...</article>
 *      <article class="media-row">...</article>
 *      <article class="media-row">...</article>
 *    </div>
 *
 *  STATS (4 крупные цифры):
 *    <div class="stats">
 *      <div class="stat">
 *        <div class="stat__value">50<span>+</span></div>
 *        <div class="stat__label">Подпись</div>
 *      </div>
 *    </div>
 *
 *  PROCESS / TIMELINE (этапы работы):
 *    <ol class="process">
 *      <li class="process__step">
 *        <div class="process__num">1</div>
 *        <div class="process__body">
 *          <h4 class="process__title">Шаг</h4>
 *          <p>Описание</p>
 *        </div>
 *      </li>
 *    </ol>
 *
 *  ACCORDION / FAQ (нативный, без JS):
 *    <div class="accordion">
 *      <details class="accordion__item">
 *        <summary class="accordion__head">
 *          <span>Вопрос</span><span class="accordion__icon"></span>
 *        </summary>
 *        <div class="accordion__body"><p>Ответ</p></div>
 *      </details>
 *    </div>
 *
 *  TABS (вкладки, требует JS в main.js):
 *    <div class="tabs">
 *      <button class="tabs__btn is-active" data-tab="t1">Битрикс24</button>
 *      <button class="tabs__btn" data-tab="t2">ИИ</button>
 *    </div>
 *    <div class="tabs-panels">
 *      <div class="tabs-panel is-active" id="t1">...</div>
 *      <div class="tabs-panel" id="t2">...</div>
 *    </div>
 *
 *  PRICING TABLE:
 *    <div class="pricing">
 *      <div class="pricing__col [pricing__col--featured]">
 *        <div class="pricing__head">
 *          <div class="pricing__tier">Bronze</div>
 *          <div class="pricing__price">15%</div>
 *          <div class="pricing__sub">скидка</div>
 *        </div>
 *        <ul class="pricing__list">
 *          <li>Что входит</li>
 *          <li class="pricing__no">Чего нет</li>
 *        </ul>
 *        <a class="btn btn--ghost">CTA</a>
 *      </div>
 *    </div>
 *
 *  LOGO CLOUD:
 *    <div class="logo-cloud">
 *      <div class="logo-cloud__item"><img src=""></div>
 *      <div class="logo-cloud__item">
 *        <span class="logo-cloud__placeholder">Client</span>
 *      </div>
 *    </div>
 *
 * ============================================================ */
@media (max-width: 899px) {
    .team-grid { grid-template-columns: 1fr !important; }
}


/* ============================================================
 *  МОДИФИКАТОРЫ НАПРАВЛЕНИЙ — локально переопределяют --c-accent.
 *  Любой элемент внутри получает цвет своего направления для
 *  всех мест где используется var(--c-accent).
 * ============================================================ */
.dir-bitrix24 {
    --c-accent:        var(--c-dir-bitrix);
    --c-accent-d:      var(--c-dir-bitrix-d);
    --c-accent-soft:   var(--c-dir-bitrix-soft);
    --c-accent-rgb:    var(--c-dir-bitrix-rgb);
    --c-accent-shadow: rgba(13, 172, 229, .18);
    /* .card--accent (тёмная карточка) на странице направления
     * окрашивается в тёмную версию цвета этого направления */
    --c-bg-dark:       var(--c-dir-bitrix-d);
}
.dir-ai {
    --c-accent:        var(--c-dir-ai);
    --c-accent-d:      var(--c-dir-ai-d);
    --c-accent-soft:   var(--c-dir-ai-soft);
    --c-accent-rgb:    var(--c-dir-ai-rgb);
    --c-accent-shadow: rgba(8, 145, 178, .18);
    --c-bg-dark:       var(--c-dir-ai-d);
}
.dir-web {
    --c-accent:        var(--c-dir-web);
    --c-accent-d:      var(--c-dir-web-d);
    --c-accent-soft:   var(--c-dir-web-soft);
    --c-accent-rgb:    var(--c-dir-web-rgb);
    --c-accent-shadow: rgba(71, 85, 105, .22);
    --c-bg-dark:       var(--c-dir-web-d);
}
.dir-design {
    --c-accent:        var(--c-dir-design);
    --c-accent-d:      var(--c-dir-design-d);
    --c-accent-soft:   var(--c-dir-design-soft);
    --c-accent-rgb:    var(--c-dir-design-rgb);
    --c-accent-shadow: rgba(190, 24, 93, .18);
    --c-bg-dark:       var(--c-dir-design-d);
}

/* Акцент-линия 3px сверху страницы — для hero-секций услуг.
 * Добавляется к телу страницы (body) или к hero-секции.
 * Цвет берётся из --c-accent текущего скоупа, поэтому линия
 * автоматически окрашивается в цвет направления. */
/* Акцент-линия сверху страницы. Реализована через box-shadow inset
 * у body — не сдвигает layout, не накладывается на админ-панель Битрикса. */
body.has-direction-stripe {
    box-shadow: inset 0 3px 0 var(--c-accent);
}

/* ============================================================
 *  АКТИВНЫЙ ПУНКТ МЕНЮ — подсветка цветом направления.
 *  Класс .is-active навешивается на <a> сервером (см.
 *  components/dicom/menu/templates/.default/template.php).
 *  Поскольку на этом же <a> уже стоит класс .dir-* (cyan/ai/web/design),
 *  --c-accent внутри ссылки переопределён — значит подсветка
 *  автоматически окрашивается в цвет своего направления.
 * ============================================================ */
.nav__link.is-active {
    color: var(--c-accent);
    background: var(--c-accent-soft);
    border-radius: 6px;
    padding: 6px 12px;
    /* margin компенсирует вертикальный padding, чтобы высота строки
     * меню не "прыгала" из-за подложки */
    margin: -6px 0;
}
.nav__submenu-link.is-active {
    background: var(--c-accent-soft);
    border-radius: 6px;
}
.nav__submenu-link.is-active span {
    color: var(--c-accent);
}
}


/* ============================================================
 *  МЕССЕНДЖЕРЫ В ФУТЕРЕ
 *  Три кнопки-канала в первой колонке футера под копирайтом.
 *  Иконки SVG берут color через currentColor.
 * ============================================================ */
.site-footer__messengers {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}
.site-footer__msg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    transition: all var(--t);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.site-footer__msg svg,
.site-footer__msg img {
    width: 18px;
    height: 18px;
}
.site-footer__msg:hover {
    color: #fff;
    background: var(--c-accent);
    transform: translateY(-2px);
}
