/* ============================================================
   Первый Оконный Завод — локальная копия сайта (без Tilda)
   Палитра и логотипы взяты с оригинала 1oknazavod.ru
   ============================================================ */

:root {
    /* Фирменные цвета */
    --brand:        #00AFEC;
    --brand-light:  #72D0F4;
    --brand-sky:    #38BDF8;
    --brand-deep:   #0038D2;
    /* Акцент = фирменный синий. Красный (--hot) оставлен только для цен/сумм и промо-заголовков. */
    --accent:       #00AFEC;
    --accent-dark:  #0094C9;
    --hot:          #F5460B;

    --ink:          #111827;
    --ink-2:        #191F2D;
    --muted:        #6B7280;
    --line:         #E4E4E4;
    --bg-soft:      #F6F9FC;
    --bg-blue:      #EAF1F7;

    --white:        #ffffff;

    --radius:       16px;
    --radius-sm:    10px;
    --shadow:       0 10px 40px rgba(17, 24, 39, .10);
    --shadow-sm:    0 4px 16px rgba(17, 24, 39, .08);

    --container:    1220px;
    --header-h:     88px;

    --f-base: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-base);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(25px, 3.5vw, 45px); }
h2 { font-size: clamp(22px, 2.7vw, 35px); }
h3 { font-size: clamp(17px, 1.75vw, 22px); }
h4 { font-size: 18px; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { width: 100%; border-collapse: collapse; }
:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; }
::selection { background: var(--brand-light); color: var(--ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 6vw, 92px) 0; }
.section--soft { background: var(--bg-soft); }
.section--blue { background: var(--bg-blue); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
/* Авто-чередование светлых секций (белый ↔ --bg-soft) по фактическому порядку DOM.
   Не зависит от tone в шаблонах и не ломается при вкл/выкл блоков на разных страницах.
   .section--dark / .section--blue — намеренные разделители, не участвуют; первый/последний не красим. */
main > section.section:nth-of-type(even):not(.section--dark):not(.section--blue):not(:last-of-type) { background: var(--bg-soft); }
main > section.section.section--soft:nth-of-type(odd),
main > section.section.section--soft:last-of-type { background: transparent; }
.section__head { max-width: 780px; margin-bottom: clamp(24px, 3vw, 44px); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__lead { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.section--dark .section__lead { color: #9EA7B3; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 28px; border: 0; border-radius: 999px;
    font-size: 16px; font-weight: 700; line-height: 1.1; text-align: center;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn--accent { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(0, 175, 236, .3); }
.btn--accent:hover { background: #0094c9; color: #fff; transform: translateY(-2px); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(0, 175, 236, .3); }
.btn--brand:hover { background: #0094c9; color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { color: var(--brand); transform: translateY(-2px); }
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn--lg { padding: 18px 38px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------- Хедер ---------- */
.header { position: sticky; top: 0; z-index: 900; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(17, 24, 39, .10); }
/* Двухуровневая белая шапка: лого слева во всю высоту, справа два ряда */
.header__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: clamp(28px, 4vw, 64px); max-width: 1320px; padding-inline: clamp(20px, 3.5vw, 44px); }
.header__col { display: flex; flex-direction: column; }
.header__top { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); min-height: 44px; font-size: 14px; color: var(--ink); }
.header__city { display: flex; align-items: center; gap: 6px; color: var(--muted); transform: translateY(5px); }
.header__city svg { width: 15px; height: 15px; fill: var(--brand-sky); }
.header__mini { display: flex; gap: 18px; margin-right: auto; transform: translateY(5px); }
.header__mini a { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line); }
.header__mini a:hover { color: var(--muted); text-decoration: none; }
.header__mini a.is-active { color: var(--accent); text-decoration-color: var(--accent); }
.header__phone-block { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.header__work { font-size: 11px; color: var(--muted); }
.header__phone { color: var(--ink); font-weight: 700; font-size: 17px; }
.header__phone:hover { color: var(--brand); }
.header__cta-btn { flex: 0 0 auto; transform: translateY(-5px); }
.header__cta-btn:hover { transform: translateY(-7px); }
.header__main { display: flex; align-items: center; gap: 26px; min-height: 44px; }
/* Логотип во всю высоту шапки (занимает оба ряда слева, по центру по вертикали). */
.logo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.logo__img { width: 112px; height: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-start; gap: 4px 22px; transform: translateY(-5px); }
.nav__link { color: var(--brand); font-size: 15px; font-weight: 600; padding: 6px 0; position: relative; display: inline-flex; align-items: center; gap: 5px; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--brand); transition: right .2s ease; }
.nav__link:hover { color: var(--brand); }
.nav__link:hover::after, .nav__link.is-active::after { right: 0; }
/* Ручка (door handle) у продуктовых пунктов — чистый CSS, без картинок. */
.menu-doorhandle-main {
    display: inline-block; position: relative;
    width: 5px; height: 14px; border-radius: 2px;
    background-color: rgba(0, 175, 236, .4);
    margin-left: 8px; vertical-align: middle;
}
.menu-doorhandle {
    position: absolute; top: 50%; left: 1px;
    width: 12px; height: 3px; border-radius: 2px;
    background-color: var(--brand);
    transform: rotate(0deg) translate(0px, -50%);
    transform-origin: left center;
    transition: transform .3s ease-out;
}
.nav__link:hover .menu-doorhandle,
.nav__link.is-active .menu-doorhandle {
    transform: rotate(90deg) translate(-3px, -50%);
}
.header__phone-mobile { display: none; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 8px; margin-left: auto; }
.burger span { display: block; height: 3px; background: var(--ink); border-radius: 3px; margin: 4px 0; transition: .2s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; position: fixed; inset: 0; z-index: 890; background: #fff; overflow-y: auto; padding-top: 90px; }
.mobile-menu.is-open { display: block; }
.mobile-menu__inner { padding: 0 20px 40px; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__inner > a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; color: var(--ink); }
.mobile-menu__phone { color: var(--accent) !important; font-size: 22px !important; font-weight: 800; }
.mobile-menu .btn { margin-top: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(1200px 500px at 85% 10%, rgba(0, 175, 236, .35), transparent 60%);
    pointer-events: none;
}
/* 20px по горизонтали — как у .container: шорткат padding обнулял боковые отступы, и на мобиле текст hero прижимался к краю экрана. */
.hero__in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: clamp(40px, 6vw, 80px) 20px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); font-size: 14px; font-weight: 600; }
.hero__badge b { color: var(--brand-sky); }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--brand-sky); }
.hero__sub { font-size: clamp(16px, 1.6vw, 20px); color: #C3CCDA; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: #9EA7B3; }
.hero__chips span { display: inline-flex; align-items: center; gap: 8px; }
.hero__chips span::before { content: ""; width: 16px; height: 16px; flex: 0 0 auto; background: no-repeat center/contain url("../img/check.svg"); }
.hero__media { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.hero__price-tag { position: absolute; left: 20px; bottom: 20px; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-sm); }
.hero__price-tag b { display: block; font-size: 24px; color: var(--hot); }
.hero__price-tag span { font-size: 13px; color: var(--muted); }
/* Хлебные крошки на тёмном фоне hero (продуктовые страницы) */
.hero .breadcrumbs--hero { color: rgba(255, 255, 255, .55); }
.hero .breadcrumbs--hero a { color: rgba(255, 255, 255, .55); }
.hero .breadcrumbs--hero a:hover { color: #fff; }
.hero .breadcrumbs--hero span::before { color: rgba(255, 255, 255, .35); }
.hero .breadcrumbs--hero + .eyebrow { margin-top: 4px; }

/* Таймер акции */
.ticker { background: linear-gradient(90deg, var(--hot), #ff7a3d); color: #fff; }
.ticker__in { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 24px; padding: 14px 20px; font-weight: 700; }
.ticker__clock { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.ticker__clock b { background: rgba(0, 0, 0, .22); border-radius: 8px; padding: 4px 9px; font-size: 18px; min-width: 40px; text-align: center; }

/* ---------- Сетки и карточки ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; display: flex; flex-direction: column; gap: 10px; border: 1px solid transparent; transition: .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--brand-light); }
.card__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-blue); margin-bottom: 6px; }
.card__icon img { width: 32px; height: 32px; }
.card h3, .card h4 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.feature { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: #fff; min-height: 300px; display: flex; align-items: flex-end; }
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: .4s; }
.feature:hover img { opacity: 1; transform: scale(1.04); }
.feature__body { position: relative; z-index: 2; padding: 24px; background: linear-gradient(transparent, rgba(10, 14, 22, .88) 55%); width: 100%; margin-top: auto; }
.feature__body h3 { margin-bottom: 4px; font-size: 22px; color: #fff; }
.feature:hover .feature__body h3 { color: var(--brand); }
.feature__body p { margin: 0; color: #C3CCDA; font-size: 15px; }
.feature__tag { position: absolute; top: 16px; left: 16px; z-index: 2; background: var(--accent); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; }

/* ---------- Витрина: большая картинка + плитки ---------- */
.showcase { display: grid; gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.showcase--left, .showcase--right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.showcase--center { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); }
.showcase__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-height: 260px; }
.showcase__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase__grid, .showcase__col { display: grid; gap: clamp(16px, 2vw, 24px); }
.showcase__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: stretch; }
.showcase__col { grid-template-columns: 1fr; align-content: stretch; }
.showcase__tile { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s; color: inherit; text-decoration: none; }
.showcase__tile:hover { border-color: var(--brand-light); box-shadow: var(--shadow); transform: translateY(-4px); }
.showcase__num { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.showcase__tile h3 { margin: 0; font-size: 19px; }
.showcase__tile p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Типы остекления (табы) ---------- */
.gtype { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 3vw, 44px); align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.gtype--left { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.gtype__media { min-height: 300px; background: var(--bg-blue); }
.gtype--left .gtype__media { order: -1; }
.gtype__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gtype__body { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.gtype__title { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
.gtype__text { margin: 0; }
.gtype .checks { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 2px; }
.gtype__notes { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 2px 0 0; }
.gtype__notes li { background: var(--bg-blue); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.gtype__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.gtype__price { font-size: 13px; color: var(--muted); }
.gtype__price b { display: block; font-size: 26px; color: var(--hot); }

/* Чек-лист */
.checks { display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
    content: ""; flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
    background: var(--accent) no-repeat center/12px url("../img/check-white.svg");
}
.checks--brand li::before { background-color: var(--brand); }

/* ---------- Преимущества / числа ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 34px; }
.stat { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: clamp(30px, 3.4vw, 44px); color: var(--accent); line-height: 1; margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Этапы ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.step__img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-blue); }
.step__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.step__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; }
.step h3 { font-size: 19px; margin: 0; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Акции ---------- */
.promo { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.promo__media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-blue); }
.promo__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.promo__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.promo__label { align-self: flex-start; background: var(--hot); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.promo h3 { font-size: 20px; margin: 0; }
.promo p { margin: 0; color: var(--muted); font-size: 15px; }
.promo__link { margin-top: auto; font-weight: 700; }

/* ---------- Табы «по типу дома» ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tabs__btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 15px; transition: .18s; }
.tabs__btn:hover { border-color: var(--brand); }
.tabs__btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.type-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.type-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.type-card__img { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--bg-blue); }
.type-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.type-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.type-card__price { font-size: 13px; color: var(--muted); }
.type-card__price b { display: block; font-size: 22px; color: var(--hot); }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.calc__panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(20px, 2.4vw, 32px); }
.calc__group { margin-bottom: 24px; }
.calc__label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.calc__hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-size: 15px; font-weight: 600; cursor: pointer; transition: .16s; background: #fff; }
.seg label:hover { border-color: var(--brand-sky); }
.seg input:checked + label { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--brand-sky); outline-offset: 2px; }
.calc__sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc__preview { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; text-align: center; }
.calc__preview img { max-height: 260px; margin: 0 auto; }
.calc__result { position: sticky; top: calc(var(--header-h) + 12px); background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.calc__result .sum { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--brand-sky); margin: 6px 0 4px; }
.calc__result .per-month { font-size: 14px; color: #9EA7B3; margin-bottom: 18px; }
.calc__result ul { display: grid; gap: 8px; font-size: 14px; color: #C3CCDA; margin-bottom: 20px; }
.calc__result li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(255, 255, 255, .14); padding-bottom: 6px; }
.calc__result li b { color: #fff; font-weight: 600; text-align: right; }

/* ---------- Квиз ---------- */
.quiz__progress { display: flex; gap: 6px; margin-bottom: 20px; }
.quiz__progress i { height: 6px; flex: 1; background: var(--line); border-radius: 6px; }
.quiz__progress i.is-done { background: var(--accent); }
.quiz__step { display: none; }
.quiz__step.is-active { display: block; animation: fade .25s ease; }
.quiz__options { display: grid; gap: 10px; }
.quiz__option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-weight: 600; transition: .16s; }
.quiz__option:hover { border-color: var(--brand-sky); background: var(--bg-soft); }
.quiz__option input { accent-color: var(--accent); width: 18px; height: 18px; }
.quiz__option.is-picked { border-color: var(--accent); background: #fff6f2; }
.quiz__nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 22px; }

/* ---------- Отзывы ---------- */
.reviews { position: relative; }
.reviews__track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.review { flex: 0 0 340px; scroll-snap-align: start; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; }
.review__stars { display: flex; gap: 3px; }
.review__stars img { width: 18px; height: 18px; }
.review p { margin: 0; font-size: 15px; color: #364152; }
.review__meta { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.review__ava { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-blue); display: grid; place-items: center; font-weight: 800; color: var(--brand); }
.review__meta b { display: block; font-size: 15px; }
.review__meta span { font-size: 13px; color: var(--muted); }
.reviews__ctl { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.reviews__ctl button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; transition: .16s; }
.reviews__ctl button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.rating-pill { display: inline-flex; align-items: center; gap: 12px; background: #fff; border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow-sm); font-weight: 700; }
.rating-pill b { color: var(--accent); font-size: 20px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 900px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq__q { width: 100%; text-align: left; border: 0; background: transparent; padding: 18px 54px 18px 20px; font-weight: 700; font-size: 17px; position: relative; }
.faq__q::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--brand); transition: .2s; }
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq__a > div { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--bg-blue); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.gallery a:hover img { transform: scale(1.07); }

/* Лайтбокс для галереи */
.lightbox { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(10, 14, 22, .85); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { max-width: min(1100px, 100%); max-height: 100%; display: grid; place-items: center; cursor: zoom-out; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 80px); width: auto; height: auto; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); object-fit: contain; }
.lightbox__cap { margin-top: 12px; color: #CBD5E1; font-size: 14px; text-align: center; min-height: 1em; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: .2s; }
.lightbox__close:hover { background: var(--accent); transform: rotate(90deg); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: .2s; }
.lightbox__nav:hover { background: var(--accent); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* ---------- Хлебные крошки / hero-страницы ---------- */
.page-head { background: var(--bg-soft); padding: clamp(28px, 4vw, 52px) 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span::before { content: "/"; margin-right: 8px; color: var(--line); }
.page-head h1 { font-size: clamp(26px, 3.4vw, 44px); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.page-head--media .page-head__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.page-head__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.page-head__media img { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 520px; }

/* ---------- Текст-статья ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; font-size: clamp(22px, 2.4vw, 30px); }
.prose h3 { margin-top: 1.4em; }
.prose ul.bul { display: grid; gap: 10px; margin: 0 0 1em; padding-left: 0; }
.prose ul.bul li { position: relative; padding-left: 28px; }
.prose ul.bul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 12px; border-radius: 3px; background: var(--brand); }
.prose table td, .prose table th { padding: 12px 14px; border: 1px solid var(--line); font-size: 15px; text-align: left; }
.prose table th { background: var(--bg-soft); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split--reverse > .split__media { order: 2; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CTA-полоса ---------- */
.cta-bar { background: linear-gradient(90deg, var(--ink), #1f2a3d); color: #fff; }
.cta-bar__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 30px 20px; }
.cta-bar__text b { display: block; font-size: 22px; }
.cta-bar__text span { color: #9EA7B3; font-size: 15px; }

/* ---------- Футер ---------- */
.footer { background: #0D1219; color: #9EA7B3; padding: clamp(40px, 5vw, 70px) 0 24px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 34px; }
.footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { color: #9EA7B3; }
.footer a:hover { color: var(--brand-sky); }
.footer__logo img { width: 132px; filter: brightness(0) invert(1) sepia(0) saturate(0); opacity: .95; }
.footer__tagline { margin: 16px 0; max-width: 320px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(56, 189, 248, .35); border-radius: 12px; transition: .18s; }
.footer__social a:hover { background: rgba(56, 189, 248, .12); }
.footer__phone { display: block; color: #fff; font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.footer__branches { display: grid; gap: 14px; }
.footer__branches span { display: block; color: #fff; font-weight: 600; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; font-size: 13px; }
.footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Попапы ---------- */
.popup { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.popup[hidden] { display: none; }
.popup__overlay { position: absolute; inset: 0; background: rgba(10, 14, 22, .68); backdrop-filter: blur(3px); }
.popup__dialog { position: relative; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .22s ease; }
.popup--wide .popup__dialog { width: min(720px, 100%); }
@keyframes pop { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.popup__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--bg-soft); font-size: 22px; line-height: 1; z-index: 3; }
.popup__close:hover { background: var(--accent); color: #fff; }
.popup__body { padding: clamp(22px, 3vw, 34px); }
.popup__sub { color: var(--muted); }
.popup__list { display: grid; gap: 10px; margin-bottom: 22px; }
.popup__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.popup__list li::before { content: "✓"; color: var(--accent); font-weight: 800; }
body.no-scroll { overflow: hidden; }

/* ---------- Формы ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #364152; }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .16s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(0, 175, 236, .16); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 6px 0 16px; }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.check a { text-decoration: underline; }
.form-result { margin-top: 14px; padding: 14px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.form-result.is-ok { background: #ECFDF3; color: #046C43; }
.form-result.is-err { background: #FEF2F2; color: #A91D1D; }
.lead-form__title { margin: 0 0 14px; }

/* ---------- Разметка появления ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1200px) {
    .nav { gap: 4px 12px; }
    .header__mini { display: none; }
    .grid--5 { grid-template-columns: repeat(3, 1fr); }
    .type-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    :root { --header-h: 76px; }
    .header__top { display: none; }
    .header__cta-btn { display: none; }
    .header__main { min-height: 76px; gap: 14px; }
    .page-head--media .page-head__grid { grid-template-columns: 1fr; }
    .showcase--center { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .showcase--center .showcase__media { grid-column: 1 / -1; }
    .gtype, .gtype--left { grid-template-columns: 1fr; }
    .gtype__media, .gtype--left .gtype__media { order: -1; min-height: 240px; }
    .gtype .checks { grid-template-columns: 1fr; }
    .nav { display: none; }
    .header__phone-mobile { display: inline-flex; align-items: center; margin-left: auto; color: var(--ink); font-weight: 800; font-size: 15px; white-space: nowrap; }
    .header__phone-mobile:hover { color: var(--accent); }
    .burger { display: block; margin-left: 12px; }
    .hero__in { grid-template-columns: 1fr; }
    .calc { grid-template-columns: 1fr; }
    .calc__result { position: static; }
    .grid--4, .steps, .stats { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .split--reverse > .split__media { order: 0; }
}
@media (max-width: 720px) {
    body { font-size: 16px; }
    .grid--2, .grid--3, .grid--4, .grid--5, .steps, .stats, .type-cards, .gallery, .calc__sizes, .field--row { grid-template-columns: 1fr; }
    .showcase, .showcase--left, .showcase--right, .showcase--center { grid-template-columns: 1fr; }
    .showcase--center .showcase__media { grid-column: auto; }
    .showcase--right .showcase__media { order: -1; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .type-cards { grid-template-columns: repeat(2, 1fr); }
    .review { flex: 0 0 84%; }
    .cta-bar__in { justify-content: center; text-align: center; }
    .footer__grid { grid-template-columns: 1fr; }
    .hero__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 420px) {
    .stats, .type-cards, .gallery { grid-template-columns: 1fr; }
    .showcase__grid { grid-template-columns: 1fr; }
}
