/* Лендинг «Чистовик» (tpg/page-chistovik.php). Брейкпоинты как в вёрстке: 1259 / 991 / 767 / 439 */

/* Заголовки в макете — Manrope 4.x (Google Fonts). В теме жирный «Inter» 700 = старый Manrope 1.2 (шире ~5% и плотнее);
   на этой странице подменяем его актуальной версией для кириллицы и латиницы */
@font-face {
    font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
    src: url(../fonts/manrope-v4-700-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
    src: url(../fonts/manrope-v4-700-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Сглаживание по умолчанию на macOS утолщает штрих — текст выходит заметно жирнее, чем в Figma.
   На этой странице сглаживание как в макете (antialiased) */
.chv { --chv-orange: #ef8333; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.page.page_gray main { background: var(--color-light); }

.chv .chvVideo__poster,
.chv .chvFeatures__image,
.chv .frontAccesses__image img { height: auto; }


/* ---------- Первый экран ---------- */
.chvHero { display: flex; flex-direction: column; align-items: center; }
.chvHero__title { margin: 40px 0 24px; line-height: 112px; }
.chvHero__text {
    font-size: 20px; line-height: 28px; text-align: center; color: var(--color-text);
    padding: 8px 0; margin-bottom: 48px;
}
.chvHero__text .frontBanner__accent { margin: 0 4px; }

.chvVideo {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    border-radius: 40px; overflow: hidden; background: #1b4f86;
}
.chvVideo__poster { display: block; width: 100%; height: 100% !important; object-fit: cover; }
/* затемнение стоп-кадра, как в макете: #3C3C3C 50% */
.chvVideo::after { content: ""; position: absolute; inset: 0; background: rgba(60, 60, 60, .5); pointer-events: none; }
.chvVideo.is-playing::after { display: none; }
.chvVideo__play {
    position: absolute; z-index: 1; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
    display: flex; align-items: center; justify-content: center; padding: 0 0 0 6px;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: rgba(60, 60, 60, .8); transition: background .2s, transform .2s;
}
.chvVideo__play svg { width: 58px; height: 58px; }
.chvVideo__play:hover { background: rgba(33, 108, 255, .9); transform: scale(1.05); }
.chvVideo.is-playing .chvVideo__poster,
.chvVideo.is-playing .chvVideo__play { visibility: hidden; }
.chvVideo__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* ---------- Возможности ---------- */
.chvFeatures {
    display: grid; gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(340px, auto));
    grid-template-areas: "editor editor ai" "team check ai";
}
.chvFeatures__item {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    background: var(--color-white); border-radius: 40px; padding: 32px;
}
.chvFeatures__item_editor { grid-area: editor; flex-direction: row; padding-right: 0; }
.chvFeatures__item_ai { grid-area: ai; padding-bottom: 0; }
.chvFeatures__item_team { grid-area: team; }
.chvFeatures__item_check { grid-area: check; }
.chvFeatures__name { font-size: 32px; font-weight: 700; line-height: 36px; color: var(--color-text); margin-bottom: 12px; }
.chvFeatures__desc { font-size: 18px; line-height: 24px; color: var(--color-text); }
.chvFeatures__item_editor .chvFeatures__text { flex: 0 1 380px; position: relative; z-index: 1; }
/* переносы строк заголовков — как в макете (через <br>) */
@media screen and (min-width: 1260px) {
    .chvFeatures__name, .chvTitleLong { white-space: nowrap; }
}
/* иллюстрации — кадры макета: «Редактор» 420×340 у правого края карточки, ИИ-ассистент 392×400 внизу на всю ширину */
.chvFeatures__item_editor .chvFeatures__image {
    position: absolute; right: 0; top: 0; width: 420px; max-width: 52%;
}
.chvFeatures__item_ai .chvFeatures__image {
    display: block; width: calc(100% + 64px); max-width: none; margin: auto -32px 0; align-self: center;
}

/* ---------- Как работают вместе ---------- */
/* геометрия по макету 1920: колонки 564 / 96 / 564, шаг между строками 16, узел 36 с «усиками» 30 px */
.chvSteps { --chv-line: #d9dde3; position: relative; display: flex; flex-direction: column; gap: 16px; }
.chvSteps__row { display: grid; grid-template-columns: 1fr 96px 1fr; }
.chvSteps__axis {
    --cl: transparent; --cr: transparent;   /* «ус» виден только со стороны карточки, как в макете */
    position: relative; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(var(--cl), var(--cl)) no-repeat left center / 30px 2px,
                linear-gradient(var(--cr), var(--cr)) no-repeat right center / 30px 2px;
}
.chvSteps__axis::before {
    content: ""; position: absolute; left: calc(50% - 1px); top: -8px; bottom: -8px; width: 2px; background: var(--chv-line);
}
.chvSteps__row_head .chvSteps__axis { background: none; }
.chvSteps__row_head .chvSteps__axis::before { top: 50%; }

.chvSteps__role {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px; border-radius: 84px; background: var(--color-white);
}
.chvSteps__role b { display: block; font-size: 24px; font-weight: 700; line-height: 28px; }
.chvSteps__role small { display: block; margin-top: 8px; font-size: 18px; line-height: 24px; color: var(--color-text); }
.chvSteps__avatar {
    flex: none; width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: #fff;
}
.chvSteps__role_teacher .chvSteps__avatar { background: var(--chv-orange); }
.chvSteps__role_student .chvSteps__avatar { background: var(--color-blue); }

.chvSteps__point {
    --c1: var(--color-blue);
    position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%;
    background: #fff; border: 4px solid var(--c1);
}
.chvSteps__point::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border-radius: 50%; background: var(--c1);
}
.chvSteps__point_teacher { --c1: var(--chv-orange); }
.chvSteps__point_together { --c1: #008636; }
.chvSteps__point_both {
    border-color: var(--color-orange) var(--color-blue) var(--color-blue) var(--color-orange);
    transform: rotate(45deg);
}
.chvSteps__point_both::after { background: var(--color-blue); }
/* «усики» от точки к карточке: цветной — в сторону карточки */
.chvSteps__axis_l { --cl: var(--chv-orange); }
.chvSteps__axis_r { --cr: var(--color-blue); }

.chvStep {
    position: relative; padding: 28px 32px;
    background: var(--color-white); border-radius: 24px; box-shadow: 0 4px 16px rgba(60, 60, 60, .06);
}
.chvStep__dot { display: none; }
.chvStep__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.chvStep__num { font-size: 40px; font-weight: 700; line-height: 40px; letter-spacing: -.04em; color: var(--color-blue); }
.chvStep_teacher .chvStep__num { color: var(--chv-orange); }
.chvStep_together .chvStep__num { color: var(--color-green); }
.chvStep__tag {
    font-size: 12px; font-weight: 600; line-height: 16px; padding: 4px 10px; border-radius: 20px;
    color: var(--color-blue); background: var(--color-blue-hover-light);
}
.chvStep_teacher .chvStep__tag { color: #c96520; background: #fff0e5; }
.chvStep_together .chvStep__tag { color: var(--color-green); background: var(--color-green-light); }
.chvStep__tag_mobile { display: none; }
.chvStep__name { font-size: 24px; font-weight: 700; line-height: 28px; color: var(--color-text); margin-bottom: 12px; }
.chvStep__text { font-size: 18px; line-height: 24px; color: var(--color-text); }

.chvSteps__join {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px;
    padding-top: 8px;
}
.chvSteps__join::before {
    content: ""; position: absolute; left: calc(50% - 1px); top: -16px; bottom: 18px; width: 2px; background: var(--chv-line);
}
.chvSteps__repeat {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border: 2px dashed var(--chv-line); border-radius: 999px; background: var(--color-white);
    font-size: 16px; line-height: 24px; color: var(--color-placeholder);
}
.chvSteps__repeat svg { flex: none; color: var(--color-placeholder); }
.chvSteps__repeat_mob { display: none; }
.chvStep_final { padding: 28px 140px; text-align: center; border: 1px solid rgba(60, 60, 60, .06); }
.chvStep_final .chvStep__name { margin-bottom: 12px; }
@media screen and (min-width: 768px) {
    .chvStep_final .chvStep__dot {
        display: flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%;
        color: #fff; background: #008636;
    }
}
.chvSteps__note {
    margin-top: 24px; text-align: center; font-size: 16px; line-height: 24px; color: var(--color-placeholder);
}

/* ---------- Было / стало ---------- */
.chvShift { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chvShift__card {
    display: flex; flex-direction: column; padding: 40px; border-radius: 32px;
    background: var(--color-white); color: var(--color-text);
}
.chvShift__card_now { background: var(--color-blue); color: #fff; }
.chvShift__label { font-size: 20px; font-weight: 700; line-height: 24px; color: var(--color-placeholder); margin-bottom: 8px; }
.chvShift__card_now .chvShift__label { color: #fff; }
.chvShift__title { font-size: 32px; font-weight: 700; line-height: 36px; }
.chv .chvShift__list { list-style: none; margin: auto 0 0; padding: 40px 0 0; display: flex; flex-direction: column; gap: 16px; }
.chvShift__list li { position: relative; display: flex; gap: 12px; margin: 0; font-size: 18px; line-height: 24px; }
.chvShift__card_was .chvShift__list li { padding-left: 36px; color: var(--color-text); }
.chvShift__card_was .chvShift__list li::before {
    content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #aeaeb3;
}
.chvShift__card_now .chvShift__list li { color: #fff; }
.chvCheck { flex: none; width: 24px; height: 24px; margin-top: 0; color: #fff; }
.chvShift__arrow {
    position: absolute; left: 50%; top: 50%; z-index: 1; width: 56px; height: 56px; margin: -28px 0 0 -28px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--color-light); color: #000;
}
.chvShift__arrow svg { width: 24px; height: 24px; }

/* ---------- Форма ---------- */
.chvAccess .frontAccesses__title { margin: 0; color: var(--color-text); }
/* конверт по макету: ~307 px, по центру, сразу под текстом; низ обрезан краем блока */
.chvAccess .frontAccesses__preview,
.chvAccess .frontAccesses__form { min-height: 448px; }
.chvAccess .frontAccesses__text { padding-bottom: 0; }
.chvAccess .frontAccesses__image { flex: 1 1 0; min-height: 0; max-height: none; margin-top: 19px; align-items: flex-start; }
.chvAccess .frontAccesses__image img { display: block; width: 307px; max-width: 70%; max-height: none; }

/* ======================= ≤1259 ======================= */
@media screen and (max-width: 1259px) {
    .chvFeatures { gap: 16px; grid-template-rows: repeat(2, minmax(300px, auto)); }
    .chvFeatures__item { border-radius: 28px; padding: 28px; }
    .chvFeatures__name { font-size: 28px; line-height: 32px; }
    .chvFeatures__item_ai .chvFeatures__image { width: calc(100% + 28px); margin-right: -28px; }
    .chvStep { padding: 20px 24px; }
    .chvShift { gap: 24px; }
    .chvShift__card { padding: 32px; border-radius: 28px; }
    .chvShift__title { font-size: 28px; line-height: 32px; }
    .chvAccess .frontAccesses__preview { flex: 1 1 400px; }
    .chvAccess .frontAccesses__form { flex: 0 1 368px; }
}

/* ======================= ≤991 ======================= */
@media screen and (max-width: 991px) {
    .chvHero__text { font-size: 16px; line-height: 24px; margin-bottom: 32px; }
    .chvHero__text .frontBanner__accent { font-size: 16px; line-height: 24px; padding: 4px 12px; }
    .chvVideo { border-radius: 24px; }
    .chvVideo__play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
    .chvVideo__play svg { width: 28px; height: 28px; }

    .chvFeatures {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: minmax(300px, auto) minmax(240px, auto) minmax(240px, auto);
        grid-template-areas: "editor editor" "team ai" "check ai";
    }
    .chvFeatures__item_editor .chvFeatures__text { flex-basis: 52%; }
    .chvFeatures__item_editor .chvFeatures__image { width: 44%; }

    .chvSteps__row { grid-template-columns: 1fr 72px 1fr; }
    .chvSteps__role { padding: 12px 16px; }
    .chvSteps__role b { font-size: 20px; line-height: 24px; }
    .chvSteps__role small { font-size: 16px; line-height: 24px; color: var(--color-placeholder); }
    .chvSteps__avatar { width: 40px; height: 40px; font-size: 20px; }
    .chvSteps__point { width: 28px; height: 28px; }
    .chvStep { padding: 20px; border-radius: 20px; }
    .chvStep_final { padding: 24px 40px; }
    .chvStep__num { font-size: 32px; line-height: 32px; }
    .chvStep__name { font-size: 20px; line-height: 24px; }
    .chvStep__text { font-size: 16px; line-height: 24px; color: var(--color-placeholder); }
    .chvFeatures__name { font-size: 24px; line-height: 28px; }
    .chvShift__list li { font-size: 16px; line-height: 24px; }
    .chvShift__card_was .chvShift__list li::before { top: 6px; }

    .chvShift { grid-template-columns: 100%; gap: 16px; }
    .chvShift__card { padding: 28px; border-radius: 24px; }
    .chv .chvShift__list { padding-top: 24px; }
    .chvTitleLong br { display: none; }
    .chvShift__title br, .chvShift__list br { display: none; }
    .chvShift__arrow { position: relative; left: auto; top: auto; width: 32px; height: 32px; margin: -24px auto; transform: rotate(90deg); }

    .chvAccess .frontAccesses__preview { flex: 1 1 300px; }
    .chvAccess .frontAccesses__form { flex: 0 1 320px; }
    .chvAccess .frontAccesses__title { font-size: 24px; line-height: 28px; }
    .chvAccess .frontAccesses__subtitle { font-size: 16px; line-height: 22px; color: var(--color-placeholder); }
    .chvAccess .accessesForm__title { font-size: 24px; line-height: 28px; }
}

/* ======================= ≤767: вертикальная лента ======================= */
@media screen and (max-width: 767px) {
    .chvHero__title { margin-top: 16px; }
    .chvHero__text { font-size: 14px; line-height: 20px; margin-bottom: 24px; }
    .chvHero__text .frontBanner__accent { font-size: 14px; line-height: 20px; padding: 2px 10px; }
    .chvHero__br { display: block; }
    .chvVideo { border-radius: 20px; }
    .chvVideo__play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
    .chvVideo__play svg { width: 22px; height: 22px; }

    .chvFeatures {
        gap: 12px; grid-template-columns: 100%; grid-template-rows: none;
        grid-template-areas: "editor" "ai" "team" "check";
    }
    .chvFeatures__item { padding: 24px; border-radius: 24px; }
    .chvFeatures__item_ai { padding-bottom: 24px; }
    .chvFeatures__item_editor { padding-right: 24px; }
    .chvFeatures__item_editor .chvFeatures__text { flex-basis: auto; }
    .chvFeatures__image { display: none !important; }
    .chvFeatures__name { font-size: 24px; line-height: 28px; }
    .chvFeatures__name br { display: none; }
    .chvFeatures__desc { font-size: 16px; line-height: 22px; }

    .chvSteps { display: flex; flex-direction: column; gap: 12px; padding-left: 48px; }
    .chvSteps::before {
        content: ""; position: absolute; left: 17px; top: 30px; bottom: 60px; width: 1px; background: var(--color-blue-active-light-2);
    }
    .chvSteps__row { display: contents; }
    .chvSteps__row > div:empty,
    .chvSteps__row_head,
    .chvSteps__axis,
    .chvSteps__row_head * { display: none; }
    .chvStep, .chvSteps__join { order: var(--chv-order); }
    .chvStep, .chvSteps__row_head + .chvSteps__row .chvStep, .chvSteps__row:nth-child(3) .chvStep, .chvStep_final { margin-top: 0; }
    .chvStep { padding: 16px 20px; text-align: left; }
    .chvStep_final .chvStep__name { font-size: 18px; }
    .chvStep__dot {
        position: absolute; left: -48px; top: 50%; width: 36px; height: 36px; margin-top: -18px;
        display: flex; align-items: center; justify-content: center; border-radius: 50%;
        font-size: 16px; font-weight: 700; color: #fff; background: var(--color-blue);
    }
    .chvStep_teacher .chvStep__dot { background: var(--chv-orange); }
    .chvStep_together .chvStep__dot { background: var(--color-green); }
    .chvStep__num, .chvStep__tag_desktop { display: none; }
    .chvStep__tag_mobile { display: inline-block; }
    .chvStep__name { font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
    .chvStep__text { font-size: 16px; line-height: 1.4; }
    .chvSteps__repeat { font-size: 14px; line-height: 20px; }
    .chvSteps__repeat_desk { display: none; }
    .chvSteps__repeat_mob { display: inline; }
    .chvSteps__join { padding: 0; align-items: flex-start; }
    .chvSteps__join::before, .chvSteps__join .chvSteps__point { display: none; }
    .chvSteps__note { font-size: 14px; line-height: 20px; margin-top: 16px; }

    .chvShift__card { padding: 24px 20px; }
    .chvShift__title { font-size: 22px; line-height: 28px; }
    .chvTitleLong { font-size: 28px; line-height: 32px; }
    .chv .chvShift__list { gap: 10px; padding-top: 20px; }
    .chvShift__list li { font-size: 14px; line-height: 20px; gap: 10px; }
    .chvShift__card_was .chvShift__list li { padding-left: 22px; }
    .chvShift__card_was .chvShift__list li::before { top: 6px; left: 4px; width: 8px; height: 8px; }
    .chvCheck { width: 18px; height: 18px; margin-top: 1px; }

    .chvAccess .frontAccesses__preview,
    .chvAccess .frontAccesses__form { flex: none; width: 100%; max-width: none; }
    .chvAccess .frontAccesses__title { font-size: 24px; }
    .chvAccess .frontAccesses__title br { display: none; }
    .chvAccess .frontAccesses__preview, .chvAccess .frontAccesses__form { min-height: 0; }
    .chvAccess .frontAccesses__image { flex: none; height: 230px; }
    .chvAccess .frontAccesses__image img { width: 240px; }
}

@media screen and (max-width: 439px) {
    .chvSteps { padding-left: 44px; }
    .chvStep__dot { left: -44px; width: 32px; height: 32px; margin-top: -16px; }
    .chvSteps::before { left: 15px; }
    .chvStep { padding: 16px; }
}
