/* Design tokens: design/*.dc.html, docs/SPEC.md §5. --accent is set from settings in base.html. */
:root {
  /* Brand book §6 */
  --rg-bg: #111315;        /* graphite background */
  --rg-surface: #16191C;   /* sections */
  --rg-card: #1D2125;      /* cards */
  --rg-line: #2A2E33;      /* borders */
  --rg-text: #ECEDEE;      /* chrome, main text */
  --rg-text-2: #B4B9BF;    /* secondary */
  --rg-muted: #9AA0A6;     /* captions */
  --rg-accent: #D7FF3A;    /* «headlight light»: buttons, accents; text on it is #111315 */
  --rg-before: #B59A2E;    /* only for «было/до» marks */
  /* Derived tones used by the mockups */
  --rg-on-accent: #111315;
  --rg-line-soft: #24282D;
  --rg-line-strong: #3A3F45;
  --rg-input-line: #33383E;
  --rg-nav: #C3C7CC;
  --rg-warn: #FF8A3D;
  --font-head: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rg-bg);
  color: var(--rg-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--rg-text); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--rg-accent); outline-offset: 3px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--rg-accent); color: var(--rg-on-accent); padding: 8px 14px; }
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container--narrow { max-width: 900px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.section--tight { padding-top: 40px; padding-bottom: 56px; }
.section--bottom { padding-bottom: 56px; }
.band { background: var(--rg-surface); border-top: 1px solid #22262A; border-bottom: 1px solid #22262A; }
.band--bottom { border-bottom: 0; }
.muted { color: var(--rg-muted); font-size: 15px; margin: 0; }

/* placeholder for missing photos, as in the mockups */
.ph {
  background: repeating-linear-gradient(135deg, #1C1F23 0 14px, #181B1E 14px 28px);
  border: 1px solid var(--rg-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--rg-muted); font-size: 13px; text-align: center;
}

/* --- typography ------------------------------------------------------------- */
.h1 { font-family: var(--font-head); font-weight: 700; font-size: 48px; line-height: 1.1; margin: 0 0 28px; letter-spacing: -.01em; }
.h2 { font-family: var(--font-head); font-weight: 700; font-size: 38px; line-height: 1.15; margin: 0; }
.h2--spaced { margin-bottom: 40px; }
.h3 { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin: 0 0 16px; }
.h3--spaced { margin-bottom: 24px; }
.accent-link { color: var(--rg-accent); font-size: 14px; font-weight: 700; }
.accent-link:hover { color: var(--rg-accent); text-decoration: underline; }

/* --- buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer;
  border: 1px solid transparent; text-align: center;
}
.btn--accent { background: var(--rg-accent); color: var(--rg-on-accent); }
.btn--accent:hover { color: var(--rg-on-accent); filter: brightness(1.06); }
.btn--ghost { border-color: var(--rg-line-strong); font-weight: 500; }
.btn--ghost:hover { border-color: var(--rg-text-2); }
.btn--icon { font-weight: 700; align-self: flex-start; }
.btn--dark { background: var(--rg-bg); color: var(--rg-text); }
.btn--dark:hover { color: #fff; }
.btn--lg { padding: 18px 28px; font-size: 16px; }
.btn--block { width: 100%; border: 0; }

/* --- header ------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rg-line-soft); position: relative; z-index: 20; background: var(--rg-bg); }
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: none; }
.brand .mark { width: 41px; height: 30px; color: var(--rg-accent); flex: none; }
.brand__words { display: flex; flex-direction: column; gap: 3px; }
/* Wordmark (brand book §4): REVAMP — Unbounded 800; GARAGE — 400, 0.38 of the size, tracking .62em */
.brand__revamp { font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: .9; letter-spacing: .01em; }
.brand__garage { font-family: var(--font-head); font-weight: 400; font-size: 8.4px; letter-spacing: .62em; color: var(--rg-text-2); }
.main-nav { display: flex; gap: 28px; font-size: 15px; flex: 1 1 auto; justify-content: center; }
.main-nav a { color: var(--rg-nav); }
.main-nav a:hover { color: #fff; }
.header-alt { font-weight: 700; font-size: 15px; color: var(--rg-nav); white-space: nowrap; }
.header-cta { padding: 13px 22px; }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 12px; flex: none; margin-left: auto;
  background: var(--rg-card); border: 1px solid var(--rg-line); color: var(--rg-text);
  align-items: center; justify-content: center; cursor: pointer;
}

/* --- hero --------------------------------------------------------------------- */
.hero-wrap { position: relative; overflow: hidden; }
/* The brand diagonal: a faint lime glint behind the hero (brand book §8). */
.hero-glint { position: absolute; top: -30%; left: 62%; width: 2px; height: 160%; background: var(--rg-accent); opacity: .25; transform: rotate(28deg); pointer-events: none; }
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "text media" "actions media";
  column-gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px;
}
.hero__text { grid-area: text; align-self: end; }
.hero__media { grid-area: media; }
.hero__actions { grid-area: actions; align-self: start; display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid #2F3439; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: var(--rg-nav); margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rg-accent); }
.hero__title { font-family: var(--font-head); font-weight: 700; font-size: 58px; line-height: 1.05; margin: 0 0 24px; letter-spacing: -.01em; }
.hero__lead { font-size: 19px; line-height: 1.55; color: var(--rg-text-2); margin: 0 0 36px; max-width: 520px; }
.hero__media { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero__lamp { width: 100%; max-width: 640px; height: auto; }
.hero__labels { display: flex; justify-content: space-between; width: 100%; max-width: 560px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.before-mark { color: var(--rg-before); }
.after-mark { color: var(--rg-accent); }
.hero__hint { flex-basis: 100%; margin: 4px 0 0; color: var(--rg-muted); font-size: 14px; }

/* --- sections ------------------------------------------------------------------ */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin-bottom: 40px; }
.section-head .h2 + .muted { margin-top: 10px; }

.services { display: flex; flex-wrap: wrap; gap: 16px; }
.services__grid { flex: 1 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
/* Headlight restoration — always first and highlighted (brand book §2). */
.service-main {
  flex: 1 1 560px; min-width: 0; background: var(--rg-card); border: 1px solid var(--rg-accent); border-radius: 22px;
  padding: 36px; display: flex; flex-direction: column; gap: 18px;
}
.service-main:hover { color: var(--rg-text); }
.service-main__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.service-main__top .tag { letter-spacing: .08em; padding: 6px 10px; }
.service-main__price { font-weight: 700; }
.service-main__title { font-family: var(--font-head); font-weight: 700; font-size: 34px; line-height: 1.1; }
.service-main__text { color: var(--rg-text-2); font-size: 17px; line-height: 1.55; max-width: 560px; }
.service-main__points { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.service-main__points > div { border-top: 2px solid var(--rg-accent); padding-top: 12px; }
.service-main__point { font-weight: 700; margin-bottom: 4px; }
.service-main__note { color: var(--rg-muted); font-size: 14px; line-height: 1.45; }
.service-card {
  background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 18px; padding: 24px;
  display: flex; flex-direction: column; gap: 10px; transition: border-color .15s;
}
.service-card:hover { border-color: var(--rg-line-strong); }
.service-card__title { font-family: var(--font-head); font-weight: 500; font-size: 19px; line-height: 1.25; }
.service-card__text { color: var(--rg-text-2); font-size: 15px; line-height: 1.5; flex: 1; }
.service-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--rg-line); padding-top: 16px; }
.service-card__price { font-weight: 700; }
.service-card__time { color: var(--rg-muted); font-size: 14px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--wrap { margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 11px 18px; border-radius: 999px;
  background: transparent; color: var(--rg-text); border: 1px solid var(--rg-line-strong);
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--rg-text-2); color: var(--rg-text); }
.chip.is-active { background: var(--rg-accent); color: var(--rg-on-accent); border-color: var(--rg-accent); }
.chips--small .chip { min-height: 40px; padding: 8px 14px; font-size: 13px; font-weight: 500; }
.chips--small .chip.is-active { font-weight: 700; }

/* works */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.work-card { display: flex; flex-direction: column; background: var(--rg-surface); border: 1px solid var(--rg-line-soft); border-radius: 18px; overflow: hidden; transition: border-color .15s; }
.work-card:hover { border-color: var(--rg-line-strong); }
.work-card[hidden] { display: none; }
.work-card__media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.work-card__media > img, .work-card__media > .ph { width: 100%; height: 180px; object-fit: cover; border: 0; }
.work-card__media--single { grid-template-columns: minmax(0, 1fr); }
.case-main { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--rg-line); border-radius: 22px; overflow: hidden; background: var(--rg-surface); cursor: zoom-in; }
.case-main img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.case-main__count { position: absolute; right: 16px; bottom: 16px; background: var(--rg-bg); color: var(--rg-text); font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.work-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.work-card__car { font-family: var(--font-head); font-weight: 500; font-size: 18px; margin-top: 4px; }
.work-card__text { color: var(--rg-text-2); font-size: 15px; line-height: 1.5; }
.work-card__date { color: var(--rg-muted); font-size: 13px; margin-top: 6px; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--rg-on-accent); background: var(--rg-accent); padding: 5px 10px; border-radius: 6px; line-height: 1.4;
}
a.tag:hover { color: var(--rg-on-accent); }
.tag--outline { background: none; color: var(--rg-nav); border: 1px solid var(--rg-line-strong); padding: 4px 10px; }
.more { display: flex; justify-content: center; margin-top: 36px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: flex-end; }
.filters--page { justify-content: flex-start; align-items: flex-start; flex-direction: column; gap: 4px; }
.make-filter { display: flex; align-items: center; gap: 10px; margin: 0; }
.make-filter__label { font-size: 14px; color: var(--rg-muted); }
.make-filter__select {
  min-height: 44px; padding: 10px 40px 10px 16px; border-radius: 999px; border: 1px solid var(--rg-line-strong);
  background: var(--rg-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23D7FF3A' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--rg-text); font: inherit; font-size: 14px; font-weight: 700; appearance: none; cursor: pointer; max-width: 100%;
}
.make-filter__select:focus { border-color: var(--rg-accent); outline: none; }
.works-count { margin-bottom: 16px; }
.empty { border: 1px dashed var(--rg-line-strong); border-radius: 18px; padding: 40px 24px; text-align: center; color: var(--rg-text-2); }
.empty-filter { margin-top: 12px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps li { border-top: 2px solid var(--rg-accent); padding-top: 20px; }
.steps__n { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--rg-line-strong); margin-bottom: 12px; }
.steps__title { font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.steps__text { color: var(--rg-text-2); font-size: 15px; line-height: 1.5; }

/* faq */
.faq__item { border-bottom: 1px solid var(--rg-line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 0; font-size: 18px; font-weight: 700; min-height: 44px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-family: var(--font-head); color: var(--rg-accent); font-size: 22px; width: 24px; text-align: center; flex: none; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { margin: 0 0 24px; color: var(--rg-text-2); font-size: 16px; line-height: 1.6; max-width: 720px; white-space: pre-line; }

/* contacts */
.contacts { display: flex; flex-wrap: wrap; gap: 32px; }
.contacts__col { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contacts__col--wide { flex-basis: 520px; }
.contacts__col .h3 { margin: 0; }
.howto { display: flex; flex-direction: column; gap: 20px; }
.map { width: 100%; height: 320px; border-radius: 18px; border: 1px solid var(--rg-line); background: var(--rg-card); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.facts__label { color: var(--rg-muted); font-size: 13px; margin-bottom: 6px; }
.facts__value { font-weight: 700; font-size: 17px; }
.route { display: flex; gap: 16px; align-items: flex-start; background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 16px; padding: 18px; }
.route__photo { width: 120px; height: 90px; border-radius: 10px; flex: none; font-size: 11px; overflow: hidden; }
.route__photo img { width: 100%; height: 100%; object-fit: cover; }
.route--text { padding: 16px 18px; }
.route p { margin: 0; color: var(--rg-text-2); font-size: 15px; line-height: 1.55; white-space: pre-line; }

.messengers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.messenger { display: flex; align-items: center; gap: 12px; background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 14px; padding: 16px; font-weight: 700; min-height: 44px; }
.messenger:hover { border-color: var(--rg-line-strong); }
.messenger--main { background: var(--rg-accent); color: var(--rg-on-accent); border-color: var(--rg-accent); }
.messenger--main:hover { color: var(--rg-on-accent); filter: brightness(1.06); }
.messenger--main .messenger__icon { background: var(--rg-on-accent); }
.contacts__lead { margin: -8px 0 0; color: var(--rg-text-2); font-size: 16px; line-height: 1.5; }
.messenger__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--rg-line); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 11px; color: var(--rg-accent); flex: none; }

.lead-form { background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.lead-form__title { font-weight: 700; font-size: 18px; }
.lead-form__ok { background: var(--rg-accent); color: var(--rg-on-accent); border-radius: 10px; padding: 12px 14px; font-weight: 700; }
.lead-form__note { font-size: 13px; color: var(--rg-muted); }
.lead-form__note.is-error { color: var(--rg-warn); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--rg-muted); }
.field input, .field select, .field textarea {
  background: var(--rg-bg); border: 1px solid var(--rg-input-line); border-radius: 10px; padding: 14px;
  color: var(--rg-text); font-size: 16px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--rg-accent); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- inner pages --------------------------------------------------------------- */
.page-top { padding-top: 48px; }
.crumbs { font-size: 14px; color: var(--rg-muted); margin-bottom: 24px; }
.crumbs a { color: var(--rg-muted); }
.crumbs a:hover { color: var(--rg-text); }
.crumbs [aria-current] { color: var(--rg-nav); }
.lead-muted { margin: -12px 0 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.case-title { max-width: 900px; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--rg-line); border: 1px solid var(--rg-line); border-radius: 16px; overflow: hidden; margin: 0; }
.meta > div { background: var(--rg-surface); padding: 18px 20px; }
.meta dt { color: var(--rg-muted); font-size: 13px; margin-bottom: 6px; }
.meta dd { margin: 0; font-weight: 700; font-size: 17px; }

.case-slider { padding-top: 40px; }
.compare {
  --pos: 50%;
  --half: 15%;  /* half of the diagonal's horizontal run: tan(28deg) x height / 2 at 16:9 */
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--rg-line); background: var(--rg-surface);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__img--after { clip-path: polygon(0 0, calc(var(--pos) + var(--half)) 0, calc(var(--pos) - var(--half)) 100%, 0 100%); }
.compare[data-compare] { cursor: ew-resize; }
.compare__line { position: absolute; top: -10%; height: 120%; left: var(--pos); width: 3px; background: var(--rg-accent); transform: translateX(-50%) rotate(28deg); }
.compare__handle {
  position: absolute; top: 50%; left: var(--pos); width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: var(--rg-accent); color: var(--rg-on-accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.compare__label { position: absolute; top: 20px; background: var(--rg-bg); color: var(--rg-text); font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 8px; }
.compare__label--left { left: 20px; color: var(--rg-accent); }
.compare__label--right { right: 20px; color: var(--rg-before); }
.compare__range { display: flex; align-items: center; gap: 16px; margin-top: 16px; color: var(--rg-muted); font-size: 14px; }
.compare__range input { flex: 1; accent-color: var(--rg-accent); min-height: 44px; min-width: 0; }

.story { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 56px; }
.story__card { flex: 1 1 420px; min-width: 0; background: var(--rg-surface); border: 1px solid var(--rg-line-soft); border-radius: 20px; padding: 32px; }
.story__p { margin: 0 0 20px; color: var(--rg-text-2); font-size: 17px; line-height: 1.6; }
.story__p:last-child { margin-bottom: 0; }
.problems { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.problems li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; }
.problems li > span[aria-hidden] { color: var(--rg-warn); font-weight: 700; }
.solution { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.solution li { display: flex; gap: 16px; align-items: flex-start; }
.solution__n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--rg-accent); color: var(--rg-on-accent); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.solution__t { font-weight: 700; font-size: 16px; padding-top: 4px; }
.solution__d { color: var(--rg-text-2); font-size: 15px; line-height: 1.5; margin-top: 4px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; position: relative; cursor: zoom-in; }
.gallery__kind { position: absolute; left: 10px; top: 10px; background: var(--rg-bg); font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 6px; color: var(--rg-text-2); }
.gallery__kind--before { color: var(--rg-before); }
.gallery__kind--after { color: var(--rg-accent); }
.compare__bar { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.compare__bar .compare__range { flex: 1; margin-top: 0; }
.compare__open { flex: none; }

/* Photo viewer */
.lightbox-lock, .lightbox-lock body { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0B0C0D; display: none; }
.lightbox.is-open { display: block; }
.lightbox__top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); }
.lightbox__caption { font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 6px; background: var(--rg-card); }
.lightbox__caption--before { color: var(--rg-before); }
.lightbox__caption--after { color: var(--rg-on-accent); background: var(--rg-accent); }
.lightbox__caption--process { color: var(--rg-text-2); }
.lightbox__counter { flex: 1; color: var(--rg-text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.lightbox__stage { position: absolute; inset: 64px 72px 24px; display: flex; align-items: center; justify-content: center; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lightbox__btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rg-line); background: var(--rg-card); color: var(--rg-text); font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox__btn:hover { border-color: var(--rg-accent); color: var(--rg-accent); }
.lightbox__nav { position: absolute; top: 50%; margin-top: -24px; z-index: 2; font-size: 30px; }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox--single .lightbox__nav { display: none; }
.gallery img, .gallery .ph { width: 100%; height: 220px; object-fit: cover; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.03); }

.cta { background: var(--rg-accent); color: var(--rg-on-accent); border-radius: 24px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta__text { flex: 1 1 420px; font-size: 17px; }
.cta__title { font-family: var(--font-head); font-weight: 700; font-size: 30px; margin-bottom: 8px; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.notfound { padding-top: 96px; padding-bottom: 120px; text-align: center; }
.notfound__code { font-family: var(--font-head); font-weight: 700; font-size: 120px; line-height: 1; color: var(--rg-accent); margin-bottom: 16px; }
.notfound .muted { margin-bottom: 32px; }
.notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --- footer & mobile bar --------------------------------------------------------- */
.site-footer { border-top: 1px solid #22262A; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; color: var(--rg-muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-services { display: flex; flex-wrap: wrap; gap: 8px 20px; flex-basis: 100%; order: 3; }
.footer-services a { color: var(--rg-muted); }
.footer-services a:hover { color: var(--rg-text); }
.footer-links a { color: var(--rg-muted); }
.footer-links a:hover { color: var(--rg-text); }

.mobile-bar { display: none; }

/* --- responsive -------------------------------------------------------------------- */
/* Service page /uslugi/… */
.service-page__title { margin-bottom: 24px; }
.service-page .meta { margin-bottom: 32px; }
.service-page__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.service-page__text p { margin: 0 0 16px; color: var(--rg-text-2); font-size: 17px; line-height: 1.65; }
.service-page__text a, .story a, .faq a { color: var(--rg-accent); text-decoration: underline; text-underline-offset: 3px; }
.service-page__aside { background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 20px; padding: 24px; position: sticky; top: 96px; }
.service-page__aside-title { font-family: var(--font-head); font-weight: 500; font-size: 20px; margin-bottom: 8px; }
.service-page__aside p { color: var(--rg-text-2); margin: 0 0 16px; line-height: 1.5; }
.service-page__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.service-page__buttons .btn { flex: 1 1 auto; justify-content: center; }
.partners { margin-top: 24px; background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 16px; padding: 18px 20px; }
.partners__title { font-weight: 700; margin-bottom: 8px; }
.partners__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--rg-text-2); }
.partners__list a { color: var(--rg-accent); font-weight: 700; }
.service-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Reviews: screenshots */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.review { margin: 0; background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 16px; overflow: hidden; }
.review__shot { display: block; background: var(--rg-bg); }
.review__shot img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; object-position: top; }
.review__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 12px 14px; font-size: 14px; color: var(--rg-text-2); }

@media (max-width: 900px) {
  .service-page__body { grid-template-columns: 1fr; }
  .service-page__aside { position: static; }
}
@media (max-width: 767px) {
  .service-page__text p { font-size: 16px; }
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .review__shot img { max-height: 300px; }
}

@media (max-width: 1080px) {
  .header-alt { display: none; }
}

@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--rg-surface); border-bottom: 1px solid var(--rg-line-soft);
    padding: 8px var(--gutter) 16px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--rg-line-soft); }
  .main-nav a:last-child { border-bottom: 0; }

  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "media" "actions"; padding-top: 40px; padding-bottom: 56px; }
  .hero__lead { margin-bottom: 24px; }
  .hero__media { margin-bottom: 20px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .header-inner { gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  .brand .mark { width: 32px; height: 23px; }
  .brand__revamp { font-size: 17px; }
  .brand__garage { font-size: 6.5px; }

  .section { padding-top: 56px; padding-bottom: 56px; }
  .section--tight { padding-top: 28px; padding-bottom: 40px; }
  .h1 { font-size: 28px; margin-bottom: 20px; }
  .h2 { font-size: 24px; }
  .h2--spaced { margin-bottom: 24px; }
  .h3 { font-size: 20px; }
  .section-head { margin-bottom: 24px; }

  .hero { padding-top: 24px; padding-bottom: 40px; }
  .badge { padding: 6px 12px; font-size: 12px; margin-bottom: 18px; }
  .dot { width: 7px; height: 7px; }
  .hero__title { font-size: 32px; line-height: 1.08; margin-bottom: 14px; }
  .hero__lead { font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
  .hero__media { gap: 8px; margin-bottom: 20px; }
  .hero__labels { font-size: 11px; }
  .hero__hint { text-align: center; font-size: 13px; }
  .hero-glint { left: 75%; }
  .hero__actions .btn { width: 100%; }
  .hero__actions .btn--ghost { display: none; }

  .service-card { padding: 20px; }
  .service-main { padding: 22px; gap: 14px; border-radius: 18px; flex-basis: 100%; }
  .service-main__title { font-size: 24px; }
  .service-main__text { font-size: 15px; }
  .services__grid { flex-basis: 100%; grid-template-columns: minmax(0, 1fr); }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); max-width: 100vw; }
  .chips::-webkit-scrollbar { display: none; }
  .section-head > .chips, .filters > .chips { width: calc(100% + 2 * var(--gutter)); }
  .filters { justify-content: flex-start; width: 100%; }
  .make-filter { width: 100%; }
  .make-filter__select { flex: 1; }

  /* Main page: swipeable rail of fresh works, like design/Mobile.dc.html */
  .works-grid--rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); gap: 10px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .works-grid--rail::-webkit-scrollbar { display: none; }
  .works-grid--rail .work-card { flex: 0 0 78%; scroll-snap-align: start; border-radius: 14px; }
  .works-grid--rail .work-card__media > img, .works-grid--rail .work-card__media > .ph { height: 120px; }
  .works-grid--rail .work-card__body { padding: 12px 14px 16px; gap: 4px; }
  .works-grid--rail .work-card__car { font-size: 15px; }
  .works-grid--rail .work-card__text { font-size: 14px; }
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .work-card__media > img, .work-card__media > .ph { height: 150px; }

  .faq__item summary { font-size: 16px; padding: 18px 0; }
  .contacts { gap: 40px; }
  .contacts__col { flex-basis: 100%; }
  .map { height: 260px; }
  .route { flex-direction: column; }
  .route__photo { width: 100%; height: 160px; }
  .messengers { grid-template-columns: minmax(0, 1fr); }
  .lead-form { padding: 18px; }

  .page-top { padding-top: 24px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta > div { padding: 14px 16px; }
  .meta dd { font-size: 15px; }
  .case-slider { padding-top: 24px; }
  .compare { aspect-ratio: 4 / 3; border-radius: 16px; --half: 20%; }
  .case-main { border-radius: 16px; }
  .case-main img { aspect-ratio: 4 / 3; }
  .compare__handle { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .compare__label { top: 12px; font-size: 12px; padding: 6px 10px; }
  .compare__label--left { left: 12px; }
  .compare__label--right { right: 12px; }
  .compare__range { flex-direction: column; align-items: stretch; gap: 4px; }
  .story { padding-top: 32px; gap: 16px; }
  .story__card { padding: 22px; flex-basis: 100%; }
  .story__p { font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery img, .gallery .ph { height: 140px; }
  .compare__bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .lightbox__stage { inset: 60px 0 76px; }
  .lightbox__nav { top: auto; bottom: 14px; margin-top: 0; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
  .cta { padding: 24px; border-radius: 18px; }
  .cta__text { flex-basis: 100%; }
  .cta__title { font-size: 22px; }
  .cta__buttons .btn { flex: 1 1 auto; }
  .notfound { padding-top: 56px; padding-bottom: 72px; }
  .notfound__code { font-size: 84px; }

  .mobile-bar {
    display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    background: var(--rg-card); border: 1px solid var(--rg-input-line); border-radius: 20px; padding: 10px;
    gap: 8px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
  .mobile-bar__label { font-size: 12px; color: var(--rg-muted); padding-left: 6px; flex: 1; }
  .mobile-bar__btn {
    width: 52px; height: 44px; border-radius: 12px; background: var(--rg-line); flex: none;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 11px; color: var(--rg-accent);
  }
  .mobile-bar__btn:hover { color: var(--rg-accent); }
  .mobile-bar__btn--main { width: auto; padding: 0 16px; background: var(--rg-accent); color: var(--rg-on-accent); font-size: 12px; font-weight: 700; }
  .mobile-bar__btn--main:hover { color: var(--rg-on-accent); }
}

@media (max-width: 360px) {
  .mobile-bar__label { display: none; }
  .mobile-bar { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
