/* КБ Прибор — основная таблица стилей */

:root {
  --paper: #e9eef5;
  --surface: #ffffff;
  --ink: #0f2a4a;
  --ink-2: #1c3f67;
  --steel: #5c7590;
  --line: #c4d2e1;
  --signal: #1a66cc;
  --signal-hover: #2f7ae0;
  --signal-text: #124a92;
  --signal-bright: #5ba4ff;

  --f-display: "Unbounded", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Golos Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
  --header-h: 72px;
}
@media (max-width: 760px) { :root { --header-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

/* Типографика */
.h1, .h2, .h3, .hero__title, .line__title, .brand__name, .hotline__phone, .foot__brand {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}
.h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
.h2--light { color: #fff; }
.h3 { font-size: 1.15rem; font-weight: 500; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.35rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--signal { background: var(--signal); color: #fff; }
.btn--signal:hover { background: var(--signal-hover); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--block { display: flex; width: 100%; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 2rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: auto; }
.brand__name { font-size: 1.05rem; }
.menu { display: flex; align-items: center; gap: 2rem; }
.menu ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.menu ul a { text-decoration: none; font-weight: 500; padding: .4rem 0; border-bottom: 2px solid transparent; }
.menu ul a:hover, .menu ul a[aria-current="page"] { border-bottom-color: var(--signal); }
.menu__contact { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.menu__phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.menu__hint { font-size: .8rem; color: var(--steel); }
.burger { display: none; }

@media (max-width: 960px) {
  .burger {
    display: grid; place-items: center; width: 48px; height: 48px;
    border: 0; background: transparent; cursor: pointer; color: var(--ink);
  }
  .burger__bars, .burger__bars::before, .burger__bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
  }
  .burger__bars::before, .burger__bars::after { content: ""; position: absolute; left: 0; }
  .burger__bars::before { top: -7px; }
  .burger__bars::after { top: 7px; }
  .burger[aria-expanded="true"] .burger__bars { background: transparent; }
  .burger[aria-expanded="true"] .burger__bars::before { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .menu.is-open { display: flex; }
  .menu ul { flex-direction: column; gap: 0; }
  .menu ul a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .menu ul a[aria-current="page"] { border-bottom-color: var(--line); color: var(--signal-text); }
  .menu__contact { text-align: left; }
  .top__row { gap: 1rem; }
}

/* Первый экран */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.hero__kicker { color: var(--steel); font-size: .95rem; margin-bottom: 1.1rem; max-width: 36ch; }
.hero__title { font-size: clamp(2.2rem, 5.4vw, 4.1rem); line-height: 1.04; margin-bottom: 1.4rem; max-width: 12ch; }
.hero__lead { font-size: 1.15rem; max-width: 46ch; color: var(--ink-2); margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .75rem; }
.hero__meta { font-size: .85rem; color: var(--steel); }
.hero__figure { margin: 0 calc(var(--gutter) * -1) 0 0; }
.fov { width: 100%; height: auto; overflow: visible; }

.fov__axis { stroke: var(--steel); stroke-width: 1; stroke-dasharray: 3 6; }
.fov__edge { stroke: var(--signal); stroke-width: 1.25; opacity: .7; }
.fov__arc { fill: none; stroke: var(--ink); stroke-width: 1.25; opacity: .32; }
.fov__device rect { fill: var(--ink); }
.fov__lens { fill: var(--signal); stroke: var(--ink); stroke-width: 4; }
.fov__flame path { fill: var(--signal); }
.fov__ring { fill: none; stroke: var(--signal); stroke-width: 1.5; opacity: 0; }

/* Единственная анимация: импульс от линзы к пламени при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .fov__arc { animation: pulse 2.4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.35s + var(--i) * .22s); }
  .fov__cone { animation: coneIn 1s ease-out .1s both; }
  .fov__ring { animation: ring 1.4s ease-out 1.1s both; transform-origin: center; transform-box: fill-box; }
}
@keyframes pulse {
  0% { opacity: 0; stroke: var(--signal); stroke-width: 3; }
  30% { opacity: 1; stroke: var(--signal); stroke-width: 3; }
  100% { opacity: .32; stroke: var(--ink); stroke-width: 1.25; }
}
@keyframes coneIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ring {
  0% { opacity: .9; transform: scale(.6); }
  100% { opacity: 0; transform: scale(2.4); }
}

.hero__facts {
  list-style: none; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.hero__facts li { padding: 1.25rem 1.5rem 1.6rem 0; display: flex; flex-direction: column; gap: .2rem; }
.hero__facts li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.hero__facts a { font-weight: 600; font-size: 1.2rem; text-decoration: none; }
.hero__facts a:hover { text-decoration: underline; }
.hero__facts span { color: var(--steel); font-size: .92rem; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { margin: 0 calc(var(--gutter) * -1); max-width: 560px; }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .hero__facts li { padding: 1rem 0; }
}

/* Секции */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--tight { padding-top: clamp(2rem, 4vw, 3rem); }
.section--tint { background: var(--surface); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; margin-bottom: 2.25rem; }
.section__note { color: var(--steel); margin: 0; max-width: 48ch; }

/* Продукция */
.lines { display: grid; grid-template-columns: 2fr 1fr 1fr; border-top: 2px solid var(--ink); }
.line { padding: 1.5rem 1.75rem 0 0; }
.line + .line { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.line__title { font-size: 1.05rem; font-weight: 500; margin-bottom: 1.25rem; }
.line__empty { color: var(--steel); }
.models { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 1.5rem; }
.models a {
  display: flex; flex-direction: column; padding: .7rem 0 .8rem;
  border-bottom: 1px solid var(--line); text-decoration: none;
}
.models__code { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; letter-spacing: -0.01em; }
.models__note { font-size: .82rem; color: var(--steel); }
.models a:hover .models__code { color: var(--signal-text); }
.models a:hover { border-bottom-color: var(--signal); }

@media (max-width: 860px) {
  .lines { grid-template-columns: 1fr; }
  .line, .line + .line { padding: 1.5rem 0; border-left: 0; }
  .line + .line { border-top: 1px solid var(--line); }
}

/* Каталог товаров */
.chips {
  position: sticky; top: var(--header-h); z-index: 5;
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1) 1.75rem; padding: .75rem var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: .35rem .85rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-weight: 500; font-size: .95rem; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip__n { font-size: .8rem; color: var(--steel); font-variant-numeric: tabular-nums; }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-current="true"] .chip__n { color: #a9bdd4; }

.catalog__group { scroll-margin-top: calc(var(--header-h) + 80px); }
.catalog__group[hidden] { display: none; }
.catalog__group + .catalog__group { margin-top: clamp(2rem, 4vw, 3rem); }
.catalog__title {
  font-family: var(--f-display); font-weight: 500; font-size: 1.15rem;
  margin: 0 0 1rem; padding-bottom: .55rem; border-bottom: 2px solid var(--ink);
}

.pcards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem;
}
.pcard {
  position: relative; display: flex; gap: 1rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s;
}
.pcard:hover { border-color: var(--signal); }
/* Картинка в боксе фиксированного размера: фото любых пропорций
   не растягивает карточку, когда подгружается при прокрутке. */
.pcard__media {
  position: relative; flex: none; width: 112px; height: 112px;
  overflow: hidden; background: #fff;
}
.pcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pcard__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pcard__name {
  font-family: var(--f-display); font-weight: 500; font-size: 1.15rem;
  line-height: 1.2; letter-spacing: -0.01em; margin: 0;
}
.pcard__link { text-decoration: none; }
.pcard__link::after { content: ""; position: absolute; inset: 0; }
.pcard__link:focus-visible { outline: none; }
.pcard__link:focus-visible::after { outline: 3px solid var(--signal); outline-offset: 2px; }
.pcard__kind { margin: .15rem 0 0; font-size: .88rem; color: var(--steel); }
.pcard__specs { margin: .7rem 0 0; font-size: .88rem; line-height: 1.35; }
.pcard__specs div { display: flex; gap: .6rem; padding: .18rem 0; }
.pcard__specs div + div { border-top: 1px dashed var(--line); }
.pcard__specs dt { flex: none; width: 7em; color: var(--steel); }
.pcard__specs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pcard__text {
  margin: .7rem 0 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__actions {
  margin: auto 0 0; padding-top: .75rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.25rem;
  font-size: .9rem; font-weight: 500;
}
.pcard:hover .pcard__link { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.pcard__order {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .85rem;
  background: var(--signal); color: #fff; border-radius: var(--radius);
  font-weight: 600; font-size: .88rem; text-decoration: none;
}
.pcard__order:hover { background: var(--signal-hover); }
.pcard__doc { position: relative; z-index: 1; color: var(--steel); }
.pcard__doc:hover { color: var(--ink); }


/* Страница товара */
.crumbs { color: var(--steel); margin: 0 0 1rem; font-size: .95rem; }
.crumbs a { color: var(--signal-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 2.5rem 3rem; align-items: start; }
.product__media { position: sticky; top: 96px; display: flex; flex-direction: column; gap: .75rem; }
.product__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--surface); border: 1px solid var(--line); padding: 1rem; }
.pkeys {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  margin: 0 0 .5rem; background: var(--surface); border: 1px solid var(--line);
}
.pkeys div { padding: .75rem 1rem; border-right: 1px solid var(--line); }
.pkeys div:last-child { border-right: 0; }
.pkeys dt { font-size: .82rem; color: var(--steel); }
.pkeys dd { margin: 0; font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pkeys__more { margin: 0 0 1.5rem; font-size: .92rem; }
.pkeys__more a { color: var(--signal-text); font-weight: 500; }
.product__h[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.product__lead { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.product__h { font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; margin: 2rem 0 .8rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.product__list { margin: 0 0 1rem; padding: 0; list-style: none; }
.product__list li { position: relative; padding: .4rem 0 .4rem 1.5rem; border-bottom: 1px solid var(--line); }
.product__list li::before { content: ""; position: absolute; left: 0; top: .95em; width: 8px; height: 8px; background: var(--signal); }
.product__specs { overflow-x: auto; }
.spec { width: 100%; border-collapse: collapse; font-size: .97rem; }
.spec th { text-align: left; background: var(--ink); color: #fff; font-weight: 600; padding: .6rem .8rem; }
.spec td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td:first-child { color: var(--steel); width: 3ch; text-align: right; }
.spec tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.product__back { margin-top: 2.5rem; }
.product__back a { color: var(--signal-text); text-decoration: none; font-weight: 500; }
.product__back a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 1.5rem; }
  .product__media { position: static; max-width: 360px; }
}

/* Применение */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.apps__item { position: relative; background: var(--ink); aspect-ratio: 3 / 4; overflow: hidden; }
.apps__item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.85); mix-blend-mode: luminosity; opacity: .85; }
.apps__title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.1rem 1.1rem;
  background: linear-gradient(to top, rgba(21,33,44,.92), rgba(21,33,44,0));
  color: #fff; font-weight: 600; font-size: 1.1rem; line-height: 1.25;
}
.apps__title::before { content: ""; display: block; width: 28px; height: 3px; background: var(--signal); margin-bottom: .6rem; }
@media (max-width: 860px) { .apps { grid-template-columns: repeat(2, 1fr); } }

/* Проекты */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; }
.project__link { display: flex; flex-direction: column; text-decoration: none; height: 100%; }
.project__img { display: block; aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--line); padding: .75rem; margin-bottom: 1rem; }
.project__img img { width: 100%; height: 100%; object-fit: contain; }
.project__title { font-weight: 600; font-size: 1.1rem; margin-bottom: .25rem; }
.project__action { color: var(--signal-text); font-weight: 500; text-decoration: underline; text-underline-offset: .2em; }
.project__link:hover .project__img { border-color: var(--ink); }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .projects { grid-template-columns: 1fr; } }

/* Полоса документации */
.band { background: var(--ink); color: #dfe5ea; padding: clamp(3rem, 7vw, 5rem) 0; }
.band__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: start; }
.band__text { margin-top: 1rem; max-width: 44ch; }
.band__links { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.band__links a {
  display: block; padding: 1rem 0; color: #fff; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.band__links a:hover { color: var(--signal-bright); }
@media (max-width: 860px) { .band__grid { grid-template-columns: 1fr; } }

/* Заявка и форма */
.order { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem 4rem; align-items: start; }
.order__text p { color: var(--ink-2); max-width: 42ch; }
.order__text .h2 { margin-bottom: 1rem; }
@media (max-width: 860px) { .order { grid-template-columns: 1fr; } }

.form { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--signal); padding: clamp(1.25rem, 3vw, 2rem); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 1.1rem; }
.field__label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: .35rem; }
.field__opt { font-weight: 400; color: var(--steel); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .8rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 45%, transparent); }
[aria-invalid="true"] { border-color: #b3261e !important; }
.field__error { color: #b3261e; font-size: .88rem; margin: .35rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; margin-bottom: 1.25rem; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--ink); flex: none; }
.check + .field__error { margin: -1rem 0 1rem; }
.form__notice { padding: .9rem 1rem; margin-bottom: 1.25rem; border-left: 4px solid; }
.form__notice--ok { background: #e7f3ea; border-color: #2e7d4a; }
.form__notice--err { background: #fbeaea; border-color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Всплывающая форма заявки */
html.modal-open { overflow: hidden; }
.modal {
  width: 100%; max-width: min(480px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible;
}
.modal::backdrop { background: rgba(15, 42, 74, .55); }
.modal__box {
  position: relative; max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-top: 4px solid var(--signal);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 30px 60px -20px rgba(15, 42, 74, .5);
}
.modal__close {
  position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--steel); cursor: pointer;
}
.modal__close:hover { color: var(--ink); background: var(--paper); }
.modal__title { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; line-height: 1.15; margin: 0 2.75rem .4rem 0; }
.modal__product { margin: 0 0 .35rem; font-weight: 600; color: var(--signal-text); }
.modal__product:empty { display: none; }
.modal__lead { margin: 0 0 1.25rem; font-size: .92rem; color: var(--steel); }
.modal__form .field { margin-bottom: .9rem; }
.modal__form .check { margin-bottom: 1rem; }
.modal__form .check + .field__error { margin: -.6rem 0 .9rem; }
.form__row--modal { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.modal__alt { margin: .9rem 0 0; text-align: center; font-size: .9rem; color: var(--steel); }
.modal__alt a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.modal__done:focus { outline: none; }
.modal__done p { color: var(--ink-2); margin-bottom: 1.25rem; }
.form__notice[hidden], .field__error[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] .modal__box { animation: modalIn .2s ease-out; }
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* На телефоне — шторка снизу */
@media (max-width: 560px) {
  .modal { max-width: 100%; max-height: 100dvh; margin: auto 0 0; }
  .modal__box {
    max-height: 94dvh; border-radius: 12px 12px 0 0;
    padding: 1.25rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom));
  }
  .modal__title { font-size: 1.2rem; }
  .modal__lead { margin-bottom: 1rem; }
  .form__row--modal { gap: 0 .75rem; }
}

/* Шапка внутренних страниц */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); border-bottom: 2px solid var(--ink); }
.page-head__lead { margin: 1rem 0 0; max-width: 60ch; font-size: 1.1rem; color: var(--ink-2); }
.page-head--404 { border-bottom: 0; min-height: 50vh; }
.page-head--404 .hero__actions { margin-top: 2rem; }

/* Документы */
.docs { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 3rem; align-items: start; }
.docs__side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 1.25rem; }
.search input {
  width: 100%; font: inherit; min-height: 48px; padding: .7rem .8rem;
  border: 1px solid var(--ink); border-radius: var(--radius); background: var(--surface);
}
.docs__nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.docs__nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.docs__nav a:hover { color: var(--signal-text); }
.docs__group { margin-bottom: 3rem; }
.docs__group[hidden] { display: none; }
.docs__group .h3 { margin-bottom: 1rem; }
.docs__empty, .docs__nothing { color: var(--ink-2); background: var(--surface); padding: 1rem 1.25rem; border-left: 4px solid var(--signal); }
.doclist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.doc + .doc { border-top: 1px solid var(--line); }
.doc[hidden] { display: none; }
.doc a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1rem; padding: .9rem 1.1rem; text-decoration: none; }
.doc a:hover { background: color-mix(in srgb, var(--signal) 10%, var(--surface)); }
.doc__title { font-weight: 600; }
.doc__note { grid-column: 1; grid-row: 2; font-size: .85rem; color: var(--steel); }
.doc__ext {
  grid-column: 2; grid-row: 1 / span 2;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: .2rem .5rem; border: 1px solid var(--ink); border-radius: 2px;
}
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 2rem; }
  .docs__side { position: static; }
}

/* Контакты */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem 4rem; align-items: start; }
.hotline { background: var(--ink); color: #dfe5ea; padding: 2rem; }
.hotline__label { margin-bottom: .5rem; }
.hotline__phone { display: block; color: var(--signal-bright); font-size: clamp(1.6rem, 3vw, 2.2rem); text-decoration: none; margin-bottom: 1.25rem; white-space: nowrap; }
.hotline__mail { margin: 0; }
.hotline__mail a { color: #fff; }
.staff { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.staff__item { padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.staff__item:nth-child(even) { padding-left: 1.5rem; padding-right: 0; border-left: 1px solid var(--line); }
.staff__role { font-size: 1rem; font-weight: 600; margin: 0 0 .25rem; font-family: var(--f-body); }
.staff__person { color: var(--steel); margin-bottom: .5rem; }
.staff__phones { margin: 0; line-height: 1.7; }
.staff__phones a { text-decoration: none; font-variant-numeric: tabular-nums; }
.staff__phones a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .contacts { grid-template-columns: 1fr; }
  .staff { grid-template-columns: 1fr; }
  .staff__item, .staff__item:nth-child(even) { padding: 1.1rem 0; border-left: 0; }
}

.reqs { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem 4rem; }
.reqs .h2 { margin-bottom: 1rem; }
.reqs__list { margin: 0; border-top: 2px solid var(--ink); }
.reqs__row { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.reqs__row dt { color: var(--steel); }
.reqs__row dd { margin: 0; font-variant-numeric: tabular-nums; word-break: break-word; }
@media (max-width: 860px) {
  .reqs { grid-template-columns: 1fr; }
  .reqs__row { grid-template-columns: 1fr; gap: .1rem; }
}

/* Видео */
.videos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.videos__frame { aspect-ratio: 16 / 9; background: var(--ink); }
.videos__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.videos__title { font-weight: 600; margin-top: .75rem; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }
.empty { max-width: 60ch; }

/* Текстовые страницы */
.prose { max-width: 70ch; }
.prose h2 { font-family: var(--f-display); font-weight: 500; font-size: 1.15rem; margin: 2rem 0 .6rem; }

/* Подвал */
.foot { background: var(--ink); color: #b9c4cd; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.foot__brand { color: #fff; font-size: 1.1rem; margin-bottom: .75rem; }
.foot__company p:last-child { max-width: 34ch; }
.foot__label { color: var(--signal-bright); font-weight: 600; margin-bottom: .5rem; }
.foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }

/* Нижняя панель действий (только телефоны) */
.mbar { display: none; }

/* ===== Мобильная версия ===== */
a, button, input, textarea, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .section { padding: 2.5rem 0; }
  .section--tight { padding-top: 1.5rem; }
  .section__head { margin-bottom: 1.25rem; }
  .section__note { font-size: .95rem; }
  .page-head { padding: 1.75rem 0 1.25rem; }
  .page-head__lead { font-size: 1rem; }

  /* Шапка: ниже, логотип компактнее, меню прокручивается и не уезжает за экран */
  .brand img { width: 36px; }
  .menu { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
  body.menu-open { overflow: hidden; }

  /* Первый экран: кнопки во всю ширину, схема компактнее */
  .hero { padding-top: 1.75rem; }
  .hero__kicker { font-size: .85rem; margin-bottom: .75rem; }
  .hero__title { font-size: clamp(1.85rem, 8.6vw, 2.4rem); margin-bottom: 1rem; max-width: none; }
  .hero__lead { font-size: 1rem; margin-bottom: 1.5rem; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__meta { text-align: center; }
  .hero__figure { max-width: 300px; margin: .25rem 0 0 calc(var(--gutter) * -1); }
  .hero__facts { margin-top: 1.25rem; }
  .hero__facts li { padding: .8rem 0; }
  .hero__facts a { font-size: 1.1rem; }
  .hero__facts span { font-size: .85rem; }

  /* Каталог: плотные карточки, характеристики сеткой 2×2 */
  .chips { margin-bottom: 1.25rem; padding-top: .6rem; padding-bottom: .6rem; }
  .chip { min-height: 38px; font-size: .9rem; }
  .catalog__title { font-size: 1.05rem; margin-bottom: .75rem; }
  .pcards { gap: .6rem; }
  .pcard { gap: .8rem; padding: .8rem; }
  .pcard__media { width: 72px; height: 72px; }
  .pcard__name { font-size: 1.02rem; }
  .pcard__kind { font-size: .82rem; }
  .pcard__specs { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .75rem; margin-top: .55rem; }
  .pcard__specs div { display: block; padding: 0; }
  .pcard__specs div + div { border-top: 0; }
  .pcard__specs dt { width: auto; font-size: .76rem; line-height: 1.2; }
  .pcard__specs dd { font-size: .9rem; line-height: 1.25; }
  .pcard__text { font-size: .86rem; -webkit-line-clamp: 2; margin-top: .45rem; }
  .pcard__actions { padding-top: .35rem; }
  .pcard__actions { align-items: center; gap: .3rem .8rem; font-size: .85rem; }
  .pcard__order { min-height: 40px; padding: .3rem .7rem; font-size: .85rem; }
  .pcard__doc { white-space: nowrap; }
  .pcard__doc { display: inline-flex; align-items: center; min-height: 40px; }

  /* Продукция */
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .models__code { font-size: 1.15rem; }
  .line, .line + .line { padding: 1.1rem 0; }

  /* Применение и проекты: по два в ряд, без огромных плиток */
  .apps { gap: .6rem; }
  .apps__item { aspect-ratio: 1 / 1; }
  .apps__title { font-size: .95rem; padding: 2rem .8rem .8rem; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .75rem; }
  .project__img { padding: .4rem; margin-bottom: .6rem; }
  .project__title { font-size: .98rem; line-height: 1.3; }
  .project__action { font-size: .88rem; }

  .band { padding: 2.5rem 0; }
  .band__links a { padding: .85rem 0; }

  /* Форма: кнопка во всю ширину, поля без лишних отступов */
  .order { gap: 1.25rem; }
  .form { padding: 1.1rem; }
  .form .btn { width: 100%; }
  .field { margin-bottom: .9rem; }
  .field input, .field textarea { font-size: 16px; } /* iOS не приближает поле при фокусе */

  /* Страница товара: сначала главные цифры, фото небольшое, таблица — списком */
  .product { gap: 1.25rem; }
  .pkeys { grid-template-columns: 1fr 1fr; }
  .pkeys div { padding: .6rem .8rem; border-right: 0; }
  .pkeys div:nth-child(odd) { border-right: 1px solid var(--line); }
  .pkeys div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pkeys dd { font-size: 1rem; }
  .product__order { display: none; } /* на телефоне — в нижней панели */
  .crumbs { font-size: .88rem; margin-bottom: .6rem; }
  .product__media { max-width: none; }
  .product__media img { max-width: 240px; margin: 0 auto; }
  .product__lead { font-size: 1.02rem; }
  .product__h { font-size: 1.05rem; margin-top: 1.5rem; }
  .spec, .spec tbody, .spec tr, .spec td { display: block; width: auto; }
  .spec tr:first-child { display: none; }
  .spec tr { padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .spec td { padding: 0; border: 0; background: none !important; }
  .spec td:first-child { display: none; }
  .spec td:nth-child(2) { color: var(--steel); font-size: .88rem; line-height: 1.35; }
  .spec td:nth-child(3) { font-weight: 600; margin-top: .15rem; }

  /* Документы: поиск прилипает под шапкой */
  .docs { gap: .75rem; }
  .docs__side { display: contents; } /* чтобы поиск прилипал на всю длину списка */
  .docs__main { margin-top: .75rem; }
  .search { position: sticky; top: var(--header-h); z-index: 5; margin: 0 calc(var(--gutter) * -1); padding: .6rem var(--gutter); background: var(--paper); }
  .search input { font-size: 16px; }
  .docs__nav { flex-direction: row; flex-wrap: wrap; gap: .4rem; border-top: 0; }
  .docs__nav a { padding: .45rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
  .doc a { padding: .8rem .9rem; }
  .docs__group { margin-bottom: 2rem; scroll-margin-top: calc(var(--header-h) + 70px); }

  .hotline { padding: 1.4rem; }
  .foot { padding-top: 2.5rem; }

  /* Нижняя панель: позвонить и оставить заявку под большим пальцем */
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    padding: .5rem var(--gutter) calc(.5rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    transition: transform .2s ease;
  }
  .mbar .btn { min-height: 46px; padding: .5rem .75rem; font-size: .95rem; }
  .mbar.is-hidden, body.menu-open .mbar { transform: translateY(110%); }
  .menu { box-shadow: 0 24px 40px -24px rgba(15, 42, 74, .45); }
  .foot { padding-bottom: calc(1.5rem + 64px + env(safe-area-inset-bottom)); }
  .foot__grid { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .top, .foot, .form, .burger, .hero__figure { display: none !important; }
  body { background: #fff; }
}
