/* Шрифты со своего сервера (Google Fonts, лицензия OFL): Onest и Unbounded — переменные, один файл на набор знаков.
   build.py ставит этот файл в начало assets/style.css. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Компания «ТРАСТ» — цвета взяты с логотипа: бирюзовая дуга, серые дуги, графитовая шестерня. */
:root {
  --steel: #F1F3F4;      /* фон страницы */
  --paper: #FFFFFF;
  --ink: #2B2D2F;        /* текст, близко к графиту шестерни #3B3B3C */
  --grey: #686767;       /* вторичный текст, от серой дуги #767474 */
  --line: #D7D7D7;       /* светлая дуга */
  --teal: #03C0CE;       /* бирюза логотипа — графика, крупные элементы */
  --teal-ink: #007A84;   /* бирюза для текста на белом (контраст) */
  --graphite: #26292B;   /* полоса чертежа */

  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Onest", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--steel); color: var(--ink); font: 400 17px/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
h1 { font: 700 clamp(1.9rem, 4vw, 3.2rem)/1.08 var(--display); letter-spacing: -.02em; }
h2 { font: 500 clamp(1.4rem, 2.4vw, 2rem)/1.15 var(--display); letter-spacing: -.015em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--grey); font-size: .92rem; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 1rem/1 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-teal { background: var(--teal); color: var(--ink); }
.btn-teal:hover { background: #2AD3E0; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.text-link { color: var(--teal-ink); font-weight: 600; text-underline-offset: 4px; }

/* шапка */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--teal); }
.header-phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-cta { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.burger { display: none; }

/* первый экран: текст слева, фото до правого края */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); min-height: 560px; }
.hero-text { padding: clamp(48px, 7vw, 96px) clamp(24px, 4vw, 64px) clamp(40px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  align-self: center; }
.hero-text p { font-size: 1.12rem; max-width: 46ch; color: #44474A; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-phone { font-size: .98rem; color: var(--grey); }
.hero-phone a { color: var(--ink); font-weight: 600; text-decoration: none; }
.hero-media { position: relative; overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 8% 50%; }

/* чертёж вала — фирменный элемент */
.drawing { background: var(--graphite); color: #fff; padding: clamp(48px, 7vw, 88px) 0; }
.drawing-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 28px; }
.drawing-head p { color: rgba(255,255,255,.75); margin: 0; }
.shaft-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  background-image: linear-gradient(rgba(3,192,206,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(3,192,206,.07) 1px, transparent 1px);
  background-size: 24px 24px; }
.shaft { width: 100%; min-width: 760px; height: auto; display: block; }
.shaft .axis { stroke: rgba(3,192,206,.45); stroke-width: 1; stroke-dasharray: 18 5 3 5; fill: none; }
.shaft .pt rect, .shaft .pt circle, .shaft .pt path { fill: rgba(3,192,206,.06); stroke: var(--teal); stroke-width: 1.6; }
.shaft .pt-spline path { stroke-width: 1; fill: none; }
.shaft .dim path { stroke: rgba(255,255,255,.55); stroke-width: 1; fill: none; }
.shaft .dim .arrow { fill: rgba(255,255,255,.55); stroke: none; }
.shaft .dim-bg { fill: var(--graphite); }
.shaft .dim text { fill: #fff; font: 500 17px var(--display); text-anchor: middle; }
.shaft .mk circle { fill: var(--teal); stroke: none; }
.shaft .mk text { fill: var(--graphite); font: 700 14px var(--display); text-anchor: middle; }
.shaft .mk .leader { stroke: rgba(255,255,255,.4); stroke-width: 1; fill: none; }
.shaft .mk:hover circle, .shaft .mk:focus circle { fill: #fff; }
.legend { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; }
.legend a { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.15); text-decoration: none; }
.legend .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: var(--graphite);
  display: grid; place-items: center; font: 700 .8rem/1 var(--display); }
.legend b { display: block; font-weight: 600; }
.legend small { display: block; color: rgba(255,255,255,.7); font-size: .9rem; }
.legend a:hover b { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 4px; }

/* секции */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.section-head p { color: var(--grey); margin: 0; }

/* список услуг — прайс-строки, а не карточки */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc-list a { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) 150px; gap: 24px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.svc-title { font-weight: 600; font-size: 1.08rem; }
.svc-short { color: var(--grey); }
.svc-price { text-align: right; font: 500 1rem/1.3 var(--display); white-space: nowrap; }
.free { color: var(--teal-ink); }
.svc-list a:hover .svc-title { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* цены */
.tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { font: 500 .98rem/1 var(--text); padding: 12px 20px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.prices { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 8px; overflow: hidden; }
.prices th, .prices td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--steel); vertical-align: top; }
.prices thead th { font-size: .85rem; font-weight: 500; color: var(--grey); background: var(--paper); }
.prices tbody th { font-weight: 600; width: 34%; }
.prices tbody th a { text-decoration: none; }
.prices tbody th a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
.prices .price { text-align: right; white-space: nowrap; font: 500 1rem/1.4 var(--display); width: 160px; }

/* преимущества */
.dark { background: var(--ink); color: #fff; }
.dark p { color: rgba(255,255,255,.78); }
.adv-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.adv { margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.adv dt { font: 500 1.05rem/1.3 var(--display); color: var(--teal); margin-bottom: 6px; }
.adv dd { margin: 0; color: rgba(255,255,255,.82); font-size: .96rem; }
.adv-photo { margin: 0; }
.adv-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }

/* шаги */
.steps { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 0 24px 0 0; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--teal); font: 700 1rem/1 var(--display); margin-bottom: 16px; background: var(--steel); position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; border-top: 2px dashed var(--line); }
.steps li:last-child::after { display: none; }
.steps p { color: var(--grey); margin: 0; }
.buyer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.buyer div { background: var(--paper); border-radius: 12px; padding: 24px; }
.buyer p { margin: 0; color: var(--grey); }

/* партнёры */
.partners-sec { padding-top: 0; }
.small-h { font: 600 1rem/1 var(--text); color: var(--grey); }
.partners { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 16px; }
.partners li { background: var(--paper); border-radius: 8px; padding: 16px 20px; display: grid; place-items: center; }
.partners img { height: 36px; width: auto; filter: grayscale(1); opacity: .8; }
.partners li:hover img { filter: none; opacity: 1; }

/* заявка */
.callback { background: var(--paper); border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 96px) 0; }
.callback-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.callback-intro p { color: var(--grey); max-width: 46ch; }
.callback-phones a { display: block; font: 500 1.3rem/1.5 var(--display); text-decoration: none; color: var(--ink); }
.muted-inv { font-size: .9rem; }
.request-form { display: grid; gap: 14px; background: var(--steel); padding: clamp(20px, 3vw, 32px); border-radius: 16px; }
.request-form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.request-form input, .request-form select, .request-form textarea { font: 400 1rem/1.4 var(--text); padding: 12px 14px; width: 100%;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.request-form select { appearance: none; -webkit-appearance: none; padding-right: 44px; text-overflow: ellipsis;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232B2D2F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
.request-form .check { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; font-size: .88rem; color: var(--grey); }
.request-form .check input { width: 20px; height: 20px; margin-top: 2px; }
.form-status { margin: 0; font-size: .92rem; min-height: 1.4em; }
.request-form .check a, .form-note a { color: inherit; text-underline-offset: 3px; }
.form-note { margin: 0; font-size: .85rem; color: var(--grey); }
.request-form .hp { display: none; }
.request-form button:disabled { opacity: .6; cursor: progress; }

/* юридические страницы */
.doc { max-width: 78ch; }
.doc h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-top: 1.6em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .3em; }
.doc a { color: var(--teal-ink); text-underline-offset: 3px; overflow-wrap: anywhere; }

/* внутренние страницы */
.page-head { padding: clamp(32px, 5vw, 56px) 0 24px; }
.crumbs { display: flex; gap: 8px; font-size: .92rem; color: var(--grey); margin-bottom: 16px; }
.page-body { padding-bottom: 72px; }
.svc-head { background: var(--paper); padding-bottom: clamp(32px, 5vw, 56px); }
.svc-head-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.svc-lead { font-size: 1.15rem; color: #44474A; max-width: 46ch; }
.svc-from { font: 500 1.6rem/1 var(--display); margin: 20px 0 0; }
.svc-photo { margin: 0; }
.svc-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.svc-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 72px); padding-top: 48px; padding-bottom: 32px; }
.prose { max-width: 68ch; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 4px; }
.prose li::marker { color: var(--teal); }
.svc-aside h2 { font-size: 1.05rem; }
.svc-aside ul { list-style: none; padding: 0; margin: 0 0 16px; }
.svc-aside a { display: block; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.svc-aside span { display: block; font-weight: 500; }
.svc-aside b { font-weight: 500; color: var(--grey); font-size: .92rem; }
.svc-prices { padding: 16px 0 72px; }
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pc { background: var(--paper); border-radius: 12px; padding: 22px 24px; border-top: 4px solid var(--teal); }
.pc ul { list-style: none; padding: 0; margin: 0; }
.pc li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--steel); }
.pc b { font: 500 1rem/1.4 var(--display); white-space: nowrap; }
.lead-price { font-size: 1.15rem; max-width: 60ch; }
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 56px; padding-bottom: 72px; }
.contacts-grid h2 { font-size: 1.1rem; margin-top: 1.4em; }
.big { font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.requisites { margin: 0 0 16px; }
.requisites div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.requisites dt { color: var(--grey); }
.requisites dd { margin: 0; overflow-wrap: anywhere; }

/* подвал */
.site-footer { background: var(--graphite); color: rgba(255,255,255,.72); padding: 56px 0 40px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 40px; }
.footer-logo { height: 36px; width: auto; margin-bottom: 16px; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.site-footer li { margin-bottom: 6px; break-inside: avoid; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* адаптив */
/* ссылка «Как добраться — Яндекс Карты» */
.map-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.2; }
.map-link .pin { color: var(--teal); flex: none; }
.map-link b { display: block; font: 600 .78rem/1.3 var(--text); color: var(--teal-ink); letter-spacing: .02em; }
.map-link:hover { border-color: var(--teal); }
.map-link.inv { margin-top: 12px; background: transparent; border-color: rgba(255,255,255,.22); color: #fff; }
.map-link.inv b { color: var(--teal); }
.site-footer .map-link.inv:hover { border-color: var(--teal); text-decoration: none; }

/* нижняя панель звонка на телефоне */
.call-bar { display: none; }

@media (max-width: 1100px) {
  .nav, .header-phone { display: none; }
  .burger { display: block; position: relative; }
  .header-cta { margin-left: auto; }
  .burger summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
  .burger summary::-webkit-details-marker { display: none; }
  .burger summary span, .burger summary span::before, .burger summary span::after { display: block; width: 24px; height: 2px; background: var(--ink); position: relative; content: ""; }
  .burger summary span::before { position: absolute; top: -7px; }
  .burger summary span::after { position: absolute; top: 7px; }
  .burger nav { position: absolute; right: 0; top: 52px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; min-width: 240px; box-shadow: 0 12px 32px rgba(38,41,43,.18); }
  .burger nav a { padding: 10px 12px; text-decoration: none; }
}
@media (max-width: 900px) {
  .hero, .drawing-head, .section-head, .adv-grid, .callback-grid, .svc-head-grid, .svc-body, .contacts-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding: 40px var(--gutter); }
  .hero-media { min-height: 260px; order: -1; }
  .legend { grid-template-columns: 1fr 1fr; }
  .svc-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .svc-short { grid-column: 1 / -1; grid-row: 2; }
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .steps li:nth-child(2)::after { display: none; }
  .buyer, .pc-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .adv-photo img { aspect-ratio: 16 / 10; }
  .call-bar { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .call-bar .btn { gap: 8px; min-height: 46px; padding: 0 12px; }
  .call-bar .btn-line { background: var(--paper); }
  .site-footer { padding-bottom: calc(40px + 72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-cta { display: none; }
  .burger { margin-left: auto; }
  .logo img { height: 34px; }
  .legend, .adv, .form-row, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::after { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .tabs { display: flex; flex-wrap: nowrap; }
  .tab { flex: 1; padding: 11px 6px; font-size: .82rem; }
  .prices thead { display: none; }
  .prices tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 14px; border-bottom: 1px solid var(--steel); }
  .prices th, .prices td { border: 0; padding: 2px 0; }
  .prices tbody th { grid-column: 1 / -1; width: auto; }
  .prices tbody th:empty { display: none; }
  .prices .price { width: auto; }
  .requisites div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .site-footer ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
