/* Ремонт автомобилей Ford — оформление v2 (тёмная «гаражная» тема, синий Ford + оранжевый акцент) */
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0b1220;
    --bg-alt: #0f1a2e;
    --surface: #14213a;
    --surface-2: #1a2a48;
    --line: rgba(148, 177, 230, .14);
    --text: #e8eef9;
    --muted: #9fb0cc;
    --blue: #2f7bff;
    --blue-soft: #6ea4ff;
    --orange: #ff7a1a;
    --orange-2: #ff9a3d;
    --wa: #25d366;
    --radius: 18px;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .65);
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-soft); text-decoration: none; }
a:hover { color: #fff; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 28px; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.accent { color: var(--orange); }
.muted { color: var(--muted); }
.kicker {
    display: inline-block;
    font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blue-soft);
    margin-bottom: 10px;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px;
    font: inherit; font-weight: 700; font-size: 16px;
    color: #fff; border-radius: 14px; border: 0; cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { color: #fff; transform: translateY(-2px); }
.btn--primary {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
    box-shadow: 0 10px 28px -10px rgba(255, 122, 26, .8);
}
.btn--primary:hover { box-shadow: 0 14px 34px -10px rgba(255, 122, 26, .95); }
.btn--wa {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(6px);
}
.btn--wa svg { color: var(--wa); }
.btn--wa:hover { background: rgba(37, 211, 102, .16); border-color: var(--wa); }

/* ---------- Верхняя панель ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 18, 32, .72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); background: rgba(11, 18, 32, .9); }
.topbar__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 19px; }
.brand:hover { color: #fff; }
.brand__mark {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, var(--blue), #1b4fd1);
    box-shadow: 0 6px 18px -6px rgba(47, 123, 255, .8);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__text b { color: var(--orange); font-weight: 800; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover { color: #fff; }
.topbar__phone {
    display: inline-flex; align-items: center; gap: 8px;
    color: #fff; font-weight: 700; white-space: nowrap;
    padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line);
}
.topbar__phone svg { color: var(--orange); }
.topbar__phone:hover { border-color: var(--orange); }

/* ---------- Первый экран ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -64px; padding: 150px 0 96px; min-height: min(92vh, 820px); display: flex; align-items: center; }
.hero__bg {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(11, 18, 32, .97) 0%, rgba(11, 18, 32, .85) 42%, rgba(11, 18, 32, .25) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(11, 18, 32, 0) 35%),
        url("../pix/bachground.jpeg") 70% 60% / cover no-repeat;
    animation: heroZoom 18s ease-out both;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__in { max-width: var(--wrap); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(47, 123, 255, .14); border: 1px solid rgba(110, 164, 255, .3);
    color: #cfe0ff; font-size: 14px; font-weight: 600;
}
.eyebrow svg { color: var(--orange); }
.hero h1 { font-size: clamp(40px, 7vw, 78px); font-weight: 800; margin: 22px 0 18px; max-width: 12ch; }
.hero__lead { font-size: clamp(17px, 2vw, 20px); color: #c4d1e8; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__facts { list-style: none; padding: 0; margin: 46px 0 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.hero__facts li { display: flex; align-items: center; gap: 10px; color: #c4d1e8; font-weight: 600; font-size: 15px; }
.hero__facts svg { width: 22px; height: 22px; color: var(--blue-soft); }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
    position: relative; overflow: hidden;
    padding: 28px; border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
    border: 1px solid var(--line);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--orange));
    transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(110, 164, 255, .35); box-shadow: var(--shadow); }
.card:hover::after { transform: scaleX(1); }
.card__icon {
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; margin-bottom: 20px;
    background: rgba(47, 123, 255, .14); color: var(--blue-soft);
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

.models { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.models h2 { margin-bottom: 16px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li {
    padding: 12px 22px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    font-weight: 700; font-size: 16px;
    transition: border-color .2s, background .2s, color .2s;
}
.chips li:hover { border-color: var(--blue); background: var(--surface-2); }
.chips .chips__more { background: transparent; border-style: dashed; color: var(--muted); font-weight: 600; }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery__item {
    position: relative; padding: 0; border: 0; cursor: zoom-in; overflow: hidden;
    border-radius: 14px; background: var(--surface); aspect-ratio: 3 / 4;
}
.gallery__item:first-child { grid-row: span 2; aspect-ratio: auto; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; filter: saturate(.9); }
.gallery__item::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(11, 18, 32, .55), transparent 50%);
    opacity: .6; transition: opacity .3s;
}
.gallery__item:hover img { transform: scale(1.06); filter: saturate(1.05); }
.gallery__item:hover::after { opacity: .15; }

/* ---------- Лайтбокс ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 9, 18, .94); backdrop-filter: blur(6px);
    padding: 24px 72px; animation: fadeIn .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox__btn {
    position: absolute; display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .2s;
}
.lightbox__btn:hover { background: var(--orange); border-color: var(--orange); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); font-weight: 600; font-size: 14px; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; }
.contacts__list { margin: 0; display: grid; gap: 20px; }
.contacts__list dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.contacts__list dt svg { color: var(--orange); width: 18px; height: 18px; }
.contacts__list dd { margin: 4px 0 0; font-size: 21px; font-weight: 700; }
.contacts__list dd a { color: #fff; }
.contacts__list dd a:hover { color: var(--orange); }
.map {
    min-height: 420px; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}

/* ---------- Подвал и мобильная панель ---------- */
.footer { padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer__in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.callbar { display: none; }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .nav { display: none; }
    .topbar__phone { margin-left: auto; }
    .models, .contacts { grid-template-columns: 1fr; gap: 32px; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .gallery__item:first-child { grid-row: auto; aspect-ratio: 3 / 4; }
}
@media (max-width: 640px) {
    body { font-size: 16px; padding-bottom: 76px; }
    .topbar__phone span { display: none; }
    .topbar__phone { padding: 10px; }
    .hero { padding: 120px 0 64px; min-height: auto; }
    .hero__bg {
        background:
            linear-gradient(180deg, rgba(11, 18, 32, .55) 0%, rgba(11, 18, 32, .9) 55%, var(--bg) 100%),
            url("../pix/bachground.jpeg") 62% 50% / cover no-repeat;
    }
    .hero__cta .btn { flex: 1 1 100%; }
    .section { padding: 64px 0; }
    .cards { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .lightbox { padding: 64px 8px; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; transform: none; }
    .lightbox__prev { left: 16px; }
    .lightbox__next { right: 16px; }
    .callbar {
        display: flex; gap: 10px; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(11, 18, 32, .92); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    }
    .callbar .btn--primary { flex: 1; }
    .callbar .btn--wa { width: 56px; padding: 0; background: var(--wa); border-color: var(--wa); }
    .callbar .btn--wa svg { color: #fff; width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
