/* ============================================================
   AI Platforms — блочный контент (.blk-*)
   Единый редакторский ДОКУМЕНТ: одна узкая колонка чтения, один фон,
   ровный вертикальный ритм. Hero — full-bleed шапка, CTA — full-bleed
   тёмная лента. Между ними — всё в колонке `.blk-flow`.
   Токены и типографика — из style.css (Fraunces, тёплая палитра).
   ============================================================ */

.article--blocks { --col: 720px; }

/* ─────────────────────────────  Колонка потока  ───────────────────────────── */
.blk-flow {
    max-width: calc(var(--col) + 48px);
    margin: 0 auto;
    padding: clamp(40px, 5vw, 68px) 24px clamp(56px, 7vw, 84px);
    display: flex;
    flex-direction: column;
    gap: clamp(34px, 4vw, 52px);
}
.blk-b { margin: 0; min-width: 0; }

/* ─────────────────────────────  HERO (шапка)  ───────────────────────────── */
.blk-hero { padding: clamp(44px, 6vw, 84px) 0 clamp(22px, 3vw, 38px); }
.blk-hero .container { max-width: calc(var(--col) + 48px); }
/* бэк-ссылка и eyebrow в одной строке — выравниваем по центру (разные кегли «плясали») */
.blk-hero .back-link, .blk-hero .eyebrow { display: inline-flex; align-items: center; vertical-align: middle; margin-bottom: 24px; }
.blk-hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.35rem); line-height: 1.06; hyphens: manual; }
.blk-hero .hero__lead { max-width: 62ch; margin-top: 22px; }

.blk-hero__meta {
    display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
    color: var(--text-muted); font-size: 12.5px;
    text-transform: uppercase; letter-spacing: .12em;
    margin-bottom: 16px;
}
.blk-hero-features {
    display: flex; flex-wrap: wrap; gap: 10px 12px;
    margin-top: 28px;
}
.blk-hero-features li {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px 8px 9px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); font-size: 14px; color: var(--text-soft);
    transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.blk-hero-features li:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.blk-hero-features__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--accent-soft); color: var(--accent-2); flex-shrink: 0;
}
.blk-hero-features__icon svg { width: 16px; height: 16px; }

/* ─────────────────────────────  Компактный заголовок блока  ───────────────────────────── */
.blk-head { margin: 0 0 clamp(18px, 2vw, 26px); }
.blk-head .eyebrow { margin-bottom: 14px; }
.blk-head h2 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.12; letter-spacing: -.02em; margin: 0; color: var(--text);
}
.blk-head__lead { font-size: 1.05rem; color: var(--text-soft); line-height: 1.55; margin: 12px 0 0; max-width: 60ch; }

/* ─────────────────────────────  PROSE (основной текст)  ───────────────────────────── */
.blk-prose > :first-child { margin-top: 0; }
.blk-prose > :last-child { margin-bottom: 0; }
.blk-prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 1.5em 0 .5em; }
.blk-prose h3 { font-size: 1.35rem; margin: 1.5em 0 .4em; }
.blk-prose h4 { font-size: 1.05rem; margin: 1.4em 0 .4em; font-family: var(--font-sans); }
.blk-prose p, .blk-prose li { font-size: 1.09rem; color: var(--text-soft); line-height: 1.75; }
.blk-prose p { margin: 0 0 1.05em; }
.blk-prose ul, .blk-prose ol { display: flex; flex-direction: column; gap: 9px; margin: 0 0 1.25em; padding: 0; }
.blk-prose li { position: relative; padding-left: 26px; }
.blk-prose ul li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 600; }
.blk-prose ol { counter-reset: blkol; }
.blk-prose ol li { counter-increment: blkol; }
.blk-prose ol li::before {
    content: counter(blkol); position: absolute; left: 0; top: .02em;
    font-family: var(--font-serif); font-style: italic; font-size: 1.05em; color: var(--accent); line-height: 1;
}
.blk-prose a { color: var(--accent); border-bottom: 1px solid rgba(210,85,42,.35); transition: border-color .2s var(--ease), color .2s var(--ease); }
.blk-prose a:hover { color: var(--accent-2); border-bottom-color: currentColor; }
.blk-prose strong { color: var(--text); font-weight: 600; }
.blk-prose code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.blk-prose pre {
    background: var(--bg-dark); color: var(--text-on-dark);
    border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; margin: 0 0 1.25em;
}
.blk-prose pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: .92em; }

/* ─────────────────────────────  CARDS (1–2 столбца в колонке)  ───────────────────────────── */
.blk-cards { display: grid; gap: clamp(14px, 1.8vw, 18px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blk-cards--1 { grid-template-columns: minmax(0, 1fr); }
.blk-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.blk-card {
    position: relative; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 2.4vw, 28px);
    display: flex; flex-direction: column; gap: 12px; min-width: 0;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.blk-card::after {
    content: ""; position: absolute; right: -50px; top: -50px; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(210,85,42,.12), transparent 68%);
    opacity: 0; transition: opacity .4s var(--ease); pointer-events: none;
}
.blk-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.blk-card:hover::after { opacity: 1; }
.blk-card__icon {
    width: 46px; height: 46px; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-2);
    transition: background .35s var(--ease), color .35s var(--ease);
}
.blk-card__icon svg { width: 23px; height: 23px; }
.blk-card:hover .blk-card__icon { background: var(--accent); color: #fff; }
.blk-card h3 {
    font-family: var(--font-serif); font-size: 1.24rem; font-weight: 500;
    letter-spacing: -.018em; line-height: 1.15; margin: 0; color: var(--text);
}
.blk-card p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.6; }

/* ─────────────────────────────  STEPS (вертикальный timeline)  ───────────────────────────── */
.blk-steps { list-style: none; margin: 0; padding: 0; }
.blk-step {
    position: relative;
    display: grid; grid-template-columns: 46px 1fr; column-gap: 18px;
    padding-bottom: clamp(24px, 3vw, 34px);
}
.blk-step:last-child { padding-bottom: 0; }
/* рейка процесса: от под номером до следующей станции */
.blk-step::before {
    content: ""; position: absolute; left: 21px; top: 36px; bottom: -2px; width: 1.5px;
    background: var(--line-strong); opacity: .55;
}
.blk-step:last-child::before { display: none; }
.blk-step__num {
    grid-column: 1; align-self: start; position: relative; z-index: 1;
    font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent);
    font-size: clamp(1.6rem, 2vw, 1.95rem); line-height: 1;
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.blk-step__body { grid-column: 2; }
.blk-step__body h3 {
    font-family: var(--font-serif); font-weight: 500; font-size: 1.22rem; line-height: 1.22;
    letter-spacing: -.012em; margin: 0 0 6px; color: var(--text);
}
.blk-step__body p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.62; }

/* ─────────────────────────────  STATS (паяная панель)  ───────────────────────────── */
.blk-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px; background: rgba(36,28,23,.10); border: 1px solid rgba(36,28,23,.10);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.blk-stat {
    background: var(--bg-card); padding: clamp(22px, 2.6vw, 30px) clamp(18px, 2vw, 24px);
    display: flex; flex-direction: column; gap: 8px; transition: background .3s var(--ease);
}
.blk-stat:hover { background: var(--bg-elevate); }
.blk-stat__value {
    font-family: var(--font-serif); font-weight: 400;
    font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: .95;
    color: var(--accent); letter-spacing: -.03em; font-feature-settings: "tnum" 1, "lnum" 1;
}
.blk-stat__label { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.4; }

/* ─────────────  CALLOUT — редакторская врезка (без коробки/полос/подложек)  ───────────── */
.blk-callout {
    display: flex; gap: 20px; align-items: flex-start; margin: 0;
    padding: 28px 2px; background: none; border: 0;
    border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.blk-callout__icon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
    border: 1.5px solid currentColor; background: none; color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center; margin-top: 3px;
}
.blk-callout__icon svg { width: 20px; height: 20px; }
.blk-callout__title {
    font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; letter-spacing: -.015em;
    line-height: 1.2; margin: 0 0 7px; color: var(--text);
}
.blk-callout__text { margin: 0; color: var(--text-soft); font-size: 1.05rem; line-height: 1.65; }
.blk-callout--warning .blk-callout__icon { color: var(--accent-2); }
.blk-callout--success .blk-callout__icon { color: var(--moss); }

/* ─────────────────────────────  TABLE  ───────────────────────────── */
.blk-table-wrap {
    overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.blk-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.blk-table th, .blk-table td { padding: 14px 18px; text-align: left; vertical-align: top; }
.blk-table thead th {
    font-family: var(--font-sans); font-weight: 600; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
    background: var(--bg-elevate); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.blk-table tbody td { color: var(--text-soft); border-bottom: 1px solid var(--line); line-height: 1.5; }
.blk-table tbody tr:last-child td { border-bottom: 0; }
.blk-table tbody tr { transition: background .2s var(--ease); }
.blk-table tbody tr:hover td { background: var(--bg-elevate); }

/* ─────────────────────────────  IMAGE  ───────────────────────────── */
.blk-image { margin: 0; text-align: center; }
.blk-image img {
    display: inline-block; width: 100%; height: auto;
    border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.blk-image figcaption { margin-top: 14px; color: var(--text-muted); font-size: 14px; }

/* ─────────────────────────────  QUOTE → манифест в колонке  ───────────────────────────── */
.blk-quote { position: relative; text-align: center; margin: 0 auto; padding: 10px 0 0; }
.blk-quote__mark {
    display: block; font-family: var(--font-serif); font-weight: 400;
    font-size: 3.4rem; line-height: .4; color: var(--accent); opacity: .4; margin-bottom: 8px;
}
.blk-quote__text {
    font-family: var(--font-serif); font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.22; letter-spacing: -.02em;
    color: var(--text); margin: 0;
}
.blk-quote__author {
    display: block; margin-top: 22px; font-style: normal; font-size: 12.5px;
    text-transform: uppercase; letter-spacing: .15em; color: var(--text-muted);
}

/* ─────────────  CTA — тёмная карточка-флоу-чайлд (в колонке, общий ритм)  ───────────── */
.blk-b--cta .cta {
    padding: clamp(38px, 5vw, 60px) clamp(26px, 4vw, 44px);
    border-radius: var(--radius-lg);
}
.blk-b--cta .cta h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: 16px; line-height: 1.12; }
.blk-b--cta .cta p { font-size: 1.02rem; margin-bottom: 26px; }

/* ─────────────  «Другие решения» — связанная навигация (строки-ссылки) в колонке  ───────────── */
.blk-related__head { margin: 0 0 clamp(16px, 2vw, 22px); }
.blk-related__head .eyebrow { margin-bottom: 12px; }
.blk-related__head h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.12; margin: 0; }
.blk-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.blk-related__item {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 16px; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--bg-card);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.blk-related__item:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.blk-related__icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-2);
}
.blk-related__icon svg { width: 20px; height: 20px; }
.blk-related__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.blk-related__title {
    font-family: var(--font-serif); font-size: 1.06rem; font-weight: 500;
    color: var(--text); line-height: 1.2; letter-spacing: -.01em;
}
.blk-related__sum {
    font-size: 12.5px; color: var(--text-muted); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blk-related__arrow { flex: 0 0 auto; color: var(--accent); margin-left: auto; transition: transform .25s var(--ease); }
.blk-related__item:hover .blk-related__arrow { transform: translateX(3px); }

/* ─────────────  Каталог услуг /services — группировка по категориям  ───────────── */
.svc-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(20px, 3vw, 40px); }
.svc-catalog .svc-cat { margin-bottom: clamp(48px, 6vw, 84px); }
.svc-catalog .svc-cat:last-child { margin-bottom: 0; }
.svc-cat__head { display: flex; align-items: flex-start; gap: 18px; margin: 0 0 clamp(22px, 3vw, 34px); max-width: 760px; }
.svc-cat__icon {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-2);
}
.svc-cat__icon svg { width: 27px; height: 27px; }
.svc-cat__meta h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; margin: 3px 0 8px; }
.svc-cat__meta p { margin: 0; color: var(--text-soft); font-size: 1.05rem; line-height: 1.5; }
.svc-grid { display: grid; gap: clamp(16px, 1.8vw, 22px); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.svc-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(24px, 2.6vw, 30px); min-width: 0; color: inherit;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.svc-card__icon {
    width: 50px; height: 50px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-2);
    transition: background .35s var(--ease), color .35s var(--ease);
}
.svc-card__icon svg { width: 25px; height: 25px; }
.svc-card:hover .svc-card__icon { background: var(--accent); color: #fff; }
.svc-card__title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; line-height: 1.14; letter-spacing: -.018em; margin: 4px 0 0; color: var(--text); }
.svc-card__sum { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.6; }
.svc-card__bullets { display: flex; flex-direction: column; gap: 7px; margin: 2px 0 0; padding: 0; list-style: none; }
.svc-card__bullets li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }
.svc-card__bullets li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--accent); }
.svc-card__link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; font-size: 14.5px; padding-top: 6px; transition: gap .2s var(--ease); }
.svc-card:hover .svc-card__link { gap: 12px; }
@media (max-width: 620px) {
    .svc-cat__head { gap: 14px; }
    .svc-cat__icon { width: 46px; height: 46px; }
    .svc-grid { grid-template-columns: 1fr; }
}
/* /services: умеренные единые отступы вокруг каталога и CTA (без 72–140px провалов) */
body.page--services .svc-catalog { padding-top: clamp(30px, 4vw, 52px); padding-bottom: clamp(22px, 3vw, 38px); }
body.page--services .section--cta { padding-top: clamp(22px, 3vw, 42px); padding-bottom: clamp(54px, 7vw, 80px); }

/* ─────────────────────────────  Адаптив  ───────────────────────────── */
@media (max-width: 620px) {
    .blk-cards, .blk-cards--2 { grid-template-columns: minmax(0, 1fr); }
    .blk-related__grid { grid-template-columns: 1fr; }
    .blk-callout { flex-direction: column; gap: 14px; }
    .blk-step { grid-template-columns: 38px 1fr; column-gap: 14px; }
    .blk-step::before { left: 17px; }
}
