/* ============================================
   Лендинг + калькулятор сыпучих материалов
   Стиль: Corporate Light
   ============================================ */

/* ============================================================
   АВАРИЙНАЯ МОБИЛЬНАЯ СТРАХОВКА (inline в main.css)
   Срабатывает ВСЕГДА — даже если mobile.css не залит.
   Главный фикс: min-width:0 на всех grid-item, чтобы карта/инпуты
   не растягивали колонку шире viewport.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0;
}

@media (max-width: 1023px) {
  /* На планшетах/мобиле калькулятор всегда в одну колонку */
  .calc__body { display: block !important; grid-template-columns: none !important; }
  .calc, .calc__body, .calc__head, .calc__form, .calc__result,
  .calc-section, .calc-section > .container, section > .container {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .calc__form, .calc__result {
    width: auto !important;
    border-right: none !important;
  }
  /* Карта не должна вылезать за родителя */
  #map { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  /* Все инпуты и trucks — min-width:0 чтобы не растягивали grid */
  .field, .trucks, .truck-card, .amount, .address-search {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* Ymaps подсказки не вылезают */
  ymaps[class*="-suggest"], .ymaps-suggest {
    max-width: calc(100vw - 24px) !important;
  }
}

@media (max-width: 600px) {
  .container, .calc-section > .container, section > .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .calc__form, .calc__result { padding: 14px !important; }
  .calc__head { padding: 16px 14px !important; }
  /* Поле объёма +/- */
  .amount {
    display: grid !important;
    grid-template-columns: 52px 1fr 52px !important;
  }
  .amount button { width: 52px !important; flex: 0 0 52px !important; }
  .amount input { width: 100% !important; min-width: 0 !important; text-align: center !important; }
  /* Адрес */
  .address-search { display: flex !important; gap: 6px !important; }
  .address-search__input { flex: 1 1 auto !important; min-width: 0 !important; font-size: 16px !important; }
  .address-search__btn { flex: 0 0 48px !important; width: 48px !important; }
  .address-search__btn-text { display: none !important; }
  /* Карта */
  #map { height: 280px !important; }
  /* Карточки машин — в столбик */
  .trucks { display: flex !important; flex-direction: column !important; gap: 8px !important; }
  .truck-card { width: 100% !important; }
}
/* ============================================================
   КОНЕЦ АВАРИЙНОЙ СТРАХОВКИ — дальше обычный CSS темы
   ============================================================ */

:root {
  --bg:        #FFFFFF;
  --surface:   #F4F6F9;
  --surface-2: #EAEEF4;
  --accent:    #F2B600;  /* жёлтый самосвальный */
  --accent-dark: #C99500; /* тёмный более насыщенный желтый для hover */
  --accent-soft: #FFF6D6; /* лёгкий кремовый для фонов */
  --text:      #0F1923;
  --text-soft: #5A6573;
  --border:    #DDE2EA;
  --danger:    #DC2626;
  --warning:   #F59E0B;
  --success:   #16A34A;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 2px 8px rgba(15,25,35,0.04), 0 8px 32px rgba(15,25,35,0.06);
  --shadow-lg: 0 8px 24px rgba(15,25,35,0.08), 0 24px 64px rgba(15,25,35,0.10);

  --font-display: 'Manrope', 'Helvetica Neue', sans-serif;
  --font-body:    'Inter', 'Arial', sans-serif;

  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

section { padding: 60px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }

.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all .2s ease;
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--text);          /* тёмный текст на жёлтом */
  font-weight: 700;
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(242,182,0,0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--lg { padding: 18px 36px; font-size: 1.05rem; min-height: 56px; }
.btn--block { width: 100%; }

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav__list {
  display: none;
  list-style: none;
  gap: 32px;
}
.nav__list a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav__list a:hover { color: var(--accent); }
.header__phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.header__cta { display: none; }
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 6px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}
.nav.is-open .nav__list {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px); /* dvh — динамический viewport на iOS, учитывает адресную строку */
  width: 100%;
  max-width: 100%;
  background: #fff;
  padding: 32px 24px 40px;
  gap: 20px;
  border-top: 1px solid var(--border);
  z-index: 999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nav.is-open .nav__list li {
  width: 100%;
}
.nav.is-open .nav__list a {
  display: block;
  padding: 12px 0;
  font-size: 1.15rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

/* Затемнение фона под открытым меню */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(15, 25, 35, 0.4);
  z-index: 998;
  animation: fadeIn .2s ease-out;
}
.nav.is-open .nav-overlay {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Блокируем скролл страницы под открытым меню */
body.nav-open {
  overflow: hidden;
}

/* Анимация бургера в крестик */
.nav.is-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.is-open .burger span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (min-width: 1024px) {
  .nav__list { display: flex; }
  .header__phone { display: flex; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }
}

/* === HERO === */
.hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero { padding: 80px 0 60px; }
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 60px; }
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero__title { margin-bottom: 18px; }
.hero__title span { color: var(--accent); }
.hero__desc {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 540px;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
@media (min-width: 480px) {
  .hero__actions { flex-direction: row; }
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero__stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 6px;
}
.hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 100%);
  padding: 40px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 30% 20%, rgba(27,79,216,0.08) 0%, transparent 50%);
}
.truck-svg {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}
.hero__photo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(15, 25, 35, 0.18));
}
@media (max-width: 767px) {
  .hero__visual { padding: 20px; min-height: 220px; }
  .hero__photo  { max-width: 360px; }
}

/* === CALCULATOR (главный блок) === */
.calc-section {
  padding-top: 0;
}
.calc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.calc__head {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--text);
  padding: 28px 32px;
}
.calc__head h2 { color: var(--text); margin-bottom: 6px; }
.calc__head p { color: rgba(15,25,35,0.78); font-size: 0.95rem; }

.calc__body {
  display: grid;
  gap: 0;
}
@media (min-width: 1024px) {
  .calc__body { grid-template-columns: 1.2fr 1fr; }
}
.calc__form {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 600px) {
  .calc__form { padding: 24px; }
}
@media (min-width: 1024px) {
  .calc__form { border-bottom: none; border-right: 1px solid var(--border); padding: 32px; }
}
.calc__result {
  padding: 16px;
  background: var(--surface);
}
@media (min-width: 600px) { .calc__result { padding: 24px; } }
@media (min-width: 1024px) { .calc__result { padding: 32px; } }

.field {
  margin-bottom: 22px;
}
.field__label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}
.field__hint {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 6px;
}

.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px; height: 8px;
  border: 2px solid var(--text-soft);
  border-top: 0;
  border-left: 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  appearance: none;
  cursor: pointer;
  transition: border-color .2s;
}
.select:focus { outline: none; border-color: var(--accent); }

/* Тумблер режима */
.toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  position: relative;
  border: 1.5px solid var(--border);
}
.toggle input { display: none; }
.toggle label {
  text-align: center;
  padding: 12px 8px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.toggle input:checked + label {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(15,25,35,0.06);
}

/* Числовое поле с +/- */
.amount {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.amount button {
  background: var(--surface);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  transition: background .15s;
}
.amount button:hover { background: var(--surface-2); }
.amount input {
  border: none;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  padding: 14px 4px;
  background: #fff;
  -moz-appearance: textfield;
}
.amount input::-webkit-outer-spin-button,
.amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount input:focus { outline: none; }
.amount__unit {
  display: inline-block;
  margin-left: 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Поиск адреса */
.address-search {
  position: relative;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.address-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 44px 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.address-search__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242,182,0,0.18);
}
.address-search__clear {
  position: absolute;
  /* Правее инпута, но левее кнопки «Найти». Калькуляция: ширина кнопки ~108пкс + gap 8пкс + 8пкс отступ */
  right: 124px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--text-soft);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.address-search__clear:hover { background: var(--surface); color: var(--text); }

/* Кнопка «Найти» */
.address-search__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: auto;
  min-height: 48px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.address-search__btn:hover { background: #ffc933; box-shadow: 0 4px 12px rgba(242,182,0,0.32); }
.address-search__btn:active { transform: translateY(1px); }
.address-search__btn.is-loading { opacity: .7; pointer-events: none; }
.address-search__btn-icon { font-size: 16px; line-height: 1; }
@media (max-width: 600px) {
  .address-search { gap: 6px; }
  .address-search__input {
    padding: 12px 38px 12px 14px !important;
    font-size: 16px; /* не меньше 16px — иначе iOS зумит при фокусе */
    background-image: none !important;
    letter-spacing: -0.01em;
  }
  /* Когда в input уже введён адрес и он не в фокусе — уменьшаем шрифт, чтобы влезало больше текста.
     16px обязателен только в момент :focus — iOS зумит только при фокусе. */
  .address-search__input:not(:focus):not(:placeholder-shown) {
    font-size: 14px;
  }
  .address-search__btn-text { display: none; }
  .address-search__btn {
    padding: 0;
    width: 48px;
    min-width: 48px;
    flex: 0 0 48px;
  }
  .address-search__btn-icon { font-size: 18px; }
  .address-search__clear { right: 60px; width: 28px; height: 28px; font-size: 20px; }
}
@media (max-width: 360px) {
  .address-search__input { padding: 10px 36px 10px 12px !important; background-image: none !important; }
  .address-search__btn { width: 44px; min-width: 44px; flex: 0 0 44px; }
  .address-search__clear { right: 52px; }
}

/* Яндекс SuggestView выпадашка */
.ymaps-suggest {
  z-index: 60;
  /* Растянуть подсказки на всю ширину контейнера (input + кнопка), а не только под input */
  width: 100% !important;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}
.ymaps-suggest .ymaps-suggest-item,
.ymaps-suggest ymaps {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.ymaps-2-1-79-search__suggest-item,
ymaps[class*="-suggest-item"] {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 8px 12px !important;
  line-height: 1.35 !important;
  height: auto !important;
}

/* Карта */
#map {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 320px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: crosshair;     /* явный сигнал: нужно кликнуть */
  touch-action: pan-x pan-y;
}
@media (min-width: 768px) { #map { height: 380px; } }
#map:hover { cursor: crosshair; }
.map-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.map-info--warn { background: #FEF3C7; color: #92400E; }
.map-info--err  { background: #FEE2E2; color: #991B1B; }

/* Машины */
.trucks {
  display: grid;
  gap: 12px;
}
.truck-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  min-height: 84px;
}
.truck-card:hover { border-color: var(--accent); }
.truck-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(27,79,216,0.08);
}
.truck-card.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.truck-card__icon {
  width: 92px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.truck-card__icon svg,
.truck-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.truck-card__info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.truck-card__info-row > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.truck-card__name {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
  word-break: break-word;
}
.truck-card__cap {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.3;
}
.truck-card__price {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}
.truck-card__price small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 2px;
}

/* На очень узких экранах — два уровня (имя сверху, цена снизу) */
@media (max-width: 420px) {
  .truck-card {
    grid-template-columns: 78px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .truck-card__icon { width: 78px; height: 60px; }
  .truck-card__info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .truck-card__price { text-align: left; }
  .truck-card__price small { display: inline; margin-left: 6px; }
}

/* Результат */
.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 280px;
  color: var(--text-soft);
  text-align: center;
  padding: 20px;
}
.result-empty svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.4; }

.result-card { display: none; }
.result-card.is-visible { display: block; }

.result-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.result-cell {
  background: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 0;          /* при длинном value ячейка не распирает грид */
  overflow: hidden;
}
.result-cell.is-hidden { display: none; }
.result-cell__label { font-size: 0.78rem; color: var(--text-soft); margin-bottom: 4px; }
.result-cell__value { font-size: 1.05rem; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.result-cell--big { grid-column: 1 / -1; }

@media (max-width: 600px) {
  .result-grid { gap: 8px; margin-bottom: 14px; }
  .result-cell { padding: 8px 10px; }
  .result-cell__label { font-size: 0.7rem; margin-bottom: 2px; }
  .result-cell__value { font-size: 0.95rem; }
  .result-cell--accent .result-cell__value { font-size: 1.25rem !important; }
}
.result-cell--accent {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}
.result-cell--accent .result-cell__label { color: rgba(15,25,35,0.72); }
.result-cell--accent .result-cell__value { color: var(--text); font-size: 1.6rem; }

.warn {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 16px;
  border-left: 3px solid var(--warning);
}
.warn--err { background: #FEE2E2; color: #991B1B; border-color: var(--danger); }

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* === SECTIONS: FEATURES === */
.features {
  background: var(--surface);
}
.features-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature {
  background: #fff;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.feature__icon {
  width: 48px; height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--text-soft); font-size: 0.92rem; }

/* === MATERIALS === */
.materials-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .materials-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .materials-grid { grid-template-columns: repeat(4, 1fr); } }
.material-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .2s;
}
.material-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.material-card__icon { font-size: 2rem; margin-bottom: 10px; }
.material-card__name { font-weight: 600; font-size: 0.98rem; margin-bottom: 6px; }
.material-card__price { color: var(--accent); font-weight: 700; }
.material-card__price small { color: var(--text-soft); font-weight: 400; }

/* === HOW IT WORKS === */
.how { background: var(--surface); }
.how-steps {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .how-steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
}
.step__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 0.92rem; }

/* === FAQ === */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item__body {
  padding: 0 22px 18px;
  color: var(--text-soft);
}

/* === CTA === */
.cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--text);
  text-align: center;
  padding: 60px 0;
}
.cta h2 { color: var(--text); margin-bottom: 12px; }
.cta p { color: rgba(15,25,35,0.78); margin-bottom: 24px; font-size: 1.05rem; }
.cta .btn--primary {
  background: #0F1923;
  color: #fff;
  border: none;
}
.cta .btn--primary:hover { background: #1F2A38; color: #fff; }

/* === FOOTER === */
.footer {
  background: #0F1923;
  color: rgba(255,255,255,0.7);
  padding: 50px 0 24px;
  font-size: 0.92rem;
}
.footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer .logo { color: #fff; }

/* === Mobile sticky CTA === */
.mobile-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
@media (max-width: 1023px) {
  .mobile-cta.is-visible { display: block; }
  .mobile-cta.is-visible ~ .footer,
  body.has-mobile-cta { padding-bottom: 80px; }
}

/* Глобальные мобильные фиксы */
@media (max-width: 767px) {
  h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.9rem); }
  .hero__desc { font-size: 1rem; }
  .calc__head { padding: 22px 20px; }
  .calc__head h2 { font-size: 1.4rem; }
  .calc__form, .calc__result { padding: 20px; }
  .field { margin-bottom: 18px; }
  .field__label { font-size: 0.95rem; }
  .toggle label { font-size: 0.88rem; padding: 14px 6px; min-height: 44px; }
  .select { font-size: 16px; padding: 14px 44px 14px 14px; min-height: 48px; }
  .amount input { font-size: 16px; }
  #map { height: 280px; }
  .map-info { font-size: 0.85rem; flex-wrap: wrap; }
  .feature { padding: 22px 18px; }
  .feature h3 { font-size: 1.05rem; }
  .material-card { padding: 16px; }
  .material-card__name { font-size: 0.92rem; }
  .step { padding: 20px; }
  .step__num { font-size: 2rem; }
  .faq-item summary { padding: 16px 18px; font-size: 0.95rem; gap: 12px; }
  .faq-item__body { padding: 0 18px 16px; font-size: 0.92rem; }
  .cta { padding: 50px 0; }
  .cta h2 { font-size: 1.5rem; }
  .cta p  { font-size: 0.95rem; }
  .footer { padding: 40px 0 24px; }
  .modal { padding: 24px 20px; }
  .modal h3 { font-size: 1.2rem; }
  /* предотвращаем горизонтальный скролл */
  html, body { max-width: 100%; overflow-x: hidden; }
  .container { max-width: 100vw; }
  /* iOS Safari fix: предотвращаем zoom при фокусе на input */
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 0 30px; }
  .hero__title { font-size: clamp(1.6rem, 8vw, 2.2rem); line-height: 1.1; }
  .hero__stats { gap: 10px; }
  .hero__stat-num { font-size: 1.4rem; }
  .hero__stat-label { font-size: 0.78rem; }
  .hero__visual { padding: 16px; min-height: 200px; }
  .hero__photo { max-width: 280px; }
  .calc__head { padding: 18px 16px; }
  .calc__head h2 { font-size: 1.25rem; }
  .calc__head p { font-size: 0.88rem; }
  .calc__form, .calc__result { padding: 16px; }
  section { padding: 40px 0; }
  .section-subtitle { font-size: 0.95rem; margin-bottom: 28px; }
  .btn { padding: 14px 20px; font-size: 0.95rem; }
  .btn--lg { padding: 16px 24px; font-size: 1rem; }
  .header__inner { height: 64px; }
  .logo { font-size: 1.15rem; }
  .nav.is-open .nav__list { inset: 64px 0 0 0; }
  .materials-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-cell--big { grid-column: auto; }
  .result-cell--accent .result-cell__value { font-size: 1.4rem; }
}

/* === Modal === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s;
}
.modal-backdrop.is-open { display: flex; opacity: 1; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 8px; }
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 1.3rem;
  color: var(--text-soft);
}
.modal__close:hover { background: var(--surface-2); }
.modal .field input,
.modal .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}
.modal .field input:focus,
.modal .field textarea:focus { outline: none; border-color: var(--accent); }
.modal .field textarea { min-height: 80px; resize: vertical; }
.modal__summary {
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.7;
}
.modal__summary strong { color: var(--accent); }

.success-state {
  text-align: center;
  padding: 20px 0;
}
.success-state__icon {
  width: 64px; height: 64px;
  background: #DCFCE7;
  color: var(--success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
}
