/* ============================================================
   Sary-Motors — главная (подключается только на home.php)
   Главный акцент страницы — прайс в виде бумажного заказ-наряда.
   ============================================================ */

.home { background: var(--graphite); color: var(--chalk); }
.home a { color: inherit; }
.home h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.08; margin-bottom: .45em; }
.home h3 { font-size: 18px; }

.home > section { padding: clamp(64px, 9vw, 112px) 0; scroll-margin-top: var(--header-h); }
.section-head { max-width: 620px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--steel); font-size: 18px; margin: 0; }

/* ── Кнопка звонка ─────────────────────────────────────── */
.btn-call {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    padding: 14px 26px 15px; border-radius: 14px; background: var(--signal); color: #fff !important;
    box-shadow: 0 10px 30px -12px rgba(226, 39, 44, .7);
}
.btn-call:hover { background: var(--signal-hv); text-decoration: none; }
.btn-call__label { font-size: 14px; font-weight: 500; opacity: .85; line-height: 1; }
.btn-call__num { font: 600 clamp(19px, 2.2vw, 23px)/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.btn-call--compact { margin-top: 28px; }

/* Ссылка «Все услуги» под ценами */
.all-services {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    margin-top: 40px; padding: 22px 22px 22px 26px; border-radius: 16px;
    background: var(--graphite); border: 1px solid var(--rule); color: var(--chalk) !important;
    position: relative; overflow: hidden;
}
.all-services::before {   /* красная кромка слева — как у блока «Проверка» */
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--signal);
}
.all-services:hover { border-color: #444a52; text-decoration: none; }
.all-services__text { display: flex; flex-direction: column; gap: 6px; }
.all-services__title { font: 600 clamp(20px, 2vw, 24px)/1.1 var(--display); letter-spacing: -.02em; }
.all-services__sub { font-size: 15px; color: var(--steel); line-height: 1.45; }
.all-services__arrow {
    flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    background: var(--signal); color: #fff; transition: transform .2s ease;
}
.all-services:hover .all-services__arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .all-services__arrow { transition: none; } }

.btn-ghost {
    display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 10px;
    border: 1px solid var(--rule); color: var(--chalk); font-weight: 500;
}
.btn-ghost:hover { border-color: var(--steel); text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────── */
.home > .hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: min(calc(100svh - var(--header-h)), 820px);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: clamp(48px, 8vw, 96px) 0 0;
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__bg img { object-fit: cover; object-position: 68% 60%; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(22, 24, 27, .92) 0%, rgba(22, 24, 27, .55) 48%, rgba(22, 24, 27, 0) 75%),
        linear-gradient(0deg, var(--graphite) 0%, rgba(22, 24, 27, 0) 32%);
}
.hero__inner { padding-bottom: clamp(40px, 6vw, 72px); }
.hero__title {
    max-width: 11ch; margin: 0 0 22px;
    font-size: clamp(40px, 7.2vw, 88px); font-weight: 700; line-height: .98; letter-spacing: -.035em;
}
.hero__lead { max-width: 540px; margin: 0 0 32px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: #d4d8de; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }

.status {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px;
    border-radius: 999px; background: rgba(22, 24, 27, .7); border: 1px solid var(--rule);
    font-size: 14px; color: var(--chalk);
}
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--steel); flex: none; }
.status.is-open .status__dot { background: #3fcf72; box-shadow: 0 0 0 0 rgba(63, 207, 114, .6); animation: sm-pulse 2.4s ease-out infinite; }
.status.is-closed .status__dot { background: var(--signal); }
@keyframes sm-pulse { 70% { box-shadow: 0 0 0 9px rgba(63, 207, 114, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 207, 114, 0); } }

.hero__facts {
    list-style: none; margin: 0; padding: 18px 0 22px; border-top: 1px solid var(--rule);
    display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px 24px;
    font-size: 15px; color: var(--steel);
}

/* ── Как работаем (последовательность — нумерация по делу) ── */
.how__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: none; }
.how__step { position: relative; padding-top: 28px; border-top: 2px solid var(--rule); }
.how__step::before {   /* красный отрезок «пройденного пути» над шагом */
    content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--signal);
}
.how__num { display: block; margin-bottom: 18px; font: 700 15px/1 var(--display); color: var(--signal); }
.how__step h3 { margin-bottom: 10px; }
.how__step p { margin: 0; color: var(--steel); font-size: 16px; line-height: 1.6; }

/* ── Цены: заказ-наряд ─────────────────────────────────── */
.home > .prices { background: var(--asphalt); }
.prices__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.prices__head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.prices__note { margin-top: 14px !important; font-size: 16px !important; }

.sheet {
    --perf: 9px;
    position: relative; padding: calc(28px + var(--perf)) clamp(20px, 4vw, 40px) calc(32px + var(--perf));
    background: var(--paper); color: var(--ink);
    /* перфорация сверху и снизу — как у отрывного бланка */
    -webkit-mask:
        radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) top / 18px var(--perf) repeat-x,
        radial-gradient(circle at 50% 100%, transparent 5px, #000 5.5px) bottom / 18px var(--perf) repeat-x,
        linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--perf)) no-repeat;
            mask:
        radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) top / 18px var(--perf) repeat-x,
        radial-gradient(circle at 50% 100%, transparent 5px, #000 5.5px) bottom / 18px var(--perf) repeat-x,
        linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--perf)) no-repeat;
}
.sheet__top {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding-bottom: 16px; border-bottom: 2px solid var(--ink);
}
.sheet__title { font: 700 clamp(18px, 2vw, 22px)/1.1 var(--display); letter-spacing: -.02em; }
.sheet__brand { font-size: 14px; color: #6a6c66; }

.sheet__table { width: 100%; border-collapse: collapse; }
.sheet__table caption {
    text-align: left; padding: 26px 0 8px; font: 600 14px/1.2 var(--display); color: #8b2a1d;
    border-bottom: 1px dashed #b9bab2;
}
.sheet__table th, .sheet__table td { padding: 11px 0; vertical-align: baseline; border-bottom: 1px dashed #d3d4cc; }
.sheet__table th {
    font-weight: 400; text-align: left; font-size: 16px;
    /* точечная направляющая до цены */
    background: radial-gradient(circle, #9fa098 1px, transparent 1.3px) left bottom 15px / 7px 3px repeat-x;
}
.sheet__table th span { background: var(--paper); padding-right: 8px; }
.sheet__table td { white-space: nowrap; text-align: right; padding-left: 8px; font-size: 14px; color: #55574f; }
.sheet__table td b { font: 600 17px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.sheet__table td small { font-size: 13px; }
.sheet__table tr:last-child th, .sheet__table tr:last-child td { border-bottom: 0; }

/* ── Проверка при покупке ─────────────────────────────── */
.check__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center;
}
.check__grid > div { border-left: 4px solid var(--signal); padding-left: clamp(20px, 3vw, 36px); }
.check__lead { font-size: 18px; color: var(--steel); max-width: 480px; }
.check__price { margin: 28px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--steel); }
.check__price b { font: 700 clamp(36px, 5vw, 56px)/1 var(--display); color: #fff; letter-spacing: -.03em; }
.check__price > span { width: 100%; font-size: 15px; }
.check__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.check__list li {
    position: relative; padding: 16px 0 16px 38px; border-bottom: 1px solid var(--rule); font-size: 18px;
}
.check__list li::before {   /* галочка */
    content: ""; position: absolute; left: 4px; top: 50%; width: 14px; height: 8px; margin-top: -6px;
    border-left: 2.5px solid var(--signal); border-bottom: 2.5px solid var(--signal); transform: rotate(-45deg);
}

/* ── Контакты ──────────────────────────────────────────── */
.home > .contacts { background: var(--asphalt); }
.contacts__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 16px; }
.contacts__col h3 { font-size: 15px; color: var(--steel); font-weight: 500; margin-bottom: 14px; }
.contacts address { font-style: normal; font-size: 18px; line-height: 1.55; margin-bottom: 18px; }
.contacts__route { display: flex; flex-wrap: wrap; gap: 8px; }
.contacts__phone { font: 600 clamp(22px, 2.4vw, 28px)/1.1 var(--display); margin-bottom: 22px; font-variant-numeric: tabular-nums; }
.contacts__label { color: var(--steel); font-size: 15px; margin-bottom: 10px; }
.contacts__pay { margin-top: 28px; }

.hours { border-collapse: collapse; width: 100%; max-width: 300px; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 8px 10px; text-align: left; font-weight: 400; border-bottom: 1px solid var(--rule); }
.hours td { text-align: right; }
.hours .is-off { color: #7c838d; }
.hours .is-today { background: var(--graphite); box-shadow: inset 3px 0 0 var(--signal); }
.hours .is-today th, .hours .is-today td { font-weight: 600; color: #fff; }

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 1000px) {
    .how__steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
    .prices__grid, .check__grid { grid-template-columns: 1fr; }
    .prices__head { position: static; }
    .contacts__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .home > .hero { min-height: calc(100svh - var(--header-h) - 72px); }
    .hero__bg img { object-position: 74% 50%; }
    .hero::after { background: linear-gradient(0deg, var(--graphite) 8%, rgba(22, 24, 27, .78) 55%, rgba(22, 24, 27, .35) 100%); }
    .hero__facts { grid-template-columns: 1fr; padding-bottom: 8px; }
    .hero__actions .messengers span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hero__actions .messengers a { padding: 11px; }
    .how__steps { grid-template-columns: 1fr; gap: 32px; }
    .contacts__grid { grid-template-columns: 1fr; gap: 36px; }
    .sheet__table th { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .status.is-open .status__dot { animation: none; }
}
