/* АТС: лендинг «авто из Китая под ключ». Светлый тёплый фон, белые карточки, золотой акцент — по макету клиента */
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #efedea;
  --card: #fff;
  --ink: #1b1b1d;
  --muted: #66625c;
  --gold: #b08a4f;
  --gold-dark: #94723d;
  --gold-soft: #f6efe3;
  --green: #2f7d3b;
  --green-soft: #e3f1df;
  --max: #5b4ff0;
  --max-dark: #483cd1;
  --line: #e2ded7;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
img, svg { display: block; }
a { color: inherit; }
p, ul, ol, h1, h2, h3, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; }

/* Шапка */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  background: #fff;
}
.bar-logo { width: 84px; height: auto; }
.bar-contact { text-align: right; }
.bar-contact a { font-size: 17px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.bar-contact small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.wrap { max-width: 480px; margin: 0 auto; padding: 16px 16px 28px; }

/* Первый экран */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 700;
}
.badge svg { width: 16px; height: 16px; }

h1 { margin: 14px 0 10px; font-size: 27px; line-height: 1.16; font-weight: 800; letter-spacing: -.01em; }
h1 span { color: var(--gold); }
.lead { font-size: 16px; color: var(--muted); }

.hero-photo { position: relative; margin-top: 16px; border-radius: 18px; overflow: hidden; background: #ddd; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-photo figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--muted);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.hero-photo figcaption b { display: block; font-size: 14px; color: var(--ink); }

.go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 60px;
  margin-top: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--gold);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(176, 138, 79, .35);
}
.go svg { width: 20px; height: 20px; }
.go:active { background: var(--gold-dark); }

/* Кнопка MAX */
.msgs { margin-top: 8px; }
.msgs a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 14px;
  background: var(--max);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.msgs a:active { background: var(--max-dark); }
.msgs svg { width: 20px; height: 20px; fill: #fff; }
.hint { margin-top: 8px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* Карточки доверия */
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.trust li { padding: 14px 12px; border-radius: 16px; background: var(--card); font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.trust b { display: block; margin: 10px 0 4px; font-size: 15px; line-height: 1.25; color: var(--ink); }
.ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.ic svg { width: 20px; height: 20px; }

/* Блоки */
.block { margin-top: 32px; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 800; }
.sub { margin-top: 4px; font-size: 14.5px; color: var(--muted); }

/* Модели: листаются вбок */
.cars {
  display: flex;
  gap: 10px;
  margin: 14px -16px 0;
  padding: 0 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
  scrollbar-width: none;
}
.cars::-webkit-scrollbar { display: none; }
.car { flex: 0 0 auto; width: 74%; max-width: 300px; border-radius: 16px; background: var(--card); overflow: hidden; scroll-snap-align: start; }
.car img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #e8e6e2; }
.car-body { padding: 12px 12px 14px; }
.car h3 { font-size: 17px; font-weight: 800; }
.spec { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.price { margin-top: 8px; font-size: 20px; font-weight: 800; }
.price-ask { font-size: 17px; color: var(--gold-dark); }
.car button {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  background: #fff;
  color: var(--gold-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.car button:active { background: var(--gold-soft); }
.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 14px 12px;
  border: 1.5px dashed #cfc6b8;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.link-btn svg { width: 18px; height: 18px; color: var(--gold); }

/* Этапы */
.steps { margin-top: 14px; padding: 6px 14px; border-radius: 16px; background: var(--card); }
.steps li { display: flex; gap: 12px; padding: 12px 0; font-size: 14px; color: var(--muted); line-height: 1.35; }
.steps li + li { border-top: 1px solid var(--line); }
.steps b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 15px;
}
.steps strong { display: block; margin-bottom: 2px; font-size: 15.5px; color: var(--ink); }

/* Выдачи */
.rating { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--muted); text-decoration: none; }
.rating b { color: var(--ink); font-size: 15px; }
.stars { display: flex; gap: 1px; }
.stars svg { width: 15px; height: 15px; fill: #f2b01e; }
.deliveries {
  display: flex;
  gap: 10px;
  margin: 12px -16px 0;
  padding: 0 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
  scrollbar-width: none;
}
.deliveries::-webkit-scrollbar { display: none; }
.deliveries figure { flex: 0 0 auto; width: 58%; max-width: 240px; scroll-snap-align: start; }
.deliveries img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #e8e6e2; }
.deliveries figcaption { margin-top: 5px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

/* Основатель */
.founder { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--card); }
.founder img { width: 112px; height: 140px; object-fit: cover; border-radius: 12px; }
.quote { font-size: 15px; line-height: 1.4; font-weight: 600; }
.sign { margin-top: 8px; font-size: 13px; color: var(--muted); }
.sign b { display: block; font-size: 14.5px; color: var(--ink); }
.address { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.address svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--gold); }
.address b { display: block; font-size: 15px; color: var(--ink); }

/* Формы */
.lead-form input,
.msg-form input[type="tel"] {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1.5px solid #d6d0c6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.lead-form input:focus,
.msg-form input[type="tel"]:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.lead-form input.is-invalid,
.msg-form input[type="tel"].is-invalid { border-color: #d12b2b; outline: 2px solid #d12b2b; outline-offset: -1px; }
.hp { position: absolute !important; left: -9999px; width: 1px !important; height: 1px !important; opacity: 0; }
.lead-form button {
  display: block;
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: var(--gold);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.lead-form button:active { background: var(--gold-dark); }
.lead-form button[disabled] { opacity: .7; }
.form-error { margin-top: 8px; color: #d12b2b; font-size: 14.5px; font-weight: 600; }
.form-error a { color: inherit; }
.consent { margin-top: 8px; font-size: 11.5px; color: #8a857d; text-align: center; }
.consent a { color: inherit; }
.lead-form.is-done > :not(.form-done) { display: none; }
.form-done { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.form-done[hidden] { display: none; }
.form-done svg { flex: 0 0 auto; width: 38px; height: 38px; padding: 7px; border-radius: 50%; background: var(--green); color: #fff; }
.form-done b { display: block; font-size: 18px; }

/* Финальный блок */
.bottom { margin-top: 32px; padding: 20px 16px 16px; border-radius: 20px; background: #1f1d1a; color: #fff; }
.bottom h2 { text-align: center; }
.bottom-sub { margin: 6px 0 14px; font-size: 14.5px; color: #c9c3b8; text-align: center; }
.bottom .lead-form input { border-color: #fff; }
.bottom .consent { color: #a39d93; }
.bottom .form-error { color: #ff8a8a; }

.foot { margin-top: 24px; font-size: 12px; line-height: 1.6; color: #8a857d; text-align: center; }
.foot a { color: inherit; }
.offer { display: block; margin-top: 8px; font-size: 11px; line-height: 1.45; }

/* Нижняя панель */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .1);
  transform: translateY(110%);
  transition: transform .25s ease-out;
}
.dock.is-visible { transform: translateY(0); }
.dock button { height: 50px; border: 0; border-radius: 14px; background: var(--gold); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; }
.dock .msgs { margin: 0; }
.dock .msgs a { height: 50px; font-size: 16px; }
body.has-dock { padding-bottom: 76px; }

/* Окна, выезжают снизу */
html.popup-open { overflow: hidden; }
.popup { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.popup[hidden] { display: none; }
.popup-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; }
.popup-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform .3s ease-out;
}
.popup.is-open .popup-backdrop { opacity: 1; }
.popup.is-open .popup-box { transform: translateY(0); }
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0eeea;
  color: var(--ink);
  cursor: pointer;
}
.popup-close svg { width: 20px; height: 20px; }
.popup-title { padding: 0 40px; font-size: 21px; font-weight: 800; text-align: center; }
.popup-sub { margin-top: 4px; font-size: 14.5px; color: var(--muted); text-align: center; }
.popup .lead-form, .msg-form { margin-top: 14px; }

.consent-check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; font-size: 13px; line-height: 1.35; color: var(--muted); cursor: pointer; }
.consent-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.consent-check a { color: inherit; }
.consent-check.is-invalid, .consent-check.is-invalid a { color: #d12b2b; }
.msg-form button,
.msg-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 14px;
  background: var(--max);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.msg-form button:active, .msg-fallback:active { background: var(--max-dark); }
.msg-form button[disabled] { opacity: .7; }
.msg-form.is-done > :not(.msg-done) { display: none; }
.msg-done[hidden] { display: none; }
.msg-fallback { margin-top: 12px; }

@media (max-width: 359px) {
  h1 { font-size: 24px; }
  .bar-contact a { font-size: 15px; }
  .trust li { font-size: 12.5px; }
  .trust b { font-size: 14px; }
  .founder { grid-template-columns: 92px 1fr; }
  .founder img { width: 92px; height: 115px; }
}
