/* Металлайн — прототип нового сайта. Трек «сайт», задача 701.
   Регистр: светлый минимализм, акцент — золото из логотипа. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f6;
  --ink: #202020;
  --ink-soft: #5a5a5a;
  /* сталь затемнена: прежний #6e7378 давал 4.43:1 на сером — ниже порога AA 4.5:1 */
  --steel: #696e73;
  --line: #e4e4e4;
  /* золото живёт в двух ролях: декор (линии, заливки, схемы) и текст.
     Декоративное — исходное; текстовое затемнено до 4.9:1 на белом, иначе
     стандарты и номера договоров, набранные золотом 12–13px, нечитаемы. */
  --gold: #c8a02a;
  --gold-text: #8a6d16;
  --gold-soft: #f3ead2;

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shell: clamp(20px, 5vw, 96px);
  --maxw: 1440px;
}

html.font-golos { --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif; }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ——— инерционный скролл ——— */
#spacer { display: none; }
body.is-smooth #spacer { display: block; }
body.is-smooth #content {
  position: fixed; top: 0; left: 0; width: 100%;
  will-change: transform;
}

/* ——— шапка ——— */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 22px var(--shell);
  mix-blend-mode: difference;
  color: #fff;
}
.hdr a { color: #fff; }
.hdr__logo { font-weight: 700; letter-spacing: 0.16em; font-size: 15px; }
.hdr__nav { display: flex; gap: 34px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.hdr__nav a { position: relative; padding-bottom: 3px; }
.hdr__nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: currentColor; transition: right .45s cubic-bezier(.16,1,.3,1);
}
.hdr__nav a:hover::after { right: 0; }
.hdr__tel { font-size: 13px; letter-spacing: 0.06em; }
@media (max-width: 860px) { .hdr__nav, .hdr__tel { display: none; } }

/* ——— бургер и мобильное меню ——— */
.burger { display: none; }
@media (max-width: 860px) {
  .burger {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 6px;
    width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0;
    background: transparent; border: 0; cursor: pointer;
    /* button не наследует color сам по себе — без этого полоски чёрные
       и на тёмной шапке с mix-blend-mode:difference становятся невидимыми */
    color: inherit;
  }
  .burger span { display: block; height: 2px; width: 26px; background: currentColor; transition: transform .35s, opacity .25s; }
  body.mnav-open .burger span:first-child  { transform: translateY(8px) rotate(45deg); }
  body.mnav-open .burger span:nth-child(2) { opacity: 0; }
  body.mnav-open .burger span:last-child   { transform: translateY(-8px) rotate(-45deg); }
}

.mnav {
  position: fixed; inset: 0; z-index: 55; background: var(--ink);
  display: grid; place-items: center; padding: 90px var(--shell) 40px;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
body.mnav-open .mnav { opacity: 1; visibility: visible; }
body.mnav-open { overflow: hidden; }
body.mnav-open .hdr { mix-blend-mode: normal; color: #fff; }
.mnav__list { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 420px; }
.mnav__list a {
  color: #fff; font-size: clamp(26px, 7vw, 38px); letter-spacing: -.03em;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14);
}
.mnav__list a.mnav__temp { font-size: 19px; color: #b6b6b6; }
.mnav__list a.mnav__tel { font-size: 20px; color: var(--gold); border-bottom: 0; margin-top: 22px; }
@media (min-width: 861px) { .mnav { display: none; } }

/* ——— общие блоки ——— */
.sec { padding: clamp(80px, 12vh, 170px) var(--shell); max-width: var(--maxw); margin: 0 auto; }
.sec--alt { background: var(--bg-alt); max-width: none; }
.sec--alt > .inner { max-width: var(--maxw); margin: 0 auto; }

.tag {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 26px; display: block;
}
.lead { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.15; max-width: 20ch; letter-spacing: -0.025em; }
.note { color: var(--ink-soft); max-width: 62ch; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px; border: 1px solid var(--ink); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--gold { border-color: var(--gold-text); color: var(--gold-text); }
.btn--gold:hover { background: var(--gold-text); border-color: var(--gold-text); color: #fff; }

/* видимый фокус для всей клавиатурной навигации: поля, чипы, плитки, кнопки */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .cta :focus-visible, .mnav :focus-visible { outline-color: #fff; }

/* ——— появление секций ———
   Прячем только когда скрипт жив: без него страница должна остаться читаемой. */
.rise { opacity: 1; }
html.js .rise { opacity: 0; transform: translateY(34px); transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); }
/* селектор обязан быть не менее специфичным, чем html.js .rise, иначе
   класс .in навешивается, а прозрачность остаётся нулевой — текст пропадает */
html.js .rise.in { opacity: 1; transform: none; }
.rise-d1 { transition-delay: .08s; } .rise-d2 { transition-delay: .16s; } .rise-d3 { transition-delay: .24s; }

.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.6s cubic-bezier(.16,1,.3,1); }
.in .draw, .draw.in { stroke-dashoffset: 0; }

/* ——— hero ——— */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 var(--shell) clamp(40px, 7vh, 90px);
  background: var(--ink); color: #fff; overflow: hidden;
}
.hero__art { position: absolute; inset: 0; display: grid; place-items: center; opacity: .5; }
.hero__art svg { width: min(78vw, 900px); height: auto; }
.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero__title {
  /* размер подбирается скриптом под ширину контейнера: у Onest и Golos Text
     разная ширина знака, фиксированный vw не садится ни там, ни там */
  font-size: clamp(40px, 13vw, 230px); font-weight: 500; line-height: .86;
  letter-spacing: -0.045em; margin-bottom: 30px;
  display: inline-block; white-space: nowrap; max-width: 100%;
}
.hero__title span { display: inline-block; opacity: 0; transform: translateY(.5em); }
.hero__title span.in { opacity: 1; transform: none; transition: opacity .8s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.hero__sub { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.hero__sub p { max-width: 46ch; color: #d5d5d5; margin: 0; }
.hero__scroll { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #8d8d8d; }

/* ——— счётчики ——— */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
@media (max-width: 900px) { .counters { grid-template-columns: repeat(2, 1fr); } }
.counter { border-top: 1px solid var(--line); padding-top: 22px; }
.counter__num { font-size: clamp(50px, 7vw, 104px); line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.counter__unit { color: var(--gold-text); }
.counter__label { color: var(--steel); font-size: 15px; margin-top: 12px; max-width: 22ch; }

.odo { display: inline-flex; }
.odo-d { display: inline-block; height: 1em; overflow: hidden; }
.odo-r { display: flex; flex-direction: column; transition: transform 1.3s cubic-bezier(.16,1,.3,1); }
.odo-r span { height: 1em; line-height: 1; }
.odo-s { display: inline-block; }

/* ——— каталог плашками: изображение проявляется внутри своей плитки ——— */
.cat { position: relative; }

.cat__grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
@media (max-width: 1180px) { .cat__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .cat__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .cat__grid { grid-template-columns: 1fr; } }

.cat__tile {
  position: relative; overflow: hidden;
  background: var(--bg-alt); padding: 26px 24px 30px;
  display: flex; flex-direction: column; gap: 12px; min-height: 210px;
  transition: background .35s ease, color .35s ease;
}
/* иконка живёт внутри своей плитки и всплывает на тёмной заливке при наведении */
.cat__art {
  position: absolute; right: -6px; bottom: 4px; width: 56%;
  color: var(--gold); pointer-events: none;
  opacity: 0; transform: translateY(14px) scale(.94);
  transition: opacity .45s ease, transform .65s cubic-bezier(.16,1,.3,1);
}
.cat__art svg { width: 100%; height: auto; display: block; }
.cat__tile:hover .cat__art,
.cat__tile:focus-visible .cat__art { opacity: .9; transform: none; }
.cat__idx, .cat__name, .cat__meta { position: relative; z-index: 1; }
.sec--alt .cat__tile { background: var(--bg); }
.cat__tile:hover { background: var(--ink); color: #fff; }
.cat__idx { font-size: 12px; letter-spacing: .14em; color: var(--gold-text); }
.cat__name { font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -.02em; line-height: 1.15; }
.cat__meta { font-size: 13px; color: var(--steel); margin-top: auto; }
.cat__tile:hover .cat__meta { color: #b9b9b9; }

/* ——— отрасли (бывшие «Наши решения»): карточка раскрывается, соседние сжимаются ——— */
.ind {
  margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  transition: grid-template-columns .75s cubic-bezier(.16,1,.3,1);
}
.ind__cell { background: var(--bg); overflow: hidden; min-height: 240px; display: flex; flex-direction: column; }
.ind__cell:hover { background: var(--bg-alt); }
.ind__cell.on { background: var(--bg-alt); }

.ind__head {
  position: relative; appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; color: inherit; font: inherit; text-align: left;
  cursor: pointer; width: 100%; flex: 1;
  padding: 32px 30px; display: flex; flex-direction: column; gap: 12px;
}
.ind__num { font-size: 12px; letter-spacing: .14em; color: var(--gold-text); }
.ind__title { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.02em; line-height: 1.12; }
.ind__lead { font-size: 15px; color: var(--ink-soft); max-width: 34ch; }
.ind__std { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--gold-text); border-top: 1px solid var(--line); }
.ind__more { position: absolute; right: 26px; top: 28px; line-height: 1; }
.ind__more::after { content: '+'; font-size: 24px; color: var(--gold-text); }
.ind__cell.on .ind__more::after { content: '–'; }

.ind__body { display: none; padding: 0 30px 36px; }
.ind__cell.on .ind__body { display: block; }
.ind__cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; }
/* без этого колонка растягивается под min-width таблицы и текст обрезается карточкой */
.ind__cols > *, .split > * { min-width: 0; }
.ind__cols p { color: var(--ink-soft); font-size: 16px; margin: 0; max-width: 62ch; }
.ind__list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; font-size: 15px; color: var(--ink-soft); }
.ind__list li { position: relative; padding-left: 18px; }
.ind__list li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 1px; background: var(--gold); }
.ind__note { font-size: 13px; color: var(--steel); margin-top: 20px; }

/* соседние карточки, когда одна раскрыта */
.ind.is-open .ind__cell:not(.on) .ind__head { padding: 28px 0; align-items: center; gap: 20px; }
.ind.is-open .ind__cell:not(.on) .ind__lead,
.ind.is-open .ind__cell:not(.on) .ind__std,
.ind.is-open .ind__cell:not(.on) .ind__more { display: none; }
.ind.is-open .ind__cell:not(.on) .ind__title { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }

@media (max-width: 900px) {
  /* на телефоне — обычная гармошка, без вертикальных корешков */
  .ind { grid-template-columns: 1fr !important; }
  .ind__cell { min-height: 0; }
  .ind__cols { grid-template-columns: 1fr; gap: 30px; }
  .ind.is-open .ind__cell:not(.on) .ind__head { padding: 26px 24px; align-items: flex-start; gap: 12px; }
  .ind.is-open .ind__cell:not(.on) .ind__title { writing-mode: horizontal-tb; transform: none; white-space: normal; }
  .ind.is-open .ind__cell:not(.on) .ind__lead,
  .ind.is-open .ind__cell:not(.on) .ind__more { display: block; }
  .ind__head { padding: 26px 24px; }
  .ind__body { padding: 0 24px 30px; }
}

/* ——— география ——— */
.geo__axis { margin: 60px 0 34px; }
.geo__points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
@media (max-width: 860px) { .geo__points { grid-template-columns: 1fr; } }
.geo__pt { border-top: 1px solid var(--line); padding-top: 20px; }
.geo__pt b { display: block; font-weight: 500; font-size: 21px; letter-spacing: -.02em; }
.geo__pt span { color: var(--steel); font-size: 15px; }
.geo__pt em { display: block; margin-top: 10px; font-style: normal; font-size: 13px; color: var(--gold-text); }

/* ——— доказательства ——— */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr; } }
.trust__cell { background: var(--bg); padding: 38px 32px; }
.trust__cell h3 { font-size: 20px; margin-bottom: 14px; }
.trust__cell p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.trust__std { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.trust__std li {
  font-size: 13px; letter-spacing: .04em; padding: 8px 14px;
  border: 1px solid var(--line); color: var(--steel);
}

/* ——— логистика ——— */
.chain { margin: 50px 0 40px; }

/* импульс, бегущий по линии поставки */
@keyframes chain-run { from { stroke-dashoffset: 1034; } to { stroke-dashoffset: 0; } }
.chain__flow { animation: chain-run 4.5s linear infinite; }
/* Узлы проявляются по очереди. Анимируем ТОЛЬКО прозрачность: позиция задана
   атрибутом transform="translate(...)", и CSS-трансформация его бы перебила. */
/* по умолчанию видимы: если скрипт не отработает, схема всё равно на месте */
.chain__node { opacity: 1; }
.in .chain__node { animation: chain-node .7s ease both; }
@keyframes chain-node { from { opacity: 0; } to { opacity: 1; } }
.in .chain__node:nth-of-type(1) { animation-delay: .05s; }
.in .chain__node:nth-of-type(2) { animation-delay: .18s; }
.in .chain__node:nth-of-type(3) { animation-delay: .31s; }
.in .chain__node:nth-of-type(4) { animation-delay: .44s; }
.in .chain__node:nth-of-type(5) { animation-delay: .57s; }
@media (prefers-reduced-motion: reduce) {
  .chain__flow { animation: none; }
  .chain__node { opacity: 1; transform: none; }
  .in .chain__node { animation: none; }
  /* пользователь отказался от движения — гасим и появление секций,
     и выезд букв героя, и дорисовку линий, а не только цепочку */
  html.js .rise, .hero__title span, .draw { transition: none; }
  html.js .rise { opacity: 1; transform: none; }
  .hero__title span { opacity: 1; transform: none; }
  .ind { transition: none; }
}

.chain__list { display: none; }
@media (max-width: 900px) {
  .chain svg { display: none; }
  .chain__list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
  .chain__list li { background: var(--bg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
  .chain__list b { font-weight: 500; }
  .chain__list span { font-size: 14px; color: var(--gold-text); }
}
.log__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 60px; }
@media (max-width: 860px) { .log__grid { grid-template-columns: 1fr; } }
.log__item { border-top: 1px solid var(--line); padding-top: 18px; }
.log__item b { font-weight: 500; }
.log__item p { color: var(--ink-soft); font-size: 15px; margin: 8px 0 0; }

/* ——— CTA + подвал ——— */
.cta { background: var(--ink); color: #fff; }
.cta .lead { max-width: 24ch; }
.cta__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.cta a.btn { border-color: #fff; color: #fff; }
.cta a.btn:hover { background: #fff; color: var(--ink); }

.foot { padding: 46px var(--shell); border-top: 1px solid var(--line); }
.foot__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; font-size: 14px; color: var(--steel); }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr; } }
.foot b { color: var(--ink); font-weight: 500; display: block; margin-bottom: 8px; }

/* ——— внутренние страницы ——— */
.page-top { padding: 150px var(--shell) 0; max-width: var(--maxw); margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--steel); margin-bottom: 26px; }
.crumbs a:hover { color: var(--gold); }
.page-title {
  font-size: clamp(38px, 6vw, 86px); letter-spacing: -.04em; line-height: .98;
  /* длинные термины вроде «нефтеперерабатывающий» иначе распирают страницу на телефоне */
  hyphens: auto; overflow-wrap: anywhere;
}
@media (max-width: 600px) { .page-title { font-size: clamp(28px, 7.6vw, 44px); } }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

table.spec { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.spec th, table.spec td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.spec th { font-weight: 500; color: var(--steel); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
table.spec tr:hover td { background: var(--bg-alt); }

.kv { border-top: 1px solid var(--line); }
.kv div { display: flex; justify-content: space-between; gap: 24px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv span:first-child { color: var(--steel); flex: none; }
.kv span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .kv div { flex-direction: column; gap: 5px; }
  .kv span:last-child { text-align: left; }
}

/* широкие таблицы прокручиваются внутри себя, а не растягивают страницу */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table.spec { min-width: 520px; }

.card-art { background: var(--bg-alt); border: 1px solid var(--line); display: grid; place-items: center; padding: 40px; }
.card-art svg { width: 100%; max-width: 380px; height: auto; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }
.gallery > div { background: var(--bg-alt); border: 1px solid var(--line); aspect-ratio: 4/3; display: grid; place-items: center; padding: 24px; }
.gallery svg { width: 80%; height: auto; }
.gallery figcaption { font-size: 12px; color: var(--steel); margin-top: 8px; }

/* ——— калькулятор ——— */
.calc { display: grid; grid-template-columns: 1.25fr .75fr; gap: 64px; align-items: start; }
@media (max-width: 960px) { .calc { grid-template-columns: 1fr; gap: 44px; } }
.calc__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.calc__row:has(> :only-child) { grid-template-columns: 1fr; }
@media (max-width: 620px) { .calc__row { grid-template-columns: 1fr; } }
.calc__field { display: flex; flex-direction: column; gap: 8px; }
.calc__field span { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); }
.calc__field input, .calc__field select {
  font: inherit; font-family: var(--font); color: var(--ink); font-variant-numeric: tabular-nums;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 11px 2px; outline: none; transition: border-color .3s;
}
.calc__field input:focus, .calc__field select:focus { border-color: var(--gold); }
.calc__hint { font-size: 14px; color: var(--steel); margin: 12px 0 0; }
.calc__radios { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 34px; font-size: 15px; }
.calc__radios label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
/* параметры отгрузки: раскрыты и на подложке, иначе теряются в общем потоке полей */
.calc__params { margin-top: 46px; background: var(--bg-alt); border: 1px solid var(--line); padding: 28px 26px 30px; }
.calc__params .tag { margin-bottom: 6px; }
.calc__params .calc__field input { background: var(--bg); padding-left: 12px; padding-right: 12px; }

.calc__money { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.calc__sum { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.03em; margin: 8px 0 20px; font-variant-numeric: tabular-nums; color: var(--gold-text); }
.calc__out { background: var(--bg-alt); border: 1px solid var(--line); padding: 34px 30px; position: sticky; top: 100px; }
body.is-smooth .calc__out { position: static; }
.calc__big { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -.03em; line-height: 1.05; margin-top: 8px; font-variant-numeric: tabular-nums; }
.calc__out .kv div { font-variant-numeric: tabular-nums; }
.calc__note { font-size: 13px; color: var(--steel); margin: 26px 0 0; }

/* ——— каталог: подбор ——— */
.finder { background: var(--bg-alt); border: 1px solid var(--line); padding: 30px 28px 26px; }
.finder__search { display: flex; flex-direction: column; gap: 10px; }
.finder__search span { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.finder__search input {
  font: inherit; font-family: var(--font); font-size: clamp(18px, 2vw, 24px); color: var(--ink);
  border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 12px 2px; outline: none;
}
.finder__search input:focus { border-color: var(--gold); }
.finder__row { display: flex; align-items: baseline; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.finder__label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); min-width: 84px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-family: var(--font); font-size: 13px; cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--line);
  background: var(--bg); color: var(--steel); transition: .25s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.finder__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--steel); }
/* отрицательный margin компенсирует padding: цель для пальца растёт, вёрстка не едет */
.finder__reset { font: inherit; font-family: var(--font); background: transparent; border: 0; color: var(--gold-text); cursor: pointer; padding: 12px 10px; margin: -12px -10px; }
@media (pointer: coarse) { .chip { padding: 11px 16px; } }
.finder__hint { margin: 16px 0 0; font-size: 14px; color: var(--steel); }
.finder__hint a { color: var(--gold-text); border-bottom: 1px solid transparent; }
.finder__hint a:hover { border-color: var(--gold); }

.pgrid { margin-top: 34px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1180px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .pgrid { grid-template-columns: 1fr; } }
.pgrid > .note { grid-column: 1 / -1; background: var(--bg); padding: 34px 28px; margin: 0; }

.pcard {
  background: var(--bg); padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 10px;
  min-height: 250px; transition: background .35s, color .35s;
}
.pcard:hover { background: var(--ink); color: #fff; }
.pcard__icon { color: var(--gold); display: block; }
.pcard__icon svg { width: 84px; height: auto; }
.pcard__name { font-size: 18px; letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; }
.pcard__std { font-size: 13px; color: var(--gold-text); }
.pcard__sizes { font-size: 13px; color: var(--steel); margin-top: auto; }
.pcard:hover .pcard__sizes { color: #b9b9b9; }
.pcard__hit { font-size: 12px; color: var(--ink); background: var(--gold-soft); padding: 6px 10px; margin-top: 10px; }
.pcard:hover .pcard__hit { color: var(--ink); }
.pgrid--sm .pcard, .pcard--sm { min-height: 180px; }

/* ——— проекты ——— */
.finder__tools { display: flex; align-items: center; gap: 20px; }
.finder__sort { color: var(--steel); }
/* 16px обязательны: iOS Safari принудительно зумит страницу при фокусе
   на контроле с меньшим кеглем, и обратно уже не отматывает */
.finder__sort select { font: inherit; font-family: var(--font); font-size: 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); padding: 10px 2px; cursor: pointer; }

.prgrid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1080px) { .prgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .prgrid { grid-template-columns: 1fr; } }

.prcard {
  background: var(--bg); padding: 28px 26px 30px; display: flex; flex-direction: column; gap: 10px;
  min-height: 260px; transition: background .35s, color .35s;
}
.prcard:hover { background: var(--ink); color: #fff; }
.prcard__year { font-size: 13px; letter-spacing: .14em; color: var(--gold-text); }
.prcard__customer { font-size: 19px; letter-spacing: -.02em; line-height: 1.2; }
.prcard__object { font-size: 14px; color: var(--steel); }
.prcard:hover .prcard__object { color: #b9b9b9; }
.prcard__items { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.prcard:hover .prcard__items { color: #d0d0d0; }
.prcard__items li { position: relative; padding-left: 14px; }
.prcard__items li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--gold); }
.prcard__rest { color: var(--gold-text); }
.prcard__geo { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--steel); border-top: 1px solid var(--line); }
.prcard:hover .prcard__geo { color: #b9b9b9; border-color: rgba(255,255,255,.18); }
.prgrid--sm .prcard { min-height: 170px; }
.pj-reg { font-variant-numeric: tabular-nums; font-size: 13px; overflow-wrap: anywhere; }

/* пометки «уточняется» — видимая граница между подтверждённым и черновым */
.p-todo-inline { color: var(--steel); font-style: italic; }
.finder__ex {
  font: inherit; font-family: var(--font); font-size: 14px; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--gold-text); padding: 2px 0; margin: 0 8px 0 0;
}
.finder__ex:hover { border-color: var(--gold-text); }
.form__consent { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.form__consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.form__consent span { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink-soft); }

.p-todo { font-size: 14px; color: var(--steel); border-left: 2px solid var(--gold); padding: 10px 0 10px 16px; margin-top: 26px; }
.caps { columns: 2; column-gap: 44px; }
.caps li { break-inside: avoid; }
@media (max-width: 760px) { .caps { columns: 1; } }

/* ——— форма запроса ——— */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .form { grid-template-columns: 1fr; } }
.form label { display: flex; flex-direction: column; gap: 8px; }
.form label span { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.form__wide { grid-column: 1 / -1; }
.form input, .form textarea {
  font: inherit; font-family: var(--font); color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 12px 2px; outline: none; transition: border-color .3s; resize: vertical;
}
.form input:focus, .form textarea:focus { border-color: var(--gold); }
.form button { grid-column: 1 / -1; justify-self: start; cursor: pointer; font-family: var(--font); background: transparent; }
.form__note { grid-column: 1 / -1; font-size: 13px; color: var(--steel); margin: 0; }

/* ——— TEMP: временные пункты меню на время согласования ——— */
.hdr__nav-temp { opacity: .55; }
.hdr__nav-temp:hover { opacity: 1; }
.hdr__nav-temp + .hdr__nav-temp { margin-left: -12px; }
.hdr__nav a.hdr__nav-temp:first-of-type::before {
  content: ''; display: inline-block; width: 1px; height: 11px;
  background: currentColor; opacity: .5; margin-right: 34px; vertical-align: middle;
}

/* ——— TEMP: плашка прототипа ——— */
/* Служебная наклейка поверх сайта, а не его элемент — скругление намеренное,
   она и должна выбиваться из прямоугольной сетки. То же у переключателя шрифта. */
.proto-badge {
  position: fixed; left: 18px; bottom: 18px; z-index: 90; max-width: 340px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px; font-size: 12px; line-height: 1.45; color: var(--steel);
  box-shadow: 0 6px 24px rgba(0,0,0,.09);
}
@media (max-width: 700px) { .proto-badge { display: none; } }

/* ——— переключатель шрифта (только прототип) ——— */
/* Переключатель шрифта — служебный элемент прототипа, а не часть сайта,
   поэтому скруглению здесь можно: он и должен читаться как «наклейка» поверх. */
.fontsw {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 8px 6px 14px;
  font-size: 12px; letter-spacing: .04em; box-shadow: 0 6px 24px rgba(0,0,0,.09);
}
.fontsw__hint { color: var(--steel); margin-right: 4px; }
.fontsw button {
  font: inherit; font-family: var(--font); cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--steel);
  padding: 6px 12px; border-radius: 100px; transition: .25s;
}
.fontsw button.on { background: var(--ink); color: #fff; }
@media (max-width: 700px) {
  .fontsw { right: 10px; bottom: 10px; padding: 4px 5px; font-size: 11px; }
  .fontsw__hint { display: none; }
  .fontsw button { padding: 5px 9px; }
}

/* ——— каталог: два направления ———
   Выдача разбита на секции по направлению: сетка карточек живёт в .pgrid__row,
   а #cat-results остаётся обычным блоком, чтобы заголовки направлений
   не превращались в ячейки сетки. */
.catout { margin-top: 34px; }
.catout > .note { margin: 0; padding: 34px 0; }

.dirhead { margin: 54px 0 22px; }
.catout > .dirhead:first-child { margin-top: 0; }
.dirhead__name { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.025em; line-height: 1.15; margin: 0; font-weight: 500; }
.dirhead__lead { margin: 12px 0 0; max-width: 72ch; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }

.pgrid__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1180px) { .pgrid__row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .pgrid__row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .pgrid__row { grid-template-columns: 1fr; } }

.pcard__kind { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.pcard:hover .pcard__kind { color: #b9b9b9; }

/* ——— карточка: стандарты и механические свойства ——— */
.docs { margin-top: 26px; }
.docs__item { padding: 30px 0; border-top: 1px solid var(--line); }
.docs__item:first-child { padding-top: 22px; }
.docs__code {
  font-size: 20px; letter-spacing: -.01em; margin: 0 0 14px; font-weight: 500;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.docs__new {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); background: var(--gold-soft); padding: 4px 9px;
}
.docs .table-wrap { margin-top: 20px; }
.docs .note { font-size: 15px; }

/* вторая строка шапки — уточнения к столбцам, тише основной */
table.spec thead tr + tr th { text-transform: none; letter-spacing: .02em; font-size: 12px; color: var(--ink-soft); }
table.spec th { vertical-align: bottom; }
.spec__split td {
  background: var(--bg-alt); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--steel);
}
table.spec tr.spec__split:hover td { background: var(--bg-alt); }

/* ——— фильтр по стандартам в два уровня ———
   53 номера плоским списком забивают экран, поэтому сверху — система
   стандартизации со счётчиком, а номера раскрываются под выбранным семейством. */
.chip i { font-style: normal; margin-left: 7px; font-size: 11px; color: var(--steel); }
.chip.on i { color: rgba(255,255,255,.6); }

.finder__row--sub { margin-top: 10px; }
.chips--sub .chip {
  font-size: 12px; padding: 6px 11px;
  background: transparent; border-style: dashed;
}
.chips--sub .chip.on { background: var(--gold-soft); border-style: solid; border-color: var(--gold); color: var(--ink); }
@media (pointer: coarse) { .chips--sub .chip { padding: 9px 13px; } }

/* пришли с главной по ссылке на раздел — говорим об этом и даём снять */
.finder__dir { margin: 22px 0 0; font-size: 14px; color: var(--steel); }
.finder__dir b { color: var(--ink); font-weight: 500; }
.finder__dir button {
  font: inherit; font-family: var(--font); font-size: 14px; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--gold-text); padding: 2px 0; margin-left: 10px;
}
.finder__dir button:hover { border-color: var(--gold-text); }

/* фирменный слоган в hero — подпись у логотипа, а не заголовок:
   держим его тише названия и выше описания */
.hero__slogan {
  flex-basis: 100%; order: -1;
  font-size: clamp(15px, 1.7vw, 20px); line-height: 1.35;
  letter-spacing: .01em; color: #c8a02a !important; max-width: none !important;
  margin: 0 0 6px !important;
}

/* логотипы заказчиков */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 520px) { .clients { grid-template-columns: repeat(2, 1fr); } }
.clients li { background: var(--bg); display: grid; place-items: center; padding: 18px 14px; min-height: 96px; }
.clients img { max-width: 100%; height: auto; max-height: 56px; width: auto; object-fit: contain; }

/* ——— калькулятор: правка вёрстки ———
   1. Скрытые группы полей. У `.calc__row { display: grid }` и у браузерного
   правила для [hidden] одинаковая специфичность, но авторский стиль сильнее
   браузерного — из-за этого атрибут hidden не работал вовсе и на странице
   разом висели поля круглой, квадратной и прямоугольной трубы. */
[hidden] { display: none !important; }

/* 2. Колонки не должны раздуваться под длинный текст внутри: у `1fr`
   минимальный размер равен содержимому, и длинный пункт списка «Группа»
   растягивал свою колонку, поджимая диаметр и стенку до нечитаемых. */
.calc { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); }
.calc__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .calc { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .calc__row { grid-template-columns: minmax(0, 1fr); } }

/* 3. Значения в сводке результата. Общее правило для .kv разрешает перенос
   в любом месте — на широкой карточке каталога это нужно, а в узкой колонке
   калькулятора приводило к тому, что «9,16 кг» ломалось по одной букве
   в столбик. Здесь наоборот: подпись ужимается, значение остаётся цельным. */
.calc__out .kv div { gap: 16px; align-items: baseline; }
.calc__out .kv span:first-child { flex: 1 1 auto; min-width: 0; }
.calc__out .kv span:last-child { flex: none; white-space: nowrap; overflow-wrap: normal; }
/* «19,300 — 21,300 т» при прежнем кегле не влезало в колонку и рвалось
   после тире, оставляя его висеть в конце строки. Уменьшаем — диапазон
   встаёт в одну строку и остаётся главным числом на странице. */
.calc__big, .calc__sum { overflow-wrap: normal; word-break: keep-all; }
.calc__big { font-size: clamp(26px, 2.4vw, 34px); }
@media (max-width: 760px) {
  .calc__out .kv div { flex-direction: row; }
  .calc__out .kv span:last-child { text-align: right; }
}

/* подбор по сортаменту в калькуляторе */
.calc__picker { margin-top: 30px; background: var(--bg-alt); border: 1px solid var(--line); padding: 24px 22px 22px; }
.calc__picker .tag { margin-bottom: 6px; }
.calc__picker select { background: var(--bg); padding-left: 12px; padding-right: 12px; }

/* ——— сортамент: широкая матрица «диаметр × стенка» ——— */
.srt { margin-top: 20px; max-height: 70vh; overflow: auto; border: 1px solid var(--line); }
table.spec.srt__t { min-width: 0; font-size: 13px; }
.srt__t th, .srt__t td { padding: 7px 9px; text-align: center; border-right: 1px solid var(--line); white-space: nowrap; }
/* шапка и колонка диаметров держатся на месте при прокрутке в обе стороны */
.srt__t thead th { position: sticky; top: 0; z-index: 2; background: var(--bg); font-size: 11px; letter-spacing: .04em; }
.srt__t .srt__d { position: sticky; left: 0; z-index: 1; background: var(--bg); font-weight: 500; color: var(--ink); text-align: right; font-size: 13px; text-transform: none; letter-spacing: 0; }
.srt__t .srt__corner { left: 0; z-index: 3; text-align: right; }
.srt__t tr:hover td { background: var(--gold-soft); }
.srt__yes { background: var(--gold-soft); padding: 0 !important; }
.srt__yes a { display: block; padding: 7px 9px; color: var(--gold-text); font-size: 12px; }
.srt__yes a:hover { background: var(--ink); color: #fff; }
.srt__no { color: transparent; }
.srt__legend { margin: 18px 0 0; font-size: 14px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 8px; }
.srt__legend b { display: inline-block; min-width: 34px; color: var(--gold-text); }

/* ——— пары «термин — пояснение» ——— */
.pairs { margin: 24px 0 0; }
.pairs dt { font-size: 17px; letter-spacing: -.01em; padding-top: 22px; border-top: 1px solid var(--line); }
.pairs dd { margin: 8px 0 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 80ch; }

/* ——— переключатель версий в плашке прототипа ——— */
.vsw { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vsw__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.vsw__btns { display: flex; border: 1px solid var(--line); }
.vsw__btn {
  font-size: 12px; padding: 4px 12px; color: var(--steel); background: var(--bg);
  border-right: 1px solid var(--line); transition: background .25s, color .25s;
}
.vsw__btn:last-child { border-right: 0; }
.vsw__btn:hover { color: var(--ink); }
.vsw__btn.on { background: var(--ink); color: #fff; cursor: default; }
