/*
 * Стили сайта-портфолио. Макет: черновик «Лендинг: Максим Семин», 1280 px,
 * адаптив 360–1440 px. Без CSS-фреймворков, шрифты — локальные (web/fonts).
 */

/* --- Шрифты --------------------------------------------------------------- */

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/golos-text-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/golos-text-latin-400-normal.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; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/golos-text-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+20BD; }

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("../fonts/golos-text-cyrillic-600-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("../fonts/golos-text-latin-600-normal.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; }

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("../fonts/golos-text-cyrillic-700-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("../fonts/golos-text-latin-700-normal.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; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("../fonts/golos-text-latin-ext-700-normal.woff2") format("woff2");
    unicode-range: U+20BD; }

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 800; font-display: swap;
    src: url("../fonts/golos-text-cyrillic-800-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 800; font-display: swap;
    src: url("../fonts/golos-text-latin-800-normal.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; }

@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("../fonts/jetbrains-mono-latin-400-normal.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; }

/* --- Токены --------------------------------------------------------------- */

:root {
    --bg: #f2f4f1;
    --surface: #ffffff;
    --surface-soft: #fafaf7;
    --ink: #16181b;
    --ink-deep: #16171b;
    --text: #3b3f45;
    --muted: #5a5f66;
    --subtle: #6b7077;
    --faint: #8a8f96;
    --line: #d5d8d1;
    --accent: #0d5c53;
    --accent-hover: #0a4a43;

    --dark-line: #33373c;
    --dark-line-strong: #4a4e56;
    --dark-text: #c9ccd0;
    --dark-muted: #9aa0a6;
    --dark-heading: #f3f4f1;
    --dark-accent: #7fc7bc;

    --font-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --container: 1160px;
    --gutter: 60px;
    --section-y: 80px;
    --radius-s: 8px;
    --radius: 10px;
    --radius-card: 14px;
    --radius-l: 16px;
    --radius-xl: 20px;
}

@media (max-width: 1100px) {
    :root { --gutter: 40px; --section-y: 72px; }
}

@media (max-width: 767px) {
    :root { --gutter: 20px; --section-y: 56px; }
}

/* --- База ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius-s);
    background: var(--ink);
    color: #fff;
    font-weight: 600;
}
.skip-link:focus { top: 8px; color: #fff; }

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Заполнители из черновика: данных ещё нет (открытые вопросы ТЗ). */
.placeholder { font-style: normal; }

.muted { color: var(--muted); }

/* --- Типографика блоков --------------------------------------------------- */

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section {
    padding: var(--section-y) 0;
    scroll-margin-top: 8px;
}

/* Блок, который сам себе контейнер (страницы «Спасибо», отзыв согласия): боковые
   отступы контейнера не должны пропадать из-за padding у .section. */
.container.section {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section--white {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section--dark {
    background: var(--ink-deep);
    color: var(--dark-text);
}
.section--dark .eyebrow { color: var(--dark-accent); }
.section--dark .section__title { color: var(--dark-heading); }

.section__title {
    max-width: 900px;
    font-size: clamp(1.875rem, 1.2rem + 2.1vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}
.section__title--wide { max-width: none; }

.section__lead {
    max-width: 690px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.3;
}

.bullets { margin-top: 16px; }
.bullets li {
    position: relative;
    padding-left: 18px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}
.bullets li::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 0.72em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.bullets--light li { color: var(--dark-text); }

/* --- Кнопки --------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-hover); color: #fff; }
.button--primary:disabled { background: #7a9c97; cursor: not-allowed; }
.button--outline { border-color: var(--ink-deep); color: var(--ink); background: transparent; }
.button--outline:hover { background: var(--ink-deep); color: #fff; }
.button--light { min-height: 48px; background: var(--bg); color: var(--ink); font-size: 15px; }
.button--light:hover { background: #fff; color: var(--ink); }
.button--white { min-height: 52px; background: #fff; color: var(--ink); }
.button--white:hover { background: var(--bg); color: var(--ink); }
.button--ghost-light { min-height: 52px; border-color: #fff; color: #fff; }
.button--ghost-light:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
span.button { cursor: default; }
.button--block { display: flex; width: 100%; }

/* --- Шапка ---------------------------------------------------------------- */

.site-header { position: relative; z-index: 20; }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo__mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--ink-deep);
    color: var(--dark-heading);
    font-size: 16px;
    font-weight: 700;
}
.logo__name { font-size: 17px; font-weight: 600; }

.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
    display: block;
    padding: 6px 10px;
    border-radius: var(--radius-s);
    color: var(--text);
    font-size: 15px;
    text-decoration: none;
}
.site-nav__link:hover { color: var(--ink); background: rgba(22, 23, 27, 0.05); }
.site-nav__link--accent { color: var(--ink); font-weight: 600; }
.site-nav__list li:last-child .site-nav__link { margin-right: -10px; }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle__bar { position: relative; }
.menu-toggle__bar::before, .menu-toggle__bar::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bar::before { top: -7px; }
.menu-toggle__bar::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
    .site-header__inner { min-height: 68px; }
    .logo__mark { width: 36px; height: 36px; font-size: 15px; }
    .logo__name { font-size: 16px; }

    /* Без JS меню показывается списком под логотипом — см. css/nojs.css. */
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        padding: 8px var(--gutter) 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(22, 23, 27, 0.08);
    }
    .site-nav.is-open { display: block; }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__link { padding: 12px 0; font-size: 17px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .site-nav__list li:last-child .site-nav__link { margin-right: 0; border-bottom: 0; }
}

/* --- Первый экран --------------------------------------------------------- */

.hero { padding: 52px 0 72px; }

.hero__title {
    max-width: 960px;
    margin-top: 14px;
    font-size: clamp(2.125rem, 1.2rem + 4.2vw, 4.25rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.hero__lead {
    max-width: 762px;
    margin-top: 32px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.55;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 36px;
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 64px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--line);
}
.facts__item { padding: 22px 24px 24px; background: var(--surface); }
.facts__value { font-size: 32px; font-weight: 700; line-height: 1.15; }
.facts__label { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.22; overflow-wrap: normal; hyphens: auto; }

@media (max-width: 1100px) {
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .hero { padding: 28px 0 56px; }
    .hero__title { margin-top: 10px; letter-spacing: -0.02em; }
    .hero__lead { margin-top: 20px; font-size: 17px; }
    .hero__actions { margin-top: 28px; }
    .hero__actions .button { flex: 1 1 200px; }
    .facts { margin-top: 40px; }
    .facts__item { padding: 16px 14px; }
    .facts__value { font-size: 26px; }
    .facts__label { font-size: 13px; }
}

/* --- Услуги для бизнеса --------------------------------------------------- */

.services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 22px;
    margin-top: 44px;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 28px 28px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface-soft);
    scroll-margin-top: 16px;
}
.service-card__num { color: #6e737a; font-family: var(--font-mono); font-size: 13px; line-height: 1.4; }
.service-card__title { margin-top: 12px; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.service-card__text { margin-top: 14px; color: var(--text); font-size: 15px; line-height: 1.55; }
.service-card__note { margin-top: 18px; color: var(--subtle); font-size: 13px; line-height: 1.55; }

.service-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}
/* Отступ над пунктирной линией — как в макете, независимо от высоты карточки. */
.service-card > :nth-last-child(2) { margin-bottom: 18px; }
.service-card__price { font-size: 18px; font-weight: 700; line-height: 1.3; }
.service-card__term { color: var(--muted); font-family: var(--font-mono); font-size: 14px; line-height: 1.3; }

.service-card--dark { border-color: var(--ink-deep); background: var(--ink-deep); }
.service-card--dark .service-card__num { color: var(--dark-muted); }
.service-card--dark .service-card__title { color: var(--dark-heading); }
.service-card--dark .service-card__text { color: var(--dark-text); }
.service-card--dark .service-card__text { margin-bottom: 24px; }
.service-card__cta { margin-top: auto; }

@media (max-width: 1100px) {
    .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .services { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 32px; }
    .service-card { padding: 22px 20px; }
    .service-card__title { font-size: 20px; }
}

/* --- Стартапам ------------------------------------------------------------ */

.startups {
    display: grid;
    grid-template-columns: minmax(0, 480fr) minmax(0, 642fr);
    gap: 38px;
    align-items: start;
}
.startups .section__title { line-height: 1.1; }
.startups__lead { margin-top: 20px; color: var(--text); font-size: 17px; line-height: 1.62; }

.offer-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
}
.offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 23px 26px 24px;
    scroll-margin-top: 16px;
}
.offer + .offer { border-top: 1px solid var(--line); }
.offer__title { font-size: 19px; font-weight: 700; line-height: 1.25; }
.offer__text { max-width: 440px; margin-top: 6px; color: var(--text); font-size: 15px; line-height: 1.55; }
.offer__meta { text-align: right; white-space: nowrap; }
.offer__price { font-size: 16px; font-weight: 700; line-height: 1.3; }
.offer__term { margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 13px; }

@media (max-width: 1100px) {
    .startups { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .startups__intro { max-width: 640px; }
}
@media (max-width: 767px) {
    .startups__lead { margin-top: 18px; font-size: 16px; }
    .offer { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; }
    .offer__meta { display: flex; align-items: baseline; gap: 12px; text-align: left; }
    .offer__term { margin-top: 0; }
}

/* --- Кейсы ---------------------------------------------------------------- */

.cases {
    display: grid;
    grid-template-columns: minmax(0, 667fr) minmax(0, 467fr);
    gap: 25px;
    align-items: stretch;
    margin-top: 46px;
}

.case {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid var(--dark-line);
    border-radius: var(--radius-l);
}
.case__main { display: flex; flex-direction: column; }
.case__media { display: flex; flex-direction: column; }
.case__title { color: var(--dark-heading); font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.case__badge {
    align-self: flex-start;
    margin-top: 10px;
    padding: 5px 10px;
    border: 1px solid var(--dark-line-strong);
    border-radius: 999px;
    color: var(--dark-text);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.4;
}
.case__text { margin-top: 14px; color: var(--dark-text); font-size: 16px; line-height: 1.6; }

.case__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 24px;
    margin-top: 18px;
}
.case__stat-value { color: #fff; font-size: 28px; font-weight: 700; line-height: 1.15; }
.case__stat-label { margin-top: 4px; color: var(--dark-muted); font-size: 14px; line-height: 1.22; }
.case .bullets { margin-top: 16px; }
.case .bullets li { line-height: 1.75; }

.case__details {
    margin-top: 22px;
    padding: 17px 19px;
    border: 1px dashed var(--dark-line-strong);
    border-radius: 12px;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
}
.case__outro { margin-top: 20px; color: var(--dark-text); font-size: 15px; line-height: 1.6; }

.case__shots-placeholder {
    display: grid;
    place-items: center;
    min-height: 256px;
    margin-top: 20px;
    padding: 24px;
    border: 1px dashed var(--dark-line-strong);
    border-radius: 12px;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.gallery__link {
    display: block;
    overflow: hidden;
    border: 1px solid var(--dark-line);
    border-radius: 10px;
    cursor: zoom-in;
}
.gallery__link img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.2s; }
.gallery__link:hover img { transform: scale(1.03); }

/* Один кейс: на всю ширину, текст слева, скриншоты справа. */
.cases--single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1101px) {
    .cases--single .case {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 48px;
        padding: 40px;
    }
    .cases--single .case__media { justify-content: stretch; }
    .cases--single .case__shots-placeholder,
    .cases--single .gallery { flex: 1; margin-top: 0; }
}

@media (max-width: 1100px) {
    .cases { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .cases { margin-top: 32px; gap: 16px; }
    .case { padding: 22px 20px; }
    .case__title { font-size: 22px; }
    .case__text { font-size: 15px; }
    .case__stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .case__stats > div { display: flex; align-items: baseline; gap: 10px; }
    .case__stat-value { flex: 0 0 auto; font-size: 24px; }
    .case__shots-placeholder { min-height: 160px; }
}

/* Лайтбокс (web/js/site.js) */
.lightbox {
    width: min(1200px, 100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #0d0e10;
    color: var(--dark-text);
}
.lightbox::backdrop { background: rgba(10, 11, 13, 0.85); }
.lightbox__figure { display: flex; flex-direction: column; }
.lightbox__img { width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox__caption { padding: 12px 56px 14px 16px; font-size: 14px; }
.lightbox__close, .lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__close { top: 8px; right: 8px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* --- Как работаю ---------------------------------------------------------- */

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 20px;
    margin-top: 44px;
}
.step { padding-top: 18px; border-top: 2px solid var(--ink-deep); }
.step__label { color: var(--accent); font-family: var(--font-mono); font-size: 14px; line-height: 1.4; }
.step__title { margin-top: 10px; font-size: 18px; font-weight: 700; line-height: 1.22; }
.step__text { margin-top: 8px; color: var(--text); font-size: 15px; line-height: 1.55; }

.stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 11px;
    margin-top: 56px;
}
.stack__label { margin-right: 6px; color: var(--muted); font-size: 14px; }
.stack__list { display: contents; }
.chip {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 32px; }
    .stack { margin-top: 36px; }
}

/* --- Контакты и форма ----------------------------------------------------- */

.section--contact { padding-top: 0; }
#process { padding-bottom: var(--section-y); }

.cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    align-items: center;
    padding: 56px;
    border-radius: var(--radius-xl);
    background: var(--accent);
    color: #fff;
}
.cta__title { max-width: 600px; font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.cta__lead { margin-top: 18px; color: #e3f1ee; font-size: 17px; line-height: 1.4; }
.cta__actions { display: grid; gap: 13px; }

.lead-form {
    margin-top: 24px;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    scroll-margin-top: 16px;
}
.lead-form__title { font-size: 22px; font-weight: 700; line-height: 1.25; }
.lead-form__hint { margin-top: 6px; color: var(--muted); font-size: 15px; }

.lead-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    margin-top: 28px;
}

.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { display: block; margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.field__optional { color: var(--muted); font-weight: 400; }
.field__input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #b9bdb5;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}
.field__input::placeholder { color: #7d828a; }
.field__input:hover { border-color: var(--muted); }
.field__input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 92, 83, 0.2); }
.field__select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2316181b' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.field__textarea { min-height: 132px; resize: vertical; }
.field__hint { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }

.segmented { display: flex; gap: 6px; padding: 4px; border: 1px solid #b9bdb5; border-radius: var(--radius); }
.segmented__option { position: relative; flex: 1 1 0; }
.segmented__option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segmented__option span {
    display: grid;
    place-items: center;
    min-height: 40px;
    padding: 0 8px;
    border-radius: 7px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}
.segmented__option input:checked + span { background: var(--ink-deep); color: #fff; }
.segmented__option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }

.consent { margin-top: 24px; }
.consent__check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.consent__check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.consent__policy { margin-top: 8px; padding-left: 32px; color: var(--muted); font-size: 14px; }

.lead-form__alert {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid #e5a4a0;
    border-radius: var(--radius);
    background: #fdf1f0;
    color: #8a1f17;
    font-size: 15px;
}
.lead-form__alert--info { border-color: #e3c98a; background: #fdf6e3; color: var(--ink); }

/* Ловушка для ботов: вне экрана, недоступна с клавиатуры и экранным дикторам. */
.lead-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.field__error { margin-top: 6px; color: #b42318; font-size: 14px; line-height: 1.4; }
.field--error .field__input,
.field--error .segmented { border-color: #d92d20; }
.field--error .field__input:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.18); }
.consent.field--error .consent__check input { outline: 2px solid #d92d20; outline-offset: 2px; }
.consent .field__error { padding-left: 32px; }
.field__counter { color: var(--muted); }

.lead-form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.lead-form__pending { max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.45; }

@media (max-width: 1100px) {
    .cta { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 40px; }
    .cta__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .cta { padding: 28px 20px; border-radius: var(--radius-l); }
    .cta__lead { font-size: 16px; }
    .cta__actions { grid-template-columns: minmax(0, 1fr); }
    .lead-form { padding: 24px 20px; }
    .lead-form__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 22px; }
    .lead-form__footer .button { width: 100%; }
}

/* --- Подвал --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    min-height: 76px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 767px) {
    .site-footer__inner { flex-direction: column; align-items: flex-start; padding-top: 24px; padding-bottom: 28px; }
    .site-footer__links { flex-direction: column; }
}

/* --- Спасибо ------------------------------------------------------------- */

.thanks { padding-top: 56px; max-width: calc(820px + 2 * var(--gutter)); }
.thanks__title { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.thanks__steps { display: grid; gap: 20px; margin: 36px 0 28px; counter-reset: step; }
.thanks__steps li { position: relative; padding: 18px 20px 18px 64px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); counter-increment: step; }
.thanks__steps li::before {
    content: "0" counter(step);
    position: absolute;
    left: 20px;
    top: 19px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 14px;
}
.thanks__steps h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.thanks__steps p { margin-top: 4px; color: var(--text); font-size: 15px; }
.thanks__note { margin-bottom: 20px; color: var(--muted); font-size: 15px; }

/* --- Отзыв согласия ------------------------------------------------------- */

.revoke { padding-top: 56px; max-width: calc(760px + 2 * var(--gutter)); }
.revoke__title { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.revoke__facts { display: grid; gap: 0; margin: 28px 0; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.revoke__facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.revoke__facts > div:first-child { border-top: 0; }
.revoke__facts dt { color: var(--subtle); font-size: 15px; }
.revoke__facts dd { color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.revoke__facts code { font-family: var(--font-mono); font-size: 13px; }
.revoke__subtitle { font-size: 20px; font-weight: 700; }
.revoke__list { display: grid; gap: 10px; margin: 14px 0 28px; padding-left: 22px; list-style: disc; color: var(--text); }
.revoke__form { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.revoke__cancel { color: var(--muted); font-size: 15px; }
.revoke__note { margin-bottom: 20px; color: var(--muted); font-size: 15px; }

@media (max-width: 600px) {
    .revoke__facts > div { grid-template-columns: 1fr; gap: 2px; }
}

/* --- Документы: политика и согласие --------------------------------------- */

.doc { max-width: calc(800px + 2 * var(--gutter)); padding-top: 40px; padding-bottom: var(--section-y); }
.doc__title {
    font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}
.doc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 16px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
}
.doc__notice {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #e3c98a;
    border-radius: var(--radius);
    background: #fdf6e3;
    color: var(--ink);
    font-size: 15px;
}
.doc__notice code { font-size: 13px; }

.doc__toc {
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
}
.doc__toc-title { font-size: 15px; font-weight: 700; }
.doc__toc ol { margin-top: 10px; padding-left: 22px; list-style: decimal; columns: 2 260px; column-gap: 32px; }
.doc__toc li { padding: 3px 0; font-size: 15px; break-inside: avoid; }

.doc__body { margin-top: 32px; color: var(--text); font-size: 16px; line-height: 1.65; }
.doc__body > * + * { margin-top: 14px; }
.doc__body h2 {
    margin-top: 40px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    scroll-margin-top: 16px;
}
.doc__body h3 { margin-top: 28px; color: var(--ink); font-size: 18px; }
.doc__body ul, .doc__body ol { padding-left: 22px; }
.doc__body ul { list-style: disc; }
.doc__body ol { list-style: decimal; }
.doc__body li + li { margin-top: 6px; }
.doc__body strong { color: var(--ink); }
.doc__body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}
.doc__body th, .doc__body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc__body th { background: var(--surface-soft); color: var(--ink); font-weight: 600; }
.doc__missing { padding: 0 3px; border-radius: 4px; background: #ffe08a; color: var(--ink); }

.doc__related { margin-top: 32px; color: var(--muted); }

.doc__versions { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc__versions h2 { font-size: 18px; font-weight: 700; }
.doc__versions ul { margin-top: 12px; }
.doc__versions li { padding: 4px 0; font-size: 15px; }
.doc__hash { margin-top: 16px; color: var(--muted); font-size: 13px; }
.doc__hash code { font-family: var(--font-mono); font-size: 12px; word-break: break-all; }

@media (max-width: 767px) {
    .doc { padding-top: 24px; }
    .doc__toc { padding: 16px 18px; }
    .doc__body { font-size: 15px; }
    .doc__body h2 { margin-top: 32px; font-size: 19px; }
}

/* --- Служебные страницы и ошибки ------------------------------------------ */

.page { padding: 48px 0 var(--section-y); }

.error-page { padding: 72px 0 96px; }
.error-page h1 { max-width: 18ch; font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.error-page p { margin-top: 16px; }
.error-page__code { color: var(--muted); font-family: var(--font-mono); font-size: 14px; }
.error-page .button { margin-top: 12px; }

/* --- Печать --------------------------------------------------------------- */

@media print {
    @page { margin: 18mm 16mm; }
    .site-header, .site-footer, .skip-link, .menu-toggle, .lead-form, .cta__actions { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .section--dark { background: #fff; color: #000; }
    /* Документы печатаются без меню, подвала, оглавления и ссылки на архив. */
    .doc { max-width: none; padding: 0; }
    .doc__toc, .doc__meta a { display: none !important; }
    .doc__body, .doc__body h2, .doc__body strong { color: #000; }
    .doc__body h2 { break-after: avoid; }
    .doc__body a { color: #000; }
}
