/* ---------- Токены ---------- */
:root {
  --concrete: #ECEDEA;   /* фон, поверхность блока */
  --graphite: #22272B;   /* текст, тёмные секции */
  --ash: #868C89;        /* линии, декор */
  --ash-text: #5B615E;   /* второстепенный текст (контраст AA на бетоне) */
  --pallet: #B9874C;     /* дерево поддона, мелкие детали */
  --cab: #1F4FA3;        /* кнопки и ссылки, кабина шаланды */
  --cab-dark: #173D80;
  --paper: #FAFAF8;      /* бланк заявки */
  --block: #B9BDBA;      /* тело блока на схемах */

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Golos Text', 'Segoe UI', Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --header-h: 68px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--graphite);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cab); }
:focus-visible { outline: 3px solid var(--pallet); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.dark { background: var(--graphite); color: var(--concrete); }
.dark a { color: #9DBBEE; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.h2 {
  font: 700 clamp(26px, 3.6vw, 40px)/1.12 var(--font-display);
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}
h3 { font: 600 19px/1.3 var(--font-body); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: 4px;
  font: 600 16px/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn--primary { background: var(--cab); color: #fff; }
.btn--primary:hover { background: var(--cab-dark); }
.btn--ghost { border-color: var(--graphite); color: var(--graphite); background: transparent; }
.btn--ghost:hover { background: var(--graphite); color: var(--concrete); }
.btn--block { width: 100%; }
.btn--big { min-height: 56px; padding-inline: 32px; font-size: 17px; }
.link { font-weight: 600; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--concrete);
  border-bottom: 1px solid rgba(134, 140, 137, .35);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--graphite); text-decoration: none; }
.logo__mark { width: 50px; height: 28px; }
.logo__text { font: 700 18px/1 var(--font-display); letter-spacing: -0.01em; }
.logo--light { color: var(--concrete); }

.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--graphite); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--cab); }

.header__contacts { display: flex; align-items: center; gap: 8px; }
.header__phone { color: var(--graphite); font-weight: 600; text-decoration: none; margin-right: 8px; white-space: nowrap; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn--wa { background: #1E8E4E; }
.icon-btn--tg { background: #2481C6; }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--graphite); margin: 5px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero { padding-top: clamp(40px, 7vw, 96px); overflow: hidden; }
.hero__text { max-width: 1000px; }
.hero__title {
  font: 700 clamp(26px, 6vw, 72px)/1.05 var(--font-display);
  overflow-wrap: break-word;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 56ch; color: var(--ash-text); margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 12px 32px; color: var(--ash-text); }
.hero__facts strong { color: var(--graphite); }

.hero__photo { max-width: 1440px; margin: clamp(32px, 5vw, 56px) auto 0; }
.hero__photo img { width: 100%; height: clamp(240px, 42vw, 600px); object-fit: cover; object-position: 30% 55%; }

/* ---------- Почему мы ---------- */
.why__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--graphite);
}
.why__item { padding: 24px 24px 0 0; }
.why__item + .why__item { padding-left: 24px; border-left: 1px solid rgba(134, 140, 137, .5); }
.why__item h3 { margin-bottom: 8px; }
.why__item p { color: var(--ash-text); }

/* ---------- Каталог: кладка со сдвигом рядов ---------- */
.catalog { background: #E2E3DF; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 48px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head .h2 { margin-bottom: 0; }
.section__head p { max-width: 44ch; color: var(--ash-text); }

.bond {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;                      /* шов кладки */
  background: var(--ash);
  padding: 8px;
}
.block-card, .bond__note, .bond__half { background: var(--paper); }
.block-card { grid-column: span 2; display: flex; flex-direction: column; padding: 24px; }
.bond__half { grid-column: span 1; background: var(--concrete); }
.bond__note { grid-column: span 2; padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.bond__note p { color: var(--ash-text); }

.block-card__photo { margin: -24px -24px 20px; }
.block-card__photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.block-card__title { font: 700 22px/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: 6px; }
.block-card__desc { color: var(--ash-text); margin-bottom: 18px; }
.block-card__price { margin-bottom: 14px; color: var(--ash-text); }
.block-card__price span { font: 700 34px/1 var(--font-display); color: var(--graphite); letter-spacing: -0.03em; margin-right: 6px; }
.block-card__pack { margin-bottom: 22px; margin-top: auto; }
.block-card__pack div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--ash); }
.block-card__pack dt { color: var(--ash-text); }
.block-card__pack dd { font-weight: 600; white-space: nowrap; }
.catalog__hint { margin-top: 14px; font-size: 14px; color: var(--ash-text); }

/* ---------- Другие товары на базе ---------- */
.goods__list { border-top: 2px solid var(--graphite); }
.goods__item {
  display: grid; grid-template-columns: minmax(220px, 1.1fr) 2fr auto;
  align-items: center; gap: 12px 32px;
  padding: 20px 0; border-bottom: 1px solid var(--ash);
}
.goods__name { font: 700 20px/1.25 var(--font-display); letter-spacing: -0.02em; }
.goods__packs { display: flex; flex-wrap: wrap; gap: 8px; }
.goods__packs li { padding: 6px 12px; border: 1px solid var(--ash); background: var(--paper); font-weight: 500; font-size: 15px; }
.goods + .product { padding-top: 0; }

/* ---------- Сколько блоков ---------- */
.product__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.product__inner p { max-width: 60ch; }
.product__inner p + p { margin-top: 14px; }
.product__example { border-left: 4px solid var(--pallet); padding: 4px 0 4px 28px; }
.product__example h3 { margin-bottom: 12px; }
.product__note { color: var(--ash-text); font-size: 15px; }

/* ---------- Доставка ---------- */
.delivery__inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); }
.delivery__lead { color: #C5C9C6; font-size: 18px; max-width: 40ch; }
.delivery__list div { padding: 18px 0; border-top: 1px solid rgba(236, 237, 234, .2); display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.delivery__list div:last-child { border-bottom: 1px solid rgba(236, 237, 234, .2); }
.delivery__list dt { color: #A9AEAB; }
.delivery__list dd { font-weight: 500; }

/* ---------- Бригадам ---------- */
.teams__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.teams__list h3 { margin-bottom: 8px; padding-top: 16px; border-top: 2px solid var(--graphite); }
.teams__list p { color: var(--ash-text); }

/* ---------- Фото ---------- */
.gallery { padding-top: 0; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 380px; gap: 20px 12px; }
.photo--wide { grid-column: span 2; }
.photo img { flex: 1; min-height: 0; width: 100%; object-fit: cover; background: #DCDDD9; }
.photo { display: flex; flex-direction: column; }
.photo figcaption { margin-top: 8px; font-size: 15px; color: var(--ash-text); }

/* ---------- Шаги ---------- */
.steps { background: #E2E3DF; }
.steps__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: none; }
.steps__num { display: block; font: 700 40px/1 var(--font-display); color: var(--cab); margin-bottom: 16px; letter-spacing: -0.03em; }
.steps__list h3 { margin-bottom: 8px; }
.steps__list p { color: var(--ash-text); }

/* ---------- Вопросы ---------- */
.faq__inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 5vw, 80px); }
.faq__list details { border-top: 1px solid var(--ash); }
.faq__list details:last-child { border-bottom: 1px solid var(--ash); }
.faq__list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-weight: 600; font-size: 18px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: '+'; font: 600 24px/1 var(--font-display); color: var(--cab); transition: transform .2s; }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { padding: 0 0 22px; max-width: 62ch; color: var(--ash-text); }

/* ---------- Заявка в виде накладной ---------- */
.order__heading { max-width: 22ch; }
.waybill {
  position: relative;
  background: var(--paper); color: var(--graphite);
  max-width: 920px;
  padding: clamp(24px, 4vw, 48px);
  border-top: 10px solid var(--cab);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.waybill__top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; border-bottom: 2px solid var(--graphite); }
.waybill__title { font: 700 clamp(20px, 2.6vw, 28px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.waybill__meta { color: var(--ash-text); font-variant-numeric: tabular-nums; }

.waybill__row { display: grid; grid-template-columns: 1.6fr 1fr; border-bottom: 1px solid var(--ash); }
.waybill__row--half { grid-template-columns: 1fr 1fr; }
.waybill__row--single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 14px 0; }
.field + .field { padding-left: 20px; border-left: 1px solid var(--ash); }
.field__label { font-size: 14px; color: var(--ash-text); }
.field input[type="text"], .field input[type="tel"], .field select {
  width: 100%; border: 0; border-bottom: 2px solid transparent; background: transparent;
  padding: 6px 0; font: 500 18px/1.3 var(--font-body); color: var(--graphite);
  border-radius: 0;
}
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--cab); }
.field input::placeholder { color: #9EA3A0; }
.field--check { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.field--check input { width: 22px; height: 22px; accent-color: var(--cab); }
.field__error { color: #B3261E; font-size: 14px; }
.field.is-invalid input { border-bottom-color: #B3261E; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.waybill__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.waybill__hint { color: var(--ash-text); font-size: 15px; max-width: 44ch; }
.waybill__hint a { color: var(--cab); }
.waybill__status:not(:empty) { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--cab); background: #E8EEF8; }
.waybill__status.is-error { border-left-color: #B3261E; background: #FBEAE9; }
.waybill.is-sent .waybill__row,
.waybill.is-sent .waybill__bottom { opacity: .45; pointer-events: none; }

/* ---------- Подвал ---------- */
.footer { background: #181C1F; color: var(--concrete); padding-block: clamp(48px, 7vw, 88px); }
.footer a { color: var(--concrete); }
.footer__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 5vw, 64px); }
.footer__list { margin: 28px 0; display: grid; gap: 16px; }
.footer__list dt { color: #A9AEAB; font-size: 15px; }
.footer__list dd { font-size: 18px; font-weight: 500; }
.footer__copy { color: #A9AEAB; font-size: 14px; }
.footer__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- Плавающие кнопки (только телефон) ---------- */
.float-bar { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: block; }
  .header__contacts { margin-left: auto; }
  .nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--concrete); border-bottom: 1px solid var(--ash);
    padding: 8px var(--gutter) 16px;
  }
  .nav.is-open a { padding: 12px 0; font-size: 18px; }

  .why__grid { grid-template-columns: 1fr 1fr; }
  .why__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .why__item { padding-bottom: 24px; }

  .bond { grid-template-columns: 1fr 1fr; }
  .bond__half { display: none; }
  .block-card, .bond__note { grid-column: auto; }
  .steps__list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .header__phone { display: none; }

  .why__grid { grid-template-columns: 1fr; }
  .why__item, .why__item + .why__item { padding: 20px 0; border-left: 0; }
  .why__item + .why__item { border-top: 1px solid rgba(134, 140, 137, .5); }

  .bond { grid-template-columns: 1fr; }

  .goods__item { grid-template-columns: 1fr; }
  .goods__item .btn { justify-self: start; }
  .product__inner, .delivery__inner, .faq__inner, .footer__inner { grid-template-columns: 1fr; }
  .delivery__list div { grid-template-columns: 1fr; gap: 4px; }
  .teams__list, .steps__list { grid-template-columns: 1fr; }
  .hero__photo img { height: auto; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .photo--wide { grid-column: auto; }
  .h2 { font-size: clamp(22px, 6.4vw, 26px); overflow-wrap: break-word; }

  .waybill__row, .waybill__row--half { grid-template-columns: 1fr; }
  .field, .field + .field { padding: 14px 0 12px; border-left: 0; }
  .field + .field { border-top: 1px solid var(--ash); }
  .waybill__bottom .btn { width: 100%; }

  .float-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);
  }
  .float-bar__btn {
    display: grid; place-items: center; min-height: 56px;
    background: var(--cab); color: #fff; font-weight: 600; text-decoration: none;
  }
  .float-bar__btn--wa { background: #1E8E4E; }
}
