/* BYD Megawatt — лендинг. Mobile-first. */
:root {
  --red: #f00a0a;
  --red-dark: #c80000;
  --ink: #0e0e10;
  --ink-2: #3a3a40;
  --muted: #6b6b73;
  --line: #e4e4e8;
  --bg: #ffffff;
  --grey: #f4f4f6;
  --dark: #0e0e10;
  --dark-2: #1a1a1e;
  --radius: 16px;
  --radius-sm: 10px;
  --head: "Conthrax", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 16px;
  --top-h: 56px;
}

@font-face { font-family: "Conthrax"; src: url("../fonts/conthrax-sb.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Conthrax"; src: url("../fonts/conthrax-bd.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Conthrax"; src: url("../fonts/conthrax-hv.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
.nw { white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--top-h); }
body {
  margin: 0;
  font: 400 16px/1.5 var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* место под sticky-кнопку */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------- кнопки ----------
   Цвет ссылок tel: задаётся селекторами из двух классов: в Тильде правило
   :where(.t-records) a[href^=tel] { color: inherit } перебивает одиночный класс. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px;
  border: 0; border-radius: 999px;
  font: 700 16px/1.2 var(--body); text-decoration: none; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.btn:active { transform: scale(.98); }
.btn.btn--red { background: var(--red); color: #fff; box-shadow: 0 8px 24px -8px rgba(240, 10, 10, .6); }
.btn.btn--red:hover { background: var(--red-dark); }
.btn.btn--dark { background: var(--ink); color: #fff; }
.btn.btn--white { background: #fff; color: var(--red); }
.btn--xl { min-height: 60px; font-size: 17px; padding: 16px 28px; }
.btn--block { display: flex; width: 100%; }
.btn--red.btn--xl { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(240, 10, 10, .6), 0 0 0 0 rgba(240, 10, 10, .45); }
  50% { box-shadow: 0 8px 24px -8px rgba(240, 10, 10, .6), 0 0 0 12px rgba(240, 10, 10, 0); }
}
@media (prefers-reduced-motion: reduce) { .btn--red.btn--xl { animation: none; } html { scroll-behavior: auto; } }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(14, 14, 16, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.top__in { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top__home { display: block; line-height: 0; }
.top__logo { width: 150px; height: auto; }
.top__right { display: flex; align-items: center; gap: 10px; }
.top__call { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; }
.top .top__call { color: #fff; } /* см. комментарий у кнопок */
.top__call svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.top__call span { display: none; }
.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 2px; }
.lang button { background: none; border: 0; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.hero__media { position: relative; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 14, 16, 0) 45%, var(--dark) 100%); }
.hero__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__in { position: relative; margin-top: -72px; padding-bottom: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; background: rgba(255, 255, 255, .12); color: #fff; }
.chip--red { background: var(--red); }
.hero__title { font: 800 28px/1.15 var(--head); letter-spacing: -.01em; text-wrap: balance; }
.hero__title em { font-style: normal; color: var(--red); }
.hero__sub { margin-top: 12px; color: rgba(255, 255, 255, .78); font-size: 16px; }
.hero__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 20px 0 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.hero__price-label { width: 100%; font-size: 13px; color: rgba(255, 255, 255, .65); }
.hero__price strong { font: 800 30px/1 var(--head); color: #fff; }
.hero__price sup { font-size: .5em; color: var(--red); }
.hero__price > span:last-child { color: rgba(255, 255, 255, .8); font-weight: 600; }
.hero .btn { width: 100%; }
.hero__note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.hero__foot { margin-top: 16px; font-size: 11px; line-height: 1.4; color: rgba(255, 255, 255, .45); }

/* ---------- benefits ---------- */
.benefits { background: var(--dark); color: #fff; padding: 0 0 32px; }
.benefits__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.benefits__list b, .why b, .feat h3, .steps b { overflow-wrap: break-word; }
.benefits__list li { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--dark-2); }
.benefits__list svg { color: var(--red); }
.benefits__list b { display: block; font: 700 15px/1.25 var(--head); }
.benefits__list span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .65); }

/* ---------- секции ---------- */
.section { padding: 48px 0; }
.section--grey { background: var(--grey); }
.section--dark { background: var(--dark); color: #fff; }
.h2 { font: 800 24px/1.2 var(--head); letter-spacing: -.01em; text-wrap: balance; margin-bottom: 12px; }
.lead { color: var(--ink-2); margin-bottom: 24px; }

/* ---------- калькулятор ---------- */
.calc { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .35); overflow: hidden; }
.calc__tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); padding: 6px; gap: 6px; }
.calc__tabs button { border: 0; border-radius: 12px; padding: 12px 8px; background: transparent; color: rgba(255, 255, 255, .7); font-weight: 700; font-size: 15px; }
.calc__tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }
.calc__tabs button[data-mode="inst"][aria-selected="true"] { background: var(--red); color: #fff; }
.calc__body { display: grid; gap: 0; }
.calc__inputs { padding: 20px 16px 8px; }
.calc__group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.calc__group legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1 0 auto; min-width: 56px; min-height: 44px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  font-weight: 700; font-size: 15px; color: var(--ink);
  transition: border-color .15s, background-color .15s, color .15s;
}
.seg button small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg button[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.seg button:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.seg--trim button { flex: 1 1 140px; text-align: left; }
.seg[data-downs] { display: grid; grid-template-columns: repeat(5, 1fr); }
.seg--terms { display: grid; grid-template-columns: repeat(4, 1fr); }
.seg[data-downs] button, .seg--terms button { min-width: 0; padding: 10px 4px; }
.calc__hint { min-height: 20px; font-size: 14px; color: var(--red-dark); font-weight: 600; }
.calc__hint:empty { display: none; }
.calc__result { padding: 20px 16px; background: var(--grey); border-top: 1px solid var(--line); }
.calc__label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.calc__pay { margin-top: 4px; font-weight: 600; color: var(--ink-2); }
.calc__pay strong { font: 800 32px/1.1 var(--head); color: var(--ink); }
.calc__badge { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(34, 197, 94, .14); color: #15803d; font-size: 13px; font-weight: 700; }
.calc__badge:empty { display: none; }
.calc__dl { margin: 16px 0 20px; display: grid; gap: 8px; }
.calc__dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.calc__dl div[hidden] { display: none; }
.calc__dl dt { color: var(--muted); }
.calc__dl dd { font-weight: 700; text-align: right; }
.calc__note { margin-top: 12px; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* ---------- фичи и галерея ---------- */
.feats { display: grid; gap: 12px; margin-top: 8px; }
.feat { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.feat svg { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: rgba(240, 10, 10, .08); color: var(--red); }
.feat h3 { font: 700 17px/1.25 var(--head); }
.feat p { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 24px var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { display: none; }
.gallery li { flex: 0 0 85%; scroll-snap-align: center; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--grey); }

/* ---------- сравнение ---------- */
.compare-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); margin-top: 16px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.compare thead th { font: 700 13px/1.2 var(--head); background: var(--ink); color: #fff; }
.compare tbody th { text-align: left; font-weight: 500; color: var(--ink-2); }
.compare td { font-weight: 700; white-space: nowrap; }
.compare td.yes { color: #16a34a; font-size: 18px; }
.compare td.no { color: #b0b0b8; }
.compare__price td { color: var(--red); font-size: 15px; }
.compare tr:last-child > * { border-bottom: 0; }

/* ---------- видео ---------- */
.videos { display: grid; gap: 16px; margin-top: 16px; }
.video__btn { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000 center / cover no-repeat; overflow: hidden; }
.video__btn::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); }
.video__btn svg { position: relative; width: 68px; height: 68px; padding: 18px 16px 18px 20px; border-radius: 50%; background: var(--red); color: #fff; fill: currentColor; stroke: none; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.video figcaption { margin-top: 10px; font-weight: 700; }

/* ---------- почему мы ---------- */
.why { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
@media (min-width: 440px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.why li { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--dark-2); }
.why svg { color: var(--red); margin-bottom: 4px; }
.why b { font: 700 15px/1.25 var(--head); }
.why span { font-size: 13px; color: rgba(255, 255, 255, .65); }

/* ---------- шаги ---------- */
.steps { counter-reset: s; display: grid; gap: 12px; margin: 16px 0 28px; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 72px; border-radius: var(--radius); background: var(--grey); min-height: 76px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font: 800 18px/1 var(--head); }
.steps b { display: block; font: 700 16px/1.3 var(--head); }
.steps span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq__item { background: #fff; border-radius: var(--radius-sm); }
.faq__item summary { position: relative; list-style: none; cursor: pointer; padding: 16px 48px 16px 16px; font-weight: 700; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--grey); font-weight: 700; transition: transform .2s; }
.faq__item[open] summary::after { content: "−"; background: var(--red); color: #fff; }
.faq__item p { padding: 0 16px 16px; color: var(--ink-2); font-size: 15px; }

/* ---------- финал ---------- */
.final { background: var(--red); color: #fff; padding: 56px 0; text-align: center; }
.final__in .lead { color: rgba(255, 255, 255, .9); max-width: 560px; margin: 0 auto 24px; }
.final .btn { width: 100%; max-width: 420px; }
.final__phone { display: block; margin-top: 16px; font: 700 20px/1.2 var(--head); text-decoration: none; }

/* ---------- подвал ---------- */
.foot { background: var(--dark); color: rgba(255, 255, 255, .8); padding: 40px 0 24px; font-size: 14px; }
.foot__logo { width: 180px; margin-bottom: 28px; }
.foot__h { font: 700 16px/1.2 var(--head); color: #fff; margin-bottom: 14px; }
.addr { display: grid; gap: 14px; }
.addr li { display: flex; gap: 10px; }
.addr svg { color: var(--red); width: 20px; height: 20px; margin-top: 2px; }
.addr b { display: block; color: #fff; }
.foot__phone { margin: 24px 0; }
.foot .foot__phone a { font: 700 20px/1.2 var(--head); color: #fff; text-decoration: none; }
.foot__legal { font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, .45); }
.foot__copy { margin-top: 16px; font-size: 12px; color: rgba(255, 255, 255, .45); }

/* ---------- sticky-кнопка ---------- */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 35%); transition: transform .25s ease; }
.sticky.is-hidden { transform: translateY(110%); }

/* ---------- index ---------- */
.index { padding-bottom: 0; }
.picks { display: grid; gap: 16px; margin-top: 16px; }
.pick { display: block; border-radius: var(--radius); overflow: hidden; background: var(--dark); color: #fff; text-decoration: none; }
.pick img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.pick__name { display: block; padding: 16px 16px 4px; font: 800 20px/1.2 var(--head); }
.pick__offer { display: block; padding: 0 16px 16px; color: var(--red); font-weight: 700; }

/* ---------- планшет и десктоп ---------- */
@media (min-width: 600px) {
  .benefits__list { grid-template-columns: repeat(4, 1fr); }
  .feats { grid-template-columns: 1fr 1fr; }
  .gallery li { flex-basis: 48%; }
  .videos, .picks { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --top-h: 68px; }
  body { padding-bottom: 0; }
  .sticky { display: none; }
  .top__logo { width: 200px; }
  .top__call { width: auto; height: 44px; padding: 0 18px; border-radius: 999px; gap: 8px; }
  .top__call span { display: inline; }

  .hero { min-height: min(720px, calc(100vh - var(--top-h))); display: flex; align-items: center; }
  .hero__media { position: absolute; inset: 0 0 0 42%; }
  .hero__media::after { background: linear-gradient(90deg, var(--dark) 0%, rgba(14, 14, 16, .4) 30%, rgba(14, 14, 16, 0) 60%), linear-gradient(0deg, var(--dark) 0%, rgba(14, 14, 16, 0) 25%); }
  .hero__img { height: 100%; aspect-ratio: auto; }
  .hero__in { margin-top: 0; padding: 56px var(--gutter); }
  .hero__text { max-width: 640px; }
  .hero__title { font-size: 44px; }
  .hero__sub { font-size: 18px; }
  .hero .btn { width: auto; }
  .hero__note { justify-content: flex-start; }

  .section { padding: 80px 0; }
  .h2 { font-size: 36px; }
  .lead { font-size: 18px; }
  .calc__body { grid-template-columns: 1.3fr 1fr; }
  .seg--terms { grid-template-columns: repeat(7, 1fr); }
  .calc__inputs { padding: 28px; }
  .calc__result { padding: 28px; border-top: 0; border-left: 1px solid var(--line); }
  .calc__pay strong { font-size: 40px; }
  .feats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .gallery { max-width: 1180px; margin: 0 auto; padding: 32px var(--gutter); }
  .gallery li { flex-basis: 32%; }
  .why { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .compare { font-size: 15px; }
  .compare th, .compare td { padding: 14px 18px; }
  .final { padding: 80px 0; }
  .final .btn { width: auto; }
  .addr { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------- чат ---------- */
.chat { margin-top: 16px; border-radius: var(--radius); overflow: hidden; background: #dfe6ec; box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .35); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.chat__head b { display: block; font-size: 15px; }
.chat__head small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #16a34a; }
.chat__head .dot { width: 7px; height: 7px; box-shadow: none; }
.chat__ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; flex: none; }
.chat__ava svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.chat__ava--txt { font: 700 17px/1 var(--head); }
.chat__label { margin: 12px auto 0; width: fit-content; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fff; font-size: 12px; font-weight: 600; }
.chat__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 16px; }
.msg { position: relative; max-width: 82%; padding: 8px 12px 6px; border-radius: 16px; font-size: 15px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.msg p { display: inline; }
.msg time { float: right; margin: 6px 0 0 10px; font-size: 11px; color: var(--muted); }
.msg time i { font-style: normal; color: #2aa1d8; margin-left: 3px; letter-spacing: -2px; }
.msg--them { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.msg--me { align-self: flex-end; background: #e1fec6; border-bottom-right-radius: 4px; }
#chat .center { margin-top: 24px; }
.reviews { display: grid; gap: 16px; }
.review .msg { max-width: 100%; }
@media (min-width: 900px) { .reviews { grid-template-columns: repeat(3, 1fr); } }
