/* arbolitblok.kz — направление А «Материал крупным планом», токены см. DESIGN.md */

:root {
  --graphite: #23211d;
  --concrete-light: #e9e7e2;
  --concrete: #c6c1b8;
  --wood: #b07c2e;
  --wa: #1faa59;
  --wa-dark: #178646;
  --border: 2px solid var(--graphite);
  --wrap: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--graphite);
  background: var(--concrete-light);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 800px; }

h1, h2, h3 { font-family: 'Unbounded', sans-serif; font-weight: 700; line-height: 1.12; }

a { color: inherit; }

/* ── Кнопки ── */
.btn {
  display: inline-block;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 14px 26px;
  border: var(--border);
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translate(2px, -2px); }
.btn:focus-visible { outline: 3px solid var(--wood); outline-offset: 2px; }

.btn-wa { background: var(--wa); border-color: var(--wa-dark); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }

.btn-dark { background: var(--graphite); color: var(--concrete-light); }
.btn-dark:hover { background: var(--wood); border-color: var(--graphite); color: var(--graphite); }

.btn-ghost { background: transparent; color: var(--graphite); }
.btn-ghost:hover { background: var(--graphite); color: var(--concrete-light); }

/* ── Штамп (сигнатурный элемент) ── */
.stamp {
  display: inline-block;
  font-family: 'JetBrains Mono', 'Onest', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: var(--border);
  padding: 6px 12px;
  color: var(--graphite);
}
.stamp-inline { margin-bottom: 22px; border-color: var(--wood); color: var(--wood); }

/* ── Header ── */
.site-header {
  border-bottom: var(--border);
  background: var(--concrete-light);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-logo { border-radius: 50%; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 12.5px; letter-spacing: .04em; color: var(--wood); font-weight: 600; }
.header-nav { display: flex; gap: 22px; }
.header-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15.5px;
  border-bottom: 2px solid transparent;
}
.header-nav a:hover { border-bottom-color: var(--wood); }
.btn-header { padding: 10px 18px; font-size: 15px; }

/* ── Hero ── */
.hero { border-bottom: var(--border); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 { font-size: clamp(36px, 4.6vw, 64px); margin: 0 0 24px; }
.hero-sub { font-size: 19px; max-width: 46ch; margin-bottom: 34px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.texture-block { border: var(--border); aspect-ratio: 400 / 460; overflow: hidden; }
.texture-block img { display: block; width: 100%; height: 100%; object-fit: cover; }
.passport {
  position: absolute;
  left: -28px;
  bottom: -24px;
  background: var(--concrete-light);
  border: var(--border);
  padding: 16px 18px;
  min-width: 270px;
}
.passport-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid var(--concrete);
}
.passport-row:last-child { border-bottom: none; }
.passport-row span { color: #6d675e; }
.passport-row b { font-variant-numeric: tabular-nums; text-align: right; }

/* ── Офферы ── */
.offers { border-bottom: var(--border); background: var(--concrete); }
.offers-grid { display: grid; grid-template-columns: 1fr 1fr; }
.offer {
  padding: 48px 40px 52px;
  background: var(--concrete-light);
  border-right: var(--border);
}
.offer:first-child { border-left: var(--border); }
.offer-accent { background: var(--graphite); color: var(--concrete-light); }
.offer-accent .offer-kicker { color: var(--wood); }
.offer-accent .btn-dark { background: var(--wood); color: var(--graphite); border-color: var(--wood); }
.offer-accent .btn-dark:hover { background: var(--concrete-light); }
.offer-kicker {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 14px;
}
.offer h2 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 16px; }
.offer p { margin-bottom: 16px; max-width: 52ch; }
.offer-price { font-size: 18px; }
.offer-price b { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 19px; }

/* ── Секции ── */
.section { padding: 84px 0; border-bottom: var(--border); }
.section-title { font-size: clamp(30px, 4vw, 52px); margin-bottom: 20px; }
.section-lead { font-size: 19px; max-width: 60ch; margin-bottom: 40px; }
.section-dark { background: var(--graphite); color: var(--concrete-light); }
.section-dark .section-title { color: var(--concrete-light); }
.section-concrete { background: var(--concrete); }

/* ── Таблицы ── */
.flat-table { width: 100%; border-collapse: collapse; border: var(--border); background: var(--concrete-light); }
.flat-table th, .flat-table td { padding: 14px 18px; text-align: left; border: 1px solid var(--concrete); }
.flat-table thead th {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--graphite);
  color: var(--concrete-light);
  border-color: var(--graphite);
}
.flat-table .num { font-family: 'Unbounded', sans-serif; font-weight: 700; white-space: nowrap; }
.flat-table-invert { background: transparent; color: var(--concrete-light); border-color: var(--concrete-light); }
.flat-table-invert th, .flat-table-invert td { border-color: #4a463f; }
.flat-table-invert thead th { background: var(--wood); color: var(--graphite); border-color: var(--wood); }
.flat-table-invert td:nth-child(2) { color: #fff; font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* ── Цены ── */
.price-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 44px; align-items: start; }
.price-note h3 { font-size: 21px; margin-bottom: 12px; }
.price-note p { margin-bottom: 22px; }

/* ── Производство ── */
.factory-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 44px; margin-top: 40px; }
.fact { border-left: 4px solid var(--wood); padding: 6px 0 6px 18px; margin-bottom: 26px; }
.fact b { display: block; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 24px; }
.fact span { color: #6d675e; }
.factory-media { display: grid; grid-template-columns: 1fr; gap: 22px; align-content: start; }
.factory-media figure { margin: 0; }
.factory-media video,
.factory-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--border);
  background: var(--graphite);
}
.factory-media figcaption { margin-top: 10px; font-size: 14.5px; color: #6d675e; line-height: 1.45; }
.factory-media figcaption .stamp { margin-right: 8px; }

/* ── Полоса объектов (стройка) ── */
.objects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px 0 40px; }
.objects figure { margin: 0; }
.objects img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #4a463f;
}
.objects figcaption { margin-top: 10px; font-size: 14px; color: #a49e93; line-height: 1.45; }

/* ── Шаги ── */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  border: 2px solid var(--concrete-light);
  margin: 36px 0;
}
.section-dark .steps { border-color: #4a463f; }
.steps li {
  counter-increment: step;
  padding: 22px 20px 24px;
  border-right: 1px solid #4a463f;
  position: relative;
}
.steps li:last-child { border-right: none; }
.steps li::before {
  content: counter(step);
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--wood);
  display: block;
  margin-bottom: 10px;
}
.steps b { display: block; font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: 17px; margin-bottom: 6px; }
.steps span { font-size: 15px; color: #a49e93; }
.steps-light { border-color: var(--graphite); }
.steps-light li { border-right-color: var(--concrete); }
.steps-light span { color: #6d675e; }

/* ── FAQ ── */
.faq details { border: var(--border); background: var(--concrete-light); margin-bottom: -2px; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17.5px;
  padding: 18px 22px;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: 'Unbounded', sans-serif;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wood);
}
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 22px 20px; max-width: 65ch; }

/* ── Футер ── */
.site-footer { background: var(--graphite); color: var(--concrete-light); padding: 56px 0 96px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.footer-line { margin: 10px 0; color: #a49e93; }
.footer-line a { color: var(--concrete-light); }
.site-footer .brand-name { font-size: 20px; }

/* ── Мобильная закреплённая CTA ── */
.sticky-cta { display: none; }

/* ── Reveal-анимация ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ── Мобильная адаптация ── */
@media (max-width: 900px) {
  .hero-grid, .price-grid, .factory-grid, .offers-grid, .footer-grid { grid-template-columns: 1fr; }
  .offer { border-left: none !important; border-right: none; border-bottom: var(--border); }
  .offer:last-child { border-bottom: none; }
  .header-nav { display: none; }
  .hero-grid { padding-top: 44px; padding-bottom: 44px; gap: 56px; }
  .hero-visual { margin-left: 28px; }
  .section { padding: 56px 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li { border-bottom: 1px solid #4a463f; }
  .steps-light li { border-bottom-color: var(--concrete); }
  .objects { grid-template-columns: 1fr 1fr; gap: 14px; }
  .flat-table th, .flat-table td { padding: 10px 10px; font-size: 14px; }
  .sticky-cta {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    padding: 10px 14px;
    background: var(--concrete-light);
    border-top: var(--border);
  }
  .sticky-cta .btn { display: block; text-align: center; }
  .site-footer { padding-bottom: 140px; }
}

/* Узкие экраны: таблицы → карточки, никакой горизонтали */
@media (max-width: 600px) {
  .flat-table thead { display: none; }
  .flat-table, .flat-table tbody, .flat-table tr, .flat-table td { display: block; width: 100%; }
  .flat-table td { border: none; padding: 4px 14px; font-size: 15.5px; }
  .flat-table td:first-child {
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .04em;
    padding-top: 16px;
  }
  .flat-table td:last-child { padding-bottom: 16px; }
  .flat-table tr + tr { border-top: 1px solid var(--concrete); }
  .flat-table-invert tr + tr { border-top-color: #4a463f; }
  .flat-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    opacity: .6;
    margin-bottom: 2px;
  }
  .flat-table-invert td:first-child { color: var(--wood); }
}

/* Совсем узкие экраны (старые iPhone SE и т.п.) */
@media (max-width: 360px) {
  .hero h1 { font-size: 30px; }
  .btn { padding: 12px 16px; font-size: 15px; }
  .steps { grid-template-columns: 1fr; }
  .header-inner { gap: 14px; }
  .brand { gap: 8px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }
  .btn-header { padding: 8px 12px; font-size: 14px; }
}

/* ── Условия (цены) ── */
.terms { list-style: none; margin-bottom: 22px; }
.terms li { padding: 8px 0 8px 24px; position: relative; border-bottom: 1px solid var(--concrete); font-size: 15.5px; }
.terms li:last-child { border-bottom: none; }
.terms li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 10px; height: 10px; background: var(--wood); }
