/*
 * Макет основного сайта: шапка, подвал, переключатель города.
 *
 * Контрольные ширины из макета: 1920, 1440, 990 и 375. На них вёрстка
 * повторяет макет один в один; между ними отступы и размеры дома
 * в подвале тянутся линейно (clamp), а текст переключается по точкам.
 * Мобильная раскладка — до 989px: на 990 десктопная шапка помещается впритык.
 */

@font-face {
    font-family: 'Bebas Neue Cyrillic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/BebasNeue.woff2') format('woff2'),
         url('../fonts/BebasNeue.woff') format('woff');
}

:root {
    --w-green: #288e62;
    --w-green-hover: #21785a;
    --w-green-light: #a4ffb8;
    --w-ease: .2s ease;
    --w-ink: #021002;
    --w-text: #242424;
    --w-bg: #f5f5f5;
    --w-footer-bg: #262626;
    --w-muted: #9a9a9a;
    --w-font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --w-font-display: 'Bebas Neue Cyrillic', 'Bebas Neue', Impact, sans-serif;

    /* Боковой отступ: 14px на 375 → 30px на 990. */
    --w-gutter: clamp(14px, calc(14px + (100vw - 375px) * 16 / 615), 30px);
}

@media (min-width: 990px) {
    :root { --w-gutter: 30px; }
}

@media (min-width: 1440px) {
    /* 30px на 1440 → 86px на 1920. */
    :root { --w-gutter: clamp(30px, calc(30px + (100vw - 1440px) * 56 / 480), 86px); }
}

* { box-sizing: border-box; }

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

body.w-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--w-bg);
    color: var(--w-ink);
    font-family: var(--w-font);
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.w-main { flex: 1 0 auto; }

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

.w-icon { display: block; flex: none; }

/* Зелёная кнопка из макета: Bebas, 6px скругление. */
.w-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    border: 0;
    border-radius: 6px;
    background: var(--w-green);
    color: #fff;
    font-family: var(--w-font-display);
    font-size: 28px;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

/* =====================================================================
   Шапка
   ===================================================================== */

.w-header {
    position: relative;
    z-index: 20;
    padding-top: 16px;
}

/* Тёмная шапка лежит поверх hero страницы, а не занимает место в потоке:
   6px от верха на 1920, 10 на 1440, 16 ниже — так в макете главной. */
.w-header--primary {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-top: 6px;
}

@media (max-width: 1919px) {
    .w-header--primary { padding-top: 10px; }
}

@media (max-width: 1439px) {
    .w-header--primary { padding-top: 16px; }
}

.w-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 86px;
    padding: 0 16px;
    border-radius: 10px;
}

/* Поверх тёмного hero: стекло и белый текст. */
.w-header--primary .w-header__bar {
    background: rgba(10, 10, 10, 0);
    -webkit-backdrop-filter: blur(17px);
    backdrop-filter: blur(17px);
    color: #fff;
}

/* На сером фоне: белая карточка. */
.w-header--secondary .w-header__bar {
    background: #fff;
    color: var(--w-text);
    box-shadow: 0 4px 2px rgba(0, 0, 0, .01);
}

/* --- Логотип и название --- */
.w-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
    color: inherit;
    text-decoration: none;
}

.w-brand__logo { display: none; height: auto; }

/* На тёмной шапке белый логотип 79×68, на белой — тёмный 66×62: так в макете. */
.w-header--primary .w-brand__logo--white { display: block; width: 79px; }
.w-header--secondary .w-brand__logo--dark { display: block; width: 66px; }

.w-city__name--short { display: none; }

.w-brand__text {
    width: 191px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.w-header--secondary .w-brand__text { color: var(--w-ink); }

/* --- Меню и контакты --- */
.w-header__right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1099.5px, 66%);
    margin-left: auto;
}

.w-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Наведение — подчёркивание, выезжающее слева, цвет не меняется. */
.w-nav__link {
    position: relative;
    color: inherit;
    text-decoration: none;
}

/* Пункт без страницы: приглушён, без подчёркивания и «руки». */
.w-nav__link--soon,
.w-footer__link--soon,
.w-footer__policy--soon { opacity: .45; cursor: default; }

.w-nav__link--soon::after { display: none; }

.w-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1.5px;
    width: 0;
    background: currentColor;
    /* Ширина, а не transform: после перехода с transform Safari сбрасывает
       курсор над ссылкой на стрелку, пока мышь не сдвинется. */
    transition: width .25s ease;
}

.w-nav__link:hover::after,
.w-nav__link:focus-visible::after { width: 100%; }

.w-contacts {
    display: flex;
    align-items: center;
    gap: 60px;
}

.w-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
}

.w-phone__number {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.w-header--secondary .w-phone__number { color: var(--w-green); }

.w-phone__callback {
    padding: 0 0 4px;
    border: 0;
    border-bottom: 1px dashed currentColor;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.w-header--secondary .w-phone__callback { color: #212121; }

/* --- Бургер (только мобильный) --- */
.w-burger {
    display: none;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--w-green);
    color: #fff;
    cursor: pointer;
}

.w-burger .w-icon--close { display: none; }
.w-header.is-open .w-burger .w-icon--burger { display: none; }
.w-header.is-open .w-burger .w-icon--close { display: block; }

/* Поверх hero бургер полупрозрачный, на белой карточке — зелёный. */
.w-header--primary .w-burger {
    border: 1px solid rgba(200, 200, 200, .35);
    background: rgba(148, 148, 148, .32);
    -webkit-backdrop-filter: blur(27px);
    backdrop-filter: blur(27px);
}

.w-header.is-open .w-burger {
    border-color: transparent;
    background: var(--w-green);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* --- 1440: меню и телефон мельче, город остаётся 18px --- */
@media (max-width: 1919px) {
    .w-header__right { width: min(914px, 66%); }
    .w-nav { font-size: 16px; }
    .w-phone { font-size: 16px; }
}

/* --- 990: в одну строку — логотип, город, меню, телефон --- */
@media (max-width: 1439px) {
    .w-header__bar { height: 62px; gap: 32px; }
    .w-brand { gap: 12px; }

    /* Узкий логотип 60×51.6 — вектор с пропорцией 79:68, как в макете 990. */
    .w-header--primary .w-brand__logo--white { width: 60px; }
    .w-header--secondary .w-brand__logo--dark { display: none; }
    .w-header--secondary .w-brand__logo--small { display: block; width: 60px; }
    .w-brand__text { width: 102px; font-size: 12px; }

    .w-city__name--full { display: none; }
    .w-city__name--short { display: inline; }

    /* Правый блок и контакты растворяются: их дети встают в общий ряд. */
    .w-header__right,
    .w-contacts { display: contents; }

    .w-city { order: 1; }
    .w-nav { order: 2; font-size: 14px; }
    .w-phone { order: 3; font-size: 14px; }
}

/* --- Мобильный: карточка или прозрачная полоса, бургер, меню панелью --- */
@media (max-width: 989px) {
    .w-header__bar {
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
    }

    /* Поверх hero: без карточки и блюра, белый логотип и текст — макет главной. */
    .w-header--primary .w-header__bar {
        padding: 0;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .w-header--primary .w-brand__logo--white { display: block; width: 60px; }
    .w-header--secondary .w-brand__text { color: var(--w-ink); }

    /* В панели меню место есть — имя города полностью. */
    .w-city__name--full { display: inline; }
    .w-city__name--short { display: none; }

    .w-burger { display: flex; }

    /* Панель меню: зелёная, под правым краем шапки, на 7px заходит на неё. */
    .w-header__right {
        position: absolute;
        top: calc(100% - 7px);
        right: 16px;
        z-index: 30;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        min-width: 171px;
        padding: 16px 12px;
        border: 1px solid rgba(200, 200, 200, .35);
        border-radius: 6px;
        background: var(--w-green);
        -webkit-backdrop-filter: blur(27px);
        backdrop-filter: blur(27px);
        color: #fff;
    }

    .w-header.is-open .w-header__right { display: flex; }

    .w-contacts { display: contents; }

    .w-city { order: 1; }

    .w-nav {
        order: 2;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.4;
        text-transform: none;
    }

    .w-nav__link:hover { opacity: .8; }
    .w-nav__link::after { display: none; }

    .w-phone { order: 3; gap: 5px; font-size: 14px; }
    .w-phone__number { font-size: 18px; font-weight: 500; line-height: 1.3; }
    .w-header--secondary .w-phone__number,
    .w-header--secondary .w-phone__callback { color: #fff; }
}

/* =====================================================================
   Переключатель города
   ===================================================================== */

.w-city {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.w-city__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.w-icon--chevron { transition: transform .15s ease; }
.w-city.is-open .w-icon--chevron { transform: scaleY(-1); }

.w-city__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.w-city.is-open .w-city__dropdown { display: flex; }

.w-city__option {
    padding: 8px 16px;
    color: #333;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.w-city__option:hover { background: #f7f7f7; }

.w-city__option.is-active {
    background: #f2f7f0;
    color: #4e9f38;
    font-weight: 600;
}

/* В мобильной панели список раскрывается в потоке и раздвигает панель. */
@media (max-width: 989px) {
    .w-city.is-open { gap: 8px; }
    .w-city__dropdown { position: static; }
}

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

.w-footer {
    position: relative;
    overflow: hidden;
    background: var(--w-footer-bg);
    color: #fff;

    /* У подвала свой боковой отступ: 80px на 1920 против 86 у шапки. */
    --w-footer-gutter: clamp(30px, calc(30px + (100vw - 1440px) * 50 / 480), 80px);
}

/* Дом и «свечение» за ним: декор, растянутый по ширине окна. */
.w-footer__scene {
    position: absolute;
    top: clamp(47px, calc(104px - (100vw - 1440px) * 57 / 480), 104px);
    left: calc(50% - clamp(28px, calc(28px + (100vw - 1440px) * 52 / 480), 80px));
    width: clamp(888px, calc(888px + (100vw - 1440px) * 270 / 480), 1158px);
    transform: translateX(-50%);
    pointer-events: none;
}

.w-footer__house {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
}

.w-footer__glow {
    position: absolute;
    top: -2%;
    left: 50%;
    z-index: 0;
    width: 83%;
    height: auto;
    transform: translateX(-50%);
}

.w-footer__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 242px 1fr 346px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "logo    .  side"
        "address .  nav"
        "policy  .  rights";
    max-width: 1920px;
    min-height: clamp(489px, calc(489px + (100vw - 1440px) * 47 / 480), 536px);
    margin: 0 auto;
    padding: 40px var(--w-footer-gutter) 19px;
}

.w-footer__logo { grid-area: logo; align-self: start; display: block; width: 157px; }
.w-footer__logo img { display: block; width: 100%; height: auto; }

.w-footer__side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 7px;
}

.w-footer__phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    line-height: 1;
}

.w-footer__number {
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.w-footer__callback {
    padding: 0 0 4px;
    border: 0;
    border-bottom: 1px dashed #212121;
    background: none;
    color: var(--w-muted);
    font: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.w-footer__button {
    width: 345px;
    height: 91px;
    margin-top: 34px;
}

.w-footer__nav {
    grid-area: nav;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-top: 63px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.w-footer__link { color: #fff; text-decoration: none; }
.w-footer__link:hover { color: var(--w-green); }

.w-footer__address {
    grid-area: address;
    align-self: end;
    width: 242px;
    margin: 0 0 64px;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
}

.w-footer__policy,
.w-footer__rights {
    align-self: end;
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.w-footer__policy { grid-area: policy; }
.w-footer__policy:hover { color: var(--w-green); }
.w-footer__rights { grid-area: rights; }

/* --- 1440 --- */
@media (max-width: 1919px) {
    .w-footer__inner {
        grid-template-columns: 242px 1fr 274px;
        padding-top: 30px;
        padding-bottom: 18px;
    }

    .w-footer__logo { width: 112px; }
    .w-footer__side { padding-top: 0; }
    .w-footer__number { font-size: 30px; }
    .w-footer__callback { font-size: 20px; }
    .w-footer__button { width: 100%; height: 70px; margin-top: 37px; }
    .w-footer__nav { margin-top: 68px; }
    .w-footer__address { margin-bottom: 72px; font-size: 16px; }
    .w-footer__policy,
    .w-footer__rights { font-size: 14px; }
}

/* --- 990: меню слева, логотип по центру, контакты справа, дом снизу --- */
@media (max-width: 1439px) {
    .w-footer { --w-footer-gutter: 30px; }

    .w-footer__scene {
        top: calc(184px - (100vw - 990px) * 80 / 450);
        left: calc(50% + 12px - (100vw - 990px) * 40 / 450);
        width: clamp(704px, calc(704px + (100vw - 990px) * 184 / 450), 888px);
    }

    .w-footer__inner {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto 1fr auto auto;
        grid-template-areas:
            "nav     logo  side"
            ".       .     ."
            "address .     ."
            "policy  .     rights";
        min-height: clamp(451px, calc(451px + (100vw - 990px) * 38 / 450), 489px);
        padding: 32px var(--w-footer-gutter) 17px;
    }

    .w-footer__logo { width: 88px; justify-self: center; }

    .w-footer__side { justify-self: end; width: 208px; margin-top: 18px; }
    .w-footer__number { font-size: 22px; }
    .w-footer__callback { font-size: 16px; }
    .w-footer__button { height: 54px; margin-top: 19px; font-size: 20px; }

    .w-footer__nav { gap: 12px; margin-top: 18px; font-size: 16px; }

    .w-footer__address { width: 162px; margin-bottom: 33px; font-size: 13px; }

    .w-footer__policy,
    .w-footer__rights { font-size: 12px; opacity: .6; white-space: normal; }
    .w-footer__policy { width: 145px; }
    .w-footer__rights { width: 122px; justify-self: end; text-align: right; }
}

/* --- Мобильный: всё в столбик по центру, без дома --- */
@media (max-width: 989px) {
    .w-footer__scene { display: none; }

    .w-footer__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 580px;
        padding: 27px var(--w-gutter) 11px;
        text-align: center;
    }

    .w-footer__logo { width: 88px; }

    .w-footer__side { align-items: stretch; width: 100%; margin-top: 41px; }
    .w-footer__phone { align-items: center; }
    .w-footer__callback { border-bottom-color: transparent; }
    .w-footer__button { width: 100%; height: 52px; margin-top: 11px; }

    .w-footer__nav { align-items: center; margin-top: 34px; }

    /* align-self:end из десктопной сетки в столбике прижал бы блоки вправо. */
    .w-footer__address,
    .w-footer__policy,
    .w-footer__rights { align-self: center; }

    .w-footer__address { width: 162px; margin: 47px 0 0; }

    .w-footer__policy { width: auto; margin-top: 48px; }
    .w-footer__rights { width: auto; margin-top: 9px; text-align: center; white-space: nowrap; }
}

/* =====================================================================
   Карточка проекта (product card из макета) — базовый размер каталога.
   Главная добавляет .w-card--lg, размеры в home.css.
   ===================================================================== */

.w-card {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    color: #0a0a0a;
}

.w-card--wide { grid-column: 1 / -1; }

.w-card__img {
    display: block;
    width: 100%;
    /* height: auto обязателен: у img стоят атрибуты width/height под srcset,
       и без него браузер взял бы высоту из атрибута вместо пропорции. */
    height: auto;
    aspect-ratio: 694 / 396;
    object-fit: cover;
    background: #e9e9e9;
}

.w-card__body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-top: 12px;
}

.w-card__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.w-card__price { color: var(--w-green); }

.w-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0 16px;
}

.w-card__chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #e9e9e9;
    color: #535353;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.w-card__chip--area {
    border-color: #50ae85;
    background: #def2e9;
    color: #136e47;
    font-weight: 700;
}

.w-card__chip sup {
    font-size: .645em;
    line-height: 0;
    vertical-align: .35em;
}

.w-card__btn {
    margin: 0 22px 0 16px;
    padding: 20px;
    border-radius: 8px;
    font-size: 22px;
}

@media (max-width: 1439px) {
    .w-card__head { font-size: 20px; }
    .w-card__chip { font-size: 14px; }
    .w-card__chips { gap: 10px; }
}

@media (max-width: 989px) {
    .w-card__img { aspect-ratio: 347 / 190; }
    .w-card__head { padding: 0 12px; font-size: 22px; }
    .w-card__chips { gap: 8px; padding: 0 12px; }
    .w-card__btn { margin: 0 12px; padding: 16px 20px; }
}

/* =====================================================================
   Попап заявки
   ===================================================================== */

/* Подложка — обычный fixed-слой: z-index ниже окон сторонних скриптов
   (подтверждение номера Nerolead), чтобы они вставали поверх попапа. */
.w-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(0, 0, 0, .55);
    overflow-y: auto;
}

.w-popup-overlay[hidden] { display: none; }

body.w-popup-open { overflow: hidden; }

.w-popup {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 810px;
    max-width: 100%;
    height: 500px;
    max-height: 100%;
    margin: auto;
    padding: 0;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #f5f5f5;
    color: var(--w-ink);
    font-family: var(--w-font);
    overflow: hidden;
    outline: 0;
}

.w-popup__close {
    position: absolute;
    top: 11px;
    right: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #c2c2c2;
    border-radius: 6px;
    background: #e6e6e6;
    color: #1b1b1b;
    cursor: pointer;
}

.w-popup__close .w-icon--close { width: 16px; height: 16px; }

.w-popup__body,
.w-popup__done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 629px;
    max-width: 100%;
    margin: 0;
}

.w-popup__done { gap: 24px; }

/* display:flex у блоков перебивал бы атрибут hidden — возвращаем ему силу. */
.w-popup__body[hidden],
.w-popup__done[hidden] { display: none; }

.w-popup__head { display: flex; flex-direction: column; gap: 18px; text-align: center; }

.w-popup__title {
    margin: 0;
    color: #1b1b1b;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

/* Заголовок «Получите подборку…» в макете уже: 543px. */
.w-popup--catalog .w-popup__head { max-width: 543px; }

.w-popup__text {
    margin: 0;
    color: #535353;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
}

.w-popup__form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 317px;
    max-width: 100%;
}

.w-popup__methods { display: flex; gap: 6px; }

.w-popup__method { position: relative; cursor: pointer; }

.w-popup__method input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.w-popup__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(40, 142, 98, .44);
    border-radius: 40px;
    background: #e1ede8;
    color: var(--w-green);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.w-popup__chip .w-icon { width: 20px; height: 20px; }

.w-popup__method input:checked + .w-popup__chip {
    border-color: var(--w-green);
    background: var(--w-green);
    color: #fff;
}

.w-popup__method input:focus-visible + .w-popup__chip { outline: 2px solid var(--w-green); outline-offset: 2px; }

.w-popup__input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 6px;
    background: #fff;
    color: #1b1b1b;
    font: inherit;
    font-size: 16px;
}

.w-popup__input::placeholder { color: #565656; }
.w-popup__input:focus { outline: 2px solid var(--w-green); outline-offset: -1px; }
.w-popup__input.is-invalid { border-color: #d24a3a; }

.w-popup__error { margin: -6px 0 0; color: #d24a3a; font-size: 13px; line-height: 1.3; }

.w-popup__submit {
    width: 100%;
    padding: 20px 40px;
    border: 0;
    border-radius: 8px;
    background: var(--w-green);
    color: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
    cursor: pointer;
}

.w-popup__submit[disabled] { opacity: .6; cursor: default; }
.w-popup__submit--done { width: 317px; max-width: 100%; }

.w-popup__consent {
    width: 307px;
    max-width: 100%;
    margin: -26px 0 0;
    color: #6b6b6b;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    opacity: .8;
}

@media (max-width: 989px) {
    .w-popup { width: 345px; height: auto; padding: 49px 12px 30px; }
    .w-popup__close { top: 11px; right: 11px; width: 30px; height: 30px; }
    .w-popup__close .w-icon--close { width: 14px; height: 14px; }
    .w-popup__body { gap: 30px; }
    .w-popup__head { gap: 16px; }
    .w-popup__title { font-size: 20px; }
    .w-popup__text { font-size: 14px; }
    .w-popup__chip { height: 37px; padding: 0 8px; gap: 4px; font-size: 14px; }
    .w-popup__chip .w-icon { width: 18px; height: 18px; }
    .w-popup__form { width: 100%; }
    .w-popup__consent { margin-top: -16px; }
}

/* =====================================================================
   Ховеры и курсоры — общий слой для шапки, подвала, кнопок, карточки
   и попапа. Правила лежат в одном месте, чтобы состояния не расходились
   между секциями: у всех зелёных кнопок одно потемнение и один подъём.

   Ховеры только там, где есть наведение (hover: hover): на тачскринах
   подсветка иначе залипает после касания. Курсор — отдельно, он нужен везде.
   ===================================================================== */

/* Карточка кликается целиком: ссылка «подробнее» растянута на всю карточку
   псевдоэлементом, поэтому и курсор «рука», и переход — с любой её точки.
   Своего position у кнопки быть не должно, иначе слой останется в её рамках. */
.w-card { position: relative; cursor: pointer; }
.w-card__btn { position: static; }
.w-card__btn::after { content: ''; position: absolute; inset: 0; }

/* Курсор: всё, что кликается, — «рука»; выключенное — обычная стрелка. */
button:not(:disabled),
[role="button"],
[role="option"],
label:has(input[type="radio"]:not(:disabled)),
label:has(input[type="checkbox"]:not(:disabled)) { cursor: pointer; }

button:disabled,
label:has(input:disabled) { cursor: default; }

/* Плавность у всего интерактивного — одна длительность на сайт. */
.w-button,
.w-brand,
.w-nav__link,
.w-phone__number,
.w-phone__callback,
.w-burger,
.w-city__trigger,
.w-city__option,
.w-footer__logo,
.w-footer__number,
.w-footer__callback,
.w-footer__link,
.w-footer__policy,
.w-popup__close,
.w-popup__chip,
.w-popup__submit,
.w-card {
    transition: color var(--w-ease), background-color var(--w-ease), border-color var(--w-ease),
        opacity var(--w-ease), box-shadow var(--w-ease);
}

@media (hover: hover) {
    /* Зелёная кнопка: темнеет и получает тень, при нажатии тень садится.
       Без движения: Safari после перехода с transform сбрасывает курсор
       на стрелку, пока мышь не сдвинется, — «рука» мигала на секунду. */
    .w-button:hover {
        background: var(--w-green-hover);
        box-shadow: 0 8px 20px rgba(40, 142, 98, .28);
    }

    .w-button:active {
        box-shadow: 0 2px 6px rgba(40, 142, 98, .25);
        transition-duration: .08s;
    }

    /* Логотипы — лёгкое притухание, без движения. */
    .w-brand:hover,
    .w-footer__logo:hover { opacity: .8; }

    /* Телефон и «обратный звонок»: на белой карточке — тёмно-зелёный,
       поверх hero — светло-зелёный, чтобы читался на фото. */
    .w-header--secondary .w-phone__number:hover,
    .w-header--secondary .w-phone__callback:hover,
    .w-header--secondary .w-city__trigger:hover { color: var(--w-green-hover); }

    .w-header--primary .w-phone__number:hover,
    .w-header--primary .w-phone__callback:hover,
    .w-header--primary .w-city__trigger:hover { color: var(--w-green-light); }

    .w-phone__callback:hover { border-bottom-style: solid; }

    .w-city__option:hover { color: var(--w-green); }
    .w-city__option.is-active:hover { color: #4e9f38; }

    /* Бургер: зелёный темнеет, полупрозрачный над hero — светлеет. */
    .w-burger:hover,
    .w-header.is-open .w-burger:hover { background: var(--w-green-hover); }
    .w-header--primary:not(.is-open) .w-burger:hover { background: rgba(148, 148, 148, .5); }

    /* Подвал: белое — в зелёный, серый «обратный звонок» — в белый. */
    .w-footer__number:hover { color: var(--w-green-light); }
    .w-footer__callback:hover { color: #fff; border-bottom-color: #fff; border-bottom-style: solid; }
    .w-footer__link:hover,
    .w-footer__policy:hover { color: var(--w-green-light); }

    /* Карточка проекта: тень; кнопка подсвечивается с любой точки карточки —
       её область растянута на карточку целиком. Фото не наезжает по той же
       причине, что и кнопки не поднимаются: движение под курсором сбивает его. */
    .w-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }

    /* Попап: крестик темнеет, невыбранный способ связи подсвечивается. */
    .w-popup__close:hover { border-color: #a9a9a9; background: #d9d9d9; }
    .w-popup__method:hover input:not(:checked) + .w-popup__chip { border-color: var(--w-green); background: #d2e7dc; }
    .w-popup__submit:not([disabled]):hover { background: var(--w-green-hover); }
}

/*
 * Богатый текст из админки: описания разделов, проектов и статей.
 *
 * Один класс на все такие тексты, а не по копии на страницу: редактор
 * в панели у них общий, и разъехавшаяся типографика означала бы, что
 * один и тот же список выглядит в разделе и в проекте по-разному.
 */
.w-prose {
    color: #535353;
    font-size: 16px;
    line-height: 1.6;
}

.w-prose p { margin: 0 0 12px; }
.w-prose p:last-child { margin-bottom: 0; }

.w-prose h2,
.w-prose h3 {
    margin: 24px 0 12px;
    color: var(--w-ink);
    font-weight: 500;
}

.w-prose h2 { font-size: 26px; }
.w-prose h3 { font-size: 20px; }

.w-prose ul,
.w-prose ol { margin: 0 0 12px; padding-left: 20px; }

.w-prose li { margin-bottom: 6px; }

.w-prose a { color: var(--w-green); }

.w-prose img { max-width: 100%; height: auto; border-radius: 10px; }

/* Кто просил меньше движения — получает мгновенные состояния. */
@media (prefers-reduced-motion: reduce) {
    [class^="w-"], [class*=" w-"] { transition-duration: 0s !important; }
}
