@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/golos-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  background-image:
    radial-gradient(760px 380px at 78% -8%, #fdf3e6 0%, rgba(253, 243, 230, 0) 68%),
    radial-gradient(560px 320px at 4% 4%, #f7f2ea 0%, rgba(247, 242, 234, 0) 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 27px;
  margin-bottom: 24px;
}

h3 {
  font-size: 21px;
}

p {
  margin: 0;
  max-width: 68ch;
}

a {
  color: var(--clay-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-12);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}

.btn-primary {
  background: var(--clay);
  color: #fff;
}

.btn-primary:hover {
  background: var(--clay-deep);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--clay-tint);
  color: var(--clay-deep);
  transform: translateY(-1px);
}

.btn-quiet {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  transition: opacity 180ms ease-out;
}

.btn-quiet:hover {
  color: var(--clay);
  opacity: 0.85;
}

.hero {
  padding: 48px 0 64px;
}

.hero-visual {
  display: block;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-16);
  box-shadow: var(--shadow-1);
}

.hero h1 {
  max-width: 12ch;
  margin-bottom: 20px;
}

.lead {
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-soft);
}

.calc,
.how,
.stages,
.example,
.catalog,
.services,
.guide,
.faq {
  padding: 96px 0;
}

.calc-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}

.calc-form {
  display: grid;
  gap: 24px;
}

.option-group {
  margin: 0;
  padding: 0;
  border: none;
}

.option-group:disabled {
  opacity: 0.55;
  cursor: default;
}

.group-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 0;
}

/* Плитки — сетка ровно в 3 колонки: карточки с пиктограммами выравниваются
   по сетке, а не по ширине подписи, как было во flex */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Общий вид плитки — в app.css (.tile/.wz-tile); здесь только отличия
   главной: просторнее, радиус из токенов и подъём при наведении */
.tile {
  gap: 8px;
  padding: 12px 8px 10px;
  border-radius: var(--r-12);
  transition: transform 180ms ease-out, border-color 180ms ease-out, background-color 180ms ease-out;
}

.tile:hover {
  transform: translateY(-2px);
}

/* Пиктограмма декоративная: contain — белая подложка картинки не обрезается */
.tile-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: var(--r-8);
}

.tile-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

/* Заблокированная группа: пиктограммы гасим и обесцвечиваем — выбор недоступен */
fieldset[disabled] .tile-icon {
  opacity: 0.45;
  filter: grayscale(1);
}

.addons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--clay);
}

.params {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input,
.field select {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  border-color: var(--clay);
  outline: none;
}

.field-error {
  display: none;
  font-size: 13px;
  color: var(--clay);
}

#square_m2:out-of-range ~ .field-error {
  display: block;
}

.floors {
  display: flex;
  gap: 8px;
}

.floors .tile {
  flex: 1 1 0;
}

.calc-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  padding: 24px;
  box-shadow: var(--shadow-1);
}

.calc-result[aria-busy="true"] {
  opacity: 0.6;
}

.result-empty {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.stages-preview h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
}

.stages-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stages-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.stages-list li:last-child {
  border-bottom: none;
}

.calc-next {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-top: 32px;
}

.quick-result {
  display: grid;
  gap: 20px;
}

.quick-total {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.quick-total-sum {
  color: var(--ink);
}

.quick-rate {
  display: block;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 400;
  margin-top: 6px;
}

.quick-stages {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.quick-stages caption {
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
}

.quick-stages th,
.quick-stages td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.quick-stages th[scope="col"]:nth-child(2),
.quick-stages td:nth-child(2),
.quick-stages th[scope="col"]:nth-child(3),
.quick-stages td:nth-child(3) {
  text-align: right;
}

.quick-stages tbody tr:last-child th,
.quick-stages tbody tr:last-child td {
  border-bottom: none;
}

.quick-components {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-components li {
  font-size: 15px;
  color: var(--ink-soft);
  padding: 4px 0;
}

.quick-note {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: none;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  position: relative;
  padding-left: 56px;
  padding-bottom: 28px;
}

.steps li:last-child {
  padding-bottom: 0;
}

.step-num {
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--clay);
  font-size: 14px;
  font-weight: 600;
}

.steps h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-note {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--clay-deep);
  background: var(--clay-tint);
  padding: 3px 10px;
  border-radius: 999px;
}

.example-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 24px;
}

.example-col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  padding: 24px;
  box-shadow: var(--shadow-1);
}

.example-col h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 16px;
}

.example-total {
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.example-total strong {
  color: var(--ink);
  font-weight: 700;
}

.example-stages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.example-stages li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.example-stages li:last-child {
  border-bottom: none;
}

.example-diff {
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.catalog-form {
  display: grid;
  gap: 16px;
  max-width: 480px;
  margin-top: 24px;
}

.service-grid {
  display: grid;
  gap: 16px;
}

.service-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 180ms ease-out;
}

.service-card:hover {
  border-color: var(--clay);
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
}

.service-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.service-card p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-list li {
  border-bottom: 1px solid var(--line-soft);
}

.guide-list a {
  display: block;
  padding: 16px 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.guide-list a:hover {
  color: var(--clay);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-list summary {
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  font-size: 22px;
  color: var(--clay);
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list p {
  color: var(--ink-soft);
  margin-top: 12px;
  max-width: 68ch;
}

.page-footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 14px;
}

.page-footer p {
  margin-bottom: 8px;
}

.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
}

.page-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.page-footer a:hover {
  color: var(--clay-deep);
  border-bottom-color: var(--line);
}

@media (max-width: 767px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  .hero {
    padding: 32px 0 48px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .calc,
  .how,
  .stages,
  .example,
  .catalog,
  .services,
  .guide,
  .faq {
    padding: 64px 0;
  }

  .hero-visual img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  /* На узких экранах плитки остаются в 3 колонки: ужимаем пиктограмму и подпись */
  .tile-icon {
    width: 72px;
    height: 72px;
  }

  .tile-text {
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: center;
  }

  .calc-layout {
    grid-template-columns: 1fr 360px;
  }

  .example-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-form {
    grid-template-columns: repeat(3, 1fr) auto;
    align-items: end;
    max-width: none;
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 1120px;
  }
}

/* Шесть этапов: снимок сам держит «карточку», поэтому без рамок и теней —
   только скругление 12px из радиусов секции */
.stages-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px 24px;
  grid-template-columns: repeat(3, 1fr);
}

/* aspect-ratio под оригинал 4:3: сетка не прыгает до загрузки снимков */
.stages-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.stages-grid figure {
  margin: 0;
}

.stages-grid figcaption {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  font-size: 15px;
}

.stage-num {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stage-share {
  color: var(--clay);
  font-weight: 600;
}

/* Подводка после h2: у глобального p margin: 0, отступ до сетки задаём явно */
.section-lead {
  color: var(--ink-soft);
  margin-bottom: 32px;
}

/* 3 → 2 → 1 колонки: в две колонки фото 4:3 на планшете остаётся крупным */
@media (max-width: 960px) {
  .stages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
