:root {
  --night: #141E27;      /* фон: невская ночь */
  --granite: #1C2833;    /* поверхности */
  --line: #2C3A47;       /* тонкие границы на тёмном */
  --brass: #B8924A;      /* латунь — акцент */
  --brass-light: #D8BC82;
  --text: #E7E3DA;
  --muted: #95A0AB;
  --ink: #111111;

  --serif: "Forum", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: .01em; }
h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }

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

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 500 16px/1 var(--sans);
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn-brass { background: var(--brass); color: #17120A; }
.btn-brass:hover { background: var(--brass-light); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brass); }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 30, 39, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 32px; height: 72px; }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); }
.header-phone { text-decoration: none; font-weight: 500; white-space: nowrap; }

/* Первый экран */
.hero { padding: 96px 0 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: 72px; align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  max-width: 14ch;
}
.lead { margin-top: 28px; max-width: 54ch; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Латунная табличка — главный образ страницы */
.plate {
  position: relative; margin: 0;
  padding: 44px 40px;
  border-radius: 3px;
  color: #3A2A10;
  text-align: center;
  background:
    linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,246,214,.45) 46%, rgba(255,255,255,0) 60%) no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, rgba(0,0,0,.03) 1px 3px),
    linear-gradient(160deg, #E2C789 0%, #C49A50 38%, #A9813C 70%, #CFAE6A 100%);
  background-size: 300% 100%, auto, auto;
  background-position: 120% 0, 0 0, 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255,244,210,.7),
    inset 0 -2px 0 rgba(80,55,15,.35),
    0 30px 60px -20px rgba(0,0,0,.6);
  animation: sheen 2.4s .4s cubic-bezier(.4,0,.2,1) both;
}
@keyframes sheen { from { background-position: 120% 0, 0 0, 0 0; } to { background-position: -20% 0, 0 0, 0 0; } }
.plate-inner {
  border: 1px solid rgba(70,48,12,.45);
  box-shadow: 0 1px 0 rgba(255,240,200,.45);
  padding: 32px 20px;
}
.plate p { text-shadow: 0 1px 0 rgba(255,240,200,.55); }
.plate-kind { font-size: 16px; letter-spacing: .04em; }
.plate-name { font: 400 clamp(48px, 5vw, 64px)/1 var(--serif); letter-spacing: .18em; margin: 10px 0 0 .18em; }
.plate hr { width: 64px; margin: 22px auto; border: 0; border-top: 1px solid rgba(70,48,12,.5); }
.plate-line { font-size: 16px; }
.plate-hours { font: 400 24px/1.35 var(--serif); margin-top: 6px; }
.screw {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F1DDAA, #8C6A2E 70%);
  box-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.screw::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 5.5px; height: 1px;
  background: rgba(60,40,10,.7); transform: rotate(-35deg);
}
.screw.tl { top: 12px; left: 12px; } .screw.tr { top: 12px; right: 12px; }
.screw.bl { bottom: 12px; left: 12px; } .screw.br { bottom: 12px; right: 12px; }

/* Цифры */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 96px 0 0; padding: 36px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts div { padding: 0 24px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font: 400 40px/1.1 var(--serif); color: var(--brass-light); }
.facts dd { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* Принципы */
.principles { padding: 120px 0; }
.principles-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 72px; }
.principles-head p { margin-top: 24px; color: var(--muted); max-width: 40ch; }
.principles-list { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 40px; }
.principles-list article { border-top: 1px solid var(--brass); padding-top: 22px; }
.principles-list h3 { font: 500 19px/1.3 var(--sans); }
.principles-list p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* Практики — точная копия референса */
.practices { background: var(--brass); color: var(--ink); padding: 52px 0 40px; }
.practices h2 {
  text-align: center;
  font: 600 30px/1.2 var(--sans);
  letter-spacing: -.005em;
}
.practice-grid {
  list-style: none; margin: 72px auto 0; padding: 0;
  max-width: 1000px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  row-gap: 56px; column-gap: 24px;
}
.practice-grid li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.practice-grid svg {
  width: 84px; height: 84px;
  fill: none; stroke: var(--ink); stroke-width: 2.2;
  stroke-linejoin: miter; stroke-linecap: butt;
}
.practice-grid .fill-bg { fill: var(--brass); }
.practice-grid span { margin-top: 26px; max-width: 22ch; font-size: 14px; font-weight: 500; line-height: 1.4; }

/* Отзывы — по образцу референса */
.reviews { padding: 120px 0; }
.section-head.center { text-align: center; max-width: 620px; margin: 0 auto; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 16px; }
.review-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr;
  gap: 22px; margin-top: 64px;
}
.review {
  display: flex; flex-direction: column;
  margin: 0;
  padding: 28px 22px 22px;
  background: var(--granite);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.quote { width: 22px; height: 22px; fill: none; stroke: #4F6D8E; stroke-width: 1.4; }
.review blockquote { flex: 1; margin: 16px 0 0; font-size: 15px; line-height: 1.75; }
@media (max-width: 1000px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .review-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.review figcaption {
  display: flex; align-items: center; gap: 14px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
}
.avatar {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #24384D; color: #8FB3D9; font-size: 13px; font-weight: 600;
}
.review b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.review small { color: var(--muted); font-size: 12px; }

/* Контакты */
.contacts { padding: 0 0 120px; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: stretch; }
.contacts dl { margin: 36px 0 40px; }
.contacts dl div { padding: 18px 0; border-top: 1px solid var(--line); }
.contacts dt { color: var(--muted); font-size: 14px; }
.contacts dd { margin: 4px 0 0; font-size: 17px; }
.contacts dd a { text-decoration: none; }
.contacts dd a:hover { color: var(--brass-light); }
.contacts small { color: var(--muted); font-size: 14px; }
.map { min-height: 460px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.map iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; filter: saturate(.75); }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

.footer-row > a:last-child, .footer-links { margin-left: auto; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Чат */
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 50; }
.chat-toggle {
  position: relative; width: 64px; height: 64px; margin-left: auto;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--brass); color: #17120A;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.6);
}
.chat-toggle:hover { background: var(--brass-light); }
.chat-toggle svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.chat-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 22px; height: 22px; border-radius: 11px;
  background: #D9534F; color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; border: 2px solid var(--night);
}
.chat-panel {
  width: 370px; height: min(560px, calc(100vh - 130px));
  margin-bottom: 16px;
  display: flex; flex-direction: column;
  background: var(--granite);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  overflow: hidden;
  transform-origin: bottom right;
  animation: chat-in .22s ease-out;
}
@keyframes chat-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--night);
}
.chat-head p { font-weight: 600; font-size: 15px; }
.chat-head small { color: var(--muted); font-size: 12px; }
.chat-avatar {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brass); color: #17120A; font: 400 20px/1 var(--serif);
}
.chat-avatar::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 50%; background: #4CC38A; border: 2px solid var(--night);
}
.chat-close { margin-left: auto; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); }
.chat-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.msg.bot { background: #26343F; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--brass); color: #17120A; border-bottom-right-radius: 4px; align-self: flex-end; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  padding: 8px 12px; border-radius: 16px; cursor: pointer;
  background: transparent; color: var(--brass-light);
  border: 1px solid rgba(184,146,74,.55); font: 500 13.5px/1.2 var(--sans);
}
.chips button:hover { background: rgba(184,146,74,.14); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--brass); }
.consent a { color: var(--brass-light); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  background: var(--night); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font: 15px var(--sans);
}
.chat-input input:focus { outline: none; border-color: var(--brass); }
.chat-input input[aria-invalid="true"] { border-color: #D9534F; }
.chat-input button {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--brass); color: #17120A; display: grid; place-items: center;
}
.chat-input button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.chat-input button:disabled { opacity: .4; cursor: default; }

/* Адаптив */
@media (max-width: 1000px) {
  .nav { display: none; }
  .header-phone { margin-left: auto; }
  .hero-grid, .principles-grid, .contacts-grid { grid-template-columns: 1fr; gap: 48px; }
  .plate { max-width: 460px; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .practice-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-row { gap: 12px; height: 64px; }

  .header-phone { display: none; }
  .header-row .btn { margin-left: auto; }
  .hero { padding-top: 56px; }
  .plate { padding: 32px 24px; }
  .facts { margin-top: 64px; }
  .facts div { padding: 0 0 0 16px; }
  .facts dt { font-size: 32px; }
  .principles, .reviews { padding: 80px 0; }
  .principles-list { grid-template-columns: 1fr; gap: 36px; }
  .practices h2 { font-size: 26px; }
  .practice-grid { grid-template-columns: 1fr 1fr; row-gap: 44px; margin-top: 48px; }
  .practice-grid svg { width: 72px; height: 72px; }
  .contacts { padding-bottom: 96px; }
  .map, .map iframe { min-height: 340px; }
  .footer-row > a:last-child, .footer-links { margin-left: 0; }
  .chat { right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; }
  .chat-panel { width: 100%; height: min(540px, calc(100vh - 110px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Окно заявки */
.btn-block { width: 100%; }
.lead-modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 32px 32px 24px;
  background: var(--granite); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.8);
}
.lead-modal[open] { animation: chat-in .22s ease-out; }
.lead-modal::backdrop { background: rgba(8, 13, 18, .72); backdrop-filter: blur(3px); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--brass-light); border: 1px solid var(--line);
}
.modal-close:hover { border-color: var(--brass); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lead-modal h2 { font-size: clamp(30px, 4.4vw, 38px); line-height: 1.05; padding-right: 32px; }
.lead-sub { margin: 16px 0 28px; color: var(--muted); font-size: 15.5px; }
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-form .lead-sub { margin: 0 0 8px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 14px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 11px 14px;
  background: var(--night); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  font: 16px/1.4 var(--sans);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #66727E; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.lead-modal [aria-invalid="true"] { border-color: #D9534F; outline-color: #D9534F; }
.form-error { color: #F08A86; font-size: 14px; }
.lead-form .btn-brass { margin-top: 4px; }
.lead-form .btn-ghost { color: var(--brass-light); font-size: 17px; }
.lead-note { color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 640px) {
  .lead-modal { padding: 32px 20px 24px; }
}

/* Логотип: знак + надпись */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { width: 46px; height: 46px; flex: none; color: var(--brass-light); }
.logo-text { display: flex; flex-direction: column; gap: 5px; }
.logo-sub { font-size: 9.5px; line-height: 1; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.logo-word { font: 400 24px/1 var(--serif); letter-spacing: .2em; color: var(--text); }
.site-footer .logo-mark { width: 38px; height: 38px; }
.site-footer .logo-word { font-size: 19px; }
@media (max-width: 640px) {
  .logo-mark { width: 38px; height: 38px; }
  .logo-sub { display: none; }
  .logo-word { font-size: 20px; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Текстовые страницы: политика, согласие */
.doc { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.1; }
.doc-meta { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc h2 { font: 500 20px/1.35 var(--sans); margin: 44px 0 12px; }
.doc p, .doc li { color: #CFCAC0; font-size: 16.5px; line-height: 1.7; }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--brass-light); }
.doc-page .header-phone { margin-left: auto; }
img.logo-mark { object-fit: contain; }
