/* =========================================================================
   БЛАГОСТРОЙ КРОВ — единая тема сайта (index, privacy, thanks, 404)
   ========================================================================= */
:root {
  --color-brand:        #EA5B0C;   /* оранжевый акцент — как у fortrent.ru */
  --color-brand-hover:  #C94B08;
  --color-brand-dark:   #1F2429;   /* графит — хедер-топбар, футер, заголовки */
  --color-brand-dark-2: #2B3238;
  --color-text:         #1F2429;
  --color-text-muted:   #62696F;
  --color-bg:           #ffffff;
  --color-bg-alt:       #F5F3F0;
  --color-border:       #E1DED8;
  --color-error:        #dc2626;
  --color-white:        #ffffff;

  --radius:  10px;
  --shadow:  0 10px 28px rgba(31,36,41,.10);
  --maxw:    1180px;
  --font:    "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-brand); text-decoration: none; }
a:hover { color: var(--color-brand-hover); text-decoration: underline; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 10px;
}

/* ---------------- ВЕРХНЯЯ ИНФО-ПОЛОСА ---------------- */
.topbar {
  background: var(--color-brand-dark);
  color: #C8CCD0;
  font-size: 13px;
}
.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
}
.topbar a { color: #C8CCD0; }
.topbar a:hover { color: #fff; text-decoration: none; }
.topbar__phone { font-weight: 700; color: #fff; }
.topbar__item + .topbar__item { margin-left: 22px; }
.topbar__row > div { padding: 6px 0; }

/* ---------------- ХЕДЕР ---------------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }

.site-nav ul { display: flex; gap: 26px; }
.site-nav a { color: var(--color-text); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--color-brand); text-decoration: none; }

.header-cta { display: flex; align-items: center; gap: 18px; }
.header-cta__phone { white-space: nowrap; }

/* Бургер для мобильной версии */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px; border-radius: 2px;
  background: var(--color-brand-dark);
  transition: .25s;
}

/* ---------------- КНОПКИ ---------------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .05s ease, border-color .2s ease;
  text-align: center;
  white-space: nowrap;
}
.btn--primary { background: var(--color-brand); color: var(--color-white); }
.btn--primary:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  box-shadow: 0 8px 20px rgba(234,91,12,.35);
  color: var(--color-white);
  text-decoration: none;
}
.btn--outline { background: transparent; color: var(--color-brand); }
.btn--outline:hover { background: var(--color-brand); color: var(--color-white); text-decoration: none; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--block { display: block; width: 100%; }
.btn--lg { padding: 17px 34px; font-size: 16px; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- HERO ---------------- */
.hero {
  background: linear-gradient(135deg, rgba(31,36,41,.86), rgba(31,36,41,.72)), var(--hero-img) center/cover no-repeat;
  color: #fff;
  padding: 76px 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: start;
}
.hero h1 { font-size: 42px; line-height: 1.16; margin-bottom: 18px; }
.hero p.lead-sub { font-size: 18px; color: #DCDFE2; margin-bottom: 26px; max-width: 560px; }

.hero__stats {
  display: flex;
  gap: 28px;
  margin: 30px 0 32px;
  flex-wrap: wrap;
}
.hero__stat b { display: block; font-size: 26px; color: var(--color-brand); }
.hero__stat span { font-size: 13px; color: #C8CCD0; }

/* ---------------- СЕКЦИИ ---------------- */
.section { padding: 70px 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-brand-dark); color: #E7E9EB; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section h2 { font-size: 32px; margin-bottom: 12px; }
.section-head p { color: var(--color-text-muted); font-size: 16px; }
.section--dark .section-head p { color: #B7BBBF; }

/* ---------------- КАРТОЧКИ ---------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card__icon { font-size: 30px; margin-bottom: 12px; display: block; }
.card h3 { margin-bottom: 8px; font-size: 18px; }
.card p { color: var(--color-text-muted); font-size: 14.5px; }

.badge-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.badge-card {
  background: var(--color-brand-dark-2);
  border-radius: var(--radius);
  padding: 22px 20px;
  border-left: 3px solid var(--color-brand);
}
.badge-card h3 { font-size: 16px; margin-bottom: 6px; color: #fff; }
.badge-card p { font-size: 13.5px; color: #ADB2B7; }

/* ---------------- ТЕХНИКА: характеристика → польза ---------------- */
.tech {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.tech__photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tech__specs { display: grid; gap: 16px; }
.spec {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 16px 18px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  align-items: start;
}
.spec b { color: var(--color-brand); font-size: 15px; }
.spec .spec__value { font-weight: 800; font-size: 17px; color: var(--color-text); }
.spec .spec__benefit { color: var(--color-text-muted); font-size: 14px; margin-top: 2px; }

/* ---------------- ЭТАПЫ РАБОТЫ ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step { position: relative; padding-top: 8px; }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--color-text-muted); font-size: 14px; }

/* ---------------- ГАЛЕРЕЯ ---------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}

/* ---------------- ЦЕНА ---------------- */
.price-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}
.price-block__value { font-size: 46px; font-weight: 800; color: var(--color-brand); line-height: 1; }
.price-block__value span { font-size: 18px; color: var(--color-text); font-weight: 600; }
.price-block__note { color: var(--color-text-muted); margin-top: 10px; max-width: 520px; }

/* ---------------- FAQ ---------------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--color-brand);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--color-text-muted); }

/* ---------------- КОНТАКТЫ ---------------- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
.contacts-info { display: grid; gap: 22px; align-content: start; }
.contacts-info__item b { display: block; font-size: 15px; margin-bottom: 4px; }
.contacts-info__item span, .contacts-info__item a { color: var(--color-text-muted); }
.contacts-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); min-height: 320px; }
.contacts-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------------- ФОРМА ЗАЯВКИ ---------------- */
.lead-form {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
  padding: 30px;
  max-width: 440px;
  color: var(--color-text);
}
.lead-form h3 { font-size: 22px; margin-bottom: 6px; }
.lead-form .form-subtitle { color: var(--color-text-muted); margin-bottom: 20px; font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  transition: border-color .2s;
}
.field input:focus { outline: none; border-color: var(--color-brand); }
.field input.is-invalid { border-color: var(--color-error); }

.field-error { display: none; color: var(--color-error); font-size: 13px; margin-top: 6px; }
.field-error.is-visible { display: block; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}
.consent input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 1px;
  accent-color: var(--color-brand);
  cursor: pointer;
  flex-shrink: 0;
}
.consent a { text-decoration: underline; }

.form-note { font-size: 12.5px; color: var(--color-text-muted); text-align: center; margin-top: 12px; }

/* ---------------- ГОРИЗОНТАЛЬНАЯ ФОРМА (блок «Как проходит работа») ---------------- */
.steps-cta { margin-top: 48px; }
.lead-form--horizontal {
  max-width: 100%;
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.lead-form--horizontal .lead-form__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.lead-form--horizontal .field { flex: 1 1 220px; margin-bottom: 0; }
.lead-form--horizontal .btn { flex: 0 0 auto; height: 49px; }
.lead-form--horizontal .consent { margin-top: 16px; margin-bottom: 0; }

/* ---------------- МОДАЛЬНОЕ ОКНО ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  overflow-y: auto;
  padding: 5vh 20px;
}
.modal.is-open { display: block; }
.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 41, .6);
  opacity: 0;
  transition: opacity .25s ease;
}
.modal.is-open .modal__overlay { opacity: 1; }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  transform: translateY(16px) scale(.98);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
}
.modal.is-open .modal__box { transform: translateY(0) scale(1); opacity: 1; }
.modal__box .lead-form { max-width: 100%; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .05s ease;
  z-index: 2;
}
.modal__close:hover { background: var(--color-border); color: var(--color-text); }
.modal__close:active { transform: scale(.92); }
body.modal-open { overflow: hidden; }

/* ---------------- CTA-ПОЛОСА ---------------- */
.cta-strip {
  background: var(--color-brand);
  color: #fff;
  padding: 44px 0;
  text-align: center;
}
.cta-strip h2 { font-size: 26px; margin-bottom: 18px; }

/* ---------------- ФУТЕР ---------------- */
.site-footer { background: var(--color-brand-dark); color: #B7BBBF; padding: 50px 0 24px; margin-top: auto; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .logo img { height: 40px; }
.site-footer p { font-size: 13.5px; margin-top: 14px; line-height: 1.6; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer a { color: #B7BBBF; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer__list { display: grid; gap: 10px; }
.site-footer__phone { font-size: 19px; font-weight: 800; color: #fff; display: block; margin-bottom: 4px; }
.site-footer__hours { font-size: 13.5px; }
.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 34px;
  padding-top: 18px;
  font-size: 12.5px;
  opacity: .75;
  text-align: center;
}

/* Sticky-подвал */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page main { flex: 1 0 auto; }

/* ---------------- СЛУЖЕБНЫЕ СТРАНИЦЫ (404, thanks, privacy) ---------------- */
.centered { text-align: center; padding: 90px 0; max-width: 640px; margin: 0 auto; }
.centered h1 { font-size: 38px; margin-bottom: 16px; }
.centered .lead { font-size: 18px; color: var(--color-text-muted); margin-bottom: 28px; }
.status-code { font-size: 100px; font-weight: 800; color: var(--color-brand); line-height: 1; }

.thanks-data {
  display: inline-block;
  text-align: left;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 20px 26px;
  margin: 8px 0 28px;
}
.thanks-data div { margin: 4px 0; }
.thanks-data span { font-weight: 700; }

.legal-text { max-width: 820px; margin: 0 auto; padding: 52px 0; }
.legal-text h1 { font-size: 32px; margin-bottom: 26px; }
.legal-text h2 { font-size: 20px; margin: 30px 0 10px; }
.legal-text h3 { font-size: 16px; margin: 16px 0 6px; }
.legal-text p  { margin-bottom: 12px; color: #374151; }
.legal-text ul { margin: 0 0 12px 22px; list-style: disc; color: #374151; }
.legal-text table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 14px; }
.legal-text th, .legal-text td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-text th { background: var(--color-bg-alt); }

/* =========================================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================================= */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .badge-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item--wide { grid-column: span 1; }
  .contacts-grid { grid-template-columns: 1fr; }
  .tech { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 32px; }
  .cards { grid-template-columns: 1fr; }
  .cards--4 { grid-template-columns: 1fr; }
  .badge-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .price-block { grid-template-columns: 1fr; text-align: center; }
  .price-block__note { margin-left: auto; margin-right: auto; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .site-footer .logo { justify-content: center; }
  .site-footer__list { justify-items: center; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 82px; left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 20px; }
  .site-nav li { padding: 12px 0; border-bottom: 1px solid var(--color-bg-alt); }

  .header-cta .header-cta__phone { display: none; }
  .header-cta .btn { display: none; }
  .lead-form { max-width: 100%; padding: 24px; }
  .lead-form--horizontal .lead-form__row { flex-direction: column; align-items: stretch; }
  .lead-form--horizontal .btn { width: 100%; }
  .modal__box { max-width: 100%; }
  .status-code { font-size: 76px; }
  .centered h1 { font-size: 28px; }
  .topbar__item--hours { display: none; }
  .topbar__item--address { display: none; }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery__item--tall { grid-row: span 1; }
}

@media (max-width: 480px) {
  .hero { padding: 52px 0; }
  .section { padding: 46px 0; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .hero__stats { gap: 20px; }
}
