/* ==========================================================================
   ЛЕС 12 — основная таблица стилей
   Mobile-first. Без внешних зависимостей. Без фреймворков.
   Палитра и типографика — согласно /docs/design-brief.md
   ========================================================================== */

/* ---------- 1. Токены ---------- */
:root {
  /* Палитра */
  --forest: #1F4D2E;
  --forest-light: #2E6B41;
  --forest-dark: #163A22;
  --wood: #8B5E3C;
  --wood-light: #B08463;
  --sand: #F5EFE6;
  --sand-dark: #E8DCC8;
  --accent: #C2410C;
  --accent-hover: #9A330A;
  --wa: #25D366;
  --tg: #229ED9;

  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --ink-3: #6B6B6B;
  --line: #D8CFC2;
  --line-soft: #EDE6DA;
  --ok: #15803D;
  --err: #B91C1C;

  /* Типографика */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PT Sans',
          'Helvetica Neue', Arial, sans-serif;

  /* Шкала отступов (кратна 4) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px;

  /* Радиусы */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Тени */
  --sh-1: 0 1px 2px rgba(0,0,0,.06);
  --sh-2: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(31,77,46,.08);
  --sh-3: 0 4px 12px rgba(31,77,46,.12), 0 16px 40px rgba(31,77,46,.10);

  /* Сетка */
  --container: 1320px;
  --gutter: 16px;
  --header-h: 60px;
  --sticky-h: 64px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --header-h: 68px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --header-h: 76px; }
}

/* ---------- 2. Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--forest);
  text-wrap: balance;
}

p { margin: 0; }
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: var(--forest-light); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
ul, ol { margin: 0; padding: 0; }
li { margin: 0; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* Доступность: видимый фокус */
:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Скип-ссылка */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--forest);
  color: #fff;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Типографическая шкала ---------- */
.h1, h1 { font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3rem); }
.h2, h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.125rem); }
.h3, h3 { font-size: clamp(1.1875rem, 1.08rem + 0.45vw, 1.375rem); }
.h4, h4 { font-size: 1.0625rem; font-weight: 700; }
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-2);
}
.small { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.micro {
  font-size: 0.75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
  /* затемнённый древесный — контраст 5.9:1 на белом, 5.2:1 на песочном (WCAG AA) */
  color: #6B4423;
}
/* Светлый вариант на тёмных фонах */
.section--forest .micro,
.calc__result .micro,
.cta-band .micro,
.footer h3 { color: #E8C568; }

/* .field-label по умолчанию */
.field-label { color: #6B4423; }
.muted { color: var(--ink-2); }

/* Длинные слова («конфиденциальности») не должны раздувать страницу на 320px */
h1, h2, h3, h4, p, li, dd, dt, caption, .card__title { overflow-wrap: break-word; }
@media (max-width: 379px) {
  h1 { font-size: clamp(1.5rem, 8vw, 2.25rem); }
}

/* ---------- 4. Сетка и контейнеры ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s4); }
@media (min-width: 1024px) { .section { padding-block: var(--s5); } }

.section--sand { background: var(--sand); }
.section--forest { background: var(--forest); color: #fff; }
.section--forest h2, .section--forest h3 { color: #fff; }
.section--forest .lead, .section--forest p { color: rgba(255,255,255,.86); }

.section-head { margin-bottom: 10px; }
@media (min-width: 768px) { .section-head { margin-bottom: var(--s4); } }
.section-head .micro { display: block; margin-bottom: var(--s2); }
.section-head p { margin-top: var(--s3); max-width: 68ch; }

/* ---------- 5. Кнопки ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--sh-1);
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); }

.btn--primary { --btn-bg: var(--accent); }
.btn--primary:hover { --btn-bg: var(--accent-hover); }
.btn--secondary { --btn-bg: var(--forest); }
.btn--secondary:hover { --btn-bg: var(--forest-light); }
.btn--wa { --btn-bg: var(--wa); color: #0b3d1f; }
.btn--wa:hover { --btn-bg: #1FBF5A; color: #0b3d1f; }
.btn--tg { --btn-bg: var(--tg); }
.btn--tg:hover { --btn-bg: #1B8CBF; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--forest);
  border-color: var(--forest);
  box-shadow: none;
}
.btn--ghost:hover { --btn-bg: var(--forest); --btn-fg: #fff; }
.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255,255,255,.55);
  box-shadow: none;
}
.btn--ghost-light:hover { --btn-bg: #fff; --btn-fg: var(--forest); }

.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }

.btn__hint {
  display: block;
  margin-top: var(--s2);
  font-size: .8125rem;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.4;
}
.section--forest .btn__hint { color: rgba(255,255,255,.75); }

/* ---------- 6. Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--forest);
  flex-shrink: 0;
}
.logo:hover { color: var(--forest); }
.logo__mark { width: 34px; height: 34px; flex-shrink: 0; }
@media (min-width: 1180px) { .logo__mark { width: 40px; height: 40px; } }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.logo__name { font-size: 1.0625rem; font-weight: 800; letter-spacing: .02em; }
.logo__sub {
  font-size: .625rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wood);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 379px) { .logo__sub { display: none; } }
.logo { min-width: 0; }
@media (min-width: 1180px) {
  .logo__name { font-size: 1.25rem; }
  .logo__sub { font-size: .6875rem; }
}

.header__nav { display: none; }
@media (min-width: 1180px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: var(--s3);
  }
  .header__phone { font-size: .875rem; }
  .header__nav a {
    padding: 8px 7px;
    font-size: .875rem;
    border-radius: var(--r-sm);
    color: var(--ink);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
  .header__nav a:hover { background: var(--sand); color: var(--forest); }
  .header__nav a[aria-current="page"] { color: var(--forest); background: var(--sand); }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-left: auto;
  flex-shrink: 0;
}

.header__phone { display: none; }
@media (min-width: 768px) {
  .header__phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
    text-decoration: none;
    color: var(--forest);
    font-weight: 800;
    font-size: 1.0625rem;
    white-space: nowrap;
  }
  .header__phone span {
    font-size: .6875rem;
    font-weight: 600;
    color: var(--ink-3);
    letter-spacing: .02em;
  }
  .header__phone:hover { color: var(--accent); }
}

.header__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--forest);
  color: #fff;
  flex-shrink: 0;
}
.header__call:hover { background: var(--forest-light); color: #fff; }
@media (min-width: 768px) { .header__call { display: none; } }

.header__cta { display: none; }
@media (min-width: 1360px) {
  .header__cta { display: inline-flex; min-height: 44px; padding: 10px 18px; font-size: .9375rem; }
}

@media (min-width: 1320px) {
  .header__nav { gap: var(--s2); margin-left: var(--s5); }
  .header__phone { font-size: 1.0625rem; }
  .header__nav a { padding: 8px 10px; font-size: .9375rem; }
}

/* Бургер */
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--forest);
  flex-shrink: 0;
  padding: 0;
}
.burger:hover { background: var(--sand); }
@media (min-width: 1180px) { .burger { display: none; } }

/* Мобильное меню */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform .25s ease;
  overflow-y: auto;
  padding: var(--s5) var(--gutter) var(--s8);
  visibility: hidden;
}
.mobile-nav[data-open="true"] { transform: translateX(0); visibility: visible; }
.mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s5);
}
.mobile-nav ul { list-style: none; }
.mobile-nav li + li { border-top: 1px solid var(--line-soft); }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav a:hover { color: var(--forest); }
/* Блок контактов закреплён внизу меню: кнопка «Оставить заявку» видна сразу,
   даже когда список страниц длиннее экрана */
.mobile-nav__contacts {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: var(--s4) 0 var(--s3);
  background: var(--white);
  box-shadow: 0 -10px 24px rgba(0,0,0,.07);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.mobile-nav__contacts a.btn { justify-content: center; }
/* Кнопки в меню не должны наследовать зелёный цвет ссылок */
.mobile-nav__contacts a.btn--primary { color: #fff; }
.mobile-nav__contacts a.btn--wa { color: #0b3d1f; }
.mobile-nav__contacts a { display: inline-flex; align-items: center; gap: var(--s2); font-size: 1.125rem; font-weight: 800; color: var(--forest); }

.no-scroll { overflow: hidden; }

/* ---------- 7. Первый экран ---------- */
.hero {
  position: relative;
  padding-block: var(--s5) var(--s7);
  background:
    radial-gradient(120% 100% at 85% 0%, rgba(139,94,60,.13) 0%, rgba(139,94,60,0) 55%),
    linear-gradient(180deg, #FBF7F1 0%, var(--sand) 100%);
  overflow: hidden;
}
@media (min-width: 1024px) { .hero { padding-block: var(--s6) var(--s6); } }

.hero__grid { display: grid; gap: var(--s5); }
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: var(--s6);
  }
}

.hero__badges { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }

.hero h1 { margin-bottom: var(--s3); }
.hero__lead { margin-bottom: var(--s3); max-width: 54ch; }

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
@media (min-width: 480px) {
  .hero__cta { flex-direction: row; flex-wrap: wrap; }
  .hero__cta > .btn { flex: 1 1 auto; }
}

/* УТП-строка */
.usp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) { .usp { grid-template-columns: repeat(4, 1fr); gap: var(--s3); } }
.usp__item { display: flex; align-items: flex-start; gap: var(--s2); }
.usp__item svg { flex-shrink: 0; width: 26px; height: 26px; color: var(--forest); }
.usp__item b { display: block; font-size: .875rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.usp__item span { display: block; font-size: .75rem; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }

/* Карточка «машина дров» в hero */
.hero__card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
}
.hero__card-media { position: relative; aspect-ratio: 16 / 9; background: var(--sand-dark); }
.hero__card-media img, .hero__card-media svg { width: 100%; height: 100%; object-fit: cover; }
.hero__price-tag {
  position: absolute;
  left: var(--s4);
  bottom: var(--s4);
  background: var(--forest);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--sh-2);
}
.hero__price-tag small { display: block; font-size: .6875rem; font-weight: 600; opacity: .85; }
.hero__card-body { padding: var(--s4); }
.hero__card-body h2 { font-size: 1.125rem; margin-bottom: var(--s2); }
.hero__card-body ul { list-style: none; display: grid; gap: 6px; margin-bottom: var(--s4); }
.hero__card-body li {
  display: flex; gap: var(--s2); align-items: flex-start;
  font-size: .9375rem; color: var(--ink-2);
}
.hero__card-body li svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--ok); margin-top: 3px; }

/* УТП-строка на всю ширину hero */
.hero .usp { margin-top: var(--s5); }
@media (min-width: 1024px) {
  .hero .usp { margin-top: var(--s6); padding-top: var(--s4); }
  .usp__item b { font-size: .9375rem; }
  .usp__item span { font-size: .8125rem; }
}

/* ---------- 8. Бейджи и чипы ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1.2;
  white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--accent { background: #FEF2E8; border-color: #F6C8A8; color: var(--accent); }
.badge--forest { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ---------- 9. Карточки пород ---------- */
.cards {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(4, 1fr); gap: var(--s3); } }
.cards--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line); }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--sand-dark);
  overflow: hidden;
}
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: cover; }
.card__flag {
  position: absolute;
  top: var(--s2); left: var(--s2);
  background: var(--accent);
  color: #fff;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.card__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 1.125rem; font-weight: 700; color: var(--forest); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card__specs { list-style: none; display: grid; gap: 5px; font-size: .875rem; }
.card__specs li { display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); }
.card__specs li svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 3px; }
.spec-plus svg { color: var(--ok); }
.spec-minus svg { color: var(--err); }

.card__price {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px dashed var(--line);
}
.card__price-main { font-size: 1.25rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.card__price-main { text-wrap: balance; }
.card__price-main span { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.card__price-sub { font-size: .8125rem; color: var(--ink-2); margin-top: 2px; }
.card__actions { display: flex; gap: var(--s2); margin-top: var(--s3); }
.card__actions .btn { flex: 1; min-height: 44px; padding: 10px 12px; font-size: .875rem; }

/* ---------- 10. Калькулятор ---------- */
.calc {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
}
.calc__body { padding: var(--s4); display: grid; gap: var(--s5); }
@media (min-width: 768px) { .calc__body { padding: var(--s6); } }
@media (min-width: 1024px) {
  .calc__body { grid-template-columns: 1.15fr .85fr; gap: var(--s7); align-items: start; }
}

.fieldset { border: 0; margin: 0; padding: 0; }
.fieldset + .fieldset { margin-top: var(--s5); }
.fieldset legend, .field-label {
  display: block;
  padding: 0;
  margin-bottom: var(--s3);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6B4423;
}

.radio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
@media (min-width: 480px) { .radio-grid { grid-template-columns: repeat(3, 1fr); } }
.radio-tile { position: relative; }
.radio-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-tile label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 8px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
}
.radio-tile label:hover { border-color: var(--wood-light); background: var(--sand); }
.radio-tile input:checked + label {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}
.radio-tile input:focus-visible + label { outline: 3px solid var(--forest); outline-offset: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--wood-light); background: var(--sand); }
.chip[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }

.range-wrap { display: flex; align-items: center; gap: var(--s3); }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 8px; border-radius: 4px;
  background: var(--sand-dark);
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 3px solid #fff;
  box-shadow: var(--sh-1); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); border: 3px solid #fff;
  box-shadow: var(--sh-1); cursor: grab;
}
.range-value {
  min-width: 74px;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--forest);
  padding: 6px 10px;
  background: var(--sand);
  border-radius: var(--r-sm);
}

.calc__result {
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-dark) 100%);
  border-radius: var(--r-md);
  padding: var(--s4);
  color: #fff;
}
@media (min-width: 768px) { .calc__result { padding: var(--s5); } }
.calc__result .micro { color: #C9A227; }
.calc__total { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 800; line-height: 1.1; margin: var(--s2) 0 var(--s1); }
.calc__note { font-size: .8125rem; color: rgba(255,255,255,.78); line-height: 1.45; }
.calc__lines { list-style: none; margin: var(--s4) 0; padding: var(--s3) 0; border-top: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); display: grid; gap: 8px; font-size: .875rem; }
.calc__lines li { display: flex; justify-content: space-between; gap: var(--s2); }
.calc__lines dt, .calc__lines span:first-child { color: rgba(255,255,255,.8); }
.calc__lines b { font-weight: 700; }

/* ---------- 11. Поля формы ---------- */
.field { display: block; margin-bottom: var(--s3); }
.field > span:first-child, .field label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #9B9B9B; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--wood-light); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31,77,46,.14);
}
.textarea { min-height: 92px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--err); }

.check { display: flex; gap: var(--s2); align-items: flex-start; font-size: .8125rem; color: var(--ink-2); line-height: 1.45; }
.check input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); }
.check a { color: var(--forest); }

.form-error { color: var(--err); font-size: .8125rem; margin-top: 6px; display: none; }
.form-error[data-show="true"] { display: block; }

.form-msg { border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin-top: var(--s3); font-size: .9375rem; display: none; }
.form-msg[data-show="true"] { display: flex; gap: var(--s2); align-items: flex-start; }
.form-msg--ok { background: #ECFDF3; color: #14532D; border: 1px solid #A7E4BF; }
.form-msg--err { background: #FEF2F2; color: #7F1D1D; border: 1px solid #FBCACA; }
.form-msg svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }

/* ---------- 12. Шаги ---------- */
.steps { display: grid; gap: var(--s4); counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }

.step { position: relative; padding-top: 52px; } /* 40px кружок + 12px зазор, иначе номер наезжает на заголовок */
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  font-size: 1.0625rem;
}
.step h3 { font-size: 1.0625rem; margin-bottom: 6px; }
@media (min-width: 1024px) { .step { padding-top: 56px; } }
.step p { font-size: .9375rem; color: var(--ink-2); }
.section--forest .step::before { background: var(--accent); }

/* ---------- 13. Преимущества ---------- */
.features { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }

.feature {
  padding: var(--s4);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: var(--sand);
  color: var(--forest);
  margin-bottom: var(--s3);
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.feature p { font-size: .9375rem; color: var(--ink-2); }

/* ---------- 14. Блок доверия («честный объём») ---------- */
.trust {
  display: grid;
  gap: var(--s5);
  align-items: center;
}
@media (min-width: 1024px) { .trust { grid-template-columns: 1fr 1fr; gap: var(--s8); } }
.trust__list { list-style: none; display: grid; gap: var(--s3); }
.trust__list li { display: flex; gap: var(--s3); align-items: flex-start; }
.trust__list svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--forest); margin-top: 2px; }
.trust__list b { display: block; color: var(--ink); }
.trust__list span { font-size: .9375rem; color: var(--ink-2); }
.section--forest .trust__list svg { color: #7FD99A; }
.section--forest .trust__list b { color: #fff; }
.section--forest .trust__list span { color: rgba(255,255,255,.82); }

.trust__visual {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  aspect-ratio: 4 / 3;
}
.trust__visual svg { width: 100%; height: 100%; }

/* ---------- 15. Отзывы ---------- */
.reviews { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

.review {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.review__text { font-size: .9375rem; color: var(--ink-2); line-height: 1.6; }
.review__text::before { content: '«'; }
.review__text::after { content: '»'; }
.review__author { display: flex; align-items: center; gap: var(--s3); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line-soft); }
.review__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sand); color: var(--forest);
  font-weight: 800; font-size: .9375rem; flex-shrink: 0;
}
.review__name { font-weight: 700; font-size: .9375rem; color: var(--ink); line-height: 1.2; }
.review__meta { font-size: .75rem; color: var(--ink-3); }

/* ---------- 16. FAQ ---------- */
.faq { display: grid; gap: var(--s2); }
.faq details {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq details[open] { border-color: var(--wood-light); box-shadow: var(--sh-1); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  list-style: none;
  min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--sand); }
.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  background: currentColor;
  clip-path: polygon(50% 15%, 60% 25%, 50% 35%, 40% 25%); /* placeholder перекрыт ниже */
  background: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq__body { padding: 0 var(--s4) var(--s4); font-size: .9375rem; color: var(--ink-2); line-height: 1.65; }
.faq__body p + p { margin-top: var(--s2); }

/* ---------- 17. Пиломатериалы / таблица ---------- */
/* Grid/flex-элементы не должны раздуваться от широкого содержимого
   (таблицы с min-width, длинные слова, iframe) */
.trust > *,
.grid-2 > *,
.grid-3 > *,
.steps > *,
.features > *,
.cards > *,
.reviews > *,
.mill-grid > *,
.contacts-grid > *,
.calc__body > *,
.footer__grid > *,
.hero__grid > *,
.section-head > * { min-width: 0; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  max-width: 100%;
}
table.data { min-width: 480px; font-size: .9375rem; }
table.data caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 700; color: var(--forest); background: var(--sand); }
table.data th, table.data td { padding: 12px var(--s4); text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data thead th { background: var(--sand); font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: var(--wood); white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #FCFAF6; }
table.data td.num { white-space: nowrap; font-weight: 700; }

/* ---------- 18. CTA-полоса ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent) 0%, #8F2E08 100%);
  color: #fff;
  padding-block: var(--s5);
}
@media (min-width: 1024px) { .cta-band { padding-block: var(--s6); } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); }
.cta-band__inner { display: grid; gap: var(--s4); }
@media (min-width: 768px) {
  .cta-band__inner { grid-template-columns: 1fr auto; align-items: center; gap: var(--s6); }
}
.cta-band__actions { display: flex; flex-direction: column; gap: var(--s2); }
@media (min-width: 480px) { .cta-band__actions { flex-direction: row; flex-wrap: wrap; } }
.cta-band .btn--primary { background: #fff; color: var(--accent); }
.cta-band .btn--primary:hover { background: #FFF3EB; color: var(--accent); }
.cta-band .btn--ghost-light { border-color: rgba(255,255,255,.65); }

/* ---------- 19. Контакты ---------- */
.contacts-grid { display: grid; gap: var(--s5); }
@media (min-width: 1024px) { .contacts-grid { grid-template-columns: 1fr 1fr; gap: var(--s7); } }

.contact-list { list-style: none; display: grid; gap: var(--s4); }
.contact-list li { display: flex; gap: var(--s3); align-items: flex-start; }
.contact-list svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--forest); margin-top: 3px; }
.contact-list b { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--wood); font-weight: 700; margin-bottom: 2px; }
.contact-list a, .contact-list span { font-size: 1.0625rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

.map-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sand);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s4);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.map-wrap:has(iframe) { padding: 0; }

/* Фасад карты: iframe грузится только по клику (быстрее LCP, нет cookie) */
.map-facade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  padding: var(--s5) var(--s4);
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.map-facade:hover { background: var(--sand-dark); }
.map-facade__icon { width: 38px; height: 38px; color: var(--forest); }
.map-facade__title { font-weight: 700; font-size: 1rem; color: var(--forest); }
.map-facade__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  margin-top: var(--s2);
  border-radius: var(--r-sm);
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
  pointer-events: none;
}
.map-facade:hover .map-facade__btn { background: var(--forest-light); }
.map-facade__hint { font-size: .75rem; color: var(--ink-3); max-width: 34ch; line-height: 1.4; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--s4);
}
@media (min-width: 768px) { .form-card { padding: var(--s6); } }

/* ---------- 20. Футер ---------- */
.footer {
  background: var(--forest-dark);
  color: rgba(255,255,255,.78);
  padding-block: var(--s6) var(--s5);
  font-size: .9375rem;
}
.footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: var(--s5); }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s6); } }
.footer h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.55); margin-bottom: var(--s3); font-weight: 700; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer .logo__name, .footer .logo { color: #fff; }
.footer .logo__sub { color: rgba(255,255,255,.6); }
.footer__bottom {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,.14);
  display: grid;
  gap: var(--s2);
  font-size: .8125rem;
  color: rgba(255,255,255,.6);
}
@media (min-width: 768px) { .footer__bottom { grid-template-columns: 1fr auto; align-items: center; } }
.footer__requisites { font-size: .8125rem; line-height: 1.6; color: rgba(255,255,255,.6); }

/* ---------- 21. Липкая мобильная панель ---------- */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: translateY(110%);
  transition: transform .25s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
}
.sticky-bar[data-show="true"] { transform: translateY(0); }
.sticky-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--sticky-h);
  background: var(--white);
  color: var(--forest);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 4px;
}
.sticky-bar a:hover { color: var(--accent); background: var(--sand); }
.sticky-bar a svg { width: 22px; height: 22px; }
.sticky-bar a.is-primary { background: var(--accent); color: #fff; }
.sticky-bar a.is-primary:hover { background: var(--accent-hover); color: #fff; }
.sticky-bar a.is-wa { color: #0B6B2E; }
@media (min-width: 1024px) { .sticky-bar { display: none; } }

body { padding-bottom: 0; }
@media (max-width: 1023px) { body { padding-bottom: var(--sticky-h); } }

/* ---------- 22. Хлебные крошки ---------- */
.breadcrumbs { padding-block: var(--s3); font-size: .8125rem; color: var(--ink-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: '/'; color: var(--line); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--forest); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink-3); }

/* ---------- 23. Страница-заголовок ---------- */
.page-head { background: var(--sand); padding-block: var(--s5) var(--s6); }
@media (min-width: 1024px) { .page-head { padding-block: var(--s6) var(--s7); } }
.page-head h1 { margin-bottom: var(--s3); }
.page-head p { max-width: 68ch; }

/* ---------- 24. Прозы ---------- */
.prose { max-width: 68ch; }
.prose--wide { max-width: 88ch; }
.prose > * + * { margin-top: var(--s3); }
.prose h2 { margin-top: var(--s6); }
.prose h3 { margin-top: var(--s5); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: 6px; }
.prose li { color: var(--ink-2); }
.prose ul li::marker { color: var(--wood); }

/* ---------- 25. Плитки пиломатериалов ---------- */
.mill-grid { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .mill-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .mill-grid { grid-template-columns: repeat(3, 1fr); } }
.mill {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.mill h3 { font-size: 1rem; }
.mill dl { display: grid; gap: 4px; font-size: .875rem; margin: 0; }
.mill dt { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.mill dd { margin: 0 0 6px; color: var(--ink-2); }
.mill__price { margin-top: auto; padding-top: var(--s3); border-top: 1px dashed var(--line); display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
.mill__price b { font-size: 1.125rem; color: var(--ink); white-space: nowrap; }
.mill__price span { white-space: nowrap; }
.mill__price span { font-size: .8125rem; color: var(--ink-3); }


/* ---------- Блок «Позвоните» вместо формы ---------- */
.call-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  align-items: flex-start;
}
.call-card__phone {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 800;
  color: var(--forest);
  letter-spacing: -.01em;
  line-height: 1.15;
  white-space: nowrap;
  text-decoration: none;
}
.call-card__phone:hover { color: var(--forest-light); text-decoration: underline; text-underline-offset: 4px; }
.call-card__hint { font-size: .9375rem; color: var(--ink-2); margin-bottom: var(--s2); }
.call-card .btn { margin-top: auto; }
@media (min-width: 480px) { .call-card { padding: var(--s6); } }


/* Кнопка-блок на узких экранах: одна главная CTA на всю ширину */
@media (max-width: 479px) {
  .btn--block-mobile { width: 100%; }
}

/* ---------- 26. Утилиты ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.mb-4 { margin-bottom: var(--s4); }
.mb-5 { margin-bottom: var(--s5); }
.center { text-align: center; }
.stack-3 > * + * { margin-top: var(--s3); }
.stack-4 > * + * { margin-top: var(--s4); }
.flow-actions { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.grid-2 { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-3 { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Печать */
@media print {
  .header, .sticky-bar, .mobile-nav, .cta-band, .footer { display: none !important; }
  body { padding-bottom: 0; color: #000; }
  .card, .feature, .review { break-inside: avoid; border: 1px solid #999; }
}
