/* ЗемСтройЭксперт — собственная вёрстка.
   Палитра и фотографии унаследованы от прежнего сайта, всё остальное своё.
   Приём: сдержанная «экспертная» подача — тонкие линии, прямые углы,
   разрядка в надзаголовках, оранжевый только на действиях. */

:root {
  --ink:        #14161a;
  --ink-2:      #1f2326;
  --paper:      #ffffff;
  --mist:       #f4f5f6;
  --brand:      #f06d28;
  --brand-dark: #d3591b;
  --amber:      #ffa000;
  --text:       #1a1c1f;
  --muted:      #6b7075;
  --line:       #e3e5e8;
  --line-dark:  rgba(255,255,255,.14);

  --container: 1180px;
  --gap: 24px;
  --radius: 3px;
  --header-h: 72px;

  --shadow-sm: 0 1px 2px rgba(16,18,22,.06), 0 2px 8px rgba(16,18,22,.05);
  --shadow-md: 0 4px 12px rgba(16,18,22,.08), 0 12px 32px rgba(16,18,22,.08);

  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(28px, 4.4vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(19px, 2vw, 23px); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.section { padding: clamp(48px, 7vw, 92px) 0; }
.section--mist { background: var(--mist); }
/* чертёжная текстура из прежнего сайта — еле заметным фоном светлых секций */
.section--mist::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('/img/20725297_1200_q70.webp') repeat; background-size: 620px;
  opacity: .5; mix-blend-mode: multiply;
}
.section--mist { position: relative; }
.section--mist > .container { position: relative; }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .eyebrow { color: var(--amber); }
.section__head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head p { color: var(--muted); margin: 14px 0 0; font-size: 18px; }
.section--dark .section__head p { color: rgba(255,255,255,.72); }

/* ─── кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border: 1px solid transparent; border-radius: var(--radius);
  font: 600 16px/1.2 var(--font); cursor: pointer; transition: .18s ease;
  text-align: center;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.btn--wide { width: 100%; }

/* ─── шапка ──────────────────────────────────────────────── */
.topbar {
  background: var(--ink); color: rgba(255,255,255,.72); font-size: 14px;
  border-bottom: 1px solid var(--line-dark);
}
.topbar .container { display: flex; gap: 26px; align-items: center; height: 42px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }
.topbar__spacer { margin-left: auto; }
@media (max-width: 900px) { .topbar { display: none; } }

.header {
  position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.97);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { flex: none; }
.brand__name {
  font-size: 20px; font-weight: 400; letter-spacing: -.01em; white-space: nowrap;
}
.brand__name b { font-weight: 700; }
.footer__logo .brand__name { font-size: 21px; }
@media (max-width: 420px) { .brand__name { font-size: 17px; } .brand__mark { width: 32px; height: 32px; } }

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { color: var(--text); font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--brand); }
.nav__item { position: relative; }
.nav__toggle {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0;
  font: 500 15.5px var(--font); color: var(--text); cursor: pointer; padding: 0;
}
.nav__toggle:hover { color: var(--brand); }
.nav__toggle svg { transition: transform .2s; }
.nav__item.is-open .nav__toggle svg { transform: rotate(180deg); }
.nav__drop {
  position: absolute; top: calc(100% + 14px); left: -18px; min-width: 330px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: .18s ease;
}
.nav__item.is-open .nav__drop { opacity: 1; visibility: visible; transform: none; }
.nav__drop a {
  display: block; padding: 9px 14px; border-radius: var(--radius); font-size: 15px;
  font-weight: 400;
}
.nav__drop a:hover { background: var(--mist); color: var(--brand); }
.header__phone { font-weight: 700; font-size: 17px; color: var(--ink); white-space: nowrap; }
.header__phone:hover { color: var(--brand); }
.header__cta { flex: none; padding: 11px 22px; font-size: 15px; }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; cursor: pointer; position: relative;
}
.burger span, .burger::before, .burger::after {
  content: ''; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink);
  transition: .2s;
}
.burger::before { top: 15px; } .burger span { top: 21px; } .burger::after { top: 27px; }
body.nav-open .burger::before { top: 21px; transform: rotate(45deg); }
body.nav-open .burger span { opacity: 0; }
body.nav-open .burger::after { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1080px) { .header__cta { display: none; } }
@media (max-width: 900px) {
  .burger { display: block; }
  /* backdrop-filter делает шапку системой координат для position:fixed —
     выдвижное меню обрезалось по её высоте. На мобильных фильтр не нужен. */
  .header { backdrop-filter: none; background: #fff; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 12px 20px 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease; margin: 0;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { transform: none; }
  .nav > * { border-bottom: 1px solid var(--line); padding: 14px 0; }
  .nav__drop {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; padding: 6px 0 0 14px; min-width: 0; display: none;
  }
  .nav__item.is-open .nav__drop { display: block; }
  .nav__toggle { width: 100%; justify-content: space-between; }
  .nav__drop a { white-space: normal; padding: 11px 0; }   /* длинные названия услуг переносим */
  .header__phone { font-size: 20px; }
}

/* ─── первый экран ───────────────────────────────────────── */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: 50% 50%; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(12,14,17,.92) 0%, rgba(12,14,17,.78) 48%, rgba(12,14,17,.5) 100%);
}
.hero__inner { position: relative; padding: clamp(56px, 9vw, 118px) 0 clamp(48px, 7vw, 96px); max-width: 860px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em, .hero h1 .accent { font-style: normal; color: var(--amber); }
.hero__lead { font-size: clamp(16px, 1.5vw, 19px); color: rgba(255,255,255,.8); max-width: 660px; margin: 0 0 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 18px;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(255,255,255,.06); font-size: 15px; color: rgba(255,255,255,.72);
}
.chip b { color: #fff; font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero--compact .hero__inner { padding: clamp(40px, 6vw, 72px) 0; }

/* ─── сетка услуг ────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px)  { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.service {
  display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: .2s ease; height: 100%;
}
.service:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service__icon { height: 52px; width: auto; object-fit: contain; align-self: flex-start; }
.service__name { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.service:hover .service__name { color: var(--brand); }
.service__meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.service__price { color: var(--ink); font-weight: 700; }

/* ─── преимущества ───────────────────────────────────────── */
.feature { padding: 30px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; }
.section--dark .feature { background: rgba(255,255,255,.04); border-color: var(--line-dark); }
.feature__num { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--brand); margin-bottom: 14px; }
.feature h3 { margin-bottom: 10px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.section--dark .feature p { color: rgba(255,255,255,.7); }

/* ─── таблица цен ────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
table.price { width: 100%; border-collapse: collapse; font-size: 16px; }
table.price th {
  background: var(--ink); color: #fff; text-align: left; font-weight: 600; font-size: 14px;
  letter-spacing: .04em; padding: 15px 18px; vertical-align: middle;
}
table.price td { padding: 15px 18px; border-top: 1px solid var(--line); vertical-align: top; }
table.price tr:nth-child(even) td { background: #fafbfb; }
table.price td:nth-child(2) { white-space: nowrap; font-weight: 700; color: var(--ink); }
table.price td:last-child { white-space: nowrap; color: var(--muted); }
@media (max-width: 760px) {
  table.price, table.price tbody, table.price tr, table.price td { display: block; width: 100%; }
  table.price thead { display: none; }
  table.price tr { border-top: 1px solid var(--line); padding: 6px 0; }
  table.price tr:first-child { border-top: 0; }
  table.price td { border: 0; padding: 5px 18px; }
  table.price td:first-child { font-weight: 600; color: var(--ink); padding-top: 14px; }
  table.price td:not(:first-child)::before { content: attr(data-label) ': '; color: var(--muted); font-weight: 400; }
  table.price tr:nth-child(even) td { background: transparent; }
}

/* ─── текстовые блоки ────────────────────────────────────── */
.prose { max-width: 820px; font-size: 17px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.prose ul li::before {
  content: ''; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px;
  background: var(--brand); border-radius: 50%;
}
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n) '.'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.prose em.accent { font-style: normal; color: var(--brand); font-weight: 600; }
.prose b { color: var(--ink); }
.section--dark .prose { color: rgba(255,255,255,.8); }
.section--dark .prose b { color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__media { order: -1; } }

/* ─── аккордеон ──────────────────────────────────────────── */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; cursor: pointer;
  font-size: 18px; font-weight: 600; color: var(--ink); list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ''; flex: none; margin-left: auto; width: 11px; height: 11px; margin-top: 7px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s;
}
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion summary:hover { color: var(--brand); }
.accordion .accordion__body { padding: 0 0 22px; }

/* ─── призыв к действию ──────────────────────────────────── */
.cta { position: relative; background: var(--ink-2); color: #fff; overflow: hidden; }
.cta__bg { position: absolute; inset: 0; background-size: cover; background-position: 50% 40%; opacity: .28; }
.cta .container { position: relative; padding: clamp(44px, 6vw, 78px) 20px; text-align: center; }
.cta h2 { margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.75); max-width: 620px; margin: 0 auto 28px; }

/* ─── контакты ───────────────────────────────────────────── */
.office { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.office h3 { margin-bottom: 12px; font-size: 20px; }
.office p { margin: 0 0 6px; color: var(--muted); font-size: 16px; }
.map { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 420px; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ─── подвал ─────────────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(255,255,255,.68); padding: 56px 0 26px; font-size: 15px; }
.footer a { color: rgba(255,255,255,.8); }
.footer a:hover { color: var(--brand); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr; gap: 30px; } }
.footer__logo { margin-bottom: 16px; }
.footer h4 { color: #fff; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer__bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 14px; color: rgba(255,255,255,.5);
}
.footer__bottom a { color: rgba(255,255,255,.6); }

/* ─── модальное окно с формой ────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10,12,15,.72);
}
.modal.is-open { display: flex; }
.modal__box {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 480px; padding: 34px 30px 30px;
  position: relative; box-shadow: var(--shadow-md); max-height: 92vh; overflow-y: auto;
}
.modal__close {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; background: none;
  cursor: pointer; color: var(--muted); font-size: 26px; line-height: 1; border-radius: var(--radius);
}
.modal__close:hover { background: var(--mist); color: var(--ink); }
.modal h3 { margin-bottom: 8px; }
.modal__note { color: var(--muted); font-size: 15px; margin: 0 0 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 16px var(--font); color: var(--text); background: #fff; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field input.is-error, .field textarea.is-error { border-color: #d64545; background: #fff7f7; }
.field textarea { min-height: 92px; resize: vertical; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__legal { font-size: 13px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.form__legal a { color: var(--muted); text-decoration: underline; }
.form__done { text-align: center; padding: 18px 0 6px; }
.form__done h3 { margin-bottom: 10px; }
.form__done p { color: var(--muted); margin: 0; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ─── прочее ─────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--brand); background: var(--mist); padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }
.breadcrumbs { font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 18px; }
.breadcrumbs a { color: rgba(255,255,255,.75); }
.breadcrumbs span { margin: 0 8px; opacity: .5; }
.legal-page { max-width: 820px; }
.legal-page h2 { font-size: 21px; margin: 34px 0 12px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: #fff; padding: 10px 16px; z-index: 300; }
