/* Демо-сайт «Ремонт квартир» — тёмная тема (та же палитра, что у разбора матчей Dota 2).
   Токены повторяют вчерашний проект: фон #0d1117, панели #18202b, границы #2b3846, акцент #e0a33c. */

:root {
  --accent: #e0a33c;
  --accent-dark: #c9862a;
  --accent-soft: rgba(224, 163, 60, 0.16);

  --bg: #0d1117;
  --bg-soft: #141b24;
  --panel: #18202b;
  --panel-2: #1f2a37;
  --border: #2b3846;

  --text: #e6edf3;
  --text-2: #cfdae6;
  --muted: #8b9aab;
  --good: #58c98a;
  --bad: #e2695c;

  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font: 16px/1.6 var(--font);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(224, 163, 60, 0.10), transparent 60%),
    radial-gradient(1100px 520px at 88% -10%, rgba(74, 127, 191, 0.10), transparent 60%),
    var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.02em; color: #fff; }
h2 { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 14px; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 40px); }

/* ── Полоса о том, что это макет ── */
.demo-ribbon {
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}
.demo-ribbon span::before { content: "● "; color: var(--accent); font-size: 10px; vertical-align: 1px; }
.demo-ribbon.hidden { display: none; }

/* ── Шапка ── */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 70px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 4px 14px rgba(224, 163, 60, 0.35);
}
.logo-text { font-size: 17px; }

.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.phone { font-weight: 700; white-space: nowrap; color: var(--text); }
.phone:hover { color: var(--accent); }

.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text-2); margin: 4px 0; border-radius: 2px; }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; padding: 14px 24px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: #b8791f;
  color: #1a1206;
  box-shadow: 0 8px 20px rgba(224, 163, 60, 0.22);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(224, 163, 60, 0.34); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ── Первый экран ── */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }

.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(224, 163, 60, 0.3);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero .lead { font-size: 18px; max-width: 46ch; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 26px; }

.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.trust li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.trust li::before {
  content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(88, 201, 138, 0.16); color: var(--good);
  font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 2px;
}

/* ── Карточка формы ── */
.hero-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); position: sticky; top: 90px;
}
.hero-card h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.card-head p { font-size: 14px; margin-bottom: 18px; }

.form label { display: block; margin-bottom: 12px; }
.form label > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); transition: border-color 0.15s, box-shadow 0.15s;
}
.form input::placeholder, .form textarea::placeholder { color: #5d6b7a; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 163, 60, 0.14); }
.form textarea { resize: vertical; }
.form-note { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.form-error { color: #ffb3aa; font-size: 13px; margin: 10px 0 0; }
.form-success {
  background: rgba(88, 201, 138, 0.12); border: 1px solid rgba(88, 201, 138, 0.4);
  color: #a9e8c4; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 10px 0 0;
}

/* ── Секции ── */
.section { padding: 64px 0; }
.section-alt { background: rgba(20, 27, 36, 0.55); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.section-head h2::before {
  content: ""; flex: none; width: 3px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}
.section-head p { color: var(--muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ── Преимущества ── */
.advantage {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s;
}
.advantage:hover { border-color: rgba(224, 163, 60, 0.45); transform: translateY(-2px); }
.advantage .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); display: grid; place-items: center;
  font-size: 20px; background: var(--accent-soft); border: 1px solid rgba(224, 163, 60, 0.25); margin-bottom: 14px;
}
.advantage h3 { margin-bottom: 6px; color: var(--text); }
.advantage p { margin: 0; font-size: 14.5px; }

/* ── Услуги ── */
.service {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.service:hover { transform: translateY(-3px); border-color: rgba(224, 163, 60, 0.5); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.service h3 { margin: 0; color: var(--text); }
.service .desc { font-size: 14.5px; color: var(--muted); margin: 0; flex: 1; }
.service .price { font-size: 21px; font-weight: 800; color: var(--accent); }
.service .term { font-size: 13px; color: var(--muted); }

.disclaimer { font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* ── Что входит в ремонт ── */
.included {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 26px;
}
.included li {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 15px; color: var(--text-2);
}
.included li::before {
  content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(88, 201, 138, 0.16); color: var(--good);
  font-size: 12px; font-weight: 800; display: grid; place-items: center;
}

/* ── Калькулятор ── */
.calc {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start;
}
.calc-field { margin-bottom: 20px; }
.calc-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--muted);
  margin-bottom: 9px; text-transform: uppercase; letter-spacing: 0.6px;
}
.calc-options { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-option { position: relative; }
.calc-option input { position: absolute; opacity: 0; pointer-events: none; }
.calc-option span {
  display: block; padding: 10px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted);
  cursor: pointer; transition: all 0.15s;
}
.calc-option span:hover { color: var(--text-2); border-color: #3b4c5e; }
.calc-option input:checked + span {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: #b8791f; color: #1a1206;
  box-shadow: 0 6px 16px rgba(224, 163, 60, 0.28);
}
.calc-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.calc-area { display: flex; align-items: center; max-width: 260px; }
.calc-area button {
  width: 46px; height: 48px; font-size: 20px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.calc-area button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.calc-area button:hover { background: #27333f; color: var(--accent); }
.calc-area input {
  width: 100%; height: 48px; text-align: center; font: inherit; font-size: 17px; font-weight: 700;
  border: 1px solid var(--border); border-left: 0; border-right: 0;
  background: var(--bg-soft); color: var(--text);
}
.calc-area input:focus { outline: none; border-color: var(--accent); }

.calc-check { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--text-2); cursor: pointer; }
.calc-check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.calc-result {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px;
}
.calc-total { font-size: clamp(26px, 3.4vw, 36px); font-weight: 850; letter-spacing: -0.02em; color: var(--accent); }
.calc-meta { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.calc-meta b { color: var(--text); }

.calc-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.calc-hint { color: var(--muted); font-size: 13.5px; }

/* ── Шаги ── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark)); color: #1a1206;
  font-weight: 800; margin-bottom: 12px;
}
.steps h3 { font-size: 16px; color: var(--text); }
.steps p { font-size: 14px; margin: 0; color: var(--muted); }

/* ── Работы ── */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  border: 1px solid var(--border); display: grid; place-items: end stretch;
}
/* Затемнение поверх заглушек: фото смотрятся частью тёмной темы, а не светлыми пятнами. */
.work::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.28), rgba(13, 17, 23, 0.55));
}
.work .caption {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 18, 0.85));
  color: #fff; padding: 18px 16px 14px; font-weight: 650; font-size: 15px;
}
.work .placeholder-note {
  position: absolute; z-index: 1; top: 12px; left: 12px; font-size: 11.5px; font-weight: 700;
  background: rgba(13, 17, 23, 0.75); color: var(--text-2);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px;
}

/* ── Отзывы ── */
.review {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.review .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }
.review blockquote { margin: 0 0 14px; font-size: 15px; color: var(--text-2); }
.review .author { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.review .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--accent-soft); border: 1px solid rgba(224, 163, 60, 0.3); color: var(--accent);
  display: grid; place-items: center; font-weight: 800;
}
.review .author small { color: var(--muted); display: block; }

/* ── FAQ ── */
.faq details {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 14px; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] { border-color: rgba(224, 163, 60, 0.4); }
.faq p { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }

/* ── Контакты ── */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.contacts-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.contacts-list li { display: flex; gap: 12px; align-items: center; font-size: 16px; color: var(--text-2); }
.contacts-list .ci { width: 26px; text-align: center; }
.contacts-list a:hover { color: var(--accent); }
.map-placeholder {
  min-height: 280px; border-radius: var(--radius); border: 1px dashed #3b4c5e;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 14px, rgba(255, 255, 255, 0.045) 14px 28px),
    var(--bg-soft);
  display: grid; place-items: center; color: var(--muted); font-size: 14px;
}

/* ── Подвал ── */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

/* ── Плавающая кнопка звонка ── */
.call-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%; display: none; place-items: center;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #1a1206; font-size: 22px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* ── Появление при прокрутке ── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ── Адаптив ── */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { position: static; }
  .grid-3, .works, .steps { grid-template-columns: 1fr 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .included { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .nav { display: none; }
  .nav.open {
    display: grid; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel); border-bottom: 1px solid var(--border);
    padding: 14px 20px 20px; gap: 12px; box-shadow: var(--shadow);
  }
  .burger { display: block; }
  .header-cta .phone { display: none; }
  .header-cta .btn { display: none; }
  .call-fab { display: grid; }
  .grid-3, .works, .steps { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 40px 0; }
  .section-alt { border-block: 1px solid var(--border); }
}
