/* Креатив Фрэндс — стили сайта. Дизайн-система: docs/features/02-glavnaya-ui-v1.html */
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap;
  src: url(../vendor/manrope/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap;
  src: url(../vendor/manrope/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap;
  src: url(../vendor/manrope/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* жёлтый — замер с логотипа tz/IMG_0975.PNG: rgb(253,225,11) */
  --y: #fde10b; --y-hover: #ffea4d;
  --black: #0d0d0d; --dark: #1a1a1a; --line-dark: #2e2e2e;
  --text: #111; --muted: #555; --muted-dark: #b8b8b8; --light: #f4f4f4; --line: #e3e3e3;
  --wrap: 1170px; --pad: 24px; --radius: 4px;
  --hdr-h: 88px; --sticky-h: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 Manrope, Arial, sans-serif; color: var(--text); background: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
.wrap { max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.i { width: 20px; height: 20px; flex: none; }
.i-s { width: 16px; height: 16px; }
.i-xl { width: 48px; height: 48px; stroke-width: 1.6; }
.y { color: var(--y); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; white-space: nowrap;
  border-radius: var(--radius); border: 2px solid transparent; font-weight: 700; font-size: 15px; transition: background .15s, color .15s; }
.btn-l { height: 56px; padding: 0 30px; font-size: 16px; }
.btn-y { background: var(--y); color: #000; }
.btn-y:hover { background: var(--y-hover); }
.btn-b { background: var(--black); color: #fff; }
.btn-b:hover { background: #333; }
.btn-outline { background: transparent; color: #fff; border-color: var(--y); }
.btn-outline:hover { background: var(--y); color: #000; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: transparent; border: 0; color: #fff; border-radius: var(--radius); }
.icon-btn-d { color: var(--text); border: 2px solid var(--text); }
.icon-btn-d:hover { background: var(--text); color: #fff; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.link-arrow:hover { color: var(--y); }
.link-dark { color: var(--text); margin-top: 28px; }
.link-dark:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }

/* Шапка */
.hdr { background: var(--black); color: #fff; position: relative; z-index: 30; }
.hdr-in { height: var(--hdr-h); display: flex; align-items: center; gap: 28px; }
.logo { height: 44px; width: auto; }
.nav { display: flex; gap: 24px; margin: 0 auto; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav > a, .dd-toggle { display: inline-flex; align-items: center; gap: 4px; height: var(--hdr-h); }
.nav a:hover { color: var(--y); }
.has-dd { position: relative; }
/* в шаблоне пункт «Материалы» — кнопка (страницы-списка материалов нет), вид как у ссылки */
.dd-toggle { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: default; }
.dd-toggle:hover { color: var(--y); }
.dd { display: none; position: absolute; top: calc(var(--hdr-h) - 12px); left: -20px; min-width: 300px; padding: 18px 20px;
  background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.has-dd:hover .dd, .has-dd:focus-within .dd, .dd-open .dd { display: grid; gap: 14px; }
.dd-cap { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.dd a { display: block; padding: 4px 0; font-weight: 600; }
.nav .dd a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }
.hdr-contact { text-align: right; line-height: 1.3; }
.phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; white-space: nowrap; }
.hours { font-size: 13px; color: var(--muted-dark); }
.m-only { display: none; }
.mnav { display: none; }

/* Главный блок */
.hero { background: var(--black); color: #fff; position: relative; overflow: hidden; }
.hero-circle { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--y); right: -90px; top: -150px; }
/* картинке больше места, чем тексту — как в макете заказчика (контракт 02 v2) */
.hero-in { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0; align-items: center; padding-top: 72px; padding-bottom: 88px; position: relative; }
.hero h1 { font-size: 52px; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
.lead { font-size: 18px; color: #d6d6d6; margin: 22px 0 26px; max-width: 520px; }
.checks { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 12px; font-size: 16px; }
.checks li { display: flex; align-items: center; gap: 12px; }
.hero-btns { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
/* края картинки прозрачны (маска ниже), поэтому её можно вытянуть в правое поле: товары крупнее, как в макете;
   80 px — меньше поля справа на 1440 (135 px), на узких окнах лишнее обрезает overflow: hidden у .hero */
.hero-pic { margin-right: -80px; }
/* height: auto — иначе атрибут height в шаблоне перебивает aspect-ratio и картинка растягивается;
   маска closest-side — эллипс касается краёв, поэтому все края и углы прозрачны и картинка сливается с фоном */
.hero-pic img { width: 100%; height: auto; aspect-ratio: 1248 / 832; object-fit: cover;
  -webkit-mask: radial-gradient(closest-side, #000 58%, transparent 100%); mask: radial-gradient(closest-side, #000 58%, transparent 100%); }
/* мазок под акцентом заголовка; цвет — var(--y), в разделе города — цвет города */
.brush { position: relative; white-space: nowrap; z-index: 0;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M3 15C48 8 120 4 200 4c34 0 66 1 95 3l2 4c-2 2-6 2-10 2-60-1-130 1-196 6-30 2-58 4-82 5-5 0-9-2-8-5z'/%3E%3C/svg%3E"); }
.brush::after { content: ""; position: absolute; z-index: -1; left: 0; right: -6%; bottom: -.22em; height: .34em; background: var(--y);
  -webkit-mask: var(--brush) no-repeat center / 100% 100%; mask: var(--brush) no-repeat center / 100% 100%; }
/* волна снизу слева: её высота меньше нижнего отступа блока, поэтому на кнопки и картинку не заходит */
.hero-wave { position: absolute; left: 0; bottom: 0; width: 46%; height: 64px; color: var(--y); display: block; }
/* «Наши работы»: круглая кнопка со стрелкой и подчёркнутая подпись */
.link-round { display: inline-flex; align-items: center; gap: 14px; color: #fff; font-weight: 600; }
.link-round .round { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s; }
.link-round .u { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link-round:hover { color: var(--y); } .link-round:hover .round { border-color: var(--y); }

/* Секции */
.sec { padding: 88px 0; }
.ttl { font-size: 36px; font-weight: 800; text-transform: uppercase; text-align: center; }
.ttl::after { content: ""; display: block; width: 48px; height: 4px; background: var(--y); margin: 18px auto 48px; }
.ttl-w { color: #fff; }
.ttl-l { text-align: left; }
.ttl-l::after { margin-left: 0; margin-bottom: 0; }

/* Карточки услуг */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.card { display: flex; flex-direction: column; }
.card-img { aspect-ratio: 540 / 400; background: var(--light); border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.slot { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, #eee 0 10px, #f6f6f6 10px 20px); }
.card h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; margin: 20px 0 10px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; flex: 1; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.card:hover .more { text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }

/* Почему мы */
.why { background: var(--black); color: #fff; padding: 80px 0 88px; position: relative; overflow: hidden; }
.why-circle { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: var(--y); left: -210px; top: 50%; transform: translateY(-50%); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.why-item h3 { font-size: 17px; font-weight: 800; text-transform: uppercase; margin: 18px 0 8px; }
.why-item p { margin: 0; color: var(--muted-dark); font-size: 15px; }

/* SEO-текст (из админки, по городу) */
.seo-in { max-width: 860px; }
.seo h2 { font-size: 28px; font-weight: 800; margin-bottom: 18px; }
.seo p { color: #333; margin: 0 0 14px; }

/* Отзывы */
.revs { background: var(--light); }
.revs-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.revs-nav { display: flex; gap: 8px; }
.revs-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; }
.revs-track::-webkit-scrollbar { display: none; }
.rev { margin: 0; background: #fff; border-radius: var(--radius); padding: 24px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; }
.rev img { width: 100%; aspect-ratio: 540 / 400; object-fit: cover; border-radius: var(--radius); }
.rev blockquote { margin: 0; font-size: 15px; flex: 1; }
.rev figcaption { font-weight: 700; font-size: 14px; border-top: 3px solid var(--y); padding-top: 12px; }

/* Блок заявки */
.cta { background: var(--y); }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
.cta h2 { font-size: 30px; font-weight: 800; text-transform: uppercase; }
.cta p { margin: 10px 0 0; font-size: 16px; max-width: 560px; }

/* Подвал */
/* нижний отступ = высота закреплённой кнопки + её отступ 24 px: в конце страницы она не закрывает подвал */
.ftr { background: var(--black); color: #fff; padding-top: 64px; padding-bottom: calc(var(--sticky-h) + 24px); font-size: 15px; }
.ftr-in { display: grid; grid-template-columns: 1.1fr .8fr 1fr 1.4fr; gap: 32px; padding-bottom: 48px; }
.ftr-col { display: flex; flex-direction: column; gap: 10px; }
.ftr-col a, .ftr-col span { color: #d6d6d6; display: flex; gap: 10px; align-items: flex-start; }
.ftr-col a:hover { color: var(--y); }
.ftr-cap { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ftr-bottom { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line-dark); padding-top: 20px; padding-bottom: 24px; font-size: 13px; color: #8a8a8a; }
.ftr-bottom a:hover { color: #fff; }

/* Закреплённая кнопка заявки: всегда видна (решение 2026-11-01) */
.sticky { position: fixed; right: 24px; bottom: 24px; z-index: 40; height: var(--sticky-h); padding: 0 28px; border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 16px; }
/* под открытым мобильным меню кнопка скрыта (контракт 02, §4) */
.menu-open .sticky { display: none; }

/* Планшет */
@media (max-width: 1199px) {
  .nav, .hdr-contact, .hdr-cb { display: none; }
  .m-only { display: inline-flex; }
  .hdr-in { gap: 8px; } .logo-link { margin-right: auto; }
  :root { --hdr-h: 72px; }
  .logo { height: 38px; }
  /* круги — только в углах, без наложения на текст (заголовок начинается ниже 56 px) */
  .hero-circle { width: 140px; height: 140px; right: -60px; top: -100px; }
  .why-circle { width: 150px; height: 150px; left: -100px; top: -60px; transform: none; }
  .hero-in { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; padding-bottom: 64px; }
  .hero-pic { margin: 0 auto; max-width: 680px; }
  .hero-wave { width: 60%; height: 48px; }
  .hero h1 { font-size: 44px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .revs-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  /* мобильное меню: на весь экран поверх всего, включая закреплённую кнопку */
  .menu-open body { overflow: hidden; }
  .menu-open .mnav { display: flex; }
  .mnav { position: fixed; inset: 0; z-index: 50; background: var(--black); flex-direction: column; padding: 0 var(--pad) 32px; overflow-y: auto; }
  .mnav-top { height: var(--hdr-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
  .mnav nav { display: flex; flex-direction: column; margin: 16px 0 28px; }
  .mnav nav > a, .mnav summary { font-size: 20px; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--line-dark);
    display: flex; justify-content: space-between; align-items: center; list-style: none; cursor: pointer; }
  .mnav summary::-webkit-details-marker { display: none; }
  .mnav details[open] summary .i { transform: rotate(180deg); }
  .m-cap { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-dark); margin: 14px 0 4px; }
  .m-sub { display: block; padding: 8px 0 8px 12px; color: #d6d6d6; }
  .m-phone { display: inline-flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 800; }
  .m-hours { color: var(--muted-dark); font-size: 14px; margin: 4px 0 20px; }
  .mnav .btn { width: 100%; height: 52px; }
}
/* Телефон */
@media (max-width: 767px) {
  :root { --pad: 16px; --hdr-h: 64px; }
  .logo { height: 32px; }
  .hero-in { padding-top: 56px; padding-bottom: 48px; gap: 8px; }
  .hero-wave { width: 70%; height: 32px; }
  .link-round .round { width: 44px; height: 44px; }
  .hero h1 { font-size: 30px; }
  .lead { font-size: 16px; margin: 16px 0 20px; }
  .hero-btns { gap: 20px; } .hero-btns .btn { width: 100%; }
  .sec { padding: 56px 0; } .why { padding: 56px 0; }
  .ttl { font-size: 26px; } .ttl::after { margin-bottom: 32px; }
  .ttl-l::after { margin-bottom: 0; }
  .cards { grid-template-columns: 1fr; gap: 32px; }
  .why-grid { grid-template-columns: 1fr; gap: 28px; }
  .seo h2 { font-size: 22px; }
  .revs-head { margin-bottom: 24px; }
  .revs-track { grid-auto-columns: 86%; gap: 12px; }
  .cta-in { flex-direction: column; align-items: stretch; padding-top: 40px; padding-bottom: 40px; }
  .cta h2 { font-size: 24px; }
  .ftr { padding-top: 40px; }
  .ftr-in { grid-template-columns: 1fr; gap: 28px; }
  .ftr-bottom { flex-direction: column; gap: 8px; }
  /* закреплённая кнопка — полоса внизу; подвал получает отступ на её высоту, чтобы она его не закрывала */
  .sticky { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; box-shadow: 0 -4px 16px rgba(0,0,0,.25); }
  .ftr { padding-bottom: var(--sticky-h); }
}

/* ===== Фича 03: страницы услуг, портфолио, галерея, просмотр фото, 404 (контракт 03) ===== */
.page { padding: 32px 0 88px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }
.crumbs span[aria-hidden] { color: #aaa; }
.page-h1 { font-size: 34px; font-weight: 800; margin-bottom: 28px; }
/* в одну строку (ставит JS после замера, контракт 03 v2 §3) */
.page-h1.is-one-line { white-space: nowrap; overflow: hidden; }

/* Галерея: большое фото 660×440 + сетка превью 3×4 (высота сетки = высоте фото) */
.gal { display: grid; grid-template-columns: 660px 1fr; gap: 24px; align-items: start; }
.gal-main { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--light); cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gal-main img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gal-count { position: absolute; left: 12px; bottom: 12px; background: rgba(13,13,13,.78); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 14px; }
.gal-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gal-thumb { position: relative; padding: 0; border: 0; background: var(--light); cursor: pointer; border-radius: 3px; overflow: hidden; outline: 3px solid transparent; outline-offset: -3px; }
.gal-thumb img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gal-thumb.is-active { outline-color: var(--y); }
/* видно 12 превью (3×4 на компьютере, 6×2 на планшете); остальные нужны просмотру, но скрыты — их обозначает «+N» */
@media (min-width: 768px) { .gal-thumbs .gal-thumb:nth-child(n+13) { display: none; } }
.gal-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(13,13,13,.7); color: #fff; font-weight: 800; font-size: 20px; }
/* одно фото — без превью и счётчика, по ширине 860 */
.gal-single { grid-template-columns: minmax(0, 860px); }
.gal-thumbs[hidden] { display: none !important; }

/* Текст под галереей: строка заглавными (обычный текст, переносится), описание, кнопка */
.work-line { margin: 28px 0 0; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.work-text { max-width: 860px; margin-top: 14px; }
.work-text p { margin: 0 0 14px; color: #333; }
.work-cta { margin-top: 24px; }
.sec-sub { padding-top: 64px; }
.sub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.sub-head h2 { font-size: 26px; font-weight: 800; text-transform: uppercase; }

/* Каталог портфолио */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tab { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 2px solid var(--text); border-radius: 20px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.tab:hover { background: var(--light); }
.tab.is-active { background: var(--text); color: #fff; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.work-card { display: flex; flex-direction: column; }
.work-card .card-img { aspect-ratio: 3 / 2; }
.work-card h3 { font-size: 16px; font-weight: 800; margin: 14px 0 4px; }
.work-card .svc { font-size: 14px; color: var(--muted); }
.work-card:hover h3 { text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }

/* Просмотр фото на весь экран */
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(8,8,8,.94); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 56px 72px; color: #fff; }
.lb.is-open, .lb-open .lb { display: flex; }
.lb-open body { overflow: hidden; }
.lb-img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 2px; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1200px; margin-top: 14px; font-size: 14px; }
.lb-cap { color: #ddd; }
.lb-cap a { color: var(--y); font-weight: 700; }
.lb-num { color: #aaa; white-space: nowrap; }
.lb-close { position: absolute; top: 8px; right: 8px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { background: var(--y); color: #000; }
.lb .icon-btn[disabled] { opacity: .3; pointer-events: none; }
/* под просмотром фото закреплённая кнопка скрыта */
.lb-open .sticky { display: none; }

/* 404 */
.nf { padding: 96px 0 120px; text-align: center; }
.nf-code { font-size: 120px; font-weight: 800; line-height: 1; color: var(--y); -webkit-text-stroke: 3px var(--text); }
.nf h1 { font-size: 30px; font-weight: 800; text-transform: uppercase; margin: 24px 0 12px; }
.nf p { color: var(--muted); margin: 0 0 28px; }
.nf-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost { border-color: var(--text); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--text); color: #fff; }

@media (max-width: 1199px) {
  .gal { grid-template-columns: 1fr; }
  .gal-thumbs { grid-template-columns: repeat(6, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .page-h1 { font-size: 30px; }
}
@media (max-width: 767px) {
  .page { padding: 20px 0 56px; }
  .page-h1 { font-size: 24px; margin-bottom: 20px; }
  .crumbs { font-size: 13px; }
  /* превью — лента с прокруткой пальцем */
  .gal { gap: 8px; }
  .gal-thumbs { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
  .gal-thumbs::-webkit-scrollbar { display: none; }
  .gal-thumb { flex: 0 0 96px; }
  .gal-more { display: none; }
  .work-line { margin-top: 20px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)) 24px; padding: 0 var(--pad); }
  .tabs::-webkit-scrollbar { display: none; }
  .works { grid-template-columns: 1fr; }
  .sub-head h2 { font-size: 22px; }
  .lb { padding: 56px 0 24px; }
  .lb-img { max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { display: none; }
  .lb-bar { padding: 0 var(--pad); flex-direction: column; align-items: flex-start; gap: 6px; }
  .nf { padding: 56px 0 80px; }
  .nf-code { font-size: 88px; }
  .nf h1 { font-size: 24px; }
}

/* постраничный вывод каталога — те же «таблетки», что у вкладок (контракт 03 v2 §4) */
.pager { margin: 40px 0 0; }

/* ===== Фича 04: материалы, отзывы, текстовые страницы, контакты (контракт 04) ===== */
/* Статья: текст из админки в простой разметке (абзацы, подзаголовки, списки) */
.article { max-width: 760px; }
.article p { margin: 0 0 16px; color: #333; }
/* подзаголовки и списки текста услуги и работы (.work-text) — как в статье материала */
.article h2, .work-text h2 { font-size: 24px; font-weight: 800; margin: 36px 0 14px; }
.article h3, .work-text h3 { font-size: 18px; font-weight: 800; margin: 28px 0 10px; }
.article ul, .work-text ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.article li, .work-text li { position: relative; padding-left: 22px; color: #333; }
.article li::before, .work-text li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 4px; background: var(--y); }
.article > :first-child { margin-top: 0; }

/* Страница материала: статья + колонка справа (услуги, призыв) */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.aside { display: grid; gap: 20px; position: sticky; top: 24px; }
.aside-box { background: var(--light); border-radius: var(--radius); padding: 22px; }
.aside-box h2 { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.aside-links { display: grid; gap: 2px; }
.aside-links a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.aside-links a:last-child { border-bottom: 0; }
.aside-links a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }
.aside-cta { background: var(--y); }
.aside-cta p { margin: 0 0 16px; font-size: 15px; }
.aside-cta .btn { width: 100%; }

/* Каталог материалов */
.mat-cat + .mat-cat { margin-top: 48px; }
.mat-cat h2 { font-size: 22px; font-weight: 800; text-transform: uppercase; margin-bottom: 20px; }
.mat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mat-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 2px solid var(--line); border-left: 6px solid var(--y); border-radius: var(--radius); }
.mat-card h3 { font-size: 18px; font-weight: 800; }
.mat-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.mat-card:hover { border-color: var(--text); border-left-color: var(--y); }

/* Отзывы: сетка карточек того же вида, что на главной (контракт 02) */
/* карточки ряда — одной высоты: подпись с жёлтой чертой у всех внизу */
.rev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rev-grid .rev { background: var(--light); }
.rev-photo { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.rev-date { color: var(--muted); font-weight: 400; display: block; margin-top: 2px; font-size: 13px; }
.empty { padding: 40px; text-align: center; background: var(--light); border-radius: var(--radius); color: var(--muted); }
.page-cta { margin-top: 56px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.c-list { display: grid; gap: 22px; }
.c-item { display: flex; gap: 14px; align-items: flex-start; }
.c-item .i { width: 24px; height: 24px; margin-top: 2px; }
.c-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.c-value { font-size: 18px; font-weight: 700; }
.c-phone { font-size: 28px; font-weight: 800; }
.c-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.map-box { background: var(--black); color: #fff; border-radius: var(--radius); padding: 32px; min-height: 320px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; position: relative; overflow: hidden; }
.map-box::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--y); right: -80px; top: -90px; }
.map-box .i-xl { position: relative; }
.map-box p { margin: 0; color: #d6d6d6; position: relative; }
.map-box .c-value { position: relative; }
.map-box .btn { align-self: flex-start; position: relative; }

@media (max-width: 1199px) {
  .with-aside { grid-template-columns: 1fr; gap: 32px; }
  .aside { position: static; grid-template-columns: 1fr 1fr; }
  .mat-cards, .rev-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .article h2, .work-text h2 { font-size: 20px; margin-top: 28px; }
  .aside { grid-template-columns: 1fr; }
  .mat-cards, .rev-grid { grid-template-columns: 1fr; }
  .c-phone { font-size: 24px; }
  .c-btns .btn { width: 100%; }
  .map-box { min-height: 240px; padding: 24px; }
  /* круг — только в углу, чтобы не ложился под текст блока */
  .map-box::before { width: 150px; height: 150px; right: -60px; top: -70px; }
}

/* фото отзыва: атрибут height="427" в шаблоне не должен перебивать пропорцию (как у фото главного блока) */
.rev img { height: auto; }
/* неактивная стрелка блока отзывов в начале/конце ленты (контракт 02 v1 §4) */
.revs .icon-btn[disabled] { opacity: .3; pointer-events: none; }

/* ===== Фича 05: формы заявки и обратного звонка (контракт 05) ===== */
:root { --err: #c62828; }
.modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(8,8,8,.72); }
.modal.is-open { display: flex; }
.modal-open body { overflow: hidden; }
.modal-open .sticky { display: none; }
.modal-box { position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: var(--radius); padding: 36px 36px 32px; box-shadow: 0 24px 64px rgba(0,0,0,.4); }
.modal-close { position: absolute; top: 10px; right: 10px; color: var(--text); }
.modal-close:hover { background: var(--light); }
.modal h2 { font-size: 24px; font-weight: 800; text-transform: uppercase; padding-right: 36px; }
.modal-sub { color: var(--muted); margin: 8px 0 20px; font-size: 15px; }
.ctx { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: var(--light); border-left: 4px solid var(--y); padding: 6px 10px; font-size: 14px; margin-bottom: 18px; }
.ctx b { white-space: nowrap; }
.ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field label i { color: var(--err); font-style: normal; }
.input { display: block; width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--text); background: #fff; }
textarea.input { height: 112px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(253,225,11,.6); }
.field.is-error .input, .field.is-error .drop { border-color: var(--err); }
.f-err { display: none; color: var(--err); font-size: 13px; margin-top: 6px; }
.field.is-error .f-err { display: block; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* файл: зона с пунктирной рамкой; выбран — имя, размер, крестик */
.drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px dashed #c9c9c9; border-radius: var(--radius); cursor: pointer; color: var(--muted); font-size: 14px; }
.drop:hover, .drop.is-over { border-color: var(--text); color: var(--text); background: #fafafa; }
.drop b { color: var(--text); }
/* на сенсорных экранах перетаскивать файл некуда — подсказку не показываем */
@media (hover: none) { .drop-hint { display: none; } }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 14px; border: 2px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.file-size { color: var(--muted); white-space: nowrap; }
.file .icon-btn { width: 36px; height: 36px; color: var(--text); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 20px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #0d0d0d; }
.consent a { color: var(--text); text-decoration: underline; }
.consent.is-error { color: var(--err); }
.modal .btn-submit { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.spin { width: 18px; height: 18px; border: 3px solid rgba(0,0,0,.25); border-top-color: #000; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* скрытое от людей поле-ловушка для ботов */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { display: flex; gap: 10px; align-items: flex-start; background: #fdecea; color: var(--err); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.form-alert .i { flex: none; margin-top: 1px; }
.form-alert a { color: var(--err); font-weight: 700; }

.done { text-align: center; padding: 12px 0 4px; }
.done .i-xl { width: 64px; height: 64px; color: #0d0d0d; background: var(--y); border-radius: 50%; padding: 12px; margin: 0 auto 18px; }
.done h2 { padding: 0; }
.done p { color: #333; margin: 12px 0 24px; }
.done .num { font-weight: 800; }

@media (max-width: 767px) {
  /* телефон: окно на весь экран */
  .modal { padding: 0; align-items: stretch; }
  .modal-box { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 56px 16px 24px; box-shadow: none; }
  .modal h2 { font-size: 22px; }
}

/* атрибут hidden сильнее display у классов (.ctx, .file, .done…) — элементы окна скрываются им */
[hidden] { display: none !important; }
.f-err-inline { display: none; }
.consent.is-error .f-err-inline { display: block; }

/* ===== Фича 07: баннер о cookie (контракт 07 v1) ===== */
/* под закреплённой кнопкой (.sticky — 40) и окном заявки (70); скрыт атрибутом hidden, пока site.js не решит показать */
.cookie { position: fixed; left: 24px; bottom: 24px; z-index: 39; max-width: 560px; display: flex; align-items: center; gap: 16px;
  padding: 14px 16px 14px 20px; background: var(--black); color: #fff; border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 14px; line-height: 1.45; }
.cookie p { margin: 0; flex: 1; }
.cookie a { color: var(--y); text-decoration: underline; }
.cookie .btn { flex: none; }
/* мобильное меню лежит в шапке (слой 30) и баннер (39) сверху не перекрыло бы — прячем, как кнопку заявки (.menu-open .sticky) */
.menu-open .cookie, .lb-open .cookie { display: none; }
/* планшет: кнопка заявки справа внизу — баннер во всю ширину над ней (24 + 56 + 12 зазор) */
@media (max-width: 1199px) {
  .cookie { right: 24px; max-width: none; bottom: calc(24px + var(--sticky-h) + 12px); }
}
/* телефон: кнопка заявки — полоса внизу; баннер — полоса прямо над ней */
@media (max-width: 767px) {
  .cookie { left: 0; right: 0; bottom: var(--sticky-h); gap: 12px; padding: 12px 16px; border-radius: 0; box-shadow: none;
    border-top: 1px solid var(--line-dark); font-size: 13px; }
}
/* пиксель Метрики для браузеров без скриптов — за пределами экрана */
.ym-px { position: absolute; left: -9999px; }
