/* maz.dvaris.ru — МАЗ и ГАЗ, коммерческая техника */
:root {
  --bg: #0f1114;
  --panel: #171a1f;
  --panel-2: #1e2228;
  --line: #2b3038;
  --text: #f1f2f4;
  --muted: #a0a7b2;
  --red: #e3232b;
  --red-deep: #a30f15;
  --plate: #f3f4f6;
  --r: 14px;
  --gut: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 16px/1.5 Montserrat, "Segoe UI", Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wrap { width: min(1480px, 100%); margin: 0 auto; padding: 0 var(--gut); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border: 1px solid transparent; border-radius: 10px; background: linear-gradient(180deg, var(--red), var(--red-deep)); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; transition: filter .2s, transform .2s, background .2s, border-color .2s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--line { background: transparent; border-color: #4a515c; color: var(--text); }
.btn--line:hover { border-color: #fff; filter: none; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn--big { min-height: 56px; padding: 14px 34px; font-size: 16px; }
.btn--wide { width: 100%; }
.btn--white { background: #fff; color: #14171b; }
.btn--white:hover { filter: none; background: #f0f0f0; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(15, 17, 20, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.top__logos { display: flex; align-items: center; gap: 16px; flex: none; text-decoration: none; }
.top__maz { height: 34px; width: auto; }
.top__gaz { height: 38px; width: auto; }
.top__dvaris { height: 30px; width: auto; padding-left: 16px; border-left: 1px solid var(--line); box-sizing: content-box; }
.top__tag { display: none; flex: none; max-width: 190px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.top__nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; font-weight: 600; }
.top__nav a { text-decoration: none; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s; }
.top__nav a:hover { border-color: var(--red); }
.top__act { display: flex; align-items: center; gap: 16px; flex: none; }
.top__phone { font-weight: 700; font-size: 17px; white-space: nowrap; text-decoration: none; }
.tg { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); transition: border-color .2s; }
.tg:hover { border-color: #fff; }
.tg svg { width: 20px; height: 20px; fill: #fff; }
.tg span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); position: relative; flex: none; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 20px; height: 2px; background: #fff; border-radius: 2px; content: ""; transition: transform .2s, opacity .2s; }
.burger span { top: 20px; }
.burger span::before { left: 0; top: -7px; }
.burger span::after { left: 0; top: 7px; }
.top.is-open .burger span { background: transparent; }
.top.is-open .burger span::before { transform: translateY(7px) rotate(45deg); }
.top.is-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1480px) { .top__tag { display: none; } }
@media (max-width: 1200px) { .top__act .tg { display: none; } .top__nav { gap: 16px; } }
@media (max-width: 1060px) {
  .burger { display: block; }
  .top__act { margin-left: auto; }
  .top__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gut) 18px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 17px; }
  .top__nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .top.is-open .top__nav { display: flex; }
}
@media (max-width: 760px) {
  .top__in { gap: 12px; min-height: 64px; }
  .top__act .btn, .top__act .tg { display: none; }
  .top__phone { font-size: 15px; }
  .top__logos { gap: 10px; }
  .top__maz { height: 26px; }
  .top__gaz { height: 30px; }
  .top__dvaris { height: 22px; padding-left: 10px; }
}
@media (max-width: 480px) {
  .top__dvaris { display: none; }
  .top__phone { font-size: 14px; }
}

/* Первый экран */
.hero { padding-top: clamp(12px, 1.6vw, 24px); }
.hero__box { position: relative; display: flex; align-items: center; min-height: clamp(440px, 60vh, 620px); border-radius: 22px; overflow: hidden; background: #08090b; border: 1px solid var(--line); }
.hero__bg { position: absolute; right: 0; top: 0; width: 63%; height: 100%; object-fit: cover; object-position: 30% 62%; }
.hero__box::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #08090b 0%, #08090b 37%, rgba(8, 9, 11, .7) 43%, rgba(8, 9, 11, .2) 50%, rgba(8, 9, 11, 0) 58%); }
.hero__box::after { content: ""; position: absolute; left: 0; top: 0; z-index: 1; width: 34%; height: 5px; background: linear-gradient(90deg, var(--red), rgba(227, 35, 43, 0)); }
.hero__text { position: relative; z-index: 2; width: min(640px, 52%); padding: clamp(28px, 3.4vw, 56px); }
.hero__kicker { margin-bottom: 18px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero__h { font-size: clamp(26px, 2.7vw, 42px); font-weight: 800; line-height: 1.12; text-transform: uppercase; }
.hero__badge { display: inline-block; margin-bottom: 14px; padding: .16em .5em .2em; border-radius: .28em; background: var(--red-deep); font-size: 1.5em; line-height: 1.1; letter-spacing: .02em; }
.hero__title { display: block; }
.hero__sub { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: clamp(13px, 1.2vw, 16px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero__sub::before { content: ""; flex: none; width: 28px; height: 2px; background: var(--red); }
.hero__sum { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; margin-top: 22px; padding: 12px 22px; border-radius: 14px; background: var(--red-deep); font-size: clamp(15px, 1.4vw, 20px); font-weight: 800; text-transform: uppercase; }
.hero__sum b { font-size: clamp(26px, 2.8vw, 42px); font-weight: 800; white-space: nowrap; }
.hero__sum a { color: #fff; text-decoration: none; font-size: 1.4em; line-height: 1; align-self: flex-start; }
.hero__act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__act .btn { padding-left: 22px; padding-right: 22px; }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.benefits li { position: relative; padding: 18px 20px 18px 54px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.benefits li::before { content: ""; position: absolute; left: 20px; top: 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); }
.benefits li::after { content: ""; position: absolute; left: 26px; top: 26px; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.benefits b { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; }
.benefits span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
@media (max-width: 1060px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .hero__box { display: block; min-height: 0; }
  .hero__bg { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; object-position: 50% 70%; }
  .hero__box::before { display: none; }
  .hero__text { width: auto; padding: 22px 18px 24px; }
  .hero__kicker { margin-bottom: 12px; font-size: 11px; }
  .hero__h { font-size: 22px; }
  .hero__act .btn { flex: 1 1 100%; }
}
@media (max-width: 520px) { .benefits { grid-template-columns: 1fr; gap: 10px; } }

/* Разделы */
.sec { padding: clamp(40px, 5vw, 76px) 0; }
.sec h2, .band h2 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 36px); }

/* Марки */
.tabs { display: inline-flex; gap: 6px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tab { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 8px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.tab i { font-style: normal; font-weight: 600; opacity: .6; margin-left: 4px; }
.tab:hover { color: #fff; }
.tab.is-on { background: var(--red); color: #fff; }

/* Карточки */
.cars__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.car { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, transform .2s; }
.car:hover { border-color: #4a515c; transform: translateY(-2px); }
.car__pic { position: relative; flex: none; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.car__pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 34px 18px 14px; }
.car__pic--photo { cursor: pointer; }
.car__pic--photo > img { object-fit: cover; padding: 0; transition: transform .4s; }
.car__pic--photo:hover > img { transform: scale(1.03); }
.car__brand { position: absolute; left: 10px; top: 10px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 54px; height: 34px; padding: 5px 8px; border-radius: 8px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .22); }
.car__brand img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.car__more { position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 6px 12px; border: 0; border-radius: 6px; background: rgba(15, 17, 20, .82); color: #fff; font-size: 13px; font-weight: 700; }
.car__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 18px; }
.car__name { display: flex; align-items: flex-start; min-height: 2.5em; font-size: 18px; font-weight: 800; line-height: 1.25; }
.car__price { font-size: 22px; font-weight: 800; }
.car__price a { color: var(--red); text-decoration: none; }
.specs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; font-size: 13px; }
.spec { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); flex: none; }
.spec dd { min-width: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.spec--one dd { text-align: left; }
.car__all summary { display: inline-block; cursor: pointer; list-style: none; padding: 2px 0; font-size: 13px; font-weight: 700; color: #fff; border-bottom: 1px dashed #6b7380; }
.car__all summary::-webkit-details-marker { display: none; }
.car__all .when-open, .car__all[open] .when-closed { display: none; }
.car__all[open] .when-open { display: inline; }
.car__all[open] summary { margin-bottom: 4px; }
.car__act { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; padding-top: 6px; }
.car__act .btn { padding-left: 12px; padding-right: 12px; }
@media (max-width: 1500px) { .cars__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 940px) { .cars__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cars__grid { grid-template-columns: 1fr; } .car__name { min-height: 0; } }

/* Призыв */
.band { background: linear-gradient(100deg, var(--red-deep), #6f0a0e); }
.band__in { display: flex; align-items: center; justify-content: space-between; gap: 22px 40px; flex-wrap: wrap; padding-top: clamp(28px, 3.4vw, 44px); padding-bottom: clamp(28px, 3.4vw, 44px); }
.band h2 { font-size: clamp(20px, 2.2vw, 30px); max-width: 720px; }
.band p { margin-top: 10px; max-width: 640px; color: #ffd9db; }
.band__act { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.band__phone { font-size: clamp(20px, 2vw, 26px); font-weight: 800; white-space: nowrap; text-decoration: none; }

/* Модельный ряд под заказ */
.models__head { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; align-items: end; margin-bottom: clamp(22px, 3vw, 36px); }
.models__head p { color: #d5d9df; font-size: 16px; line-height: 1.55; }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.types li { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 16px 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); text-align: center; }
.types img { height: 130px; width: auto; object-fit: contain; }
.types b { flex: 1; font-size: 15px; font-weight: 700; line-height: 1.35; }
.perks { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; }
.perks li { position: relative; padding-left: 22px; font-size: 14px; font-weight: 600; color: #d5d9df; }
.perks li::before { content: ""; position: absolute; left: 0; top: .28em; width: 12px; height: 12px; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%, 28% 50%); }
@media (max-width: 900px) { .types { grid-template-columns: repeat(2, 1fr); } .models__head { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .types img { height: 84px; } .types li { padding: 16px 10px; } .types b { font-size: 13px; } .types .btn { padding: 8px 10px; font-size: 12px; } }

/* О компании */
.about { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about__in { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.about__zubr { width: 96px; margin-bottom: 18px; }
.about__lead { margin-top: 18px; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; }
.ticks { display: grid; gap: 10px; margin: 22px 0 28px; }
.ticks li { position: relative; padding-left: 28px; color: #d5d9df; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.about__pic img { width: 100%; border-radius: var(--r); }
@media (max-width: 860px) { .about__in { grid-template-columns: 1fr; } .about__pic { order: -1; } }

/* Контакты */
.contacts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(22px, 3vw, 36px); }
.contact { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.contact span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact a, .contact p { font-size: 17px; font-weight: 700; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.contact a:hover { color: #ff5a60; }
.contacts__act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 980px) { .contacts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .contacts__grid { grid-template-columns: 1fr; } }

/* Подвал */
.foot { padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.foot__note { max-width: 900px; scroll-margin-top: 100px; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot__row ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__row button, .lnk { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.foot__row button:hover, .lnk:hover { color: #fff; }

/* Окна */
.dlg { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); overflow: auto; }
.dlg::backdrop { background: rgba(5, 6, 8, .78); }
.dlg--doc { width: min(680px, calc(100vw - 24px)); }
.dlg__x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--panel-2); }
.dlg__x::before, .dlg__x::after { content: ""; position: absolute; left: 12px; top: 19px; width: 16px; height: 2px; background: #fff; transform: rotate(45deg); }
.dlg__x::after { transform: rotate(-45deg); }
.lead, .doc { position: relative; padding: 32px 28px 28px; }
.lead h2, .doc h2 { padding-right: 44px; font-size: 22px; font-weight: 800; line-height: 1.2; }
.lead__form { display: grid; gap: 16px; }
.lead__car { padding: 10px 14px; border-left: 3px solid var(--red); background: var(--panel-2); border-radius: 0 8px 8px 0; font-weight: 700; font-size: 15px; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: 13px; font-weight: 600; color: var(--muted); }
.fld input { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid #3a4049; border-radius: 10px; background: #0f1114; color: #fff; font: 600 17px/1.2 inherit; font-family: inherit; }
.fld input:focus { outline: none; border-color: #fff; }
.fld.is-bad input { border-color: var(--red); }
.chk { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.45; color: #cfd3d9; cursor: pointer; }
.chk input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); }
.chk i { color: var(--muted); font-style: normal; }
.chk.is-bad { color: #ff7a80; }
.chk.is-bad input { outline: 2px solid var(--red); outline-offset: 2px; }
.chk .lnk { color: #fff; display: inline; }
.lead__msg { min-height: 0; font-size: 14px; font-weight: 600; }
.lead__msg:empty { display: none; }
.lead__msg.is-err { color: #ff7a80; }
.lead__done { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 12px 0 4px; }
.lead__done svg { width: 64px; height: 64px; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lead__done h2 { padding: 0; }
.doc__text { display: grid; gap: 12px; margin-top: 18px; font-size: 14px; line-height: 1.6; color: #d5d9df; }

/* Фото */
.dlg--gal { width: min(1100px, calc(100vw - 24px)); background: #0a0b0d; }
.gal { position: relative; padding: 16px; }
.gal__title { min-height: 40px; padding: 8px 52px 8px 4px; font-weight: 800; font-size: 16px; }
.gal__stage { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; max-height: calc(100dvh - 190px); width: 100%; }
.gal__stage img { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.gal__nav { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gal__nav button { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); font-size: 26px; line-height: 1; padding-bottom: 4px; }
.gal__nav button:hover { border-color: #fff; }
.gal__nav span { min-width: 64px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
