/* Союз Техпласт — прототип главной. Направление «инженерный лист», см. ../design.md */
:root {
  --bg: #ffffff;
  --sub: #f2f5f7;
  --ink: #14202b;
  --ink-2: #56646f;
  --act: #0090dc;
  --act-h: #0077b8;
  --steel: #96b4c6;
  --line: #d5dee4;
  --ok: #1e8a4c;
  --r: 2px;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--act); text-decoration: none; }
a:hover { color: var(--act-h); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: var(--r); border: 1px solid var(--act); background: var(--act); color: #fff; font: 500 16px/1 var(--sans); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--act-h); border-color: var(--act-h); color: #fff; }
.btn:focus-visible, .chip:focus-visible, .add:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.logo svg { width: 38px; height: 38px; }
.logo b { display: block; font: 700 17px/1 var(--sans); letter-spacing: 0.16em; color: var(--act); }
.logo span { display: block; margin-top: 4px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.26em; color: var(--ink-2); }
.nav { display: flex; gap: 26px; font-size: 15px; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--act); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.phone { font: 500 16px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
.phone small { display: block; font: 400 12px/1.2 var(--sans); color: var(--ink-2); }
.list-btn { position: relative; }
.list-btn .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--act); font: 500 13px/22px var(--mono); text-align: center; }

/* ---------- первый экран ---------- */
.hero { padding: 64px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 56px; align-items: start; }
.hero h1 { margin: 18px 0 22px; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; }
.hero .lead { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; border-top: 1px solid var(--ink); }
.facts div { padding: 16px 16px 0 0; }
.facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts b { display: block; font: 500 26px/1.1 var(--mono); letter-spacing: -0.02em; }
.facts span { font-size: 14px; color: var(--ink-2); }
.todo { font: 500 11px/1.3 var(--mono); color: #b35c00; letter-spacing: .02em; }

/* лист образцов: фото изделий как в спецификации */
.sheet { border: 1px solid var(--steel); display: grid; grid-template-columns: 1fr 1fr; }
.sheet figure { margin: 0; padding: 18px; position: relative; background: #fff; }
.sheet figure:nth-child(odd) { border-right: 1px solid var(--line); }
.sheet figure:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.sheet img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; mix-blend-mode: multiply; }
.sheet figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font: 400 12.5px/1.35 var(--mono); color: var(--ink-2); }
.sheet figcaption b { color: var(--ink); font-weight: 500; }
.sheet .idx { position: absolute; top: 12px; left: 14px; font: 500 11px var(--mono); color: var(--steel); letter-spacing: .1em; }
.sheet-foot { grid-column: 1 / -1; border-top: 1px solid var(--steel); padding: 10px 18px; display: flex; justify-content: space-between; font: 400 11.5px/1.3 var(--mono); color: var(--ink-2); letter-spacing: .04em; }

/* полоса сечений труб — чертёж в масштабе */
.caliber { margin-top: 72px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sub); }
.caliber .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-top: 30px; padding-bottom: 30px; align-items: end; }
.caliber h2 { font-size: 20px; line-height: 1.25; }
.caliber p { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.pipes { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pipe { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); cursor: pointer; background: none; border: 0; padding: 6px 4px; font: inherit; border-radius: var(--r); }
.pipe svg circle.o { fill: var(--steel); transition: fill .15s; }
.pipe:hover svg circle.o, .pipe.on svg circle.o { fill: var(--act); }
.pipe .d { font: 500 15px/1 var(--mono); }
.pipe .p { font: 400 12.5px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.pipe:hover .p { color: var(--act); }

/* ---------- секции ---------- */
section { padding: 96px 0; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; margin-top: 12px; }
.sec-head p { color: var(--ink-2); max-width: 36em; }

/* направления — колонки с разделителями, без карточек */
.dirs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.dir { padding: 26px 28px 0 0; color: var(--ink); display: flex; flex-direction: column; }
.dir + .dir { padding-left: 28px; border-left: 1px solid var(--line); }
.dir .n { font: 500 13px var(--mono); color: var(--steel); letter-spacing: .1em; }
.dir h3 { font-size: 25px; line-height: 1.15; margin: 10px 0 12px; }
.dir .ph { aspect-ratio: 4 / 3; overflow: hidden; margin: 6px 0 18px; background: var(--sub); }
.dir .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dir:hover .ph img { transform: scale(1.03); }
.dir ul { list-style: none; margin: 0 0 18px; padding: 0; font-size: 15px; }
.dir li { padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.dir .from { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; padding-top: 6px; }
.dir .from b { font: 500 20px var(--mono); }
.dir .from a { font-weight: 500; }
.dir .who { font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }

/* таблица ходовых позиций */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { height: 40px; padding: 0 16px; border: 1px solid var(--line); background: #fff; border-radius: var(--r); font: 500 15px var(--sans); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--act); background: var(--act); color: #fff; }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec th { text-align: left; font: 500 11.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 0 12px 12px 0; border-bottom: 1px solid var(--ink); }
.spec td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.spec tr:hover td { background: var(--sub); }
.spec .num { font-family: var(--mono); font-feature-settings: "tnum"; white-space: nowrap; }
.spec .r { text-align: right; }
.spec td.name { font-weight: 500; }
.add { height: 38px; padding: 0 14px; border: 1px solid var(--act); color: var(--act); background: #fff; border-radius: var(--r); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.add:hover { background: var(--act); color: #fff; }
.add.done { border-color: var(--ok); color: var(--ok); background: #fff; }
.table-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 14px; color: var(--ink-2); gap: 20px; flex-wrap: wrap; }

/* калькулятор */
.calc-sec { background: var(--sub); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--steel); }
.calc-in { padding: 34px; border-right: 1px solid var(--line); display: grid; gap: 24px; }
.calc-out { padding: 34px; display: flex; flex-direction: column; }
label.f { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
label.f em { font-style: normal; font-weight: 400; color: var(--ink-2); }
input[type=number], input[type=text], input[type=tel], select, textarea { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); font: 400 17px var(--sans); color: var(--ink); background: #fff; }
input[type=number] { font-family: var(--mono); }
textarea { height: 110px; padding: 12px 14px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--steel); }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { flex: 1; height: 48px; border: 0; background: #fff; font: 500 15px var(--mono); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--act); color: #fff; }
.out-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.out-row span { color: var(--ink-2); font-size: 15px; }
.out-row b { font: 500 22px var(--mono); }
.out-total b { font-size: 36px; color: var(--ink); }
.calc-note { font-size: 13px; color: var(--ink-2); margin: 16px 0 22px; }
.calc-out .btn { align-self: flex-start; margin-top: auto; }

/* почему мы */
.why { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.why div { padding: 22px 24px 0 0; }
.why div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.why b { display: block; font: 500 13px var(--mono); color: var(--steel); letter-spacing: .1em; margin-bottom: 14px; }
.why h3 { font-size: 20px; line-height: 1.2; margin-bottom: 10px; }
.why p { color: var(--ink-2); font-size: 15px; }

/* как заказать — шкала */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; counter-reset: s; margin: 0; padding: 0; }
.steps::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 1px; background: var(--steel); }
.steps li { list-style: none; padding-right: 24px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: inline-block; background: #fff; padding-right: 12px; font: 500 14px/22px var(--mono); color: var(--act); position: relative; }
.steps h3 { font-size: 19px; margin: 18px 0 8px; }
.steps p { color: var(--ink-2); font-size: 15px; }
.steps ol { margin: 0; padding: 0; display: contents; }

/* производство */
.prod { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.prod .ph { position: relative; }
.prod .ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prod .ph .todo { position: absolute; left: 12px; bottom: 12px; background: #fff; padding: 6px 10px; }
.prod h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; margin: 12px 0 18px; }
.prod p { color: var(--ink-2); margin-bottom: 14px; }
.docs { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.doc { border: 1px solid var(--line); padding: 12px 16px; font: 400 13px/1.35 var(--mono); color: var(--ink); border-radius: var(--r); }
.doc b { display: block; font: 500 14px var(--sans); }

/* вопросы */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px var(--mono); color: var(--act); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 52em; }

/* заявка */
.lead-sec { background: var(--ink); color: #fff; }
.lead-sec .eyebrow { color: var(--steel); }
.lead-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; }
.lead-sec h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; margin: 12px 0 18px; }
.lead-sec p { color: #b9c5ce; }
.contacts { margin-top: 36px; display: grid; gap: 18px; }
.contacts div { border-top: 1px solid #2c3a46; padding-top: 14px; }
.contacts small { display: block; font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--steel); margin-bottom: 4px; }
.contacts a, .contacts span { color: #fff; font-size: 17px; }
.contacts .mono a { font-family: var(--mono); }
form.lead { background: #fff; color: var(--ink); padding: 34px; border-radius: var(--r); display: grid; gap: 18px; }
form.lead .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.list-box { border: 1px dashed var(--steel); padding: 12px 14px; font: 400 13.5px/1.5 var(--mono); color: var(--ink-2); border-radius: var(--r); }
.list-box:empty { display: none; }
.consent { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); align-items: flex-start; }
.consent input { margin-top: 3px; }
.sent { display: none; padding: 14px; border: 1px solid var(--ok); color: var(--ok); font-weight: 500; border-radius: var(--r); }

/* отходы */
.recycle { padding: 26px 0; border-bottom: 1px solid var(--line); }
.recycle .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.recycle p { font-size: 16px; }
.recycle p b { font-weight: 500; }

footer { padding: 40px 0 110px; font-size: 14px; color: var(--ink-2); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ячейки сетки не должны раздвигаться содержимым (полоса сечений, таблица) */
.hero-grid > *, .caliber .wrap > *, .sec-head > *, .dirs > *, .prod > *, .lead-grid > *, .calc > * { min-width: 0; }
html, body { overflow-x: clip; }

/* мобильная панель */
.mbar { display: none; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .hero-grid, .sec-head, .prod, .lead-grid, .calc { grid-template-columns: 1fr; gap: 36px; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--line); }
  .dirs, .why { grid-template-columns: 1fr; }
  .dir + .dir, .why div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 28px; }
  .dir { padding-right: 0; }
  .caliber .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .top .wrap { height: 62px; gap: 12px; }
  .phone, .list-btn .lbl { display: none; }
  .hero { padding-top: 36px; }
  .facts { grid-template-columns: 1fr; }
  .sheet figure { padding: 12px; }
  .sheet figcaption { flex-direction: column; gap: 2px; }
  .sheet-foot { flex-direction: column; gap: 2px; }
  .facts div + div { padding-left: 0; border-left: 0; }
  section { padding: 64px 0; }
  .pipes { overflow-x: auto; justify-content: flex-start; gap: 18px; padding-bottom: 6px; }
  .spec thead { display: none; }
  .spec tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .spec td { border: 0; padding: 2px 0; }
  .spec td.hide-m { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  form.lead { padding: 22px; }
  form.lead .two { grid-template-columns: 1fr; }
  .mbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); }
  .mbar a { display: flex; align-items: center; justify-content: center; height: 58px; font-weight: 500; color: var(--ink); }
  .mbar a + a { background: var(--act); color: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
