/* Группа компаний «Мосанка», Ейск.
   Направление из дизайн-системы: «Accessible & Ethical» — высокий
   контраст, крупный текст, видимый фокус. Палитра промышленная:
   тёмно-синий + стальной синий, тёплый охристый как отсылка к дереву. */

:root {
  color-scheme: light;

  --ground: #F8FAFC;
  --panel: #FFFFFF;
  --sunken: #EEF2F6;

  --ink: #0F172A;
  --ink-soft: #33415A;
  --muted: #566178;

  --line: #DCE3EB;
  --line-soft: #E9EEF3;
  --line-strong: #97A3B4;

  --navy: #0F172A;
  --steel: #0369A1;
  --steel-ink: #075985;
  --steel-wash: #E5F0F8;

  /* тёплый акцент — дерево, погонаж, брикеты */
  --timber: #B45309;
  --timber-wash: #FBF0E3;

  --on-navy: #FFFFFF;
  --on-steel: #FFFFFF;

  /* шрифт обязан поддерживать кириллицу: у Plus Jakarta Sans её нет,
     и весь русский текст рисовался системной подменой */
  --sans: 'Manrope', system-ui, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1180px;
  --gutter: 20px;
  --radius: 12px;
  --radius-sm: 8px;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px;
  --s5: 32px; --s6: 48px; --s7: 72px;

  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .08), 0 18px 44px rgba(15, 23, 42, .13);
}

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

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.62 var(--sans);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

h1, h2, h3, h4 {
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 var(--s3);
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.1vw, 34px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

p { margin: 0 0 var(--s3); }

a { color: var(--steel-ink); text-underline-offset: .18em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--steel);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.vh {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--navy); color: #fff;
  padding: 12px 20px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ───────────────  Кнопки  ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 700 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn--primary { background: var(--steel); color: var(--on-steel); }
.btn--primary:hover { background: var(--steel-ink); color: #fff; }
.btn--navy { background: var(--navy); color: var(--on-navy); }
.btn--navy:hover { background: #1E293B; color: #fff; }
.btn--ghost { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--sunken); color: var(--ink); }

/* ───────────────  Шапка  ─────────────── */

.topline {
  background: var(--navy);
  color: #CBD9E6;
  font-size: 14px;
}
.topline__in {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 40px;
  flex-wrap: wrap;
}
.topline a { color: #CBD9E6; text-decoration: none; }
.topline a:hover { color: #fff; }
.topline span, .topline a { display: inline-flex; align-items: center; gap: 7px; }
.topline svg { width: 15px; height: 15px; opacity: .85; }
.topline__spacer { margin-left: auto; }
@media (max-width: 720px) {
  .topline__in { padding-block: 7px; min-height: 0; }
  .topline__hide { display: none; }
}

.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header__in {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.logo svg { width: 40px; height: 40px; }
.logo b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; display: block; }
.logo span { font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }

.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font: 600 15.5px/1.2 var(--sans);
}
.nav a:hover { background: var(--sunken); color: var(--ink); }
/* подчёркивание рисуем псевдоэлементом: inset-тень повторяла бы
   скругление кнопки и загибалась по краям */
.nav a[aria-current='page'] { color: var(--steel-ink); position: relative; }
.nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 6px;
  height: 2px;
  background: var(--steel);
  border-radius: 2px;
}
@media (max-width: 960px) {
  .nav.is-open a[aria-current='page']::after { display: none; }
}

.header__cta { flex: none; display: flex; align-items: center; gap: var(--s2); }
.header__phone {
  font: 800 17px/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.burger {
  display: none;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.burger svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .header__cta .btn { display: none; }
  .nav.is-open {
    display: grid;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: var(--s2) var(--gutter) var(--s4);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open a { min-height: 50px; font-size: 16.5px; }
}
@media (max-width: 520px) { .header__phone { display: none; } }

/* ───────────────  Первый экран  ─────────────── */

.hero {
  background:
    radial-gradient(90% 130% at 92% 0%, var(--steel-wash) 0%, transparent 58%),
    var(--sunken);
  border-bottom: 1px solid var(--line);
}
/* Отступы задаём через padding-block: класс висит на том же элементе,
   что и .wrap, и шорткат `padding` затирал его боковые поля — на узком
   экране текст упирался в края экрана и обрезался справа. */
.hero__in {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--s6);
  align-items: center;
  padding-block: var(--s7);
}
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; gap: var(--s5); padding-block: var(--s6); }
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: var(--s3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 13px/1 var(--sans);
  color: var(--steel-ink);
}
.hero__kicker svg { width: 15px; height: 15px; }
.hero p.lead { font-size: 19px; color: var(--ink-soft); max-width: 52ch; margin-bottom: var(--s4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.hero__facts b {
  display: block;
  font: 800 clamp(24px, 3.2vw, 32px)/1.05 var(--sans);
  color: var(--steel-ink);
  letter-spacing: -.02em;
}
.hero__facts span { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
/* на телефоне три колонки дают по 106 px, и подписи рвутся по слогам */
@media (max-width: 560px) {
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: var(--s2); }
}

.hero__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--s4);
  display: grid;
  gap: var(--s3);
}
.hero__panel h2 { font-size: 19px; margin: 0; }
.hero__co {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
}
.hero__co:last-of-type { border-bottom: 0; padding-bottom: 0; }
.hero__co:hover .hero__co-name { color: var(--steel-ink); }
.hero__co svg { width: 22px; height: 22px; color: var(--steel); flex: none; margin-top: 2px; }
.hero__co-name { display: block; font-weight: 700; font-size: 16px; }
.hero__co-txt { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ───────────────  Секции  ─────────────── */

.section { padding: var(--s7) 0; }
.section--tint { background: var(--sunken); border-block: 1px solid var(--line); }
.section--navy { background: var(--navy); color: #D6E2EE; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy a { color: #9FD0EE; }

.section__head { margin-bottom: var(--s5); max-width: 62ch; }
.section__head p { color: var(--muted); margin: var(--s2) 0 0; }
.section--navy .section__head p { color: #AEC2D4; }

.grid { display: grid; gap: var(--s3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.card:hover {
  border-color: var(--steel);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--ink);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: var(--s2);
  background: var(--steel-wash);
  border-radius: 10px;
  color: var(--steel-ink);
  flex: none;
}
.card__icon--timber { background: var(--timber-wash); color: var(--timber); }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.card__by {
  margin-top: auto;
  padding-top: var(--s3);
  font-size: 13px;
  font-weight: 600;
  color: var(--steel-ink);
}

/* ───────────────  Страница компании  ─────────────── */

.crumbs { padding: var(--s3) 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid var(--line-strong);
  border-top: 1.5px solid var(--line-strong);
  transform: rotate(45deg);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--steel-ink); text-decoration: underline; }

.page-head { padding: var(--s5) 0 var(--s4); }
.page-head p { color: var(--ink-soft); font-size: 19px; max-width: 60ch; margin: 0; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s6);
  align-items: start;
  padding-bottom: var(--s7);
}
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; gap: var(--s5); } }

/* min-width: 0 обязателен: .prose — ячейка грида, и по умолчанию она не
   сжимается уже своего содержимого. Из-за этого широкая таблица ТУ
   распирала страницу вбок, хотя лежит в .tablewrap с прокруткой. */
.prose { max-width: 70ch; min-width: 0; font-size: 17.5px; line-height: 1.72; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--s6) 0 var(--s3); }
.prose ul { padding-left: 1.3em; margin: 0 0 var(--s3); }
.prose li { margin-bottom: 7px; }
.prose li::marker { color: var(--steel); }

.aside { display: grid; gap: var(--s3); position: sticky; top: 84px; }
@media (max-width: 1000px) { .aside { position: static; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
}
.panel--steel { background: var(--steel-wash); border-color: transparent; }
.panel h3 { font-size: 17px; margin-bottom: var(--s2); }
.panel p { font-size: 14.5px; color: var(--muted); margin-bottom: var(--s3); }
.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.panel li a {
  display: block;
  padding: 10px 0;
  min-height: 42px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}
.panel li:last-child a { border-bottom: 0; }
.panel li a:hover { color: var(--steel-ink); }

.facts { display: grid; gap: var(--s3); }
.facts div { padding-bottom: var(--s3); border-bottom: 1px solid var(--line-soft); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts b { display: block; font: 800 20px/1.15 var(--sans); color: var(--steel-ink); }
.facts span { font-size: 13.5px; color: var(--muted); }

/* ───────────────  Таблица технических условий  ─────────────── */

.tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin: var(--s4) 0;
}
table.tu { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 780px; }
table.tu th, table.tu td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
table.tu thead th {
  position: sticky;
  top: 0;
  background: var(--sunken);
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tu tbody th { font-weight: 600; min-width: 220px; }
table.tu tbody tr:nth-child(even) { background: #FAFCFE; }
table.tu tbody tr:last-child th,
table.tu tbody tr:last-child td { border-bottom: 0; }

/* ───────────────  Контакты  ─────────────── */

.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 800px) { .contacts { grid-template-columns: 1fr; } }
.contacts b { display: block; font: 800 20px/1.25 var(--sans); margin-bottom: 4px; }

/* ───────────────  Подвал  ─────────────── */

.footer {
  background: var(--navy);
  color: #B9C9D9;
  font-size: 15px;
  padding: var(--s6) 0 var(--s5);
}
.footer a { color: #B9C9D9; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s5) var(--s4);
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h3 {
  color: #fff;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer li a { display: block; padding: 7px 0; min-height: 36px; }
.footer__phone { display: block; font: 800 22px/1.2 var(--sans); color: #fff; }
.footer__phone:hover { color: #fff; text-decoration: none; }
.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, .15);
  margin-top: var(--s5);
  padding-top: var(--s4);
  font-size: 13px;
  color: #8FA3B7;
}
