:root {
  --bg: #141414;
  --bg-elev: #1c1c1c;
  --ink: #f4f1ea;
  --muted: #b7b1a8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6534ff;
  --accent-2: #8a6bff;
  --sand: #c5a47e;
  --danger: #ffb4b4;
  --ok: #b6f0c8;
  --max: 1120px;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.skip {
  position: absolute; left: 12px; top: -40px; background: #fff; color: #000; padding: 8px 12px; z-index: 10;
}
.skip:focus { top: 12px; }

.header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header);
  display: flex; align-items: center;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 16px; width: min(1200px, calc(100% - 32px)); }
.logo { font-weight: 800; letter-spacing: 0.08em; text-decoration: none; }
.nav { display: flex; gap: 16px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; }
.menu-services { position: relative; }
.menu-services summary {
  cursor: pointer; color: var(--muted); font-size: 14px; min-height: 44px;
  display: flex; align-items: center; list-style: none;
}
.menu-services summary::-webkit-details-marker { display: none; }
.menu-services summary:hover,
.menu-services[open] summary { color: #fff; }
.menu-services div { display: none; }
.menu-services[open] div {
  display: grid;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  max-height: min(70vh, calc(100vh - var(--header) - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  background: #1c1c1c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  z-index: 30;
  box-sizing: border-box;
  box-shadow: var(--shadow);
}
.menu-services a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  text-decoration: none;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.split { display: grid; gap: 14px; grid-template-columns: 1.2fr 0.8fr; }
.nav a.btn { color: #fff; }
.nav a.header-phone { color: var(--ink); font-weight: 700; }
.nav a:hover { color: #fff; }
.header-phone { text-decoration: none; font-weight: 700; white-space: nowrap; }
.nav-panel { display: none; }
.burger.btn { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
}
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--sand); outline-offset: 2px;
}

.hero { padding: 56px 0 28px; }
.kicker { color: var(--sand); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; margin: 0 0 16px; max-width: 16ch; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.crumbs a { color: var(--sand); }

.section { padding: 28px 0; }
h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 12px; }
h3 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.card, .panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 180px; overflow: visible; }
.card.priority { border-color: var(--accent); box-shadow: var(--shadow); }
.card h3, .card p, .card span, .card small {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.card small, .tag { color: var(--sand); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.card-img, .hero-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  background: #2a2a2a;
}
.hero-photo { min-height: 220px; max-height: 360px; object-fit: cover; }
.card .card-img { height: 140px; }
.ph {
  height: 120px; border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(101,52,255,.55), rgba(197,164,126,.25)),
    repeating-linear-gradient(45deg, #2a2a2a 0 8px, #242424 8px 16px);
  display: grid; place-items: end start; padding: 10px;
  color: #fff; font-size: 12px;
}
.case-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.case-heading h2 { margin-bottom: 0; }
.case-service { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); white-space: nowrap; }
.case-service a { color: inherit; }
.case-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0; color: var(--muted); font-size: 14px; }
.case-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.case-photo { margin: 0; overflow: hidden; }
.case-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.case-photo figcaption { display: grid; gap: 4px; padding-top: 10px; }
.case-photo-stage { font-weight: 700; }
@media (max-width: 720px) {
  .case-heading { display: block; }
  .case-service { display: inline-block; margin-top: 12px; white-space: normal; }
  .case-gallery { grid-template-columns: 1fr; }
}
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-scroll::after { content: "Таблица прокручивается вбок"; display: block; color: var(--muted); font-size: 12px; padding: 8px 10px; }
.list {
  margin: 0;
  padding-left: 1.35em;
  list-style-position: outside;
  overflow: visible;
}
.list li {
  padding-left: 0.15em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.list li + li { margin-top: 6px; }
.footer .wrap > div { min-width: 0; overflow: visible; }
.footer .list { padding-left: 1.4em; }
.steps { counter-reset: step; }
.steps article { position: relative; padding-left: 48px; }
.step-n {
  margin: 0 0 8px;
  color: var(--sand);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.steps article { padding-left: 16px; }
.steps article::before { content: none; }
.section details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.section summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: #101010; color: var(--ink); padding: 10px 12px; font: inherit;
}
textarea { min-height: 96px; }
.check { grid-template-columns: 20px 1fr; align-items: start; gap: 10px; }
.check input {
  width: 20px; height: 20px;
  margin: 0; padding: 0;
  min-height: 0;
  border: 0; border-radius: 6px;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
  align-self: start;
}
.hp { position: absolute; left: -9999px; }
.form-ok { display: none; padding: 12px; border-radius: 12px; background: #173222; color: var(--ok); }
.form-ok.show { display: block; }
.error { color: var(--danger); font-size: 13px; min-height: 1em; }
.footer { border-top: 1px solid var(--line); padding: 36px 0 80px; color: var(--muted); }
.footer a { color: var(--sand); }
.footer .wrap { display: grid; gap: 18px; grid-template-columns: 1.2fr 1fr 1fr; }
.mobile-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  gap: 8px; padding: 10px; background: rgba(20,20,20,.96); border-top: 1px solid var(--line);
}
.mobile-bar a, .mobile-bar button { flex: 1; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .nav { display: none; }
  .burger.btn { display: inline-flex; margin-left: auto; }
  .nav-panel.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header); left: 0; right: 0;
    background: #1c1c1c; padding: 12px 16px 16px; border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--header)); overflow-y: auto; overflow-x: hidden;
  }
  .nav-panel a {
    min-height: 44px; display: block; padding: 10px 4px 10px 8px;
    text-decoration: none; line-height: 1.35;
    overflow-wrap: anywhere; word-break: break-word;
  }
}
.trust {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: 22px 0 0; padding: 0; list-style: none; font-weight: 650;
}
.section-cta { margin-top: 16px; }
.band { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cards.two { grid-template-columns: 1fr 1fr; }
.card.compact { min-height: 0; }
.more { color: var(--sand); font-weight: 700; font-size: 14px; }
.price-table td.num, .price-table th:last-child { text-align: right; white-space: nowrap; }
.quiz-shell fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.quiz-shell legend { padding: 0 6px; }
.nav { flex-wrap: wrap; justify-content: flex-end; }
.nav-panel .menu-services { width: 100%; }
.nav-panel .menu-services summary { min-height: 44px; color: var(--ink); }
.nav-panel .menu-services[open] div {
  position: static; display: grid; width: auto; max-width: none; max-height: none;
  margin: 0; padding: 0 0 8px 8px; background: transparent; border: 0; box-shadow: none;
}
.nav-panel .menu-contacts { width: 100%; }
.nav-panel .menu-contacts summary { min-height: 44px; width: 100%; }
.nav-panel .menu-contacts .drop {
  position: static; width: 100%; min-width: 0; max-width: none;
  margin: 0; padding: 0 0 4px 8px; background: transparent; border: 0; box-shadow: none;
}
.nav-panel .menu-contacts .drop a { white-space: normal; }
.nav-panel .menu-contacts[open] summary { color: var(--ink); }
.home h1 { max-width: 18ch; }
.header { height: auto; min-height: var(--header); }

@media (max-width: 1180px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .footer .wrap { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; }
  body { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  .cards, .cards.two { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  .mobile-bar .btn { padding: 0 8px; font-size: 14px; }
}

.quiz-shell { display: grid; gap: 14px; scroll-margin-top: var(--header); }
.quiz-progress { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-progress span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700;
}
.quiz-progress span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.quiz-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.quiz-choice {
  min-height: 52px; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: #101010; color: var(--ink); cursor: pointer; font: inherit;
  display: grid; gap: 4px; align-content: center;
}
.quiz-choice span { font-weight: 700; }
.quiz-choice small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.quiz-choice.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.quiz-choice.suggest { border-color: rgba(197, 164, 126, 0.75); }
.quiz-details { display: grid; gap: 12px; }
.quiz-stepper {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px;
}
.quiz-stepper input {
  width: 96px; text-align: center; font-weight: 700; font-size: 18px;
}
.quiz-stepper .btn { min-width: 48px; padding: 0; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.quiz-total { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 8px 0; }
.quiz-total small { display: block; font-size: 16px; color: var(--muted); font-weight: 600; }
.quiz-min {
  margin: 0 0 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: rgba(101, 52, 255, 0.08);
  font-size: 14px;
}
.quiz-page .hero { padding-bottom: 8px; }

/* --- Контакты и значки --- */
.icon { width: 18px; height: 18px; flex: none; display: block; }
.contact-link { display: inline-flex; align-items: center; gap: 8px; }
.menu-contacts { position: relative; }
.menu-contacts summary { cursor: pointer; color: var(--ink); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 9px; list-style: none; padding: 0 6px; white-space: nowrap; font-weight: 700; }
.menu-contacts summary::-webkit-details-marker { display: none; }
.menu-contacts summary::marker { display: none; }
.contacts-label { display: inline-block; }
.contacts-icons { display: inline-flex; align-items: center; gap: 4px; }
.contacts-icons .icon { width: 17px; height: 17px; }
.menu-contacts[open] summary { color: var(--ink); }
.menu-contacts .drop { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 270px; min-width: 270px; background: #fff; border: 1px solid #e6e1d8; border-radius: 14px; padding: 8px; z-index: 30; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); grid-template-columns: 1fr; gap: 2px; }
.menu-contacts[open] .drop { display: grid; }
.menu-contacts .drop a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; white-space: normal; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: #141414; }
.menu-contacts .drop a:hover { background: #f1ede5; color: #141414; }
.menu-contacts .drop a .icon { width: 20px; height: 20px; }
.menu-contacts .drop .cap { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; }
.menu-contacts .drop .sub { display: block; color: #6e675f; font-size: 12px; line-height: 1.3; margin-top: 2px; }

/* Футер: контакты со значками */
.contact-row { display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px; }
.contact-row .sep { color: rgba(255,255,255,0.25); margin: 0 4px; }

