/* Почём — общий стиль сайта. Без внешних шрифтов и счётчиков: ничего не грузится с зарубежных серверов. */

:root {
  --ink: #1a2333;
  --steel: #586174;
  --line: #dce1e7;
  --paper: #f4f6f8;
  --white: #ffffff;
  --tape: #f5b800;
  --tape-soft: #fff4cc;
  --ok: #1f7a4d;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-s: 6px;
  --radius-m: 14px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

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

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

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

/* ---------- Шапка ---------- */

.site-header {
  padding: 20px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-tag {
  width: 30px;
  height: 22px;
  background: var(--tape);
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 28% 100%, 0 50%);
  border-radius: 3px;
  position: relative;
}

.logo-tag::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.header-nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
}

.header-nav a { text-decoration: none; color: var(--steel); }
.header-nav a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .header-nav { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-s);
  border: 2px solid var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  color: var(--white);
}

.btn:hover { background: #0f1724; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover { background: var(--white); }

.btn-tape {
  background: var(--tape);
  border-color: var(--tape);
  color: var(--ink);
  width: 100%;
}

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

/* ---------- Первый экран ---------- */

.hero {
  padding: 40px 0 72px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 24px 0 24px;
  max-width: 13ch;
}

.hero-lead {
  font-size: 19px;
  color: var(--steel);
  max-width: 34em;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin: 28px 0 0;
  font-size: 15px;
  color: var(--steel);
  max-width: 34em;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { margin-top: 8px; }
}

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

.demo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  box-shadow: 0 24px 48px -32px rgba(26, 35, 51, 0.45);
}

.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.demo-title {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 0;
}

.demo-badge {
  font-size: 13px;
  color: var(--steel);
  white-space: nowrap;
}

.field { margin-bottom: 22px; }

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.field-label { font-weight: 600; font-size: 16px; }

.field-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 18px;
}

/* Площадь — слайдер на «рулетке» */
.tape-range {
  position: relative;
  padding-bottom: 22px;
}

.tape-range input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.tape-range input[type="range"]::-webkit-slider-runnable-track {
  height: 34px;
  border-radius: 4px;
  background: var(--tape);
}

.tape-range input[type="range"]::-moz-range-track {
  height: 34px;
  border-radius: 4px;
  background: var(--tape);
}

.tape-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 6px;
  height: 46px;
  margin-top: -6px;
  border-radius: 3px;
  background: var(--ink);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--ink);
}

.tape-range input[type="range"]::-moz-range-thumb {
  width: 6px;
  height: 46px;
  border-radius: 3px;
  background: var(--ink);
  border: 2px solid var(--white);
}

.tape-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  pointer-events: none;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(26, 35, 51, 0.7) 0 1px, transparent 1px calc(100% / 30)) 0 0 / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, rgba(26, 35, 51, 0.9) 0 2px, transparent 2px calc(100% / 6)) 0 0 / 100% 16px no-repeat;
}

.tape-scale {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}

/* Счётчики */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  width: fit-content;
}

.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.stepper button:hover { background: var(--paper); }
.stepper button:disabled { color: var(--line); cursor: default; background: transparent; }

.stepper output {
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steppers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.steppers .field-label { display: block; margin-bottom: 8px; }

/* Ценник */
.price-tag {
  margin: 6px 0 18px;
  padding: 16px 18px;
  background: var(--tape-soft);
  border-left: 6px solid var(--tape);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.price-tag small {
  display: block;
  font-size: 14px;
  color: var(--steel);
}

.price-tag strong {
  display: block;
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.demo-foot {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--steel);
}

/* Что видит мастер */
.owner-view {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}

.owner-view[hidden] { display: none; }

.owner-view h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ping {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-s);
  font-size: 15px;
  margin-bottom: 10px;
}

.ping-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tape);
}

.order {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-size: 15px;
}

.order dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0;
}

.order dt { color: var(--steel); }
.order dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {
  .owner-view.is-new { animation: arrive 420ms cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Секции ---------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 16px;
  max-width: 22ch;
}

.section-lead {
  color: var(--steel);
  max-width: 38em;
  margin: 0 0 40px;
}

/* Как это работает — последовательность из трёх шагов */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--steel);
  margin-bottom: 6px;
}

.steps h3 {
  font-size: 20px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.steps p { margin: 0; color: var(--steel); }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

/* Для кого */
.niches {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.niches li {
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
}

/* Тарифы */
.prices {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 32px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
}

.price-row:first-child { border-top: 0; }

.price-row h3 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.price-row p { margin: 0; color: var(--steel); max-width: 40em; }

.price-sum {
  text-align: right;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.price-sum small {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--steel);
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .price-row { grid-template-columns: 1fr; padding: 20px; }
  .price-sum { text-align: left; }
}

.included {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 32px;
  max-width: 900px;
}

.included li {
  padding-left: 28px;
  position: relative;
}

.included li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--ok);
  border-bottom: 2.5px solid var(--ok);
  transform: rotate(-45deg);
}

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

.prices-note {
  margin: 28px 0 0;
  color: var(--steel);
  font-size: 15px;
  max-width: 44em;
}

/* Вопросы */
.faq { max-width: 820px; }

.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 650;
  font-size: 18px;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 12px;
  font-size: 26px;
  font-weight: 400;
  color: var(--steel);
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: 0 0 18px;
  color: var(--steel);
  max-width: 40em;
}

/* Контакты */
.contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
}

.contacts div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px 22px;
}

.contacts dt { color: var(--steel); font-size: 15px; margin-bottom: 4px; }
.contacts dd { margin: 0; font-size: 19px; font-weight: 700; word-break: break-word; }

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

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

.site-footer {
  background: var(--ink);
  color: #c9d0db;
  padding: 40px 0;
  font-size: 15px;
}

.site-footer a { color: var(--white); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px 48px;
}

.footer-grid p { margin: 0 0 6px; }

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

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

/* ---------- Документы ---------- */

.doc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 40px clamp(20px, 5vw, 56px);
  margin: 16px 0 72px;
}

.doc-body { max-width: 46em; }

.doc h1 {
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.doc-meta { color: var(--steel); margin: 0 0 32px; }

.doc h2 {
  font-size: 21px;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}

.doc p, .doc li { margin: 0 0 10px; }

.doc ol, .doc ul { padding-left: 22px; margin: 0 0 12px; }

.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0 16px;
  font-size: 16px;
}

.doc th, .doc td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 8px 0;
  vertical-align: top;
}

.doc th { color: var(--steel); font-weight: 600; }

.back-link {
  display: inline-block;
  margin: 8px 0 0;
  color: var(--steel);
  text-decoration: none;
}

.back-link:hover { color: var(--ink); text-decoration: underline; }
