/* =====================================================================
   WAY BUILDING — дизайн-система сайта
   1. Токены и база          6. Смета
   2. Шапка и меню           7. Калькулятор
   3. Заставка и первый экран 8. Портфолио, отзывы, FAQ
   4. Общие блоки            9. Контакты, футер, cookie
   5. Услуги и преимущества  10. Адаптив
   ===================================================================== */

/* ------------------------------------------------ 1. Токены и база --- */
:root {
  --navy: #07172e;
  --navy-deep: #04101f;
  --panel: #0c213b;
  --panel-2: #102a49;
  --orange: #f58a16;
  --orange-soft: #ff9f37;
  --paper: #f2f0ea;
  --paper-2: #e9e7e1;
  --ink: #0b1522;
  --ink-soft: #55606c;
  --muted: #aab6c6;
  --line: rgba(255, 255, 255, .12);
  --line-dark: #d5d3cc;
  --ok: #3dbb72;
  --danger: #e2544a;

  --shell: min(1320px, calc(100vw - 72px));
  --header-h: 78px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px rgba(4, 14, 28, .18);
  --shadow-dark: 0 30px 70px rgba(2, 8, 18, .45);
  --font: "Inter", "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body > * { min-width: 0; }
img, svg, video { display: block; max-width: 100%; }
img { width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { overflow-wrap: break-word; margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--orange); color: #10192a; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 120px) 0; position: relative; }
.section--light { background: var(--paper); color: var(--ink); }
.section--paper2 { background: var(--paper-2); color: var(--ink); }
.section--panel { background: #091a30; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 999;
  padding: 12px 18px; border-radius: 0 0 10px 10px;
  background: var(--orange); color: #10192a; font-weight: 800;
}
.skip-link:focus { top: 0; }

.label {
  display: flex; align-items: center; gap: 13px;
  color: #7b8899; font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
.label::before { content: ""; width: 42px; height: 2px; background: var(--orange); flex: none; }
.section--light .label, .section--paper2 .label { color: #6d7783; }

.title {
  margin: 22px 0 0;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -.04em;
  text-transform: uppercase;
  font-weight: 800;
}
.title--sm { font-size: clamp(28px, 3.4vw, 46px); }
.lead { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.7; color: var(--muted); }
.section--light .lead, .section--paper2 .lead { color: var(--ink-soft); }
.muted { color: var(--muted); }
.section--light .muted { color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 1.2fr .7fr; gap: clamp(28px, 5vw, 80px); align-items: end; }
.split > p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.section:not(.section--light):not(.section--paper2) .split > p { color: var(--muted); }

/* Кнопки */
.btn {
  min-height: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px 26px;
  border: 1px solid var(--orange); border-radius: 10px;
  background: var(--orange); color: #10192a;
  font-size: 14px; font-weight: 800; letter-spacing: .01em;
  cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  text-align: center;
}
.btn:hover { background: var(--orange-soft); box-shadow: 0 12px 30px rgba(245, 138, 22, .28); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn--ghost { background: transparent; border-color: var(--line); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .35); box-shadow: none; }
.section--light .btn--ghost, .section--paper2 .btn--ghost { color: var(--ink); border-color: #c5c3bc; }
.section--light .btn--ghost:hover { background: rgba(11, 21, 34, .06); }
.btn--dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--panel-2); box-shadow: 0 12px 30px rgba(7, 23, 46, .3); }
.btn--wide { width: 100%; }
.btn--sm { min-height: 46px; padding: 10px 18px; font-size: 13px; border-radius: 9px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px;
  font-size: 14px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.section--light .link-arrow { color: var(--ink); border-color: rgba(11, 21, 34, .25); }

.icon { width: 24px; height: 24px; flex: none; }

/* ------------------------------------------------ 2. Шапка и меню --- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  background: rgba(7, 23, 46, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease), height .3s var(--ease);
}
.header--solid { background: rgba(5, 17, 34, .96); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 22px; }

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--orange), #d9720a);
  color: #10192a; font-size: 14px; font-weight: 900; letter-spacing: .02em;
}
.brand strong { display: block; font-size: 15px; letter-spacing: .16em; font-weight: 800; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #d8e0ea;
  transition: color .2s, background .2s;
}
.nav a:hover, .nav a.is-active { color: #fff; background: rgba(255, 255, 255, .08); }

.header__phone {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.header__phone:hover { border-color: var(--orange); color: var(--orange); }
.header__phone svg { width: 17px; height: 17px; }

.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: transparent; cursor: pointer;
}
.burger span { position: relative; display: block; width: 20px; height: 2px; background: #fff; transition: transform .25s var(--ease), opacity .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: #fff; transition: transform .25s var(--ease); }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------- 3. Заставка и первый экран --- */
.intro {
  position: fixed; inset: 0; z-index: 900;
  overflow: hidden; background: var(--navy-deep);
  display: grid; place-items: center;
  animation: introOut .6s ease 2.4s forwards;
  pointer-events: none;
}
.intro__bg {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3, 12, 24, .9), rgba(3, 12, 24, .55)), var(--intro-bg, none) center/cover no-repeat;
  opacity: 0; animation: introBg 2.4s var(--ease) forwards;
}
.intro__brand {
  position: relative; display: flex; align-items: center; gap: 16px;
  opacity: 0; animation: introBrand 2.2s var(--ease) .15s forwards;
}
.intro__brand .brand__mark { width: 56px; height: 56px; font-size: 18px; border-radius: 15px; }
.intro__brand strong { display: block; font-size: clamp(20px, 4vw, 28px); letter-spacing: .2em; font-weight: 800; }
.intro__brand small { display: block; margin-top: 6px; color: var(--muted); font-size: clamp(10px, 2.4vw, 12px); letter-spacing: .12em; text-transform: uppercase; }
.intro__progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--orange), #ffc077);
  animation: introBar 2.3s linear forwards;
}
.intro__skip {
  position: absolute; right: 18px; bottom: 22px; pointer-events: auto;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .04); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.intro.is-off { animation: none; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }

@keyframes introOut { to { opacity: 0; visibility: hidden; } }
@keyframes introBg { 0% { opacity: 0; transform: scale(1.06); } 45% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes introBrand { 0% { opacity: 0; transform: translateY(14px); } 30%, 90% { opacity: 1; transform: none; } 100% { opacity: 1; } }
@keyframes introBar { to { transform: scaleX(1); } }

.hero {
  position: relative; isolation: isolate;
  min-height: min(880px, 100svh);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 60px) 0 130px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(4, 16, 33, .97) 0%, rgba(4, 16, 33, .86) 38%, rgba(4, 16, 33, .35) 75%, rgba(4, 16, 33, .55) 100%);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 0 15px;
  border: 1px solid rgba(245, 138, 22, .45); border-radius: 999px;
  background: rgba(245, 138, 22, .1);
  color: #ffca8c; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.hero h1 {
  margin: 26px 0 0; max-width: 17ch;
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.05; letter-spacing: -.03em;
  text-transform: uppercase; font-weight: 800;
  overflow-wrap: normal; hyphens: none;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero__lead { margin: 24px 0 0; max-width: 52ch; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.65; color: #d3dbe5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__points {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 16, 33, 0), rgba(4, 16, 33, .75));
  backdrop-filter: blur(6px);
}
.hero__points ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero__points li {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px 20px 0;
  font-size: 13px; font-weight: 600; color: #d9e1ea;
}
.hero__points b { color: var(--orange); font-size: 12px; letter-spacing: .1em; }

/* ------------------------------------------------ 4. Общие блоки --- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.facts li { padding: 26px 24px; background: var(--paper); }
.facts b { display: block; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.facts span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

.wide-photo { margin-top: 56px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 7; box-shadow: var(--shadow); }
.wide-photo img { transition: transform .8s var(--ease); }
.wide-photo:hover img { transform: scale(1.03); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------- 5. Услуги и преимущества --- */
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 56px; }
.service {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--panel); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.service:hover { transform: translateY(-6px); border-color: rgba(245, 138, 22, .5); }
.service__media { aspect-ratio: 16 / 10; overflow: hidden; }
.service__media img { transition: transform .8s var(--ease); }
.service:hover .service__media img { transform: scale(1.05); }
.service__body { padding: 30px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.service__body small { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.service__body h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.service__body p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.service__features { display: grid; gap: 10px; margin-top: auto; padding-top: 8px; }
.service__features li { display: flex; gap: 10px; align-items: flex-start; color: #cdd7e2; font-size: 14px; line-height: 1.45; }
.service__features svg { width: 18px; height: 18px; margin-top: 2px; color: var(--orange); flex: none; }

.advantages__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.advantage {
  padding: 30px 28px;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: #fff;
}
.advantage__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: rgba(245, 138, 22, .14); color: #b4630b;
}
.advantage__icon svg { width: 26px; height: 26px; }
.advantage h3 { margin-top: 20px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.advantage p { margin-top: 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

/* Вкладки «работы и цены» */
.tabs { display: flex; gap: 8px; margin: 44px 0 0; flex-wrap: wrap; }
.tab {
  min-height: 50px; padding: 0 20px;
  border: 1px solid var(--line-dark); border-radius: 10px;
  background: transparent; color: #4f5b66;
  font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: all .2s var(--ease);
}
.tab:hover { border-color: var(--navy); }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.work-list { margin-top: 26px; border-top: 1px solid var(--line-dark); }
.work-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px; align-items: center;
  padding: 20px 4px; border-bottom: 1px solid var(--line-dark);
}
.work-row span { color: #8c949c; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.work-row strong { font-size: 16px; font-weight: 700; color: var(--ink); }
.work-row b { color: var(--ink); font-size: 14px; font-weight: 800; white-space: nowrap; }
.work-note { margin-top: 26px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

/* --------------------------------------------------- 6. Смета --- */
.estimate-head { display: grid; grid-template-columns: 1.15fr .6fr; gap: clamp(24px, 5vw, 70px); align-items: end; }
.estimate-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.estimate-meta span {
  min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px;
  border: 1px solid #c8c8c3; border-radius: 999px;
  color: #5b6570; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.estimate-toolbar {
  position: sticky; top: calc(var(--header-h) - 1px); z-index: 15;
  display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; gap: 10px;
  margin-top: 30px; padding: 12px; border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(242, 240, 234, .96); backdrop-filter: blur(10px);
}
.estimate-search {
  min-height: 52px; padding: 0 16px;
  border: 1px solid #c8c8c3; border-radius: 11px; background: #fff; color: var(--ink); outline: none;
  font-size: 15px;
}
.estimate-search:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 138, 22, .16); }
.estimate-filters { display: flex; gap: 6px; }
.estimate-filter, .estimate-toggle {
  min-height: 52px; padding: 0 16px;
  border: 1px solid #c8c8c3; border-radius: 11px; background: transparent;
  color: #4f5b66; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.estimate-filter.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.estimate-toggle { background: #fff; }

.estimate-list { display: grid; gap: 10px; margin-top: 16px; }
.estimate-group { overflow: hidden; border: 1px solid #cdccc6; border-radius: 15px; background: #f7f5ef; }
.estimate-group[hidden] { display: none; }
.estimate-group summary { min-height: 84px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto 26px; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.estimate-group summary::-webkit-details-marker { display: none; }
.estimate-group summary:hover { background: #f2efe7; }
.estimate-code { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--orange); font-size: 12px; font-weight: 900; }
.estimate-summary-copy { min-width: 0; }
.estimate-summary-copy strong { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.estimate-summary-copy small { display: block; margin-top: 6px; color: #7b848c; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.estimate-from { text-align: right; }
.estimate-from small { display: block; color: #8a9198; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.estimate-from b { display: block; margin-top: 5px; color: var(--ink); font-size: 14px; }
.estimate-chevron { width: 26px; height: 26px; position: relative; border: 1px solid #c4c5c1; border-radius: 50%; transition: transform .25s var(--ease); }
.estimate-chevron::before, .estimate-chevron::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 1px; background: var(--ink); transform: translate(-50%, -50%); }
.estimate-chevron::after { transform: translate(-50%, -50%) rotate(90deg); }
.estimate-group[open] .estimate-chevron { transform: rotate(45deg); border-color: var(--orange); }

.estimate-table { border-top: 1px solid #d4d3cd; }
.estimate-table-head, .estimate-row { display: grid; grid-template-columns: 34px minmax(240px, 1fr) 88px 110px 96px 120px; gap: 10px; align-items: center; }
.estimate-table-head { min-height: 42px; padding: 0 20px; background: #e5e3dd; color: #6f7880; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.estimate-row { min-height: 64px; padding: 10px 20px; border-top: 1px solid #dddcd6; }
.estimate-row[hidden] { display: none; }
.estimate-row.is-selected { background: #fff8ef; }
.estimate-check { width: 22px; height: 22px; accent-color: var(--orange); cursor: pointer; }
.estimate-name { font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.estimate-unit { color: #6f7880; font-size: 12px; }
.estimate-price, .estimate-line-total { text-align: right; font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--ink); }
.estimate-qty { width: 88px; min-height: 42px; padding: 0 8px; border: 1px solid #c9c9c4; border-radius: 9px; background: #fff; text-align: center; outline: none; }
.estimate-qty:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 138, 22, .16); }
.estimate-empty { display: none; padding: 50px 20px; text-align: center; color: #6f7880; }
.estimate-empty.is-visible { display: block; }

.estimate-basket {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  margin-top: 18px; padding: 20px 22px; border-radius: 16px;
  background: var(--navy); color: #fff; box-shadow: var(--shadow);
}
.estimate-basket small { display: block; color: #8fa0b3; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.estimate-basket strong { display: block; margin-top: 6px; color: var(--orange); font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.estimate-basket-info { color: #b8c3cf; font-size: 12px; }
.estimate-basket-actions { display: flex; gap: 8px; }
.estimate-disclaimer { margin: 18px 0 0; color: #6f7880; font-size: 12px; line-height: 1.7; }
.estimate-disclaimer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------- 7. Калькулятор --- */
.calculator { background: var(--orange); color: #111925; }
.calc-grid { display: grid; grid-template-columns: .65fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.calc-copy .label { color: #7b4d10; }
.calc-copy .label::before { background: #111925; }
.calc-copy .title { color: #111925; }
.calc-copy p { margin-top: 22px; color: #4a3a22; font-size: 15px; line-height: 1.7; }
.calc-panel { padding: clamp(20px, 3vw, 34px); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: 0 30px 70px rgba(90, 50, 5, .22); }
.calc-block + .calc-block { margin-top: 24px; }
.calc-block > label { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #6a737c; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calc-block > label strong { color: var(--ink); font-size: 15px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.choices button {
  min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line-dark); border-radius: 10px; background: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s var(--ease);
}
.choices button:hover { border-color: var(--navy); }
.choices button.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
input[type="range"] { width: 100%; margin-top: 14px; accent-color: var(--orange); height: 32px; }
.calc-options { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.calc-options label { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.calc-options select { min-height: 48px; padding: 0 12px; border: 1px solid var(--line-dark); border-radius: 10px; background: #fff; }
.calc-options input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--orange); }
.result { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin-top: 26px; padding: 22px; border-radius: 16px; background: var(--paper); }
.result small { display: block; color: #6f7880; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.result strong { display: block; margin-top: 8px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.result p { margin-top: 6px; color: var(--ink-soft); font-size: 13px; }
.result .locked { text-align: right; color: #8a9198; }
.result .locked b { display: block; margin: 6px 0; color: var(--ink); font-size: 20px; letter-spacing: .1em; }

/* Формы */
.form { display: grid; gap: 12px; margin-top: 24px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12px; font-weight: 700; color: #6a737c; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form textarea {
  min-height: 54px; padding: 14px 16px;
  border: 1px solid var(--line-dark); border-radius: 11px; background: #fff; color: var(--ink);
  font-size: 15px; outline: none; width: 100%;
}
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 138, 22, .16); }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 12px; font-weight: 600; min-height: 0; }
.consent { display: flex; gap: 11px; align-items: flex-start; margin-top: 4px; color: #5b6570; font-size: 12px; line-height: 1.55; }
.consent input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--orange); }
.consent a { text-decoration: underline; text-underline-offset: 2px; }
.form__note { margin-top: 10px; color: #7b838a; font-size: 12px; line-height: 1.6; }
.form__status { margin-top: 10px; font-size: 14px; font-weight: 700; }
.form__status[data-state="ok"] { color: #1f8b4d; }
.form__status[data-state="error"] { color: var(--danger); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------ 8. Портфолио, отзывы, FAQ --- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 52px; }
.project {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 16 / 11; border: 1px solid var(--line); cursor: zoom-in; background: var(--panel);
  padding: 0; text-align: left; width: 100%; display: block;
}
.project img { transition: transform .8s var(--ease); }
.project:hover img { transform: scale(1.05); }
.project__overlay {
  position: absolute; inset: auto 0 0 0; padding: 26px;
  background: linear-gradient(180deg, rgba(4, 14, 28, 0), rgba(4, 14, 28, .92));
}
.project__overlay small { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.project__overlay h3 { margin-top: 10px; font-size: clamp(18px, 2vw, 23px); font-weight: 800; color: #fff; }
.project__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.project__meta span { padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; font-size: 11px; color: #d5dde7; }
.reference { margin-top: 22px; color: var(--muted); font-size: 12px; }

.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.review { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.review__stars { display: flex; gap: 3px; color: var(--orange); }
.review__stars svg { width: 18px; height: 18px; }
.review p { color: #d3dbe5; font-size: 14px; line-height: 1.7; flex: 1; }
.review footer { border-top: 1px solid var(--line); padding-top: 14px; }
.review strong { display: block; font-size: 15px; font-weight: 800; }
.review small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 52px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.step { padding: 32px 26px; background: var(--paper); }
.step span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--orange); font-size: 13px; font-weight: 900; }
.step h3 { margin-top: 22px; font-size: 19px; font-weight: 800; color: var(--ink); }
.step p { margin-top: 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

.faq-list { display: grid; gap: 10px; margin-top: 44px; }
.faq-item { border: 1px solid var(--line-dark); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 18px 22px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #faf9f6; }
.faq-item .estimate-chevron { flex: none; }
.faq-item p { padding: 0 22px 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }

/* -------------------------------- 9. Контакты, футер, cookie --- */
.contact { position: relative; isolation: isolate; overflow: hidden; }
.contact__media { position: absolute; inset: 0; z-index: -2; }
.contact::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 18, 38, .98), rgba(5, 18, 38, .72)); }
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.contact-card { padding: clamp(22px, 3vw, 34px); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-dark); }
.contact-card h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; letter-spacing: -.02em; }
.contact-card > small { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.contact-links { display: grid; gap: 4px; margin-top: 22px; }
.contact-links a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; font-size: 16px; font-weight: 700; border-bottom: 1px solid #ececea; }
.contact-links a:last-child { border-bottom: 0; }
.contact-links svg { width: 20px; height: 20px; color: var(--orange); flex: none; }
.contact-links span { color: var(--ink-soft); font-size: 13px; font-weight: 500; margin-left: auto; }

.footer { padding: 70px 0 40px; border-top: 1px solid var(--line); background: var(--navy-deep); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; }
.footer h4 { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8794a5; }
.footer ul { display: grid; gap: 4px; margin-top: 16px; }
.footer li a, .footer li span { display: inline-flex; align-items: center; min-height: 40px; color: #cdd6e1; font-size: 14px; }
.footer li a:hover { color: var(--orange); }
.footer__req { margin-top: 16px; color: #8794a5; font-size: 13px; line-height: 1.8; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); color: #7b8899; font-size: 12px; line-height: 1.7; }

.mobile-dock { display: none; }

.cookie {
  position: fixed; left: 50%; bottom: 18px; z-index: 300;
  width: min(720px, calc(100vw - 24px)); transform: translateX(-50%);
  display: none; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(9, 26, 48, .97); box-shadow: var(--shadow-dark);
  backdrop-filter: blur(12px);
}
.cookie.is-visible { display: flex; }
.cookie p { flex: 1 1 320px; color: #cdd6e1; font-size: 13px; line-height: 1.6; }
.cookie a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.cookie__actions { display: flex; gap: 10px; flex: 0 0 auto; }

/* Модальное окно и уведомления */
.modal { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(3, 10, 20, .72); backdrop-filter: blur(6px); }
.modal.is-open { display: flex; }
.modal__box { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: clamp(22px, 4vw, 34px); border-radius: var(--radius-lg); background: #fff; color: var(--ink); box-shadow: var(--shadow-dark); }
.modal__box h3 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.modal__box p { margin-top: 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 11px; background: #fff; cursor: pointer; }
.modal__close svg { width: 20px; height: 20px; }

.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(3, 10, 20, .92); }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1200px, 96vw); max-height: 86vh; width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.lightbox figcaption { margin-top: 14px; color: #d5dde7; font-size: 14px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 500; transform: translate(-50%, 20px);
  padding: 15px 22px; border-radius: 12px; background: #0d2440; border: 1px solid var(--line);
  color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-dark);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Юридические страницы */
.doc { padding: calc(var(--header-h) + 60px) 0 90px; background: var(--paper); color: var(--ink); min-height: 100vh; }
.doc__inner { width: min(880px, calc(100vw - 40px)); margin-inline: auto; }
.doc h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.doc h2 { margin-top: 40px; font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; }
.doc h3 { margin-top: 26px; font-size: 17px; font-weight: 800; }
.doc p, .doc li { margin-top: 12px; color: #333e4a; font-size: 15px; line-height: 1.8; }
.doc ul, .doc ol { margin-top: 12px; padding-left: 22px; }
.doc ul li { list-style: disc; }
.doc ol li { list-style: decimal; }
.doc a { color: #a4620c; text-decoration: underline; text-underline-offset: 3px; }
.doc__meta { margin-top: 16px; color: #6f7880; font-size: 13px; }
.doc__back { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 26px; font-size: 14px; font-weight: 700; color: #4a5560; }
.doc table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { padding: 12px 14px; border: 1px solid var(--line-dark); text-align: left; vertical-align: top; }
.doc th { background: #e9e7e1; font-weight: 800; }

/* Страница 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.notfound__code { font-size: clamp(72px, 18vw, 180px); font-weight: 900; letter-spacing: -.06em; color: var(--orange); line-height: 1; }

/* ------------------------------------------------- 10. Адаптив --- */
@media (max-width: 1180px) {
  :root { --shell: min(100% - 48px, 1100px); }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1.2fr; }
  .footer__grid > :last-child { grid-column: 1 / -1; }
  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --shell: min(100% - 40px, 920px); --header-h: 70px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; z-index: 99;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 20px 26px;
    background: rgba(5, 17, 34, .99); border-bottom: 1px solid var(--line);
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { min-height: 56px; display: flex; align-items: center; padding: 0 14px; font-size: 16px; }
  .burger { display: inline-flex; }
  .header__phone { display: none; }
  .split { grid-template-columns: 1fr; align-items: start; }
  .services__grid, .portfolio-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .steps, .facts { grid-template-columns: repeat(2, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero__points ul { grid-template-columns: repeat(2, 1fr); }
  .hero__points li { padding: 14px 16px 14px 0; font-size: 12px; }
  .estimate-head { grid-template-columns: 1fr; }
  .estimate-toolbar { grid-template-columns: 1fr; }
  .estimate-filters { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .estimate-filters::-webkit-scrollbar { display: none; }
  .estimate-table-head, .estimate-row { grid-template-columns: 34px minmax(200px, 1fr) 78px 100px 88px 110px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --shell: calc(100vw - 32px); }
  body { padding-bottom: 76px; font-size: 15px; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 42px) 0 120px; }
  .hero__media img { object-position: 62% center; }
  .hero h1 { font-size: clamp(29px, 7.6vw, 40px); max-width: none; }
  .hero__lead { font-size: 15px; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__points ul { grid-template-columns: 1fr 1fr; }
  .hero__points li { gap: 9px; padding: 12px 10px 12px 0; font-size: 11.5px; }
  .facts, .steps { grid-template-columns: 1fr; }
  .advantages__grid { grid-template-columns: 1fr; }
  .wide-photo { aspect-ratio: 4 / 3; }
  .service__body { padding: 22px; }
  .tabs { margin-inline: -16px; padding-inline: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .work-row { grid-template-columns: 34px minmax(0, 1fr); row-gap: 6px; padding: 16px 2px; }
  .work-row b { grid-column: 2; font-size: 13px; color: #5b6570; }
  .work-row strong { font-size: 15px; }

  .estimate-toolbar { position: static; padding: 10px; }
  .estimate-group summary { min-height: 78px; grid-template-columns: 42px minmax(0, 1fr) 24px; gap: 12px; padding: 14px; }
  .estimate-summary-copy strong { font-size: 15px; }
  .estimate-summary-copy small { font-size: 10px; }
  .estimate-from { grid-column: 2; grid-row: 2; text-align: left; margin-top: -6px; }
  .estimate-from small { display: none; }
  .estimate-from b { font-size: 12px; color: #626d76; }
  .estimate-chevron { grid-column: 3; grid-row: 1 / 3; }
  .estimate-table-head { display: none; }
  .estimate-row { min-height: auto; grid-template-columns: 26px minmax(0, 1fr) 84px; gap: 8px 10px; padding: 15px 13px; }
  .estimate-check { grid-column: 1; grid-row: 1 / 3; }
  .estimate-name { grid-column: 2 / 4; font-size: 13px; }
  .estimate-unit { grid-column: 2; font-size: 11px; }
  .estimate-price { grid-column: 3; }
  .estimate-qty { grid-column: 2; width: 82px; min-height: 40px; }
  .estimate-line-total { grid-column: 3; }
  .estimate-basket { position: sticky; bottom: 84px; z-index: 20; grid-template-columns: 1fr auto; padding: 15px; }
  .estimate-basket-info { grid-column: 1 / -1; font-size: 11px; }
  .estimate-basket-actions { grid-column: 1 / -1; }
  .estimate-basket-actions .btn { flex: 1; }

  .result { grid-template-columns: 1fr; }
  .result .locked { text-align: left; border-top: 1px dashed var(--line-dark); padding-top: 14px; }
  .footer { padding: 54px 0 30px; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .cookie { bottom: 82px; padding: 16px; }
  .cookie__actions { width: 100%; }
  .cookie__actions .btn { flex: 1; }

  .mobile-dock {
    position: fixed; inset: auto 10px max(10px, env(safe-area-inset-bottom)); z-index: 90;
    display: grid; grid-template-columns: 1fr 60px 60px; gap: 8px;
  }
  .mobile-dock a {
    min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 14px; background: var(--orange); color: #10192a;
    font-size: 14px; font-weight: 800; box-shadow: 0 16px 34px rgba(4, 14, 28, .45);
  }
  .mobile-dock a.is-secondary { background: #0f2743; color: #fff; border: 1px solid var(--line); }
  .mobile-dock svg { width: 22px; height: 22px; }
}

@media (max-width: 380px) {
  :root { --shell: calc(100vw - 26px); }
  .brand small { display: none; }
  .hero h1 { font-size: 29px; }
  .title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .intro { display: none; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .mobile-dock, .cookie, .intro, .hero__points, .estimate-toolbar, .btn, .modal, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 20px 0; }
}

/* ------------------------------------------- служебные утилиты --- */
/* Строгая политика безопасности (CSP) запрещает style="" в разметке,
   поэтому все точечные отступы вынесены в классы. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ta-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-18 { margin-top: 18px; }
.mt-22 { margin-top: 22px; }
.mt-26 { margin-top: 26px; }
.mt-32 { margin-top: 32px; }
.mt-36 { margin-top: 36px; }
.ml-10 { margin-left: 10px; }
.measure { margin: 18px auto 0; max-width: 52ch; }
