/* ════════════════════════════════════════════════════════════
   VENHO — лендинг venho.ru (v2)
   Светлая база + тёмный графит из логотипа, красный акцент,
   шестиугольный мотив. Mobile-first, без фреймворков.
   ════════════════════════════════════════════════════════════ */

:root {
    --bg: #f4f5f7;            /* светлая база секций */
    --paper: #ffffff;         /* карточки */
    --ink: #1a1f24;           /* основной текст */
    --muted: #5a646e;         /* вторичный текст */
    --line: #e3e7eb;          /* границы на светлом */

    --graphite: #23272e;      /* графит из логотипа: hero, шапка, футер */
    --graphite-2: #2b3039;    /* карточка на тёмном */
    --g-text: #eef0f3;
    --g-muted: #a9b2bb;
    --g-line: #3a414c;

    --red: #d81030;           /* фирменный красный из логотипа */
    --red-h: #f02a45;

    --radius: 16px;
    --container: 1160px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --hex: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { transition: none !important; }
    .marquee__track { animation: none !important; }
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red-h); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 26px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: 600 1rem var(--font);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn--accent { background: var(--red); color: #fff; }
.btn--accent:hover { background: var(--red-h); }
.btn--accent:active { transform: translateY(1px); }
.btn--ghost { border-color: var(--g-line); color: var(--g-text); background: transparent; }
.btn--ghost:hover { border-color: var(--red-h); color: #fff; }
.btn--lg { padding: 14px 32px; font-size: 1.05rem; }

/* ── Шапка (тёмная) ─────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(35, 39, 46, .93);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--g-line); }
.header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 30px; width: auto; }

.nav {
    position: fixed;
    inset: 65px 0 auto 0;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px 24px;
    background: var(--graphite);
    border-bottom: 1px solid var(--g-line);
    box-shadow: 0 24px 40px rgba(0,0,0,.35);
}
.nav.is-open { display: flex; }
.nav a {
    padding: 12px 10px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--g-text);
}
.nav a:hover { background: var(--graphite-2); }
.nav__call { display: none; }   /* на десктопе — отдельная кнопка в шапке */

.header__call { display: none; }

.burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
}
.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--g-text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero (тёмный графит + соты + красное свечение) ─────── */
.hero {
    padding: 76px 0 68px;
    color: var(--g-text);
    background-color: var(--graphite);
    background-image:
        radial-gradient(820px 420px at 85% -10%, rgba(216,16,48,.20), transparent 60%),
        radial-gradient(620px 320px at 0% 115%, rgba(216,16,48,.10), transparent 60%),
        url("assets/hexes.svg");
    background-size: auto, auto, 56px 98px;
}
.hero__kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border: 1px solid var(--g-line);
    border-radius: 999px;
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #b8c0c9;
}
.hero h1 {
    font-size: clamp(2.05rem, 7vw, 3.7rem);
    line-height: 1.1;
    font-weight: 800;
    max-width: 21ch;
    letter-spacing: -.01em;
    color: #fff;
}
.hero h1 em { font-style: normal; color: #ff4a5c; }
.hero__lead {
    margin-top: 20px;
    max-width: 56ch;
    font-size: 1.1rem;
    color: #b8c0c9;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}
.hero__facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 44px;
    padding: 0;
    list-style: none;
}
.hero__facts li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: var(--radius);
}
.hero__facts b { font-size: 1.4rem; color: #fff; white-space: nowrap; }
.hero__facts span { font-size: .9rem; color: #aeb6bf; }

/* ── Бегущая строка моделей ─────────────────────────────── */
.marquee {
    overflow: hidden;
    padding: 15px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    width: max-content;
    animation: marquee 55s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .03em;
    color: #3a4048;
    white-space: nowrap;
}
.hex {
    flex: none;
    width: 9px;
    height: 10px;
    background: var(--red);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: .75;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Секции ─────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section--white { background: var(--paper); }
.section__title {
    font-size: clamp(1.5rem, 4.5vw, 2.3rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
    max-width: 26ch;
}
.section__sub { margin-top: 12px; max-width: 64ch; color: var(--muted); }
.block__title { margin-top: 44px; margin-bottom: 18px; font-size: 1.2rem; font-weight: 700; }

/* ── О компании ─────────────────────────────────────────── */
.about__grid { margin-top: 36px; display: grid; gap: 28px; }
.about__text p + p { margin-top: 14px; }
.about__text { color: var(--muted); font-size: 1.03rem; }
.about__facts { display: grid; gap: 12px; align-content: start; }
.fact {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.fact b { font-size: 1.3rem; color: var(--red); white-space: nowrap; }
.fact span { font-size: .9rem; color: var(--muted); }

.stats {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.stat {
    padding: 22px 18px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.stat b {
    display: block;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--red);
    font-variant-numeric: tabular-nums;
}
.stat span { font-size: .88rem; color: var(--muted); }
.stats__note { margin-top: 12px; font-size: .84rem; color: var(--muted); }

/* ── Два направления ────────────────────────────────────── */
.dirs { margin-top: 36px; display: grid; gap: 14px; }
.dir {
    display: flex;
    flex-direction: column;
    padding: 26px 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.dir:hover {
    transform: translateY(-3px);
    border-color: rgba(216,16,48,.35);
    box-shadow: 0 12px 30px rgba(20,24,32,.08);
}
.dir h3 { font-size: 1.25rem; }
.dir ul { margin-top: 12px; list-style: none; }
.dir li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 7px;
    font-size: .95rem;
    color: var(--muted);
}
.dir li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .48em;
    width: 9px;
    height: 10px;
    background: var(--red);
    clip-path: var(--hex);
    opacity: .75;
}
.dir__link { margin-top: 16px; font-weight: 600; color: var(--red); }
.dir__link:hover { color: var(--red-h); }

/* ── Карточки ───────────────────────────────────────────── */
.cards { margin-top: 36px; display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
    padding: 24px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .15s, box-shadow .15s;
}
.cards .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(20,24,32,.08);
}
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card h4 { font-size: 1rem; margin-bottom: 4px; }
.card p { font-size: .95rem; color: var(--muted); }

.card__icon {
    display: inline-flex;
    width: 46px;
    height: 52px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    background: rgba(216,16,48,.09);
    color: var(--red);
    clip-path: var(--hex);
}
.card__icon svg { width: 22px; height: 22px; }

/* ── Чипсы «что ремонтируем» / клиенты ──────────────────── */
.chips {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}
.chips li {
    padding: 9px 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .9rem;
    color: #3c434b;
    transition: border-color .15s, color .15s;
}
.chips li:hover { border-color: rgba(216,16,48,.4); color: var(--red); }

.clients {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}
.clients li {
    padding: 11px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-weight: 600;
    font-size: .92rem;
    color: #2c323b;
}

/* ── Тёмная секция «Запчасти» ───────────────────────────── */
.section--dark {
    color: var(--g-text);
    background-color: var(--graphite);
    background-image:
        radial-gradient(700px 320px at 90% 0%, rgba(216,16,48,.16), transparent 60%),
        url("assets/hexes.svg");
    background-size: auto, 56px 98px;
}
.section--dark .section__title { color: #fff; }
.section--dark .section__sub { color: var(--g-muted); }
.section--dark .block__title { color: #dfe3e8; }
.section--dark .card {
    background: var(--graphite-2);
    border-color: var(--g-line);
}
.section--dark .card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.section--dark .card h3, .section--dark .card h4 { color: #fff; }
.section--dark .card p { color: var(--g-muted); }
.section--dark .card__icon {
    background: rgba(240,42,69,.16);
    color: #f85a76;
}
.parts__cta { margin-top: 40px; font-size: 1.03rem; color: #c6ccd3; max-width: 62ch; }
.parts__cta .btn { margin-top: 14px; }

/* ── Подстраницы: компактный hero, крошки, активный пункт ─ */
.hero--page { padding: 52px 0 48px; }
.hero--page h1 { font-size: clamp(1.8rem, 5.5vw, 2.9rem); max-width: 24ch; }
.crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: .85rem;
    color: var(--g-muted);
}
.crumb:hover { color: #fff; }
.crumb::before {
    content: "";
    width: 7px;
    height: 8px;
    background: var(--red);
    clip-path: var(--hex);
}
.nav a.is-active { color: #fff; }
.nav a.is-active::after {
    content: "";
    display: block;
    height: 2px;
    width: 100%;
    margin-top: 2px;
    background: var(--red);
    border-radius: 2px;
}

/* ── Шаги (как проходит работа) ─────────────────────────── */
.steps { margin-top: 36px; display: grid; grid-template-columns: 1fr; gap: 14px; }
.step {
    padding: 24px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.step__num {
    display: inline-flex;
    width: 38px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: rgba(216,16,48,.09);
    color: var(--red);
    font-weight: 700;
    clip-path: var(--hex);
}
.step h3 { margin-bottom: 6px; font-size: 1.08rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ── Числовой список (статистика по моделям) ────────────── */
.numlist {
    margin-top: 8px;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 32px;
}
.numlist li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--line);
    font-size: .95rem;
}
.numlist li b { color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── CTA-полоса внизу подстраниц ────────────────────────── */
.cta-band {
    padding: 64px 0;
    text-align: center;
    color: var(--g-text);
    background-color: var(--graphite);
    background-image:
        radial-gradient(600px 280px at 50% 0%, rgba(216,16,48,.18), transparent 65%),
        url("assets/hexes.svg");
    background-size: auto, 56px 98px;
}
.cta-band h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: #fff;
    max-width: 24ch;
    margin: 0 auto;
}
.cta-band p { margin: 14px auto 0; max-width: 58ch; color: var(--g-muted); }
.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

/* ── Галерея ────────────────────────────────────────────── */
.gallery {
    margin-top: 36px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.shot {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
}
.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
/* слот без фото: мягкая заглушка, фото подставится само */
.shot.is-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: repeating-linear-gradient(45deg, #eef0f3 0 12px, #f4f5f7 12px 24px);
    border-style: dashed;
}
.shot.is-empty::before {
    content: "";
    width: 30px;
    height: 34px;
    background: #dde1e6;
    clip-path: var(--hex);
}
.shot.is-empty::after {
    content: attr(data-caption) " — фото добавим";
    font-size: .85rem;
    color: var(--muted);
    max-width: 80%;
    text-align: center;
}
.shot figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 14px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
    font-size: .9rem;
}
.shot.is-empty figcaption { display: none; }

/* лайтбокс */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 16px;
    background: rgba(16, 18, 22, .93);
}
.lightbox[hidden] { display: none; }  /* display:flex перебивает атрибут hidden */
.lightbox img { max-width: min(100%, 1000px); max-height: 78vh; border-radius: 10px; }
.lightbox__caption { color: #fff; font-size: 1rem; }
.lightbox__close {
    position: absolute;
    top: 12px; right: 16px;
    width: 48px; height: 48px;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    background: none;
    border: 0;
    cursor: pointer;
}

/* ── Контакты ───────────────────────────────────────────── */
.contacts__grid { margin-top: 36px; display: grid; gap: 28px; }
.person {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .15s, transform .15s;
}
.person:hover { border-color: rgba(216,16,48,.45); transform: translateY(-2px); }
.person__name { font-weight: 700; font-size: 1.05rem; }
.person__role { font-size: .88rem; color: var(--muted); }
.person__phone { margin-top: 6px; font-weight: 600; color: var(--red); }
.contacts__addr { margin-top: 8px; font-size: .92rem; color: var(--muted); }

/* форма */
.form {
    padding: 26px 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.form h3 { margin-bottom: 18px; font-size: 1.2rem; }
.form label { display: block; margin-bottom: 16px; }
.form label span {
    display: block;
    margin-bottom: 6px;
    font-size: .88rem;
    color: var(--muted);
}
.form input, .form textarea {
    width: 100%;
    padding: 13px 14px;
    font: 1rem var(--font);
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.form input:focus, .form textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(216,16,48,.12);
}
.form input::placeholder, .form textarea::placeholder { color: #8a929b; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: var(--red); }
.form .btn { width: 100%; }
.form__note { margin-top: 12px; font-size: .82rem; color: var(--muted); }

/* ── Футер (тёмный) ─────────────────────────────────────── */
.footer {
    padding: 42px 0;
    border-top: 1px solid var(--g-line);
    background: #1a1e24;
    color: #a3acb5;
}
.footer__row { display: grid; gap: 22px; }
.logo--footer img { height: 28px; }
.footer__line { margin-top: 10px; font-size: .88rem; max-width: 44ch; }
.footer__legal { font-size: .82rem; line-height: 1.7; }

/* ── Появление при скролле ──────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ═══════════ Планшет ≥720px ═══════════ */
@media (min-width: 720px) {
    .hero { padding: 100px 0 88px; }
    .hero__facts { grid-template-columns: repeat(3, 1fr); }
    .hero__facts li { flex-direction: column; gap: 6px; }

    .about__grid { grid-template-columns: 1.15fr 1fr; align-items: start; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .dirs { grid-template-columns: repeat(2, 1fr); }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .contacts__grid { grid-template-columns: 1.05fr 1fr; gap: 32px; }
    .footer__row { grid-template-columns: auto 1fr; justify-content: space-between; align-items: start; }
    .parts__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
    .parts__cta .btn { margin-top: 0; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .numlist { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════ Десктоп ≥1024px ═══════════ */
@media (min-width: 1024px) {
    .section { padding: 92px 0; }

    .header__row { min-height: 72px; }
    .nav { top: 73px; }
    .logo img { height: 33px; }
    .burger { display: none; }
    .header__call { display: inline-flex; }
    .nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }
    .nav a { font-size: .95rem; }

    .cards { grid-template-columns: repeat(3, 1fr); }
    .cards--two { grid-template-columns: repeat(2, 1fr); }
    .cards--three { grid-template-columns: repeat(3, 1fr); }
    .cards--four { grid-template-columns: repeat(4, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .numlist { grid-template-columns: repeat(3, 1fr); }
}
