/* ==========================================================================
   SuperFedor — грузоперевозки, ИП Пеструхин Ф. О.
   Дизайн-система из макетов Клод-Дизайна. Токены менять только здесь.
   ========================================================================== */

/* --- Токены -------------------------------------------------------------- */
:root {
  --primary: #17518C;
  --primary-h: #0F3D6E;
  --tint: #E8F0F9;

  --deep: #12293D;
  --deep-2: #0A1927;
  --field-dark: #0B1C2B;

  --ink: #0D1826;
  --ink-2: #33465C;
  --muted: #6B7C90;
  --on-dark: #AFC3D6;
  --on-dark-2: #8FA5B8;

  --bg: #FFFFFF;
  --surface: #F4F7FA;
  --subtle: #FAFCFD;

  --line: #DDE4EC;
  --line-2: #EBF0F5;
  --line-dark: #2C4459;
  --line-dark-2: #22384B;

  --ok: #2C7A5B;
  --accent: #C2701A;
  --error: #B3402F;
  --error-tint: #FDF4F2;
  --disabled: #C6D2DF;

  --font-d: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-b: 'Golos Text', 'Segoe UI', system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: 140px;
  --r-chip: 6px;
  --r-ctl: 10px;
  --r-icon: 12px;
  --r-card: 14px;
  --r-card-lg: 16px;

  --header-h: 76px;
}

/* --- Сброс --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-d); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
/* <picture> — инлайновая обёртка, из-за неё img переставал тянуться
   на всю карточку. Держим обёртку блоком в полный размер слота. */
.hero__shot picture, .gallery__main picture, .gallery__thumb picture { display: block; width: 100%; height: 100%; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-h); text-decoration: underline; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: none;
  border-radius: var(--r-chip);
  box-shadow: 0 0 0 3px var(--tint);
}
.on-dark :focus-visible { box-shadow: 0 0 0 3px var(--line-dark); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); box-sizing: content-box; }
.section { padding: 88px 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Типографика --------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-d);
  font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.h1 { font-weight: 800; font-size: 62px; line-height: 1.02; letter-spacing: -.025em; }
.h2 { font-weight: 800; font-size: 44px; line-height: 1.06; letter-spacing: -.025em; }
.h3 { font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -.015em; }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.num { font-family: var(--font-d); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); }

/* Пунктирная плашка-заглушка. Убрать вместе с содержимым, когда данные реальные. */
.stub {
  display: inline-block;
  border: 1px dashed var(--accent);
  border-radius: var(--r-chip);
  padding: 8px 10px;
  font-size: 12px; line-height: 1.4;
  color: var(--accent);
}
.stub--inline { padding: 2px 7px; font-size: 12px; font-weight: 600; vertical-align: 2px; }

/* --- Кнопки -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px;
  border-radius: var(--r-ctl);
  font-family: var(--font-d); font-weight: 700; font-size: 17px;
  white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn--sm { height: 44px; padding: 0 20px; border-radius: 9px; font-size: 15px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-h); color: #fff; }
.btn--outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--tint); color: var(--primary-h); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); background: var(--bg); }
.btn--ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--tint); color: var(--ink); }
.btn--dark-outline { border: 1px solid var(--line-dark); color: #fff; }
.btn--dark-outline:hover { background: var(--field-dark); color: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { background: var(--disabled); color: #fff; cursor: not-allowed; }
.btn .tel { font-family: var(--font-d); font-variant-numeric: tabular-nums; }

/* --- Логотип (знак C: «Ф» в пунктирном кольце МКАД) ---------------------- */
.logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.logo:hover { text-decoration: none; }
.logo__mark { flex: 0 0 auto; }
.logo__name { font-family: var(--font-d); font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1.15; }
.logo__sub { font-size: 12px; color: var(--muted); line-height: 1.2; }
.on-dark .logo__name { color: #fff; }
.on-dark .logo__sub { color: var(--on-dark-2); }

/* --- Шапка --------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: 100%; }
.nav { display: flex; gap: 26px; font-size: 15px; }
.nav a { color: var(--ink-2); }
.nav a:hover { color: var(--primary); }
.header__side { display: flex; align-items: center; gap: 16px; }
.header__tel { text-align: right; line-height: 1.2; }
.header__tel a { font-family: var(--font-d); font-weight: 800; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.header__tel span { display: block; font-size: 12px; color: var(--muted); }
.burger {
  display: none;
  width: 44px; height: 44px; border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
}

/* Мобильное меню на весь экран */
.mmenu {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateY(-8px); opacity: 0;
  transition: opacity .2s, transform .2s;
}
.mmenu[hidden] { display: none; }
.mmenu.is-open { transform: none; opacity: 1; }
.mmenu__top { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.mmenu__close { width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--tint); display: flex; align-items: center; justify-content: center; }
.mmenu__body { flex: 1; overflow-y: auto; padding: 8px 18px 18px; display: flex; flex-direction: column; }
.mmenu__link {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-d); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--ink);
}
.mmenu__link:hover { color: var(--primary); text-decoration: none; }
.mmenu__link span { font-family: var(--font-b); font-size: 13px; font-weight: 600; color: var(--muted); }
.mmenu__call { margin-top: 22px; background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.mmenu__call a { display: block; font-family: var(--font-d); font-weight: 800; font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
.mmenu__foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.mmenu__req { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }

/* --- Герой (вариант B) --------------------------------------------------- */
.hero { background: var(--deep); color: #fff; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1fr 470px; gap: 60px; align-items: center; padding: 72px 0 76px; }
.hero h1 { font-weight: 800; font-size: 62px; line-height: 1.02; letter-spacing: -.025em; color: #fff; margin: 18px 0 0; }
.hero__eyebrow { color: var(--on-dark-2); }
.hero__lead { font-size: 18px; line-height: 1.55; color: var(--on-dark); max-width: 560px; margin: 22px 0 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.hero__fact b { display: block; font-family: var(--font-d); font-weight: 800; font-size: 28px; color: #fff; font-variant-numeric: tabular-nums; }
.hero__fact span { font-size: 13px; color: var(--on-dark-2); }
.hero__media { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 220px 132px; gap: 10px; }
.hero__shot { position: relative; overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--line-dark); }
.hero__shot--wide { grid-column: span 2; }
.hero__shot img { width: 100%; height: 100%; object-fit: cover; }
.hero__plate {
  position: absolute; left: 12px; bottom: 12px;
  height: 28px; padding: 0 10px; display: flex; align-items: center;
  border-radius: var(--r-chip); background: rgba(10, 25, 39, .82);
  font-family: var(--font-d); font-weight: 700; font-size: 13px; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Бегущая строка ПВЗ */
.marquee { background: var(--deep-2); height: 72px; display: flex; align-items: center; overflow: hidden; }
.marquee__track {
  display: flex; gap: 44px; padding-left: 40px; white-space: nowrap;
  font-family: var(--font-d); font-weight: 700; font-size: 16px; color: var(--on-dark); letter-spacing: -.01em;
  animation: sfMarquee 26s linear infinite;
}
@keyframes sfMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Сетки и карточки ---------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card-lg);
  padding: 22px;
  transition: border-color .16s, transform .16s, background .16s;
}
.card--link:hover { border-color: var(--primary); background: var(--subtle); transform: translateY(-2px); text-decoration: none; }
.card__icon {
  width: 40px; height: 40px; border-radius: var(--r-icon);
  background: var(--tint); display: flex; align-items: center; justify-content: center;
  transition: background .16s;
}
.card--link:hover .card__icon { background: var(--primary); }
.card--link:hover .card__icon svg { stroke: #fff; }
.card__title { font-family: var(--font-d); font-weight: 700; font-size: 18px; letter-spacing: -.015em; color: var(--ink); margin-top: 14px; }
.card__text { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin-top: 6px; }
.card__more { font-size: 14px; font-weight: 600; color: var(--primary); margin-top: 10px; }

.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.section__head h2 { margin-top: 14px; }
.section__head p { margin-top: 14px; max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }

/* --- Что берём / не берём ------------------------------------------------ */
.take { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.take > div { background: var(--surface); border-radius: var(--r-card); padding: 22px 24px; }
.take h4 { font-size: 15px; font-weight: 700; }
.take p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-top: 8px; }

/* --- Тарифы -------------------------------------------------------------- */
.tariffs__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.tariffs__head h2 { font-size: 40px; }
.tariffs__link { margin-left: auto; font-size: 15px; font-weight: 600; }
.tariffs { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--r-card-lg); overflow: hidden; }
.tariffs__row { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.tariffs__row:last-child { border-bottom: 0; }
.tariffs__row:not(.tariffs__row--head):hover { background: var(--subtle); }
.tariffs__row--head { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tariffs__row--head > * { padding: 14px 22px; }
.tariffs__row > * { padding: 16px 22px; }
.tariffs__name { font-size: 16px; font-weight: 500; color: var(--ink); }
.tariffs__rate { text-align: right; font-family: var(--font-d); font-weight: 800; font-size: 18px; color: var(--primary); font-variant-numeric: tabular-nums; }
.tariffs__note { font-size: 15px; color: var(--ink-2); }
.tariffs__foot { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; align-items: center; }
.tariffs__foot .btn { margin-left: auto; }

/* --- Калькулятор --------------------------------------------------------- */
.calc { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card-lg); padding: 28px; }
.calc__title { font-family: var(--font-d); font-weight: 700; font-size: 20px; letter-spacing: -.015em; }
.calc__sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.calc__label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 22px 0 8px; }
.calc__dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  min-height: 44px; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  font-weight: 500; font-size: 15px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--tint); color: var(--primary-h); font-weight: 600; }
.calc__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.stepper { height: 52px; border: 1px solid var(--line); border-radius: var(--r-ctl); display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 8px; color: var(--primary); font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.stepper button:hover { background: var(--tint); }
.stepper output { font-family: var(--font-d); font-weight: 800; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc__km { margin-top: 18px; }
.calc__km-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.calc__km-top b { font-family: var(--font-d); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc__km input { width: 100%; height: 24px; accent-color: var(--primary); }
.calc__km.is-off { opacity: .45; pointer-events: none; }
.calc__lines { margin-top: 22px; border-top: 1px solid var(--line-2); padding-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.calc__line { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--ink-2); }
.calc__line b { font-family: var(--font-d); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc__total {
  margin-top: 18px; background: var(--tint); border-radius: var(--r-card);
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.calc__total span { font-size: 13px; color: var(--ink-2); }
.calc__total small { display: block; font-size: 12px; color: var(--muted); }
.calc__total b { font-family: var(--font-d); font-weight: 800; font-size: 38px; letter-spacing: -.02em; color: var(--primary); font-variant-numeric: tabular-nums; }
.calc__steps { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.calc__step { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink-2); }
.calc__step i {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  border: 1.6px solid var(--primary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 13px; font-weight: 700;
}

/* --- Машина -------------------------------------------------------------- */
.fleet { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.gallery__main { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--deep); aspect-ratio: 4 / 3; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.gallery__thumb { height: 74px; border-radius: var(--r-ctl); overflow: hidden; border: 1px solid var(--line); padding: 0; transition: border-color .15s; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--tint); }
.specs { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.specs div { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); }
.specs div:last-child { border-bottom: 0; }
.specs b { font-family: var(--font-d); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- Шаги ---------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 24px 28px; }
.step i {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff;
  font-family: var(--font-d); font-style: normal; font-weight: 800; font-size: 15px;
}
.step h3 { margin-top: 14px; font-size: 18px; }
.step p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* --- География ----------------------------------------------------------- */
.geo { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.zone {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card-lg);
  padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start;
  transition: border-color .18s, transform .18s;
}
.zone:hover { border-color: var(--primary); transform: translateX(4px); }
.zone__dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex: 0 0 12px; background: var(--primary); }
.zone__dot--ring { background: none; border: 2px solid var(--primary); }
.zone__dot--dash { background: none; border: 2px dashed var(--accent); }
.zone__body h3 { font-size: 19px; }
.zone__body p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; }
.zone__rate { margin-left: auto; font-family: var(--font-d); font-weight: 800; font-size: 17px; color: var(--primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Схема зон. Подписи — HTML поверх SVG (позиции в %), чтобы шрифт не уменьшался вместе со схемой. */
.geo__map { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1; }
.geo__map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.geo__fill { transition: fill-opacity .35s; }
.geo__fill--mkad { fill: var(--primary); fill-opacity: .1; }
.geo__fill--oblast { fill: var(--primary); fill-opacity: .03; }
.geo__fill--regions { fill: var(--accent); fill-opacity: 0; }
.geo__ring, .geo__roads, .geo__dots { transition: opacity .35s, stroke-width .35s; }

.geo__hub, .geo__city, .geo__tag { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; }
.geo__hub { top: 56.5%; left: 50%; font-family: var(--font-d); font-weight: 800; font-size: 16px; color: var(--primary); }
.geo__city { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .86); transition: color .35s; }
.geo__tag {
  pointer-events: auto; cursor: default;
  font-family: var(--font-d); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; color: var(--primary);
  padding: 4px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--primary);
  transition: background .25s, color .25s, border-color .25s;
}
.geo__tag[data-zone="regions"] { color: var(--accent); border-color: var(--accent); }

/* Активная зона: её кольцо и заливка ярче, остальное приглушено. Зону выбирает main.js → geo
   (наведение/касание на карточку или тег, а без взаимодействия — по очереди). */
.geo__map:not([data-zone=""]) .geo__ring,
.geo__map:not([data-zone=""]) .geo__roads,
.geo__map:not([data-zone=""]) .geo__dots { opacity: .4; }
.geo__map[data-zone="mkad"] .geo__ring--mkad,
.geo__map[data-zone="oblast"] .geo__ring--oblast,
.geo__map[data-zone="regions"] .geo__ring--regions,
.geo__map[data-zone="regions"] .geo__roads,
.geo__map[data-zone="regions"] .geo__dots { opacity: 1; }
.geo__map[data-zone="mkad"] .geo__ring--mkad { stroke-width: 4; }
.geo__map[data-zone="oblast"] .geo__ring--oblast { stroke-width: 3.2; }
.geo__map[data-zone="regions"] .geo__ring--regions { stroke-width: 3; }
.geo__map[data-zone="mkad"] .geo__fill--mkad { fill-opacity: .24; }
.geo__map[data-zone="oblast"] .geo__fill--oblast { fill-opacity: .15; }
.geo__map[data-zone="regions"] .geo__fill--regions { fill-opacity: .16; }
.geo__map[data-zone="regions"] .geo__city { color: var(--ink); }
.geo__map[data-zone="mkad"] .geo__tag[data-zone="mkad"],
.geo__map[data-zone="oblast"] .geo__tag[data-zone="oblast"] { background: var(--primary); color: #fff; }
.geo__map[data-zone="regions"] .geo__tag[data-zone="regions"] { background: var(--accent); color: #fff; }

.zone.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23, 81, 140, .1); }
.zone[data-zone="regions"].is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 112, 26, .12); }

/* --- Неделя из жизни фургона --------------------------------------------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 40px; }
.day { border-radius: var(--r-card); padding: 18px 16px; min-height: 300px; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.day--peak { background: var(--deep); border-color: var(--deep); color: #fff; }
.day--rest { background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }
.day__top { display: flex; justify-content: space-between; align-items: baseline; }
.day__top b { font-family: var(--font-d); font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.day__top span { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.day hr { height: 1px; border: 0; background: currentColor; opacity: .15; margin: 12px 0 14px; width: 100%; }
.day__km { font-family: var(--font-d); font-weight: 800; font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day__km + span { font-size: 12px; opacity: .7; }
.day__what { font-size: 14px; line-height: 1.45; margin-top: 16px; }
.day__tag { margin-top: auto; padding-top: 16px; font-size: 12px; opacity: .75; }
.day__bar { height: 4px; border-radius: 2px; background: currentColor; opacity: .35; margin-top: 10px; }
.week__foot { display: flex; flex-wrap: wrap; gap: 44px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line-2); align-items: center; }
.week__foot .btn { margin-left: auto; }
.week__stat b { display: block; font-family: var(--font-d); font-weight: 800; font-size: 32px; color: var(--ink); font-variant-numeric: tabular-nums; }
.week__stat span { font-size: 13px; color: var(--muted); }

/* --- Почему -------------------------------------------------------------- */
.why { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.why__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 24px; transition: border-color .15s; }
.faq details[open] { border-color: var(--primary); }
.faq summary { font-family: var(--font-d); font-weight: 700; font-size: 17px; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--primary); line-height: 1; flex: 0 0 auto; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* --- Форма --------------------------------------------------------------- */
.order { background: var(--deep); color: #fff; }
.order__in { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
.order h2 { color: #fff; }
.order__lead { font-size: 17px; line-height: 1.6; color: var(--on-dark); margin-top: 12px; }
.form { margin-top: 26px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: span 2; }
.field > label { font-size: 13px; color: var(--on-dark); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  height: 52px; padding: 0 16px;
  border-radius: var(--r-ctl); border: 1px solid var(--line-dark);
  background: var(--field-dark); color: #fff; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.field textarea { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--on-dark-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--line-dark); }
.field.is-error input, .field.is-error textarea { border-color: var(--error); }
.field__error { font-size: 13px; color: #F2A899; }
.field.is-error .field__error::before { content: attr(data-msg); }
.check { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; font-size: 13.5px; line-height: 1.55; color: var(--on-dark-2); }
.check input { margin: 2px 0 0; width: 20px; height: 20px; accent-color: var(--primary); flex: 0 0 20px; }
.check a { color: var(--on-dark); text-decoration: underline; }
.form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 24px; }
.form__hint { font-size: 13.5px; color: var(--on-dark-2); max-width: 260px; line-height: 1.5; }

.contacts { background: var(--field-dark); border: 1px solid var(--line-dark); border-radius: var(--r-card-lg); padding: 32px 30px; }
.contacts h3 { color: #fff; font-size: 19px; }
.contacts > p { font-size: 14.5px; line-height: 1.6; color: var(--on-dark-2); margin: 8px 0 16px; }
.contacts__row { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-radius: 11px; border: 1px solid var(--line-dark); margin-bottom: 10px; transition: background .15s; }
.contacts__row:hover { background: rgba(255, 255, 255, .04); text-decoration: none; }
.contacts__row--primary { background: var(--primary); border-color: var(--primary); }
.contacts__row--primary:hover { background: var(--primary-h); }
.contacts__row b { display: block; font-family: var(--font-d); font-weight: 700; font-size: 15px; color: #fff; }
.contacts__row span { font-size: 12.5px; color: var(--on-dark-2); }
.contacts__row--primary b { font-size: 16px; font-variant-numeric: tabular-nums; }
.contacts__row--primary span { color: var(--on-dark); }

/* --- Футер --------------------------------------------------------------- */
.footer { background: var(--deep-2); color: var(--on-dark); padding: 56px 0 40px; }
.footer__top { display: grid; grid-template-columns: 1.1fr .8fr 1.4fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark-2); }
.footer p { font-size: 14.5px; line-height: 1.6; color: var(--on-dark-2); }
.footer__tel { display: block; font-family: var(--font-d); font-weight: 800; font-size: 18px; color: #fff; margin-top: 16px; font-variant-numeric: tabular-nums; }
.footer__col h4 { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer__col a { display: block; font-size: 14.5px; color: var(--on-dark); margin-bottom: 11px; }
.footer__col a:hover { color: #fff; }
.req { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: 13.5px; line-height: 1.5; }
.req div { display: flex; flex-direction: column; }
.req .wide { grid-column: span 2; }
.req dt { color: var(--muted); }
.req dd { margin: 0; color: var(--line); font-variant-numeric: tabular-nums; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; font-size: 13px; color: var(--muted); }
.footer__bottom a { color: var(--on-dark-2); }

/* --- Липкая мобильная панель --------------------------------------------- */
.sticky-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom));
  gap: 10px;
}
.sticky-bar .btn { flex: 1; height: 52px; font-size: 16px; padding: 0 12px; }

/* --- Страницы «Спасибо», «Политика», 404 --------------------------------- */
.thanks { background: var(--deep); color: #fff; min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 64px 0; }
.thanks__deco { position: absolute; right: -80px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.thanks__in { position: relative; max-width: 760px; }
.thanks h1 { font-weight: 800; font-size: 58px; line-height: 1.02; letter-spacing: -.025em; color: #fff; margin: 20px 0 0; }
.thanks p { font-size: 18px; line-height: 1.55; color: var(--on-dark); margin-top: 20px; }
.badge-ok {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px;
  border-radius: var(--r-chip); background: var(--field-dark); border: 1px solid var(--line-dark);
  color: var(--on-dark); font-size: 13px;
}
.ticket { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ticket div { background: var(--field-dark); border: 1px solid var(--line-dark); border-radius: var(--r-card); padding: 16px 20px; }
.ticket span { font-size: 13px; color: var(--on-dark-2); }
.ticket b { display: block; font-family: var(--font-d); font-weight: 800; font-size: 26px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.thanks__foot { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 34px; font-size: 14px; color: var(--on-dark-2); }
.thanks__foot b { color: #fff; font-family: var(--font-d); font-weight: 700; }

.doc { max-width: 700px; margin: 0 auto; padding: 64px 24px 80px; }
.doc h1 { font-weight: 800; font-size: 38px; line-height: 1.08; letter-spacing: -.025em; margin: 10px 0 0; }
.doc__meta { font-size: 14px; color: var(--muted); }
.doc__body { display: flex; flex-direction: column; gap: 22px; margin-top: 34px; }
.doc__body h2 { font-family: var(--font-d); font-weight: 700; font-size: 19px; letter-spacing: -.015em; }
.doc__body p { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin-top: 8px; }
.doc__foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-2); display: flex; gap: 20px; font-size: 15px; }

.e404 { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 70px 24px; max-width: 700px; margin: 0 auto; }
.e404__num { font-family: var(--font-d); font-weight: 800; font-size: 150px; line-height: .9; letter-spacing: -.03em; color: var(--tint); font-variant-numeric: tabular-nums; }
.e404 h1 { font-weight: 800; font-size: 38px; line-height: 1.06; letter-spacing: -.025em; margin: 18px 0 0; }
.e404 p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin-top: 14px; max-width: 460px; }
.e404__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; font-size: 15px; }

/* --- Анимации из макета -------------------------------------------------- */
@keyframes sfDash { to { stroke-dashoffset: -600; } }
@keyframes sfDraw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes sfDrive { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes sfRoll { from { offset-distance: 2%; } to { offset-distance: 102%; } }
@keyframes sfSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes sfSpinBack { from { transform: rotate(360deg); } to { transform: rotate(0); } }
@keyframes sfPulse { 0% { transform: scale(.62); opacity: .55; } 100% { transform: scale(1.06); opacity: 0; } }
@keyframes sfTrip { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 86% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes sfRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes sfRiseX { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes sfKen { 0% { transform: scale(1.06); } 100% { transform: scale(1.16) translate(-2%, -2%); } }
@keyframes sfBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.anim-dash { animation: sfDash 9s linear infinite; }
.anim-spin { transform-origin: center; animation: sfSpin 90s linear infinite; }
.anim-spin-back { transform-origin: center; animation: sfSpinBack 120s linear infinite; }
.anim-pulse { transform-origin: center; animation: sfPulse 4.5s ease-out infinite; }
.anim-roll { animation: sfRoll 11s linear infinite; }
/* Фургон выезжает к городу и гаснет; без анимации (reduced motion) его не видно. */
.anim-trip { opacity: 0; animation: sfTrip 9s linear infinite; }
.anim-drive { animation: sfDrive 9s linear infinite; }
.anim-ken { animation: sfKen 18s ease-in-out infinite alternate; }
.anim-draw { stroke-dasharray: 40; animation: sfDraw .9s ease-out both; }
.day__bar { transform-origin: left; animation: sfBar .9s cubic-bezier(.2, .8, .2, 1) both; }
.rise { animation: sfRise .6s ease both; }
.rise-x { animation: sfRiseX .45s cubic-bezier(.2, .8, .2, 1) both; }

/* --- Адаптив ------------------------------------------------------------- */
@media (max-width: 1360px) {
  :root { --gutter: 64px; }
}

@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .hero__in { grid-template-columns: 1fr 380px; gap: 40px; }
  .hero h1 { font-size: 50px; }
  .h2 { font-size: 36px; }
  .geo, .why, .order__in, .fleet { grid-template-columns: 1fr; gap: 40px; }
  .why__cards, .grid--4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .day { min-height: 260px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --gutter: 24px; --header-h: 60px; }
  .nav, .header__tel { display: none; }
  .burger { display: flex; }
  .header__side .btn { display: none; }
  .hero__in { grid-template-columns: 1fr; padding: 40px 0 48px; }
  .hero h1 { font-size: 36px; }
  .hero__lead { font-size: 16px; }
  .hero__media { grid-template-rows: 200px 110px; }
  .hero__facts { gap: 22px; }
  .section { padding: 56px 0; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .h2, .tariffs__head h2 { font-size: 30px; }
  .grid--3, .grid--2, .grid--4, .steps, .why__cards, .faq, .take { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tariffs__row { grid-template-columns: 1fr auto; row-gap: 0; }
  .tariffs__row--head { display: none; }
  .tariffs__row > * { padding: 14px 16px; }
  .tariffs__note { grid-column: 1 / -1; padding-top: 0; font-size: 13.5px; }
  .tariffs__foot .btn, .week__foot .btn { margin-left: 0; width: 100%; }
  .form__grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: span 1; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .sticky-bar { display: flex; }
  body { padding-bottom: 76px; }
  .thanks h1 { font-size: 34px; }
  .thanks__deco { display: none; }
  .e404__num { font-size: 96px; }
  .doc h1 { font-size: 28px; }
  .calc { padding: 20px; }
}

@media (max-width: 520px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .hero__cta .btn, .thanks .btn { width: 100%; }
  .calc__pair { grid-template-columns: 1fr; }
  .calc__dirs { grid-template-columns: 1fr; }
  .ticket div { flex: 1 1 100%; }
}

/* --- Motion-петли (assets/js/motion.js, исходники в ../motion) ------------ */
/* Петля — белое (multiply) или чёрное (screen) видео, поэтому прямоугольника не видно.
   Это работает, только пока видео «видит» страницу под собой: у предков НЕ должно быть
   stacking context (z-index на позиционированном, transform, filter, opacity < 1,
   isolation, will-change, sticky/fixed). Режим смешивания, маска и позиционирование
   ставятся на сам .motion, а не на обёртку. */
.motion { position: absolute; pointer-events: none; user-select: none; }
.motion img, .motion video { display: block; width: 100%; height: 100%; object-fit: cover; }
.motion video { position: absolute; inset: 0; }
.motion.is-playing img { visibility: hidden; }
.motion--screen { mix-blend-mode: screen; }
.motion--multiply { mix-blend-mode: multiply; }

/* Герой: петля лежит под текстом и фото. Позиционированные блоки без z-index рисуются
   в порядке DOM, поэтому .hero__in (идёт позже) оказывается сверху без stacking context. */
.hero { position: relative; }
.hero__in { position: relative; }
.motion--hero {
  top: 0; right: 0; bottom: 0; width: min(100%, 1280px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40%);
}

/* «Как проходит заказ»: полоса с дорогой над четырьмя карточками. Станции в видео стоят
   над центрами колонок, поэтому показываем её только при четырёх колонках. */
.route-strip { position: relative; aspect-ratio: 1600 / 260; margin: -14px 0 0; }
.motion--route { inset: 0; }

@media (max-width: 1100px) { .route-strip { display: none; } }
@media (max-width: 860px) { .motion--hero { display: none; } }
@media (max-width: 520px) { .geo__city { font-size: 12px; padding: 1px 4px; } .geo__tag { font-size: 12px; padding: 4px 9px; } .geo__hub { font-size: 15px; } }

/* --- Печать и «меньше движения» ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .header, .sticky-bar, .mmenu, .marquee, .order, .hero__media, .motion, .route-strip { display: none !important; }
  body { padding: 0; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}
