/* ===========================================================================
   Стили сайта. Один файл, без сборщика и без внешних зависимостей.

   Принципы:
   - Мобильный экран первичен: базовые правила — для телефона, медиазапросы
     только расширяют вёрстку вверх.
   - Цвета и отступы заданы переменными: перекрасить сайт можно из одного места.
   - Шрифты системные. Веб-шрифт — это лишние сотни килобайт и задержка отрисовки
     на мобильном интернете, а выигрыш здесь чисто эстетический.
   ========================================================================= */

:root {
  --bg:          #17191c;
  --surface:     #1e2126;
  --surface-2:   #262a30;
  --line:        #333941;
  --text:        #e8eaed;
  --muted:       #a3abb5;
  --accent:      #f5a623;
  --accent-dim:  #d98e12;
  --accent-ink:  #17191c;
  --accent-soft: rgba(245, 166, 35, .12);
  --ok:          #6dd08a;

  --wrap:        1120px;
  --wrap-narrow: 760px;
  --gutter:      20px;
  --radius:      14px;
  --radius-sm:   10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --shadow: 0 12px 32px rgba(0, 0, 0, .38);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Место под липкую панель звонка на мобильных. */
  padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-color: rgba(245, 166, 35, .4); text-underline-offset: 3px; }
a:hover { color: var(--accent-dim); }

h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Шапка ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(23, 25, 28, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand__city { font-size: 12px; color: var(--muted); }

.burger {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav.is-open { display: block; }
.nav__list { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.nav__list a {
  display: block;
  padding: 13px 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.nav__list li:last-child a { border-bottom: 0; }
.nav__list a[aria-current="page"] { color: var(--accent); }

.header-phone { display: none; }

/* --- Кнопки --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
  min-height: 48px; /* палец, а не курсор */
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-dim); color: var(--accent-ink); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--muted); }

.btn--lg { font-size: 18px; padding: 16px 26px; min-height: 56px; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.link-more::after { content: "→"; }

/* --- Первый экран --------------------------------------------------------- */

.hero {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(245, 166, 35, .10), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero__inner { padding-block: 34px 40px; }

.hero__title {
  font-size: clamp(29px, 7.2vw, 46px);
  margin-bottom: .35em;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(16px, 4vw, 19px);
  color: var(--muted);
  max-width: 46ch;
}
.hero__bullets {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 9px;
}
.hero__bullets li {
  position: relative;
  padding-left: 28px;
  font-size: 15.5px;
}
.hero__bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: .55em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero__note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.hero__media { margin-top: 26px; }
.hero__photo { width: 100%; border-radius: var(--radius); }

/* --- Секции --------------------------------------------------------------- */

.section { padding-block: 44px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section__title { font-size: clamp(23px, 5.6vw, 31px); }
.section__lead { color: var(--muted); max-width: 62ch; margin-bottom: 26px; }
.section__more { margin-top: 22px; margin-bottom: 0; }

/* --- Карточки услуг ------------------------------------------------------- */

/* Сетки задаются через auto-fit: количество колонок вычисляется из ширины
   экрана, а не прописывается для каждого брейкпоинта. Побочная польза —
   одиночная карточка занимает всю строку, а не половину с пустотой рядом. */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.card {
  display: grid;
  gap: 7px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.card:hover { border-color: var(--accent); background: #2b3037; color: var(--text); }
.card__icon { color: var(--accent); }
.card__title { font-weight: 700; font-size: 18px; }
.card__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  /* Ограничиваем анонс, чтобы карточки в ряду не разъезжались по высоте. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__price { font-weight: 700; color: var(--accent); font-size: 15px; }
.card__more { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.card__more::after { content: " →"; }

/* --- Карточки техники ----------------------------------------------------- */

.machines { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.machine-card {
  display: grid;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease;
}
.machine-card:hover { border-color: var(--accent); color: var(--text); }
.machine-card__photo { display: block; }
.machine-card__photo .photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.machine-card__body { display: grid; gap: 4px; padding: 18px 20px 20px; }
.machine-card__kind { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.machine-card__name { font-size: 21px; font-weight: 700; }
.machine-card__short { color: var(--accent); font-weight: 600; }
.machine-card__more { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 6px; }
.machine-card__more::after { content: " →"; }

/* --- Заглушка фотографии -------------------------------------------------- */

.photo-stub {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px),
    var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: #4b535d;
}
.photo-stub svg { width: 64px; height: 48px; }

/* --- Преимущества --------------------------------------------------------- */

.adv { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.adv__item {
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.adv__icon { display: block; color: var(--accent); margin-bottom: 10px; }
.adv__title { font-size: 17px; margin-bottom: .4em; }
.adv__text { color: var(--muted); font-size: 15px; margin: 0; }

/* --- Шаги работы ---------------------------------------------------------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.steps__item {
  position: relative;
  padding-left: 52px;
}
.steps__num {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.steps__title { font-size: 17px; margin-bottom: .3em; }
.steps__text { color: var(--muted); font-size: 15px; margin: 0; }

/* --- Плашки районов ------------------------------------------------------- */

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}

/* --- Хлебные крошки ------------------------------------------------------- */

.crumbs { border-bottom: 1px solid var(--line); background: var(--surface); }
.crumbs__list {
  list-style: none;
  margin: 0;
  padding: 11px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.crumbs__list li + li::before { content: "/"; margin-right: 6px; color: #5a626c; }
.crumbs__list a { color: var(--muted); text-decoration: none; }
.crumbs__list a:hover { color: var(--accent); }

/* --- Контентные страницы -------------------------------------------------- */

.page { padding-block: 30px 44px; }
.page__title { font-size: clamp(26px, 6.4vw, 38px); text-wrap: balance; }
.page__lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.page__cta-inline { margin: 22px 0 30px; }

.prose { margin-top: 32px; }
.prose h2 { font-size: clamp(21px, 5vw, 26px); margin-bottom: .55em; }
.prose p { max-width: 68ch; }

.ticks { list-style: none; padding: 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 3px; top: .42em;
  width: 13px; height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.link-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.link-list a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}

/* --- Цена ----------------------------------------------------------------- */

.price-box {
  margin: 24px 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.price-box__label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.price-box__value { font-size: 27px; font-weight: 700; margin-bottom: 8px; }
.price-box__value span { font-size: 17px; font-weight: 500; color: var(--muted); }
.price-box__note { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.price-box__note:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }

.price-table, .specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.price-table th, .price-table td,
.specs th, .specs td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.price-table thead th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.price-table tbody th { font-weight: 600; }
.specs { margin: 8px 0 0; }
.specs th { color: var(--muted); font-weight: 500; width: 52%; }
.specs td { font-weight: 600; }

/* --- Галерея -------------------------------------------------------------- */

.gallery { display: grid; gap: 12px; margin: 28px 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.gallery__item { width: 100%; border-radius: var(--radius); }
.gallery .photo-stub { border-radius: var(--radius); }

/* --- Вопросы и ответы ----------------------------------------------------- */

.faq { display: grid; gap: 8px; margin-top: 8px; }
.faq__item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  padding: 15px 44px 15px 18px;
  font-weight: 600;
  position: relative;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 20px; top: 22px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq__answer { padding: 0 18px 16px; color: var(--muted); }
.faq__answer p { margin: 0; max-width: 68ch; }

/* --- Районы --------------------------------------------------------------- */

.areas { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 2px; }
.areas__item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.areas__name { font-weight: 700; font-size: 17px; }
.areas__note { color: var(--muted); font-size: 15px; }

/* --- Портфолио ------------------------------------------------------------ */

.works { display: grid; gap: 20px; margin-top: 26px; }
.work {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.work__media { display: grid; gap: 2px; }
.work__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work__body { padding: 20px; }
.work__title { font-size: 20px; }
.work__meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.work__link { margin: 0; }

/* --- Контакты ------------------------------------------------------------- */

.contacts { display: grid; gap: 18px; margin: 26px 0; }
.contacts__main, .contacts__side {
  padding: 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contacts__label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.contacts__phone { font-size: clamp(26px, 7vw, 34px); font-weight: 700; margin-bottom: 8px; }
.contacts__phone a { text-decoration: none; }
/* Имя стоит между номером и режимом работы: человек читает сверху вниз
   и должен понять, кому звонит, до того как решит звонить. */
.contacts__name {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
.contacts__note { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.contacts__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* --- Призыв к действию ---------------------------------------------------- */

.cta {
  background: linear-gradient(160deg, #23262b, #1a1d21);
  border-top: 1px solid var(--line);
}
.cta__inner { padding-block: 38px; display: grid; gap: 22px; }
.cta__title { font-size: clamp(22px, 5.4vw, 29px); }
.cta__text p { color: var(--muted); max-width: 56ch; }
.cta__hours { font-size: 14px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Подвал --------------------------------------------------------------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; gap: 26px; padding-block: 34px; }
.site-footer__name { font-weight: 700; margin-bottom: 4px; }
.site-footer__text { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.site-footer__phone { font-size: 22px; font-weight: 700; margin: 10px 0 6px; }
.site-footer__phone a { text-decoration: none; }
.site-footer__head { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.site-footer__list { list-style: none; padding: 0; display: grid; gap: 7px; }
.site-footer__list a { color: var(--text); text-decoration: none; font-size: 15px; }
.site-footer__list a:hover { color: var(--accent); }
.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 18px 26px;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer__bottom p { max-width: 72ch; margin-bottom: 10px; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Липкая панель звонка ------------------------------------------------- */

.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 9px var(--gutter) calc(9px + env(safe-area-inset-bottom, 0px));
  background: rgba(23, 25, 28, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.callbar__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.callbar__btn--call { background: var(--accent); color: var(--accent-ink); flex: 1.4; }
.callbar__btn--wa,
.callbar__btn--tg { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

/* ===========================================================================
   Планшет
   ========================================================================= */

@media (min-width: 620px) {
  .cards { gap: 14px; }
  .work { display: grid; grid-template-columns: 240px 1fr; }
  .work__media { grid-auto-flow: row; }
  .work__photo { height: 100%; aspect-ratio: auto; min-height: 200px; }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .steps { gap: 22px 26px; }
  .contacts { grid-template-columns: 1.2fr 1fr; }
}

/* ===========================================================================
   Десктоп: появляется горизонтальное меню и телефон в шапке,
   липкая панель звонка убирается за ненадобностью.
   ========================================================================= */

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
  .burger { display: none; }

  .nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin-right: 18px;
  }
  .nav__list { display: flex; gap: 4px; padding: 0; }
  .nav__list a {
    padding: 9px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }
  .nav__list a:hover { background: var(--surface-2); }
  .nav__list a[aria-current="page"] { background: var(--accent-soft); }

  .header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
    color: var(--text);
    flex: none;
  }
  .header-phone__num { font-weight: 700; font-size: 17px; white-space: nowrap; }
  .header-phone__hint { font-size: 12px; color: var(--muted); white-space: nowrap; }
  .header-phone:hover .header-phone__num { color: var(--accent); }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding-block: 60px 66px;
  }
  .hero__media { margin-top: 0; }
  .hero__photo { aspect-ratio: 4 / 3; object-fit: cover; }
  .hero .photo-stub { aspect-ratio: 4 / 3; }

  .section { padding-block: 62px; }

  .cta__inner {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    padding-block: 52px;
  }
  .cta__actions { justify-content: flex-end; }

  .page { padding-block: 34px 62px; }
}

/* --- Печать: страница услуги должна нормально печататься с телефона -------- */

@media print {
  .site-header, .callbar, .cta, .site-footer, .crumbs { display: none; }
  body { background: #fff; color: #000; padding: 0; }
  a { color: #000; }
}

/* --- Схема районов работы ------------------------------------------------- */

.areamap {
  margin: 30px 0 6px;
  padding: 8px 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.areamap__svg {
  width: 100%;
  height: auto;
  display: block;
}
/* Лучи от базы читаются как «выезжаю отсюда туда», поэтому они заметно
   тише точек: это фон, а не содержание. */
.areamap__ray {
  stroke: var(--line);
  stroke-width: 1.5;
}
.areamap__halo {
  fill: var(--accent);
  opacity: .13;
}
.areamap__dot { fill: var(--accent); }
.areamap__dot--base { fill: var(--accent); }

.areamap__label {
  fill: var(--text);
  font-family: var(--font);
  font-size: 15px;
  dominant-baseline: middle;
}
.areamap__label--base { font-weight: 700; }
.areamap__dist {
  fill: var(--muted);
  font-size: 13px;
}

/* На узком экране схема сжимается вместе с подписями: 15 единиц холста
   превращаются в 7-8 пикселей на экране, читать невозможно. Поэтому размер
   шрифта задаётся в единицах холста и на мобильных увеличивается, а строка
   с расстоянием убирается — рядом с укрупнёнными подписями она не помещается. */
@media (max-width: 700px) {
  .areamap__label { font-size: 22px; }
  .areamap__dist { display: none; }
}

/* --- Кнопка возврата наверх ----------------------------------------------- */

/* Маячок нулевой высоты сразу под шапкой. Пока он виден, страница не
   прокручена — за ним следит IntersectionObserver вместо событий прокрутки. */
.scroll-sentinel { height: 0; }

.totop {
  position: fixed;
  right: var(--gutter);
  /* Над липкой панелью звонка, чтобы не перекрывать кнопку «Позвонить»:
     она важнее возврата наверх. */
  bottom: calc(66px + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 45;

  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);

  /* Скрыта, пока страница не прокручена. visibility, а не только opacity:
     иначе невидимая кнопка ловила бы нажатия и попадала в обход с клавиатуры.
     Без JavaScript она не появится вовсе — это удобство, а не функция,
     и мигать ею до загрузки скрипта хуже, чем не показывать. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.totop:hover { background: #2b3037; color: var(--text); border-color: var(--muted); }

@media (min-width: 900px) {
  /* На десктопе липкой панели звонка нет, место внизу свободно. */
  .totop { bottom: 24px; width: 50px; height: 50px; }
}

/* --- Отклик на нажатие пальцем --------------------------------------------- */

/* Мобильные браузеры сами подсвечивают нажатое место полупрозрачным
   прямоугольником. На круглой кнопке возврата он выглядит откровенно чужеродно,
   на янтарной кнопке звонка — серым пятном мимо палитры.
   Убираем его, но только там, где взамен даём собственный отклик: без всякой
   реакции на палец интерфейс кажется зависшим. */
.btn,
.callbar__btn,
.totop,
.burger,
.card,
.machine-card {
  -webkit-tap-highlight-color: transparent;
}

/* Наведение на телефоне не срабатывает — нужен именно :active. */
.btn--primary:active { background: var(--accent-dim); }
.btn--ghost:active { background: var(--surface-2); border-color: var(--muted); }

.callbar__btn { transition: background-color .12s ease; }
.callbar__btn--call:active { background: var(--accent-dim); }
.callbar__btn--wa:active,
.callbar__btn--tg:active { background: #2b3037; }

.totop:active {
  background: #2b3037;
  border-color: var(--muted);
  transform: scale(.94);
}

.burger:active { background: var(--surface-2); }

.card:active,
.machine-card:active {
  border-color: var(--accent);
  background: #2b3037;
}

/* --- Калькулятор объёма ---------------------------------------------------- */

.calc {
  margin: 26px 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.calc__modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
/* Подсветку убираем с самой label: нажимают именно её, а не span внутри —
   ему задавать бесполезно, браузер подсветит родителя. */
.calc__mode {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.calc__mode input { position: absolute; opacity: 0; pointer-events: none; }
.calc__mode span {
  display: block;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
}

/* Взамен системной подсветки — свой отклик. Наведение на телефоне
   не срабатывает, нужен именно :active. */
.calc__mode:active span { transform: scale(.96); }
.calc__mode:active input:not(:checked) + span {
  background: var(--surface);
  border-color: var(--muted);
  color: var(--text);
}
.calc__mode input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
/* Выделение с клавиатуры: сам переключатель скрыт, показываем его рамкой. */
.calc__mode input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.calc__fields { display: grid; gap: 12px; }
.calc__field { display: grid; gap: 5px; }
/* Собственный display перебивает встроенное поведение атрибута hidden,
   поэтому скрытие приходится задавать явно. Иначе поле остаётся на экране,
   хотя в разметке помечено скрытым. */
.calc__field[hidden] { display: none; }
.calc__label { font-size: 13.5px; color: var(--muted); }
.calc__input {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px; /* меньше 16px — и мобильный Safari увеличивает страницу */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.calc__input:focus { border-color: var(--accent); outline: none; }
/* У полей ввода отклик и так есть — рамка при фокусе, поэтому системная
   подсветка только мешает. */
.calc__input { -webkit-tap-highlight-color: transparent; }

/* Системную стрелку списка браузер рисует сам: её нельзя ни отодвинуть
   от края, ни перевернуть при открытии. Поэтому убираем её и рисуем свою
   фоном — тогда и отступ наш, и направление под контролем. */
.calc select.calc__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3abb5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Два отдельных правила, а не список через запятую: браузер, не знающий
   :open, отбросил бы всё правило целиком вместе с запасным вариантом. */
.calc select.calc__input:open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5a623' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}
.calc select.calc__input.is-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5a623' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}

.calc__out { display: block; margin-top: 18px; }
.calc__hint { color: var(--muted); font-size: 15px; margin: 0; }
.calc__trips { font-size: 17px; margin: 0 0 2px; }
.calc__trips b { font-size: 30px; color: var(--accent); }
.calc__limit { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }

.calc__rows { margin: 0; display: grid; gap: 2px; }
.calc__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.calc__rows dt { color: var(--muted); font-size: 15px; }
.calc__rows dd { margin: 0; font-weight: 600; }

.calc__note { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }

@media (min-width: 620px) {
  .calc__fields { grid-template-columns: repeat(3, 1fr); }
  .calc__field--wide { grid-column: 1 / -1; }
}

/* --- Отклик на нажатие: остальные элементы --------------------------------- */

/* Логотип и телефон в шапке — по сути кнопки, и системная подсветка рисует
   поверх них прямоугольник во всю ширину блока вместе с подписью. */
.brand,
.header-phone { -webkit-tap-highlight-color: transparent; }
.brand__mark { transition: transform .08s ease; }
.brand:active .brand__mark { transform: scale(.93); }
.header-phone:active .header-phone__num { color: var(--accent); }

/* Подпись и поле обёрнуты в одну label, поэтому нажатие подсвечивало весь
   блок целиком. Отклик здесь даёт рамка поля при фокусе. */
.calc__field { -webkit-tap-highlight-color: transparent; }

/* Вопрос-ответ: раскрытие блока само по себе отклик, но по строке жмут
   пальцем, и мгновенная реакция всё равно нужна. */
.faq__item summary {
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease;
}
.faq__item summary:active { background: #2b3037; }

/* Текстовые ссылки, меню и хлебные крошки намеренно оставлены с системной
   подсветкой: там она уместна, а заменить её нечем — своего вида нажатия
   у обычной ссылки нет. */
