/* =========================================================
   «Полдень» — демо-лендинг с калькулятором стоимости дома
   Mobile-first. Без сборки, без фреймворков.
   ========================================================= */

/* ---------- Токены ---------- */
:root {
  --paper: #faf7f2;
  --surface: #ffffff;
  --sand: #f3ebdf;
  --sand-2: #e9dccb;
  --line: #e2d6c4;
  --ink: #1c1d1a;
  --ink-2: #34362f;
  --muted: #5d5850;
  --accent: #b0431c;
  --accent-hover: #963815;
  --accent-soft: #f7e3d8;
  --sun: #f2b544;
  --sun-hover: #f6c567;
  --olive: #56693f;
  --forest: #1f2a24;
  --forest-2: #29362f;
  --on-dark: #f4efe6;
  --on-dark-muted: #c9c3b6;
  --danger: #b3261e;
  --danger-on-dark: #ffb4a8;
  --focus: #1b63c6;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 29, 26, .06);
  --shadow: 0 1px 2px rgba(28, 29, 26, .05), 0 12px 32px -12px rgba(28, 29, 26, .18);
  --container: 1180px;
  --gutter: 16px;
  --header-h: 64px;
  --section-y: clamp(56px, 9vw, 112px);

  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* ---------- Базовые стили ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: manual;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
b, strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* атрибут hidden должен побеждать display у компонентов (.lead-form { display: grid } и т.п.) */
[hidden] { display: none !important; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary { --btn-bg: var(--accent); }
.btn--primary:hover { --btn-bg: var(--accent-hover); }
.btn--sun { --btn-bg: var(--sun); --btn-fg: var(--ink); }
.btn--sun:hover { --btn-bg: var(--sun-hover); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--on-dark); border-color: rgba(244, 239, 230, .4); }
.btn--outline-light:hover { border-color: var(--on-dark); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: 14px 24px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-link:hover { color: var(--accent-hover); text-decoration-thickness: 2.5px; }
.btn-link--inline { padding: 0; font-weight: inherit; color: inherit; }
.btn-link--light { padding: 0; color: var(--on-dark); font-weight: inherit; text-align: left; text-decoration: none; }
.btn-link--light:hover { color: var(--on-dark); text-decoration: underline; text-decoration-thickness: 1.5px; }

/* ---------- Демо-плашка и шапка ---------- */
.demo-bar {
  padding: 8px var(--gutter);
  background: var(--ink);
  color: var(--on-dark);
  font-size: .8125rem;
  line-height: 1.4;
  text-align: center;
}
.demo-bar strong { color: var(--sun); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
/* Размытие фона — на псевдоэлементе: backdrop-filter на самой шапке
   сделал бы её контейнером для position: fixed у мобильного меню */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 247, 242, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
  color: var(--ink);
}
.logo__mark { width: 38px; height: 38px; }
.logo__text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.logo__sub {
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}
.logo--light { color: var(--on-dark); }
.logo--light .logo__sub { color: var(--on-dark-muted); }
.logo--light .logo__mark { border-radius: 11px; box-shadow: 0 0 0 1px rgba(244, 239, 230, .25); }

.site-nav {
  position: fixed;
  inset: var(--nav-top, 100px) 0 0 0;
  z-index: 40;
  display: none;
  padding: 24px var(--gutter) 40px;
  background: var(--paper);
  overflow-y: auto;
}
.site-nav.is-open { display: block; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone svg { width: 18px; height: 18px; color: var(--accent); }
.header-phone:hover { color: var(--accent); }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 419.98px) {
  .header-cta { display: none; }
}
@media (min-width: 640px) {
  .header-phone { display: inline-flex; }
}
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    padding: 0;
    background: none;
    overflow: visible;
    margin-left: auto;
  }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav a {
    padding: 8px 10px;
    border: 0;
    border-radius: 999px;
    font-size: .9375rem;
    font-weight: 600;
  }
  .site-nav a:hover { background: var(--sand); color: var(--ink); }
  .header-actions { margin-left: 8px; }
  .site-nav .nav-extra { display: none; }
}
/* 1080–1299 px: меню, телефон и кнопка вместе не помещаются в строку — телефон прячем,
   он остаётся в контактах и в мобильном меню */
@media (min-width: 1080px) and (max-width: 1299.98px) {
  .header-phone { display: none; }
}

/* телефон внутри мобильного меню: на узких экранах в шапке его нет */
.site-nav .nav-extra a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 0;
  color: var(--accent);
}
.site-nav .nav-extra svg { width: 22px; height: 22px; }

/* ---------- Общие секции ---------- */
.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--forest); color: var(--on-dark); }

.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--row { max-width: none; display: grid; gap: 20px; align-items: end; }
@media (min-width: 960px) {
  .section-head--row { grid-template-columns: minmax(0, 1fr) auto; }
  .section-head--row .section-lead { max-width: 640px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.eyebrow--light { color: var(--sun); }

.section-lead { color: var(--muted); font-size: 1.0625rem; margin: 0; }
.section--dark .section-lead { color: var(--on-dark-muted); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 6vw, 80px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
}

.hero-lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 36em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
@media (max-width: 479.98px) {
  .hero-actions .btn { width: 100%; }
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-facts dt {
  font-family: var(--font-display);
  font-size: clamp(1rem, .8rem + 1vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
}
.hero-facts dd { margin: 4px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.35; }

.hero-visual { position: relative; }
.hero-art {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 250px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
}
.hero-chip svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.hero-chip--top { top: 16px; left: 16px; }
.hero-chip--bottom { right: 16px; bottom: -18px; }
@media (max-width: 479.98px) {
  .hero-chip { position: static; margin-top: 12px; max-width: none; width: 100%; }
}
@media (min-width: 960px) {
  .hero-chip--top { left: -24px; top: 28px; }
}

/* ---------- Технологии ---------- */
.tech-grid {
  display: grid;
  gap: 16px;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .tech-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tech-card {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow .25s, transform .25s;
}
.tech-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tech-card__texture {
  height: 92px;
  margin-bottom: 18px;
  border-radius: 14px;
}
.tech-card--aerated .tech-card__texture {
  /* кладка блоков вперевязку */
  background: #e6e1d8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='44'%3E%3Cg fill='%23cbc2b3'%3E%3Crect width='80' height='2'/%3E%3Crect y='22' width='80' height='2'/%3E%3Crect width='2' height='22'/%3E%3Crect x='40' y='22' width='2' height='22'/%3E%3C/g%3E%3C/svg%3E");
}
.tech-card--frame .tech-card__texture {
  background-color: #f1e3c8;
  background-image:
    repeating-linear-gradient(90deg, #c99a5b 0 8px, transparent 8px 40px),
    linear-gradient(#c99a5b 8px, transparent 8px, transparent 84px, #c99a5b 84px);
}
.tech-card--brick .tech-card__texture {
  background: #b5552f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='40'%3E%3Cg fill='%23eadfce'%3E%3Crect width='48' height='3'/%3E%3Crect y='20' width='48' height='3'/%3E%3Crect width='3' height='20'/%3E%3Crect x='24' y='20' width='3' height='20'/%3E%3C/g%3E%3C/svg%3E");
}
.tech-card--timber .tech-card__texture {
  background-color: #c68d58;
  background-image:
    repeating-linear-gradient(#c68d58 0 20px, #9f6a3b 20px 23px),
    radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, .18), transparent 60%);
}

.tech-card h3 { margin-bottom: 4px; font-size: 1.3125rem; }
.tech-card__price { color: var(--accent); font-weight: 800; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.tech-card p:not(.tech-card__price) { color: var(--muted); font-size: .9375rem; }
.tech-card__facts {
  margin: 0 0 20px;
  padding: 12px 0 0;
  border-top: 1px dashed var(--line);
  list-style: none;
  font-size: .875rem;
  font-weight: 600;
}
.tech-card__facts li + li { margin-top: 4px; }
.tech-card .btn { margin-top: auto; font-size: .9375rem; }

/* ---------- Калькулятор ---------- */
.noscript {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-weight: 600;
}

.calc {
  display: grid;
  gap: 20px;
  align-items: start;
}
@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; }
  .calc__result { position: sticky; top: calc(var(--header-h) + 20px); }
}

.calc__fields {
  display: grid;
  gap: 4px;
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) { .calc__fields { padding: 12px 32px; } }

.field {
  min-width: 0;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.field:last-child { border-bottom: 0; }
/* legend ведёт себя как обычный блок внутри отступов fieldset */
fieldset.field > legend { float: left; width: 100%; }
fieldset.field > legend + * { clear: both; }
.field__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.field__label {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 1rem;
}
.field__head .field__label { margin: 0; }
.field__hint { margin: 10px 0 0; color: var(--muted); font-size: .875rem; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #c9bba6;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: #a8987f; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(27, 99, 198, .25); }
.input:disabled { background: var(--sand); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
textarea.input { resize: vertical; min-height: 96px; }

.number-unit { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.input--num {
  width: 5.5em;
  min-height: 44px;
  text-align: right;
  font-weight: 800;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.input--num::-webkit-outer-spin-button,
.input--num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.number-unit--sm .input--num { width: 4.5em; min-height: 40px; font-size: 1rem; }

/* range */
.range {
  --fill: 22%;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--sand-2) var(--fill));
}
.range::-moz-range-track { height: 8px; border-radius: 8px; background: var(--sand-2); }
.range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px;
  margin-top: -10px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.range:hover::-webkit-slider-thumb { transform: scale(1.08); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--focus); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--focus); }

/* segmented radio */
.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--sand);
}
.segmented--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg { position: relative; display: block; }
.seg input,
.choice input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9375rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.seg:hover span { background: rgba(255, 255, 255, .6); }
.seg input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

/* choice cards */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) and (max-width: 1119.98px) { .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; display: block; }
.choice__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.choice__title { font-weight: 800; }
.choice__price { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.choice:hover .choice__body { border-color: #a8987f; }
.choice input:checked + .choice__body {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice input:checked + .choice__body .choice__price { color: var(--accent-hover); }
.choice input:focus-visible + .choice__body { outline: 3px solid var(--focus); outline-offset: 2px; }

/* checkboxes */
.options { display: grid; gap: 10px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
}
.check input {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check__text small {
  display: block;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check--light .check__text small { color: var(--on-dark-muted); }
.check--light input { accent-color: var(--sun); }

/* result */
.result-card {
  container-type: inline-size;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
@media (min-width: 768px) { .result-card { padding: 32px; } }
.result-card.is-flash { animation: flash .9s ease; }
@keyframes flash {
  0% { box-shadow: var(--shadow), 0 0 0 0 rgba(176, 67, 28, .45); }
  100% { box-shadow: var(--shadow), 0 0 0 16px rgba(176, 67, 28, 0); }
}

.result__label { margin: 0 0 4px; color: var(--muted); font-weight: 700; font-size: .9375rem; }
.result__total {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 2.6vw, 2.75rem);
  font-size: clamp(1.5rem, 10cqi, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.result__total output::before { content: "≈ "; color: var(--muted); font-weight: 500; }
.result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.result__bar {
  display: flex;
  gap: 3px;
  height: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 12px;
}
.result__bar span { min-width: 4px; height: 100%; transition: flex-grow .35s ease; }
.result__bar span:first-child { border-radius: 12px 0 0 12px; }
.result__bar span:last-child { border-radius: 0 12px 12px 0; }
.result__bar span:only-child { border-radius: 12px; }

.result__list { margin: 0 0 24px; padding: 0; list-style: none; }
.result__list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem;
}
.result__list li:last-child { border-bottom: 0; }
.result__dot { width: 10px; height: 10px; border-radius: 3px; transform: translateY(1px); }
.result__item-label { font-weight: 700; line-height: 1.35; }
.result__item-detail { display: block; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.result__item-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.c-shell { background: var(--ink-2); }
.c-finish { background: var(--accent); }
.c-slab { background: var(--olive); }
.c-terrace { background: var(--sun); }
.c-garage { background: #8a7c6a; }

.result__share { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 14px; min-height: 32px; }
.result__share-status { color: var(--olive); font-size: .875rem; font-weight: 700; }
.result__note { margin: 12px 0 0; color: var(--muted); font-size: .8125rem; }

/* мобильная плашка с итогом */
.calc-sticky {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .45);
  text-decoration: none;
  transform: translateY(calc(100% + 24px));
  visibility: hidden;
  transition: transform .3s ease, visibility .3s;
}
.calc-sticky.is-visible { transform: none; visibility: visible; }
.calc-sticky__label { color: var(--on-dark-muted); font-size: .875rem; font-weight: 600; }
.calc-sticky__total { font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-sticky__more { margin-left: auto; color: var(--sun); font-size: .875rem; font-weight: 700; white-space: nowrap; }
@media (min-width: 960px) { .calc-sticky { display: none; } }

/* ---------- Заявка ---------- */
.lead-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
}
.lead-copy h2 { color: #fff; }

.ticks { margin: 24px 0 32px; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ticks svg { width: 22px; height: 22px; flex: none; color: var(--sun); }

.lead-summary {
  padding: 20px;
  border: 1px solid rgba(244, 239, 230, .16);
  border-radius: var(--radius);
  background: var(--forest-2);
}
.lead-summary__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.lead-summary__title { margin: 0; font-weight: 800; color: #fff; }
.lead-summary__edit { color: var(--sun); font-weight: 700; font-size: .9375rem; text-underline-offset: 3px; }
.lead-summary__list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 0; margin: 0; font-size: .9375rem; }
.lead-summary__list dt { padding-right: 16px; color: var(--on-dark-muted); }
.lead-summary__list dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.lead-summary__list .is-total { padding-top: 8px; margin-top: 4px; border-top: 1px solid rgba(244, 239, 230, .16); color: var(--sun); font-size: 1.0625rem; }

.lead-panel {
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  background: var(--forest-2);
  border: 1px solid rgba(244, 239, 230, .12);
}
@media (min-width: 768px) { .lead-panel { padding: 36px; } }

.lead-form { display: grid; gap: 16px; }
.lead-form__title { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.form-field { display: grid; gap: 6px; }
.form-field > label:not(.check) { font-weight: 700; }
.req { color: var(--sun); }
.optional { color: var(--on-dark-muted); font-weight: 500; }
.lead-form .input { border-color: rgba(244, 239, 230, .28); background: rgba(0, 0, 0, .18); color: #fff; }
.lead-form .input::placeholder { color: #a7a295; }
.lead-form .input:hover { border-color: rgba(244, 239, 230, .5); }
.lead-form .input:focus { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 181, 68, .3); }
.lead-form .input[aria-invalid="true"] { border-color: var(--danger-on-dark); }
.section--dark :focus-visible { outline-color: var(--sun); }
.form-error { margin: 0; color: var(--danger-on-dark); font-size: .875rem; font-weight: 700; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 700; color: var(--danger-on-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#lead-submit { position: relative; }
.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 3px solid rgba(28, 29, 26, .25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.is-busy .spinner { display: inline-block; }
.is-busy { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.lead-success { text-align: center; padding: 24px 0; }
.lead-success__icon {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
}
.lead-success__icon svg { width: 36px; height: 36px; }
.lead-success h3 { font-size: 1.5rem; color: #fff; }
.lead-success h3:focus { outline: none; }
.lead-success__demo {
  margin: 16px auto 24px;
  max-width: 34em;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(242, 181, 68, .12);
  color: var(--on-dark);
  font-size: .9375rem;
}

/* ---------- Этапы ---------- */
.stages {
  display: grid;
  gap: 16px;
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: stage;
}
@media (min-width: 640px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.stage {
  position: relative;
  padding: 24px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: stage;
}
.stage::before {
  content: counter(stage, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.stage__time {
  position: absolute;
  top: 24px; right: 20px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sand);
  font-size: .8125rem;
  font-weight: 700;
}
.stage p:not(.stage__time) { margin: 0; color: var(--muted); font-size: .9375rem; }

/* ---------- Проекты ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px;
  padding: 8px 16px;
  border: 1.5px solid var(--sand-2);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  font-size: .9375rem;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.projects {
  display: grid;
  gap: 20px;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.project:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.project__art {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, var(--sky1), var(--sky2));
}
.project__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px 20px 20px; }
.project__body h3 { margin-bottom: 4px; font-size: 1.1875rem; }
.project__tags { margin-bottom: 8px; color: var(--muted); font-size: .9375rem; }
.project__price { margin: auto 0 6px; font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

/* цвета иллюстраций домов (переменные задаются на карточке) */
.h-sun { fill: var(--sun, #f2b544); }
.h-ground { fill: var(--ground, #a9b37e); }
.h-wall { fill: var(--wall, #f3efe8); }
.h-roof { fill: var(--roof, #2d302c); }
.h-glass { fill: var(--glass, #6d8a97); }
.h-trim { fill: var(--trim, #8a5a33); }
.h-bush { fill: var(--bush, #56693f); }
.h-mullion { fill: none; stroke: var(--wall, #fff); stroke-width: 3; }

/* ---------- Гарантии ---------- */
.guarantees {
  display: grid;
  gap: 16px;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .guarantees { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .guarantees { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.guarantee {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--sand);
}
.guarantee__icon {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  padding: 11px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--accent);
}
.guarantee p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.faq__item summary {
  position: relative;
  display: block;
  padding: 20px 64px 20px 22px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 20px; top: 50%;
  width: 28px; height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--sand);
  transition: transform .25s, background-color .2s;
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
  background:
    linear-gradient(#fff, #fff) center / 12px 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 12px no-repeat,
    var(--accent);
}
.faq__item summary:hover { color: var(--accent); }
.faq__body { padding: 0 22px 20px; color: var(--muted); }
.faq__body p { margin: 0; }
.faq__body b { color: var(--ink); }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .contacts-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; } }
.contact-list { display: grid; gap: 18px; margin: 28px 0 32px; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg {
  width: 44px; height: 44px;
  flex: none;
  padding: 10px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--accent);
}
.contact-list__label { display: block; color: var(--muted); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.contact-list a { font-weight: 800; font-size: 1.125rem; text-decoration: none; }
.contact-list a:hover { color: var(--accent); text-decoration: underline; }

.map { margin: 0; }
.map svg { width: 100%; height: auto; border-radius: var(--radius-lg); }
.map figcaption { margin-top: 10px; color: var(--muted); font-size: .875rem; }

/* ---------- Подвал ---------- */
.site-footer {
  padding-block: 48px;
  background: var(--ink);
  color: var(--on-dark);
}
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; } }
.footer-note { margin: 16px 0 0; color: var(--on-dark-muted); font-size: .875rem; max-width: 36em; }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--on-dark); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-dev { margin: 0; color: var(--on-dark-muted); font-size: .875rem; }
.footer-dev a { color: var(--sun); font-weight: 700; }
.site-footer :focus-visible { outline-color: var(--sun); }

/* ---------- Диалог ---------- */
.dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}
.dialog::backdrop { background: rgba(28, 29, 26, .55); }
.dialog__inner { padding: 28px; }
.dialog h2 { font-size: 1.375rem; }
.dialog p { color: var(--muted); }

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

/* ---------- Печать ---------- */
@media print {
  .site-header, .demo-bar, .hero-visual, #lead, .site-footer, .filters, .btn, .btn-link { display: none !important; }
  .section { padding-block: 24px; }
  .calc__result { position: static; }
}
