/* ==========================================================================
   Стили внутренних страниц: услуги, цены, статьи.
   Подключается после style.css. Главная страница этот файл не использует.
   ========================================================================== */

:root {
    --blue: #1e3a8a;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --sky: #3b82f6;
    --link: #1d4ed8;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f1f5f9;
    --bg: #f8fafc;
    --r: 16px;
    --header-h: 64px;
    --heading: Montserrat, sans-serif;
}

@media (min-width: 768px) {
    :root { --header-h: 80px; }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
}

.skip-link:focus { top: 12px; }

.wrap {
    width: 100%;
    max-width: 1152px;
    margin-inline: auto;
    padding-inline: 16px;
}

.wrap--narrow { max-width: 824px; }

@media (min-width: 1024px) {
    .wrap { padding-inline: 32px; }
}

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

.site-nav > a { transition: color .15s; }
.site-nav > a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.nav-drop { position: relative; }

.nav-drop__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s;
}

.nav-drop__btn::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.nav-drop__btn:hover,
.nav-drop__btn.is-current { color: var(--accent); }

.nav-drop__menu {
    position: absolute;
    top: 100%;
    left: -16px;
    width: 320px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 40px -16px rgba(15, 23, 42, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s, transform .15s, visibility .15s;
}

.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu,
.nav-drop.is-open .nav-drop__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nav-drop__menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink);
}

.nav-drop__menu a:hover { background: var(--bg); color: var(--accent-hover); }

.nav-drop__menu small {
    display: block;
    margin-top: 2px;
    font-size: .8125rem;
    font-weight: 400;
    color: var(--muted);
}

.m-nav {
    max-height: calc(100vh - var(--header-h));
    padding: 4px 16px 20px;
    overflow-y: auto;
}

.m-nav__group {
    padding: 14px 0 4px;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.m-nav__link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--soft);
    font-weight: 500;
    color: var(--text);
}

.m-nav__link[aria-current="page"] { color: var(--accent); }

.m-nav__phone {
    display: block;
    padding: 18px 0 14px;
    font: 700 1.25rem var(--heading);
    text-align: center;
    color: var(--blue);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}

.btn--accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(249, 115, 22, .55);
}

.btn--accent:hover { background: var(--accent-hover); }
.btn--accent:disabled { opacity: .6; cursor: default; }

.btn--ghost {
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.btn--ghost:hover { background: rgba(255, 255, 255, .2); }

.btn--outline {
    border: 2px solid var(--blue);
    background: #fff;
    color: var(--blue);
}

.btn--outline:hover { background: var(--blue); color: #fff; }

.btn--sm { min-height: 44px; padding: 8px 20px; font-size: .9375rem; font-weight: 600; }
.btn--block { width: 100%; }

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

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(var(--header-h) + 28px) 0 40px;
    background: var(--blue);
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url(/img/plastikovyye-okna5.jpg) center / cover no-repeat;
    opacity: .3;
    mix-blend-mode: overlay;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, var(--blue) 0%, rgba(30, 58, 138, .92) 50%, rgba(30, 58, 138, .4) 100%);
}

.hero--plain::before { display: none; }
.hero--plain::after { background: linear-gradient(135deg, var(--blue) 0%, #1e40af 100%); }

@media (min-width: 1024px) {
    .hero { padding: calc(var(--header-h) + 48px) 0 64px; }
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: .8125rem;
    color: #a5b4d4;
}

.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #e2e8f0; }

.hero__title {
    max-width: 800px;
    margin-top: 16px;
    font: 800 clamp(1.75rem, 1.1rem + 2.7vw, 3rem) / 1.12 var(--heading);
    letter-spacing: -.01em;
    text-wrap: balance;
}

.hero__lead {
    max-width: 680px;
    margin-top: 16px;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 479px) {
    .hero__actions .btn { width: 100%; }
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 16px;
    font-size: .875rem;
    color: #a5b4d4;
}

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    max-width: 800px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

@media (min-width: 768px) {
    .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.facts dt { font: 700 1.375rem / 1.2 var(--heading); color: var(--accent); }
.facts dd { margin-top: 4px; font-size: .875rem; line-height: 1.4; color: #a5b4d4; }

/* ---------- Секции ---------- */

.section { padding: 48px 0; background: #fff; }
.section--soft { background: var(--bg); border-block: 1px solid var(--line); }

@media (min-width: 1024px) {
    .section { padding: 72px 0; }
}

.section__head { max-width: 760px; margin-bottom: 28px; }

.h2 {
    font: 700 clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem) / 1.2 var(--heading);
    color: var(--blue);
    text-wrap: balance;
}

.h3 { font: 700 1.125rem / 1.3 var(--heading); color: var(--ink); }

.section__lead {
    margin-top: 12px;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
}

.caption {
    margin-top: 14px;
    font-size: .875rem;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- Текст ---------- */

.prose {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
}

.prose > * + * { margin-top: 1em; }

.prose h2 {
    margin-top: 2.2em;
    font: 700 clamp(1.375rem, 1.15rem + 1vw, 1.75rem) / 1.25 var(--heading);
    color: var(--blue);
    text-wrap: balance;
}

.prose h3 {
    margin-top: 1.8em;
    font: 700 1.1875rem / 1.3 var(--heading);
    color: var(--ink);
}

.prose h2 + *,
.prose h3 + * { margin-top: .7em; }

.prose a:not(.btn) {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose a:not(.btn):hover { color: var(--accent-hover); }
.prose strong { font-weight: 600; color: var(--ink); }

.prose ul > li,
.prose ol > li { position: relative; }

.prose li + li { margin-top: .55em; }
.prose ul > li { padding-left: 1.5em; }

.prose ul > li::before {
    content: "";
    position: absolute;
    left: .3em;
    top: .66em;
    width: .42em;
    height: .42em;
    border-radius: 50%;
    background: var(--accent);
}

.prose ol { counter-reset: item; }
.prose ol > li { padding-left: 2.5em; counter-increment: item; }

.prose ol > li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: .1em;
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font: 700 .8125rem / 1.75em var(--heading);
    text-align: center;
}

/* ---------- Карточки ---------- */

.cards { display: grid; gap: 16px; }

@media (min-width: 640px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg);
}

.section--soft .card { background: #fff; }

.card__text {
    margin-top: 8px;
    font-size: .9688rem;
    line-height: 1.6;
    color: var(--text);
}

.card__price {
    margin-top: 14px;
    font: 700 1.125rem var(--heading);
    color: var(--blue);
}

.card__tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ffedd5;
    font-size: .75rem;
    font-weight: 600;
    color: #9a3412;
}

/* ---------- Таблицы ---------- */

.tbl-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: .9688rem;
    line-height: 1.45;
}

.tbl th,
.tbl td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.tbl thead th {
    border-bottom: 0;
    background: var(--blue);
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
}

.tbl thead th small {
    display: block;
    margin-top: 2px;
    font-size: .75rem;
    font-weight: 400;
    color: #bfdbfe;
}

.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody th { font-weight: 600; color: var(--ink); }

.tbl tbody th small {
    display: block;
    margin-top: 3px;
    font-size: .8125rem;
    font-weight: 400;
    color: var(--muted);
}

.tbl .num { text-align: right; white-space: nowrap; }

.price {
    font: 700 1.0625rem var(--heading);
    color: var(--blue);
    white-space: nowrap;
}

.price-sub {
    display: block;
    margin-top: 3px;
    font-size: .8125rem;
    color: var(--muted);
    white-space: nowrap;
}

/* На телефоне таблица цен превращается в список карточек */
@media (max-width: 767px) {
    .tbl--stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .tbl--stack,
    .tbl--stack tbody,
    .tbl--stack tr,
    .tbl--stack th,
    .tbl--stack td { display: block; }

    .tbl--stack tr { padding: 16px; border-bottom: 1px solid var(--line); }
    .tbl--stack tr:last-child { border-bottom: 0; }
    .tbl--stack th,
    .tbl--stack td { padding: 0; border: 0; }
    .tbl--stack tbody th { margin-bottom: 10px; font-size: 1.0625rem; }

    .tbl--stack td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 8px 0;
        border-top: 1px dashed var(--line);
    }

    .tbl--stack td::before {
        content: attr(data-label);
        font-size: .875rem;
        color: var(--muted);
    }

    .tbl--stack td > span { text-align: right; }
}

/* ---------- Шаги ---------- */

.steps { display: grid; gap: 16px; counter-reset: step; }

@media (min-width: 768px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.steps > li {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    counter-increment: step;
}

.steps > li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    font: 700 1rem var(--heading);
    color: var(--blue);
}

.steps__time {
    display: block;
    margin-top: 10px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
}

/* ---------- Списки с галочками ---------- */

.ticks { display: grid; gap: 10px; margin-top: 20px; }

.ticks li {
    position: relative;
    padding-left: 28px;
    line-height: 1.5;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .32em;
    width: 14px;
    height: 8px;
    border-left: 2.5px solid var(--accent);
    border-bottom: 2.5px solid var(--accent);
    transform: rotate(-45deg);
}

/* ---------- Текст рядом с картинкой ---------- */

.split { display: grid; gap: 28px; align-items: center; }

@media (min-width: 1024px) {
    .split { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.split img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--r);
    object-fit: cover;
}

/* ---------- Фотографии работ ---------- */

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@media (min-width: 768px) {
    .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.gallery figure {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.gallery figcaption {
    padding: 10px 12px;
    font-size: .8125rem;
    line-height: 1.4;
    color: var(--text);
}

/* ---------- Вопросы и ответы ---------- */

.faq { display: grid; gap: 10px; max-width: 860px; }

.faq details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
}

.section--soft .faq details { background: #fff; }

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: -4px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .2s;
}

.faq details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }

.faq__a {
    padding: 0 18px 18px;
    line-height: 1.65;
    color: var(--text);
}

.faq__a > * + * { margin-top: .7em; }
.faq__a a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Выноски ---------- */

.note {
    padding: 16px 18px;
    border-left: 4px solid var(--sky);
    border-radius: 0 12px 12px 0;
    background: #eff6ff;
    color: var(--text);
}

.note--warn { border-color: var(--accent); background: #fff7ed; }
.note__title { display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink); }

.answer {
    padding: 18px 20px;
    border: 1px solid #fed7aa;
    border-radius: var(--r);
    background: #fff7ed;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
}

.answer__title {
    display: block;
    margin-bottom: 6px;
    font: 700 .8125rem var(--heading);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9a3412;
}

.toc {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg);
}

.toc__title {
    margin-bottom: 10px;
    font: 700 .8125rem var(--heading);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.toc ol { display: grid; gap: 7px; counter-reset: toc; }
.toc li { counter-increment: toc; line-height: 1.4; }
.toc a { color: var(--link); }
.toc a:hover { text-decoration: underline; }
.toc a::before { content: counter(toc) ". "; color: var(--muted); }

.cta-box {
    display: grid;
    gap: 18px;
    align-items: center;
    margin-top: 2em;
    padding: 24px;
    border-radius: var(--r);
    background: var(--blue);
    color: #fff;
}

@media (min-width: 768px) {
    .cta-box { grid-template-columns: 1fr auto; padding: 28px 32px; }
}

.cta-box__title { font: 700 1.25rem / 1.25 var(--heading); }

.cta-box__text {
    margin-top: 6px;
    font-size: .9688rem;
    line-height: 1.55;
    color: #cbd5e1;
}

/* ---------- Схемы ---------- */

.fig { margin-top: 1.5em; }

.fig__box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg);
}

.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 10px; font-size: .875rem; line-height: 1.5; color: var(--muted); }

.pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pins + .pins { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pins__item { text-align: center; }
.pins__item svg { max-width: 120px; margin-inline: auto; }

.pins__name {
    display: block;
    margin-top: 6px;
    font: 700 .9375rem var(--heading);
    color: var(--ink);
}

.pins__hint { display: block; font-size: .8125rem; line-height: 1.35; color: var(--muted); }

.pins-axis {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
}

.legend { display: grid; gap: 8px; margin-top: 14px; font-size: .9375rem; line-height: 1.45; color: var(--text); }
.legend li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }

.legend b {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue);
    font: 700 .8125rem var(--heading);
    color: #fff;
}

/* ---------- Ссылки на связанные страницы ---------- */

.related { display: grid; gap: 12px; }

@media (min-width: 640px) {
    .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .related { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.related a {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.related a:hover { border-color: var(--accent); box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .3); }

.related__kind {
    display: block;
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.related__title {
    display: block;
    margin-top: 6px;
    font: 700 1.0625rem / 1.3 var(--heading);
    color: var(--blue);
}

.related__text {
    display: block;
    margin-top: 6px;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--text);
}

/* ---------- Список статей ---------- */

.posts { display: grid; gap: 16px; }

@media (min-width: 768px) {
    .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.post {
    display: block;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.post:hover { border-color: var(--accent); box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .3); }
.post__meta { font-size: .8125rem; color: var(--muted); }
.post__title { margin-top: 8px; font: 700 1.25rem / 1.3 var(--heading); color: var(--blue); }
.post__lead { margin-top: 10px; line-height: 1.6; color: var(--text); }
.post__more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--accent-hover); }

/* ---------- Форма заявки ---------- */

.cta-band { padding: 56px 0; background: var(--blue); color: #fff; }
.cta-band__in { display: grid; gap: 32px; align-items: center; }

@media (min-width: 1024px) {
    .cta-band { padding: 72px 0; }
    .cta-band__in { grid-template-columns: 1.1fr .9fr; gap: 64px; }
}

.cta-band__title {
    font: 700 clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem) / 1.2 var(--heading);
    text-wrap: balance;
}

.cta-band__text {
    max-width: 540px;
    margin-top: 12px;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.cta-band .ticks { color: #e2e8f0; }

.lead-form {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 48px -24px rgba(2, 6, 23, .6);
    color: var(--ink);
}

@media (min-width: 768px) {
    .lead-form { padding: 32px; }
}

.lead-form__title {
    font: 700 1.25rem / 1.25 var(--heading);
    text-align: center;
    color: var(--blue);
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.field {
    display: grid;
    gap: 6px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: var(--bg);
    font-size: 1rem;
    color: var(--ink);
}

.field input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(249, 115, 22, .25);
    outline-offset: 0;
}

.lead-form__msg { font-size: .9375rem; line-height: 1.45; text-align: center; color: var(--text); }
.lead-form__msg:empty { display: none; }
.lead-form__msg.is-error { color: #b91c1c; }

.lead-form__legal {
    font-size: .75rem;
    line-height: 1.45;
    text-align: center;
    color: var(--muted);
}

.lead-form__legal a { text-decoration: underline; }

.lead-form.is-done .field,
.lead-form.is-done .btn,
.lead-form.is-done .lead-form__legal,
.lead-form.is-done .modal__desc { display: none; }

.lead-form.is-done .lead-form__msg {
    padding: 16px;
    border-radius: 12px;
    background: #f0fdf4;
    font-weight: 600;
    color: #166534;
}

/* ---------- Всплывающее окно ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal[hidden] { display: none; }

.modal__bg {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, .8);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal__dialog { position: relative; width: 100%; max-width: 420px; }

.modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--muted);
}

.modal__close:hover { color: var(--ink); }
.modal .lead-form__title { padding: 0 28px; }

.modal__desc {
    margin-top: -6px;
    font-size: .875rem;
    line-height: 1.45;
    text-align: center;
    color: var(--muted);
}

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

.site-footer {
    padding: 48px 0 24px;
    background: #0f172a;
    font-size: .9375rem;
    line-height: 1.5;
    color: #94a3b8;
}

.site-footer__grid { display: grid; gap: 32px; }

@media (min-width: 640px) {
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1.2fr 1fr 1.3fr 1.1fr; gap: 40px; }
}

.site-footer__h {
    margin-bottom: 14px;
    font: 700 .8125rem var(--heading);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}

.site-footer li + li { margin-top: 8px; }
.site-footer a { transition: color .15s; }
.site-footer a:hover { color: #fff; }

.site-footer__brand {
    font: 700 1.125rem var(--heading);
    letter-spacing: .12em;
    color: #fff;
}

.site-footer__about { max-width: 300px; margin-top: 12px; }
.site-footer__phone { font: 700 1.125rem var(--heading); color: #fff; }

.socials { display: flex; gap: 10px; margin-top: 18px; }

.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e293b;
    font: 700 .6875rem var(--heading);
    color: #cbd5e1;
}

.socials a:hover { background: var(--accent); color: #fff; }

.site-footer__bottom {
    display: grid;
    gap: 8px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: .75rem;
    line-height: 1.5;
    color: #64748b;
}

.site-footer__bottom a { text-decoration: underline; }

/* ---------- Мелочи ---------- */

.caption a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.caption a:hover { color: var(--accent-hover); }
.prose > :first-child { margin-top: 0; }

.header-cta { display: none; align-items: center; gap: 24px; }
.header-cta .btn { display: none; }

@media (min-width: 1024px) {
    .header-cta { display: flex; }
}

@media (min-width: 1200px) {
    .header-cta .btn { display: inline-flex; }
}

.split .fig { margin-top: 0; }
.split .legend { margin-top: 1em; }
.prose .legend li { padding-left: 0; }
.prose .legend li::before { display: none; }

.tbl-wrap + .note { margin-top: 20px; }
.subhead { margin: 32px 0 14px; }

.toc + .prose { margin-top: 32px; }

.pins-title {
    margin-bottom: 8px;
    font: 700 .75rem var(--heading);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.pins + .pins-title { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }

.hero__meta a { color: #e2e8f0; text-decoration: underline; text-underline-offset: 3px; }
.hero__meta a:hover { color: #fff; }
.site-footer__about a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Ссылки внутри карточек, таблиц и подводок ---------- */

.card__link {
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card__link:hover { color: var(--accent-hover); }

.tbl a,
.section__lead a,
.note a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tbl a:hover,
.section__lead a:hover,
.note a:hover { color: var(--accent-hover); }

.fig__sash { max-width: 320px; margin-inline: auto; }
.fig__box .legend { margin-top: 16px; }

/* ---------- Фотографии на страницах ремонта ---------- */

.card--photo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.card--photo .card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card--photo .card__body { padding: 22px; }

.split--head { margin-bottom: 28px; }
.split--head .section__head { margin-bottom: 0; }
.split--head img { aspect-ratio: 16 / 10; }

.fig > img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.fig--small { max-width: 480px; }
