/* Первый экран главной (23.10.2026): машины на 15% меньше, въезжают слева и уезжают вправо, колёса крутятся;
   текст и кнопка помещаются в первый экран. Откат: убрать <link> на этот файл в include_areas/main_slider.php
   или вернуть файлы по git-метке backup-hero-2026-10-23. */
.banner-section .cars-slider__item {
    opacity: 1;
    scale: .85;
    translate: none; /* без сдвига за мышью — машина встаёт ровно по центру */
    transform-origin: 50% 62%;
    transform: translateX(-130%);
    animation: mfDrive 30s infinite;
}
.banner-section .cars-slider__wheel { rotate: none; animation: mfWheel 30s infinite; }
.banner-section .cars-slider__item:nth-child(1), .banner-section .cars-slider__item:nth-child(1) .cars-slider__wheel { animation-delay: 0s; }
.banner-section .cars-slider__item:nth-child(2), .banner-section .cars-slider__item:nth-child(2) .cars-slider__wheel { animation-delay: 6s; }
.banner-section .cars-slider__item:nth-child(3), .banner-section .cars-slider__item:nth-child(3) .cars-slider__wheel { animation-delay: 12s; }
.banner-section .cars-slider__item:nth-child(4), .banner-section .cars-slider__item:nth-child(4) .cars-slider__wheel { animation-delay: 18s; }
.banner-section .cars-slider__item:nth-child(5), .banner-section .cars-slider__item:nth-child(5) .cars-slider__wheel { animation-delay: 24s; }

/* на машину 6 с из 30: въезд 0–5% (1,5 с, с торможением), стоит до 15% (3 с), выезд 15–20% (1,5 с, с разгоном);
   следующая въезжает только когда предыдущая уже уехала — не сталкиваются */
@keyframes mfDrive {
    0% { transform: translateX(-130%); animation-timing-function: cubic-bezier(.2, .7, .25, 1); }
    5% { transform: translateX(0); }
    15% { transform: translateX(0); animation-timing-function: cubic-bezier(.6, 0, .85, .35); }
    20%, 100% { transform: translateX(130%); }
}
@keyframes mfWheel {
    0% { transform: rotate(-900deg); animation-timing-function: cubic-bezier(.2, .7, .25, 1); }
    5% { transform: rotate(0); }
    15% { transform: rotate(0); animation-timing-function: cubic-bezier(.6, 0, .85, .35); }
    20%, 100% { transform: rotate(900deg); }
}
@media (prefers-reduced-motion: reduce) {
    .banner-section .cars-slider__item, .banner-section .cars-slider__wheel { animation: none; transform: none; }
    .banner-section .cars-slider__item:not(:first-child) { display: none; }
}

/* текст первого экрана: заголовок слева, описание и кнопки справа */
.mf-hero.preorder-auto { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 64px; align-items: center; }
.mf-hero__title.preorder-auto__title { margin: 0; font-size: clamp(36px, 4vw, 60px); line-height: 1.02; }
.mf-hero__text { margin: 0; max-width: 520px; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.mf-hero__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mf-hero__btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border: 1px solid rgba(255, 255, 255, .35); font-family: 'Tenor Sans', sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #fff; transition: border-color .2s, background .2s, color .2s; }
.mf-hero__btn:hover { border-color: #fff; }
.mf-hero__btn_primary { border-color: #bf8738; background: #bf8738; }
.mf-hero__btn_primary:hover { background: #a9752e; border-color: #a9752e; }
@media (max-width: 820px) {
    .mf-hero.preorder-auto { grid-template-columns: 1fr; padding-top: 20px; }
    .mf-hero__btn { flex: 1 1 100%; }
}

/* факты внизу первого экрана */
.mf-hero__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .12); }
.mf-hero__facts li { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 0 0; }
.mf-hero__facts li + li { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.mf-hero__facts b { font-family: 'Tenor Sans', sans-serif; font-weight: 400; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: .04em; color: #bf8738; }
.mf-hero__facts span { font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .6); }
@media (max-width: 820px) {
    .mf-hero__facts { grid-template-columns: 1fr 1fr; margin-top: 36px; }
    .mf-hero__facts li, .mf-hero__facts li + li { padding: 16px 12px 16px 0; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
    .mf-hero__facts li:nth-child(even) { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .12); }
}

/* компьютер: первый экран = высота окна — баннер с машиной сверху, текст, факты прижаты к низу */
@media (min-width: 821px) {
    .banner-section { height: max(360px, 58svh); }
    .banner-section .cars-slider { position: absolute; left: 0; right: 0; top: calc(50% + 40px); translate: 0 -50%; margin: 0; }
    .banner-section__logo { top: 130px; z-index: 3; }
    .preorder-auto-section { margin-top: -4svh; padding-bottom: 28px; min-height: max(330px, calc(100svh - max(360px, 58svh) + 4svh)); display: flex; flex-direction: column; }
    .preorder-auto-section > .container { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 28px; }
    .preorder-auto-section .mf-hero { margin: auto 0; } /* текст — по центру между машиной и фактами */
}

/* значок «На рынке с 1999» в первом экране: золотые лучи медленно вращаются, год крупно */
.banner-section__logo-img { gap: 18px; }
.banner-section__logo .circle-logo { position: relative; width: 84px; height: 84px; color: #bf8738; }
.banner-section__logo .circle-logo__lines { width: 84px; height: 84px; opacity: .85; animation: mfSpin 40s linear infinite; }
.banner-section__logo .circle-logo__letter { position: absolute; left: 50%; top: 50%; width: 18px; height: auto; translate: -50% -50%; color: #fff; }
.mf-since { display: flex; flex-direction: column; gap: 4px; padding-left: 18px; border-left: 1px solid rgba(191, 135, 56, .45); }
.mf-since small { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.mf-since b { font-family: 'Tenor Sans', sans-serif; font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: .06em; color: #bf8738; }
@keyframes mfSpin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .banner-section__logo .circle-logo__lines { animation: none; } }

/* названия машин: всплывают, когда машина встала (5–15% цикла), и уплывают перед отъездом */
.mf-names { position: relative; align-self: flex-start; min-width: 320px; height: 90px; }
.mf-name { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; gap: 6px; opacity: 0; animation: mfName 30s infinite; }
.mf-name__brand { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: #bf8738; animation: mfNameBrand 30s infinite; }
.mf-name__model { font-family: 'Tenor Sans', sans-serif; font-size: clamp(26px, 2.4vw, 38px); line-height: 1.05; letter-spacing: .06em; text-transform: uppercase; color: #fff; animation: mfNameModel 30s infinite; }
.mf-name__line { display: block; width: 64px; height: 1px; margin-top: 8px; background: #bf8738; transform-origin: left; animation: mfNameLine 30s infinite; }
.mf-name:nth-child(2), .mf-name:nth-child(2) * { animation-delay: 6s; }
.mf-name:nth-child(3), .mf-name:nth-child(3) * { animation-delay: 12s; }
.mf-name:nth-child(4), .mf-name:nth-child(4) * { animation-delay: 18s; }
.mf-name:nth-child(5), .mf-name:nth-child(5) * { animation-delay: 24s; }
@keyframes mfName { 0%, 4% { opacity: 0; } 5%, 14% { opacity: 1; } 15.5%, 100% { opacity: 0; translate: 0 -14px; } }
@keyframes mfNameBrand { 0%, 4.5% { opacity: 0; translate: 0 10px; letter-spacing: .5em; } 7% { opacity: 1; translate: 0 0; letter-spacing: .28em; } 100% { opacity: 1; } }
@keyframes mfNameModel { 0%, 5% { opacity: 0; translate: 0 18px; clip-path: inset(0 0 100% 0); } 8% { opacity: 1; translate: 0 0; clip-path: inset(0 0 0 0); } 100% { opacity: 1; } }
@keyframes mfNameLine { 0%, 7% { scale: 0 1; } 10%, 100% { scale: 1 1; } }
@media (max-width: 820px) {
    .banner-section__logo { top: 14px; }
    .mf-names { min-width: 0; height: 56px; }
    .mf-name__brand { font-size: 10px; }
    .mf-name__model { font-size: 20px; }
    .mf-name__line { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mf-names { display: none; } }
.mf-name { white-space: nowrap; }

/* «клевок» при торможении: кузов кивает носом и выпрямляется (5–8% цикла) */
.banner-section .cars-slider__body { transform-origin: 50% 85%; animation: mfDip 30s infinite; }
.banner-section .cars-slider__item:nth-child(2) .cars-slider__body { animation-delay: 6s; }
.banner-section .cars-slider__item:nth-child(3) .cars-slider__body { animation-delay: 12s; }
.banner-section .cars-slider__item:nth-child(4) .cars-slider__body { animation-delay: 18s; }
.banner-section .cars-slider__item:nth-child(5) .cars-slider__body { animation-delay: 24s; }
@keyframes mfDip {
    0%, 4.2% { rotate: 0deg; }
    5.3% { rotate: .9deg; }
    6.4% { rotate: -.35deg; }
    7.4%, 14.6% { rotate: 0deg; }
    15.6% { rotate: -.6deg; } /* приседает на заднюю ось при разгоне */
    17%, 100% { rotate: 0deg; }
}
@media (prefers-reduced-motion: reduce) { .banner-section .cars-slider__body { animation: none; } }

/* телефон: название не прячется под шапку, машина крупнее */
@media (max-width: 820px) {
    .banner-section__logo { top: 40px; }
    .banner-section .cars-slider__item { scale: 1.12; transform-origin: 50% 70%; }
    .banner-section .cars-slider { margin-top: 36px; }
}
