/* kamaz-remont.ru — главная */

/* ---------- Первый экран: видео на месте, страница уезжает поверх ---------- */
.hero {
  position: relative; min-height: max(640px, 100svh);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--on-dark); padding-top: calc(var(--hdr-h) + 40px);
  isolation: isolate;
}
.hero__media { position: fixed; inset: 0; z-index: -1; background: var(--k-black) url(../video/hero-1920.jpg) center/cover no-repeat; }
/* Без filter и наложений с mix-blend-mode: тонировка вшита в ролик (tools/make-video.sh), иначе видео подтормаживает */
.hero__video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Затемнение: сверху под меню, слева под текст, снизу в глубокий синий КАМАЗ */
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(10 15 14 / .72) 0%, rgb(10 15 14 / .35) 45%, rgb(10 15 14 / .1) 75%),
    linear-gradient(180deg, rgb(10 15 14 / .45) 0%, rgb(10 15 14 / .1) 30%, rgb(0 48 85 / .45) 70%, rgb(10 15 14 / .92) 100%);
}
.hero__in { padding-bottom: clamp(40px, 6vh, 72px); }
/* Пауза видео: последняя в ряду кнопок, прижата вправо; на телефоне — рядом с «Прайс-листом» */
.hero__toggle {
  position: relative; flex: none; align-self: center; margin-left: auto; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgb(255 255 255 / .4); border-radius: 50%; background: rgb(10 15 14 / .25); color: #fff; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.hero__toggle:hover { background: rgb(255 255 255 / .14); border-color: #fff; }
.hero__toggle::before { /* пауза: две полосы; при остановленном видео — треугольник «играть» */
  content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 14px;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px, currentColor 8px);
}
.hero__toggle[aria-pressed="true"]::before { width: 13px; left: 3px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.hero__title {
  font-size: var(--fs-h1); font-weight: 600; line-height: 1.02; letter-spacing: -.03em;
  max-width: 11em; text-wrap: balance;
}
.hero__lead { margin-top: 24px; font-size: var(--fs-lead); line-height: 1.55; color: var(--on-dark-2); max-width: 32em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-dark); padding-block: 24px 32px;
}
.hero__facts li { display: flex; flex-direction: column; gap: 6px; padding-right: 24px; }
.hero__facts li + li { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.hero__fact-k { font: 400 var(--fs-label)/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.hero__fact-v { font-size: 18px; font-weight: 500; }
.hero__fact-v b { font-weight: 600; }

/* Появление первого экрана при загрузке — один раз, коротко */
@media (prefers-reduced-motion: no-preference) {
  .hero__in > *, .hero__facts { animation: rise .7s var(--ease) both; }
  .hero__in > :nth-child(2) { animation-delay: .06s; }
  .hero__in > :nth-child(3) { animation-delay: .12s; }
  .hero__in > :nth-child(4) { animation-delay: .18s; }
  .hero__facts { animation-delay: .26s; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
}

@media (max-width: 900px) {
  .hero__facts { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .hero__facts li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .hero { min-height: 100svh; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__actions .btn--ghost-light { flex: 1 1 0; }
  .hero__toggle { width: 56px; height: 56px; }
  .hero__facts { padding-bottom: 24px; }
  .hero__facts li { padding-right: 12px; }
  .hero__facts li + li { padding-left: 12px; }
  .hero__facts li:nth-child(3) { padding-left: 0; }
  .hero__fact-v { font-size: 16px; }
}

/* Всё после первого экрана — непрозрачный лист поверх видео */
.sheet { position: relative; z-index: 1; background: var(--bg); }

/* ---------- Что ремонтируем ---------- */
.svc__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 112px); align-items: start; }
.svc__head { position: sticky; top: calc(var(--hdr-h) + 32px); }
.svc__head .lead { margin-top: 24px; }
.svc__photo { margin-top: 40px; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; }
.svc__photo img { width: 100%; height: 100%; object-fit: cover; }
.svc__list { border-top: 1px solid var(--line); }
.svc__list a {
  display: grid; grid-template-columns: 44px 1fr auto 40px; align-items: center; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; min-height: 72px;
}
.svc__n { font: 400 14px/1 var(--mono); color: var(--text-2); }
.svc__name { font-size: 21px; font-weight: 500; line-height: 1.3; }
.svc__meta { font: 400 14px/1.3 var(--mono); color: var(--text-2); text-align: right; white-space: nowrap; }
.svc__list a:hover .svc__name { color: var(--accent); }
.svc__list a:hover .arr { opacity: 1; background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 1000px) {
  .svc__grid { grid-template-columns: 1fr; }
  .svc__head { position: static; }
  .svc__photo { display: none; }
}
@media (max-width: 600px) {
  .svc__list a { grid-template-columns: 32px 1fr 40px; row-gap: 4px; padding: 16px 0; }
  .svc__meta { grid-column: 2; grid-row: 2; text-align: left; }
  .svc__list .arr { grid-column: 3; grid-row: 1 / 3; }
  .svc__name { font-size: 19px; }
}

/* ---------- Частые работы ---------- */
.prices__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 40px; }
.prices__rates { max-width: 30em; color: var(--text-2); }
.prices__rates b { color: var(--text); font-weight: 600; }
.tbl-wrap { background: var(--bg); border-radius: var(--r); padding: 8px clamp(16px, 3vw, 40px); }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { font: 400 var(--fs-label)/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); text-align: left; padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; padding-left: 24px; }
.tbl td.num { font-weight: 600; }
.tbl td.num.h { font-weight: 400; color: var(--text-2); }
.prices__foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.prices__foot .note { max-width: 36em; }
@media (max-width: 640px) {
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { border: 0; padding: 0; }
  .tbl td:first-child { grid-column: 1 / -1; margin-bottom: 6px; }
  .tbl .num { text-align: left; padding-left: 0; }
  .tbl td.num:last-child { text-align: right; }
  .tbl td.num.h::after { content: " н/ч"; }
}

/* ---------- Почему к нам ---------- */
.why__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
/* Кадр 3:2 закреплён при прокрутке, как фото в «Что ремонтируем»: двор с техникой виден целиком */
.why__photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 3 / 2; position: sticky; top: calc(var(--hdr-h) + 24px); }
.why__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.why__list { margin-top: 40px; border-top: 1px solid var(--line); }
.why__list li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.why__list h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.why__list p { margin-top: 8px; color: var(--text-2); }
.why__cert { display: inline-flex; align-items: center; gap: 16px; margin-top: 16px; text-decoration: none; font-weight: 600; font-size: 16px; min-height: 44px; }
.why__cert img { width: 96px; border-radius: 4px; border: 1px solid var(--line); }
.why__cert:hover span { color: var(--accent); text-decoration: underline; }
@media (max-width: 1000px) {
  .why__grid { grid-template-columns: 1fr; }
  .why__photo { position: static; aspect-ratio: 16 / 9; }
}

/* ---------- Модели: крупные номера ---------- */
.models__list { margin-top: 48px; border-top: 1px solid var(--line-dark); }
.models__list a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 40px; align-items: center; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line-dark); text-decoration: none; color: var(--on-dark-2);
}
.models__num { font-size: clamp(56px, 8vw, 120px); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: #fff; }
.models__what { font-size: var(--fs-lead); }
.models__list a:hover { color: #fff; }
.models__list a:hover .arr { opacity: 1; background: #fff; color: var(--k-deep); border-color: #fff; }
.models__more { margin-top: 32px; color: var(--on-dark-2); }
@media (max-width: 640px) {
  .models__list a { grid-template-columns: 1fr 40px; row-gap: 4px; }
  .models__what { grid-column: 1; grid-row: 2; font-size: 17px; }
  .models__list .arr { grid-column: 2; grid-row: 1 / 3; }
}

/* ---------- Как проходит ремонт ---------- */
.steps__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; margin-top: 56px; counter-reset: s; }
.steps__list li { border-top: 2px solid var(--text); padding-top: 24px; }
.steps__n { display: block; font: 400 var(--fs-label)/1 var(--mono); color: var(--text-2); margin-bottom: 32px; }
.steps__list h3 { font-size: var(--fs-h3); font-weight: 600; }
.steps__list p { margin-top: 10px; color: var(--text-2); font-size: 17px; }
@media (max-width: 1100px) { .steps__list { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }
@media (max-width: 600px) {
  .steps__list { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .steps__list li { display: grid; grid-template-columns: 48px 1fr; border-top: 1px solid var(--line); padding: 20px 0; }
  .steps__list li:first-child { border-top-width: 2px; border-top-color: var(--text); }
  .steps__n { margin: 4px 0 0; grid-row: 1 / 3; }
}

/* ---------- Наша СТО ---------- */
.gallery__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 40px; }
.gallery__head .lead { max-width: 22em; }
.gallery__grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 15vw, 240px); gap: 12px; }
.gallery__grid figure { border-radius: var(--r); overflow: hidden; background: var(--k-silver); }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; }
.g1 { grid-column: 1 / 8; grid-row: 1 / 3; }
.g2 { grid-column: 8 / 13; grid-row: 1 / 2; }
.g3 { grid-column: 8 / 10; grid-row: 2 / 4; }
.g4 { grid-column: 1 / 8; grid-row: 3 / 4; }
.g5 { grid-column: 10 / 13; grid-row: 2 / 4; }
@media (max-width: 760px) {
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 44vw; gap: 8px; }
  .g1 { grid-column: 1 / 3; grid-row: auto; }
  .g2, .g3, .g4, .g5 { grid-column: auto; grid-row: auto; }
}

/* ---------- Гарантия ---------- */
.warranty__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.warranty__grid .lead { margin-top: 24px; }
.warranty__side { display: grid; gap: 16px; }
.warranty__hotline { border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 3vw, 40px); }
.warranty__hotline .label { margin-bottom: 12px; }
.warranty__num { display: inline-block; font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; letter-spacing: -.02em; text-decoration: none; line-height: 1.1; }
.warranty__num:hover { color: var(--accent); }
.warranty__hotline .note { margin-top: 8px; }
.warranty__quality { background: var(--bg-soft); border-radius: var(--r); padding: clamp(24px, 3vw, 40px); }
.warranty__quality h3 { font-size: var(--fs-h3); font-weight: 600; }
.warranty__quality p { margin: 8px 0 24px; color: var(--text-2); }
@media (max-width: 900px) { .warranty__grid { grid-template-columns: 1fr; } }

/* ---------- Вопросы ---------- */
.faq__grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-size: 20px; font-weight: 500; line-height: 1.35; min-height: 44px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor; opacity: .6;
  -webkit-mask: linear-gradient(#000 0 0) center/16px 2px no-repeat, linear-gradient(#000 0 0) center/2px 16px no-repeat;
          mask: linear-gradient(#000 0 0) center/16px 2px no-repeat, linear-gradient(#000 0 0) center/2px 16px no-repeat;
  transition: transform .2s var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list summary:hover { color: var(--accent); }
.faq__list p { padding: 0 48px 24px 0; color: var(--text-2); max-width: 40em; }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; } .faq__list summary { font-size: 18px; } .faq__list p { padding-right: 0; } }

/* ---------- Запись и контакты ---------- */
.book__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 112px); align-items: start; }
.book .lead { margin-top: 20px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-top: 40px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-s);
  border: 1px solid rgb(127 127 127 / .45); background: var(--bg);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 104px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(0 86 130 / .2); }
.field input[aria-invalid="true"] { border-color: #b9242d; }
.field input::placeholder, .field textarea::placeholder { color: rgb(127 127 127 / .9); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check a { color: var(--text); }
.check.is-invalid { color: #b9242d; }
.form__foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.form__status { font-size: 16px; }
.form__status.is-ok { color: #2f7d4a; }
.form__status.is-err { color: #b9242d; }
@media (prefers-color-scheme: dark) { .form__status.is-ok { color: #7cc796; } .form__status.is-err, .field input[aria-invalid="true"] { color: #ef7d84; border-color: #ef7d84; } }

.book__contacts { background: var(--k-deep); color: var(--on-dark); border-radius: var(--r); padding: clamp(28px, 3vw, 48px); }
.contacts { display: grid; gap: 28px; }
.contacts dt { font: 400 var(--fs-label)/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 8px; }
.contacts dd { font-size: 18px; line-height: 1.5; }
.contacts a { text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.contacts__phone { font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.01em; }

.map { position: relative; margin-top: clamp(48px, 6vw, 80px); height: clamp(320px, 40vw, 480px); border-radius: var(--r); overflow: hidden; background: var(--bg-soft) url(../img/photo/fleet-yard.webp) center 65%/cover; }
.map::before { content: ""; position: absolute; inset: 0; background: rgb(10 15 14 / .45); }
.map iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; }
.map__load { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; z-index: 1; }
.map.is-loaded::before { display: none; }

@media (max-width: 1000px) {
  .book__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
}

