/* ==========================================================================
   parovoy-kotel.ru — основные стили
   Критический CSS (переменные, reset, header, hero) продублирован инлайном
   в <head> каждой страницы. Этот файл грузится асинхронно.
   ========================================================================== */

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--tint { background: var(--bg-2); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .section__lead { color: #a8b5c2; }
.section--dark h2 { color: #fff; }

.section__head { max-width: 760px; margin-bottom: 36px; }
.section__lead { margin-top: 12px; color: var(--steel); font-size: 17px; line-height: 1.6; }

h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; color: var(--ink); }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section--dark .eyebrow { color: #ff6b6b; }

/* ---------- Карточки серий ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  border: 1px solid var(--line);
  background: #fff;
  display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--steel); transform: translateY(-2px); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__stub {
  position: relative; aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(140deg, #16212c 0%, #0f1720 55%, #182533 100%);
  color: #fff; padding: 22px; overflow: hidden;
}
.card__stub::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 22px);
}
.card__stub::after {
  content: ""; position: absolute; left: 22px; bottom: 0; width: 44px; height: 3px; background: var(--accent);
}
.card__stub b {
  position: relative; font-size: clamp(24px, 2.6vw, 30px);
  letter-spacing: -0.03em; line-height: 1.05;
}
.card__stub .stub-range {
  position: relative; font-size: 15px; color: #b9c6d3;
  margin-top: 8px; font-variant-numeric: tabular-nums;
}
.card__stub .stub-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: #8fa0b1; border: 1px solid #2e3d4c; padding: 4px 8px;
}
.card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.card__sub { font-size: 13px; color: var(--steel); margin-bottom: 12px; }
.card__specs { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.card__specs li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--bg-2); }
.card__specs dt, .card__specs .k { color: var(--steel); }
.card__specs .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.card__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card__vd { flex-direction: column; align-items: stretch; gap: 3px !important; font-size: 12.5px; color: var(--steel); line-height: 1.4; }
.card__vd span { display: block; }

/* ---------- Таблица ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.tablewrap::-webkit-scrollbar { height: 8px; }
.tablewrap::-webkit-scrollbar-thumb { background: var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
thead th {
  background: var(--bg-2); font-size: 13px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--steel); white-space: nowrap;
}
thead th[data-sort] { cursor: pointer; user-select: none; }
thead th[data-sort]:hover { color: var(--ink); }
thead th[data-sort]::after { content: "↕"; opacity: .35; margin-left: 6px; font-size: 11px; }
thead th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--accent); }
thead th[aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--accent); }
tbody tr:hover { background: #fafbfc; }
td.num { font-variant-numeric: tabular-nums; }
.t-hint { font-size: 13px; color: var(--steel); margin-top: 10px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line); background: #fff; padding: 7px 14px;
  font: inherit; font-size: 14px; color: var(--steel); cursor: pointer;
  transition: all .12s;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip:hover:not([aria-pressed="true"]) { border-color: var(--steel); color: var(--ink); }

/* ---------- Цена / факторы ---------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.factors { list-style: none; padding: 0; margin: 0; counter-reset: f; }
.factors li {
  counter-increment: f;
  position: relative; padding: 12px 0 12px 42px;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.factors li::before {
  content: counter(f, decimal-leading-zero);
  position: absolute; left: 0; top: 13px;
  font-size: 13px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.panel { background: var(--bg-2); border: 1px solid var(--line); padding: 24px; }
.panel h3 { margin-bottom: 14px; }
.panel ul { margin: 0; padding-left: 20px; font-size: 15px; }
.panel li { margin-bottom: 8px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Отрасли ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: #fff; padding: 24px; }
.tile svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 12px; }
.tile h3 { font-size: 17px; }
.tile p { font-size: 14px; color: var(--steel); line-height: 1.55; margin: 0; }

/* ---------- Кейсы ---------- */
.cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.case { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.case__img { aspect-ratio: 3 / 2; overflow: hidden; cursor: zoom-in; background: var(--bg-2); }
.case__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.case__img:hover img { transform: scale(1.04); }
.case__body { padding: 14px 16px 16px; }
.case__region { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.case__name { font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.case__eq { font-size: 13px; color: var(--steel); line-height: 1.5; }
.case__kpi { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Процесс ---------- */
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.step { position: relative; padding: 0 14px 0 0; }
.step__n {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; margin-bottom: 14px; position: relative; z-index: 1;
}
.step::after {
  content: ""; position: absolute; left: 34px; top: 17px; right: 0;
  height: 1px; background: var(--line);
}
.step:last-child::after { display: none; }
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--steel); line-height: 1.5; margin: 0; }
.section--dark .step h3 { color: #fff; }
.section--dark .step p { color: #98a6b5; }
.section--dark .step::after { background: #2b3947; }

/* ---------- Гео ---------- */
.geo { display: flex; flex-wrap: wrap; gap: 10px; }
.geo span {
  border: 1px solid var(--line); background: #fff;
  padding: 9px 16px; font-size: 15px;
}
.geo span b { font-weight: 700; }
.section--dark .geo span { background: var(--ink-2); border-color: #2b3947; color: #dfe6ec; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 18px 40px 18px 0; cursor: pointer; position: relative;
  font-weight: 600; font-size: 17px; line-height: 1.4; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq__a { padding: 0 40px 20px 0; color: var(--steel); font-size: 16px; line-height: 1.65; }

/* ---------- Форма ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--steel); margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { min-height: 96px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--steel); line-height: 1.5; }
.consent input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { padding: 14px 16px; font-size: 15px; display: none; }
.form__msg.ok { display: block; background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }
.form__msg.err { display: block; background: #ffebee; border: 1px solid #ef9a9a; color: #b71c1c; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.contact-item { border-left: 2px solid var(--accent); padding-left: 16px; }
.contact-item .k { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--steel); margin-bottom: 6px; }
.contact-item .v { font-size: 19px; font-weight: 700; }
.contact-item .v a { color: var(--ink); text-decoration: none; }
.contact-item .v a:hover { color: var(--accent); }
.contact-item small { display: block; font-size: 13px; color: var(--steel); margin-top: 4px; font-weight: 400; }

/* ---------- Лайтбокс ---------- */
.lb {
  position: fixed; inset: 0; background: rgba(10,15,20,.94);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px;
}
.lb[open], .lb.on { display: flex; }
.lb img { max-width: 94vw; max-height: 82vh; object-fit: contain; }
.lb__cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #cfd8e0; font-size: 14px; padding: 0 24px; }
.lb__x {
  position: absolute; top: 20px; right: 24px; width: 40px; height: 40px;
  background: none; border: 1px solid #445; color: #fff; font-size: 22px; cursor: pointer; line-height: 1;
}
.lb__x:hover { border-color: #fff; }

/* ---------- Футер ---------- */
.footer { background: var(--ink); color: #93a2b1; padding: 56px 0 28px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer h4 { color: #fff; font-size: 14px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .05em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: #93a2b1; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid #22303d; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #6d7e8f;
}
.footer__brand { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 10px; }

/* ---------- Плавающие ---------- */
.totop {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  display: none; align-items: center; justify-content: center; z-index: 90;
}
.totop.on { display: flex; }
.totop:hover { background: var(--accent); }
.msg-widget { position: fixed; right: 20px; bottom: 78px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.msg-widget a {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.msg-widget svg { width: 22px; height: 22px; }
.msg-wa { background: #25d366; }
.msg-tg { background: #2aabee; }
.sticky-cta { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .cards, .cases { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .step:nth-child(4)::after { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .section { padding: 44px 0; }
  .calc__grid, .split { grid-template-columns: 1fr; gap: 24px; }
  .calc__out { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 22px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: 1fr; gap: 18px; }
  .form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cards, .cases, .tiles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .calc { padding: 18px; }
  .msg-widget { bottom: 130px; right: 12px; gap: 6px; }
  .msg-widget a { width: 40px; height: 40px; }
  .msg-widget svg { width: 19px; height: 19px; }
  .totop { bottom: 72px; right: 12px; width: 40px; height: 40px; }
  .prose table th { width: auto !important; }
  .prose th, .prose td { overflow-wrap: anywhere; }
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--accent); color: #fff; text-align: center;
    padding: 15px; font-weight: 700; font-size: 16px; text-decoration: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,.14);
  }
  body { padding-bottom: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .case__img:hover img { transform: none; }
}

/* ==========================================================================
   Внутренние страницы
   ========================================================================== */

.crumbs { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 0; }
.crumbs li { color: var(--steel); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--steel); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.pagehead { padding: 40px 0 8px; }
.pagehead h1 {
  font-size: clamp(26px, 3.8vw, 40px); line-height: 1.12;
  letter-spacing: -.03em; margin: 0 0 18px; max-width: 22ch;
}
.pagehead .lead { font-size: 18px; color: var(--steel); max-width: 68ch; margin: 0 0 26px; }

.spec-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px;
}
.spec-grid > div { background: #fff; padding: 18px 20px; }
.spec-grid .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--steel); margin-bottom: 6px; }
.spec-grid .v { font-size: 19px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }

.prose { max-width: 76ch; font-size: 16px; line-height: 1.7; }
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose table { min-width: 0; }
.prose--wide { max-width: none; }

.tabs { border-bottom: 1px solid var(--line); display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid transparent; border-bottom: 0; background: transparent;
  font: inherit; font-size: 15px; padding: 12px 18px; cursor: pointer; color: var(--steel);
  margin-bottom: -1px;
}
.tabs button[aria-selected="true"] {
  background: #fff; border-color: var(--line); color: var(--ink); font-weight: 600;
}
.tabs button:hover:not([aria-selected="true"]) { color: var(--ink); }
.tabpanel[hidden] { display: none; }

.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related a {
  border: 1px solid var(--line); background: #fff; padding: 16px 18px;
  text-decoration: none; color: var(--ink); transition: border-color .15s;
}
.related a:hover { border-color: var(--accent); }
.related b { display: block; font-size: 16px; margin-bottom: 4px; }
.related span { font-size: 13px; color: var(--steel); }

.caselist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.note {
  border-left: 3px solid var(--accent); background: var(--bg-2);
  padding: 16px 20px; font-size: 15px; margin: 24px 0;
}

@media (max-width: 1080px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: repeat(2, 1fr); }
  .caselist { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .spec-grid, .related, .caselist { grid-template-columns: 1fr; }
  .pagehead { padding: 24px 0 4px; }
}
