/* ДК Тайга — пиломатериал от производителя
   Палитра взята из логотипа: графит-олива + песочный, акценты — свежий распил и лиственница. */

:root {
  --ink:        #22241D;
  --ink-deep:   #191B14;
  --ink-raise:  #2B2E24;
  --sand:       #DED2B9;
  --sand-dim:   #9C947E;
  --sand-faint: #6E6857;
  --saw:        #D89B4E;
  --larch:      #A85A2B;
  --line:       rgba(222, 210, 185, .14);
  --line-soft:  rgba(222, 210, 185, .07);

  --display: "Arial Black", "Arial Bold", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --pad: clamp(18px, 4vw, 48px);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.on-mobile { display: none; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--sand);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

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

/* ---------- типографика ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.015em;
  line-height: .98;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(33px, 4.6vw, 58px); }
h2 { font-size: clamp(28px, 4.4vw, 52px); }
h3 { font-size: clamp(17px, 2vw, 22px); letter-spacing: 0; }

p { margin: 0; }

.lead {
  font-size: clamp(17px, 1.9vw, 21px);
  color: var(--sand-dim);
  max-width: 62ch;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand-faint);
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ink-deep) 92%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}

.top__in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}

.brand__mark { width: auto; height: 30px; flex: none; }

.brand__name {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -.01em;
  text-transform: uppercase;
  line-height: 1;
}

.brand__sub {
  display: block;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sand-faint);
  line-height: 1;
  margin-top: 5px;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  white-space: nowrap;
}

.nav a {
  text-decoration: none;
  color: var(--sand-dim);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}

.nav a:hover { color: var(--sand); border-bottom-color: var(--saw); }

.top__phone {
  font-family: var(--display);
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.01em;
}

.top__phone:hover { color: var(--saw); }

@media (max-width: 1180px) { .nav { display: none; } }
@media (max-width: 560px) { .top__phone { display: none; } }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  font-family: var(--display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid var(--saw);
  background: var(--saw);
  color: var(--ink-deep);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.btn:hover { background: #E8AE5F; border-color: #E8AE5F; }

.btn--ghost {
  background: transparent;
  color: var(--sand);
  border-color: var(--line);
}

.btn--ghost:hover { background: transparent; border-color: var(--sand); color: var(--sand); }

.btn--sm { padding: 11px 18px; font-size: 13px; }

/* ---------- главный экран ---------- */

.hero { position: relative; border-bottom: 1px solid var(--line); }

.hero__bg { position: absolute; inset: 0; overflow: hidden; }

.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, var(--ink) 26%, rgba(34,36,29,.86) 50%, rgba(34,36,29,.35) 100%),
    linear-gradient(to top, var(--ink) 2%, transparent 42%);
}

.hero__in {
  position: relative;
  padding-block: clamp(64px, 12vw, 128px) clamp(28px, 4vw, 44px);
  display: grid;
  gap: 26px;
  max-width: 900px;
}

.hero__eyebrow { display: flex; align-items: center; gap: 12px; }

.hero__eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
  max-width: 180px;
}

.hero h1 span { color: var(--saw); display: block; }

@media (min-width: 700px) { .hero h1 span { white-space: nowrap; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero__note { font-size: 14px; color: var(--sand-dim); }

/* полоса фактов под заголовком */
.facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.facts > div {
  padding: 22px 26px 26px;
  border-right: 1px solid var(--line);
}

.facts > div:first-child { padding-left: 0; }

.facts > div:last-child { border-right: 0; }

.facts b {
  display: block;
  font-family: var(--display);
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}

.facts span { font-size: 14px; color: var(--sand-dim); }

@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div { padding: 18px 20px 20px; border-bottom: 1px solid var(--line); }
  .facts > div:nth-child(2n+1) { padding-left: 0; }
  .facts > div:nth-child(2n) { border-right: 0; }
  .facts > div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- секции ---------- */

.sec { padding-block: clamp(56px, 8vw, 104px); border-bottom: 1px solid var(--line); }

.sec--flat { border-bottom: 0; }

.sec__head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(32px, 5vw, 52px);
  max-width: 760px;
}

/* ---------- бирки с ценами ---------- */

.tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tag {
  background: var(--ink);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background .18s;
}

.tag:hover { background: var(--ink-raise); }

.tag__title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

.tag__title .label { white-space: nowrap; }

.tag__sizes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 14.5px;
  color: var(--sand-dim);
  font-variant-numeric: tabular-nums;
}

.tag__sizes li { display: flex; gap: 10px; align-items: baseline; }

.tag__sizes li::before {
  content: "";
  width: 8px; height: 1px;
  background: var(--sand-faint);
  flex: none;
  transform: translateY(-4px);
}

.tag__price { margin-top: auto; display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.price-row span { font-size: 13.5px; color: var(--sand-dim); }

.price-row b {
  font-family: var(--display);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.price-row--larch b { color: var(--larch); }
.price-row--pine b { color: var(--saw); }
.price-row--fir b { color: var(--sand); }
.price-row--solo b { color: var(--saw); font-size: 24px; }

.tags__note { margin-top: 18px; font-size: 14px; color: var(--sand-faint); }

/* некондиция — отдельное предложение, не пятая колонка прайса */
.offcut {
  margin-top: 1px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--ink-deep);
}

.offcut__text { display: grid; gap: 8px; max-width: 62ch; }

.offcut__text p:last-child { color: var(--sand-dim); font-size: 15px; }

.offcut__price { display: flex; align-items: baseline; gap: 10px; }

.offcut__price b {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -.02em;
  color: var(--saw);
  font-variant-numeric: tabular-nums;
}

.offcut__price span { font-size: 14px; color: var(--sand-dim); }

/* ---------- калькулятор ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

.calc__form, .calc__out, .calc__spec { background: var(--ink); padding: clamp(22px, 3vw, 32px); min-width: 0; }

.calc__out { background: var(--ink-deep); display: flex; flex-direction: column; gap: 22px; }

.calc__spec { grid-column: 1 / -1; background: var(--ink-deep); }

.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

@media (max-width: 460px) { .readouts { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; margin-bottom: 18px; }

.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field--row .field { margin-bottom: 0; }

select, input[type="number"] {
  width: 100%;
  padding: 13px 14px;
  background: var(--ink-deep);
  border: 1px solid var(--line);
  color: var(--sand);
  font-family: var(--body);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  border-radius: 0;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--sand-dim) 50%), linear-gradient(135deg, var(--sand-dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:hover, input[type="number"]:hover { border-color: var(--sand-faint); }

.seg { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); }

.seg button {
  flex: 1;
  padding: 12px 8px;
  background: var(--ink-deep);
  border: 0;
  color: var(--sand-dim);
  font-family: var(--body);
  font-size: 14.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.seg button:hover { color: var(--sand); }

.seg button[aria-pressed="true"] { background: var(--saw); color: var(--ink-deep); font-weight: 600; }

.seg--disabled { opacity: .38; pointer-events: none; }

.calc__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

#section-canvas {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  background: var(--ink);
}

.readout { display: grid; gap: 4px; }

.readout__big {
  font-family: var(--display);
  font-size: clamp(34px, 5.2vw, 52px);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.readout__big small { font-size: .42em; color: var(--sand-dim); margin-left: 8px; letter-spacing: 0; }

.readout--sum .readout__big { color: var(--saw); }

.readout__hint { font-size: 13.5px; color: var(--sand-faint); }

.spec { display: grid; gap: 14px; }

.spec__list { display: grid; gap: 10px; }

.spec__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: baseline;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.spec__row b { font-weight: 600; }

.spec__row em { display: block; font-style: normal; font-size: 12.5px; color: var(--sand-faint); }

.spec__del {
  background: none; border: 0; cursor: pointer;
  color: var(--sand-faint); font-size: 18px; line-height: 1; padding: 0 2px;
}

.spec__del:hover { color: var(--larch); }

.spec__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.spec__total b { font-family: var(--display); font-size: 26px; color: var(--saw); font-variant-numeric: tabular-nums; }

.spec__empty { font-size: 14px; color: var(--sand-faint); }

/* ---------- производство ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.split__media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; filter: saturate(.92) contrast(1.03); }

.split__media img:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }

.checks li::before {
  content: "";
  width: 15px; height: 15px;
  margin-top: 5px;
  border: 1px solid var(--saw);
  background: linear-gradient(135deg, transparent 46%, var(--saw) 46%, var(--saw) 54%, transparent 54%);
}

.checks b { display: block; }

.checks span { color: var(--sand-dim); font-size: 15px; }

/* ---------- доставка ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card { background: var(--ink); padding: 26px 24px; display: grid; gap: 12px; align-content: start; }

.card p { color: var(--sand-dim); font-size: 15px; }

.card__cap {
  font-family: var(--display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: -.005em;
}

.card__vol { font-family: var(--display); font-size: 30px; color: var(--saw); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.pay {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pay div { display: grid; gap: 6px; }

.pay p { font-size: 15px; color: var(--sand-dim); }

/* ---------- отзывы ---------- */

.rating { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }

.rating__score { font-family: var(--display); font-size: 46px; color: var(--saw); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.review { background: var(--ink); padding: 26px 24px; display: grid; gap: 14px; align-content: start; }

.review__text { font-size: 16px; }

.review__by { font-size: 13.5px; color: var(--sand-faint); }

.review__stars { color: var(--saw); letter-spacing: .12em; font-size: 14px; }

/* ---------- контакты ---------- */

.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 60px); }

@media (max-width: 900px) { .contacts { grid-template-columns: 1fr; } }

.contact-list { display: grid; gap: 24px; }

.contact-list div { display: grid; gap: 5px; }

.contact-list a { text-decoration: none; font-family: var(--display); font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -.015em; }

.contact-list a:hover { color: var(--saw); }

.contact-list p { font-size: 16.5px; }

.contacts__map { display: grid; gap: 12px; align-content: start; }

.map {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 320px;
  border: 1px solid var(--line);
  background: var(--ink-deep);
  overflow: hidden;
}

.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.map__note { font-size: 14.5px; color: var(--sand-dim); }

/* ---------- подвал ---------- */

.foot { padding-block: 34px 40px; font-size: 13.5px; color: var(--sand-faint); }

.foot__in { display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: space-between; align-items: center; }

.foot__logo { width: auto; height: 76px; opacity: .85; margin-right: 8px; }

@media (max-width: 700px) { .foot__logo { height: 64px; } }

.foot a { text-decoration: none; }
.foot a:hover { color: var(--sand); }

/* ---------- мобильная кнопка звонка ---------- */

.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--ink-deep) 94%, transparent);
  backdrop-filter: blur(9px);
  border-top: 1px solid var(--line);
}

.callbar .btn { flex: 1 1 0; padding-inline: 12px; }

.callbar .btn--ghost { flex: 0 1 40%; border-color: var(--sand-faint); }

@media (max-width: 700px) {
  .callbar { display: flex; }
  body { padding-bottom: 78px; }
}

/* ---------- телефон ----------
   На маленьком экране важнее цены, контакты и дорога, поэтому расчёт кубатуры
   остаётся только на большом экране, а отступы и карточки становятся плотнее. */

@media (max-width: 700px) {
  body { font-size: 16px; }

  #raschet { display: none; }

  .on-desktop { display: none; }
  .on-mobile { display: inline-flex; }

  .sec { padding-block: 46px; }

  .sec__head { gap: 14px; margin-bottom: 26px; }

  .hero__in { padding-block: 52px 26px; gap: 20px; }

  .hero__cta { gap: 10px; }

  .hero__cta .btn { width: 100%; }

  .hero__note { font-size: 13.5px; }

  .lead { font-size: 16.5px; }

  .tag { padding: 22px 18px; gap: 15px; }

  .tag__sizes { gap: 6px; font-size: 14px; }

  .offcut { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 18px; }

  .card { padding: 22px 18px; }

  .pay { gap: 18px; margin-top: 22px; padding-top: 22px; }

  .review { padding: 22px 18px; }

  .contact-list { gap: 20px; }

  .contact-list a { font-size: 22px; }

  .map { aspect-ratio: 1 / 1; min-height: 320px; }

  .split__media { gap: 8px; }

  .foot__in { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- появление секций ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
