/* Шрифты лежат рядом с сайтом: Golos Text и Sofia Sans Extra Condensed, лицензия OFL. */
@font-face {
  font-family: "Golos Text";
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-weight: 700 800;
  font-display: swap;
  src: url("/fonts/sofia-sans-extra-condensed-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-weight: 700 800;
  font-display: swap;
  src: url("/fonts/sofia-sans-extra-condensed-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}

:root {
  --paper: #f1f4f3;
  --panel: #ffffff;
  --ink: #172a3a;
  --muted: #566573;
  --rule: #c5cdd2;
  /* Цвета сетей — как у самих труб и линий на планах. */
  --v1: #1466c0;
  --k1: #a9541b;
  --k2: #22867c;
  --t1: #c3262e;
  --g: #b88a00;
  --b: #6c7884;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible { outline: 3px solid var(--v1); outline-offset: 3px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: #fff;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* Шапка */
.top {
  display: flex;
  align-items: baseline;
  gap: 1rem 2.5rem;
  flex-wrap: wrap;
  padding: 1.25rem var(--gutter);
}
.brand {
  font: 800 2rem/1 var(--display);
  text-decoration: none;
  margin-right: auto;
}
.top__nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; font-size: 0.95rem; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; }
.top__phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.top__phone:hover { text-decoration: underline; }

/* Первый экран */
.hero { padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 {
  font: 800 clamp(3.25rem, 10.4vw, 9.25rem)/0.9 var(--display);
  letter-spacing: -0.005em;
  max-width: 17ch;
  text-wrap: balance;
}
.lead {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.3rem);
  line-height: 1.5;
}

/* Общие заголовки разделов */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1rem 3rem;
  align-items: end;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section-head h2, .contacts h2 { font: 700 clamp(2.5rem, 5.4vw, 4.25rem)/0.95 var(--display); }
.section-head p { max-width: 62ch; color: var(--muted); }

.legend, .objects, .plain { padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }

/* Сети: линия с буквенным кодом, как на плане */
.net {
  --c: var(--b);
  display: grid;
  grid-template-columns: minmax(13rem, 21rem) minmax(0, 1fr) auto;
  grid-template-areas: "line line line" "head desc count";
  gap: 0.55rem 2.5rem;
  align-items: baseline;
  padding: 0 0 1.75rem;
  text-decoration: none;
}
.net--v1 { --c: var(--v1); }
.net--k1 { --c: var(--k1); }
.net--k2 { --c: var(--k2); }
.net--t1 { --c: var(--t1); }
.net--g { --c: var(--g); }

.net__line {
  grid-area: line;
  display: block;
  height: 28px;
  width: calc(100% + var(--gutter));
  clip-path: inset(0 100% 0 0);
  animation: lay-pipe 1.15s cubic-bezier(0.25, 0.7, 0.2, 1) forwards;
}
.net__line line { stroke: var(--c); stroke-width: 5; }
.net__line text { fill: var(--c); font: 700 27px var(--display); }
.net:nth-child(2) .net__line { animation-delay: 0.12s; }
.net:nth-child(3) .net__line { animation-delay: 0.24s; }
.net:nth-child(4) .net__line { animation-delay: 0.36s; }
.net:nth-child(5) .net__line { animation-delay: 0.48s; }
.net:nth-child(6) .net__line { animation-delay: 0.6s; }
@keyframes lay-pipe { to { clip-path: inset(0 0 0 0); } }

.net__head { grid-area: head; display: flex; align-items: baseline; gap: 0.7rem; }
.net__code { font: 800 2.1rem/1 var(--display); color: var(--c); min-width: 2.2rem; }
.net__name { font: 700 2.1rem/1 var(--display); }
.net:hover .net__name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.14em; }
.net__desc { grid-area: desc; max-width: 58ch; }
.net__count { grid-area: count; white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Объекты */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  --c: var(--ink);
  font: 500 0.95rem/1.2 var(--text);
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-bottom: 4px solid var(--c);
  border-radius: 2px;
  padding: 0.45rem 0.8rem 0.35rem;
  cursor: pointer;
}
.chip--v1 { --c: var(--v1); }
.chip--k1 { --c: var(--k1); }
.chip--k2 { --c: var(--k2); }
.chip--t1 { --c: var(--t1); }
.chip--g { --c: var(--g); }
.chip--b { --c: var(--b); }
.chip:hover { background: var(--panel); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.filter-status { min-height: 1.6rem; margin-top: 0.75rem; color: var(--muted); font-size: 0.95rem; }

.objects__block { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.objects__block h3, .places h3 { font: 700 2rem/1 var(--display); margin-bottom: 1.1rem; }

/* Паспорт объекта — как информационный щит на стройплощадке */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem; }
.board {
  --c: var(--b);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-top: 14px solid var(--c);
  padding: 1.1rem 1.3rem 1.3rem;
}
.board--v1 { --c: var(--v1); }
.board--k1 { --c: var(--k1); }
.board--k2 { --c: var(--k2); }
.board--t1 { --c: var(--t1); }
.board--g { --c: var(--g); }
.board__label { font-size: 0.85rem; color: var(--muted); }
.board__title { font: 700 1.85rem/1.02 var(--display); margin: 0.35rem 0 1rem; text-wrap: balance; }
.board__rows { margin-bottom: 1.1rem; }
.board__row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.4;
}
.board__row dt { color: var(--muted); }
.board__link { margin-top: auto; font-weight: 500; }

/* Список сданных объектов */
.list { width: 100%; border-collapse: collapse; font-size: 0.97rem; line-height: 1.4; }
.list th {
  text-align: left;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 1.25rem 0.6rem 0;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.list td { padding: 0.95rem 1.25rem 0.95rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.list th:last-child, .list td:last-child { padding-right: 0; }
.list strong { font-weight: 600; }
.place { display: block; color: var(--muted); font-size: 0.92rem; }
.col-years { white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-net { white-space: nowrap; }
.col-customer { color: var(--muted); max-width: 22rem; }
.col-price { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.list th.col-price { text-align: right; }

.tag {
  --c: var(--b);
  display: inline-block;
  font: 800 1.35rem/1.05 var(--display);
  border-bottom: 4px solid var(--c);
  padding: 0 0.1rem;
  margin-right: 0.35rem;
}
.tag--v1 { --c: var(--v1); }
.tag--k1 { --c: var(--k1); }
.tag--k2 { --c: var(--k2); }
.tag--t1 { --c: var(--t1); }
.tag--g { --c: var(--g); }
.tag--b { font: 500 0.85rem/1.5 var(--text); }

[hidden] { display: none !important; }

/* Заказчики, география, реквизиты */
.customers { columns: 2 22rem; column-gap: 3rem; }
.customers li { break-inside: avoid; padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.places { margin-top: clamp(2rem, 4vw, 3rem); }
.places p { max-width: 70ch; }

.requisites { border-bottom: 1px solid var(--rule); }
.requisites div {
  display: grid;
  grid-template-columns: minmax(10rem, 19rem) minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--rule);
}
.requisites dt { color: var(--muted); }
.requisites dd { font-variant-numeric: tabular-nums; }

/* Контакты */
.contacts { background: var(--ink); color: #fff; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.contacts :focus-visible { outline-color: #fff; }
.contacts__phone {
  display: block;
  width: fit-content;
  margin-top: 1.25rem;
  font: 800 clamp(3.25rem, 11vw, 8.5rem)/0.9 var(--display);
  text-decoration: none;
}
.contacts__phone:hover { text-decoration: underline; text-decoration-thickness: 0.05em; }
.contacts__mail { display: block; width: fit-content; margin-top: 1.5rem; font-size: 1.3rem; }
.contacts__address { margin-top: 0.75rem; max-width: 46ch; color: #c9d3da; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.5rem var(--gutter);
  background: var(--ink);
  color: #c9d3da;
  font-size: 0.9rem;
  border-top: 1px solid #33495b;
}

/* Узкие экраны */
@media (max-width: 60rem) {
  .section-head { grid-template-columns: 1fr; }
  .net { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "line line" "head count" "desc desc"; }
}

@media (max-width: 52rem) {
  .top__nav { order: 3; width: 100%; }
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .list, .list tbody { display: block; }
  .list tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "object object" "customer customer" "years net" "price eis";
    gap: 0.35rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .list tbody tr:first-child { border-top: 2px solid var(--ink); }
  .list td { display: block; padding: 0; border: 0; }
  .col-object { grid-area: object; }
  .col-customer { grid-area: customer; max-width: none; }
  .col-years { grid-area: years; }
  .col-net { grid-area: net; text-align: right; }
  .col-net .tag { margin: 0 0 0 0.35rem; }
  .col-price { grid-area: price; text-align: left; font-weight: 600; }
  .col-eis { grid-area: eis; text-align: right; }
  .requisites div { grid-template-columns: 1fr; }
}

@media (max-width: 30rem) {
  .net__code, .net__name { font-size: 1.8rem; }
  .board__row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .net__line { animation: none; clip-path: none; }
}

@media print {
  .filters, .filter-status, .skip, .top__nav { display: none; }
  .net__line { animation: none; clip-path: none; }
  .contacts, .foot { background: none; color: var(--ink); }
}
