/* ALTI Service. Стиль макета design/mockup.html в палитре v3 «Кремовый и ржавый» (R83), один шрифт Rubik (R72, R80), mobile-first (SPEC, раздел 7). */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../assets/fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../assets/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../assets/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Палитра v3 «Кремовый и ржавый» (R83, по цветам логотипа): кремовые фоны, ржавый акцент, тёмный футер */
  --white: #FEF9F3;        /* основной фон, шапка, карточки — кремовый */
  --hero-rgb: 254, 249, 243; /* тот же кремовый для полупрозрачных градиентов первого экрана */
  --peach: #F6EADB;        /* чередующиеся блоки */
  --peach-deep: #F0DCC4;   /* панель «Говорим как есть» */
  --peach-line: #E7D5BF;   /* линии и рамки */
  --ink: #101414;          /* основной текст */
  --ink-soft: #4A4540;     /* второстепенный текст */
  /* Футер */
  --night: #101414;
  --cream: #FEF9F3;        /* текст в футере */
  --sand: #B8AFA4;         /* приглушённый текст в футере */
  --line-dark: #2E3030;    /* линии в футере */
  --orange: #A8571A;       /* кнопки, акценты, круг WhatsApp */
  --orange-hover: #94491A;
  --orange-ink: #FFFFFF;   /* текст и значок на оранжевом */
  --sage: #6F8C72;

  --font-text: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --section-y: 48px;
  --header-h: 56px;
  --radius: 2px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.dark :focus-visible { outline-color: var(--orange); }

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  /* iPhone в альбомной ориентации (viewport-fit=cover): текст не заходит под вырез экрана */
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Секции: белые и персиковые по очереди; тёмный только футер */
.section {
  padding: var(--section-y) 0;
  scroll-margin-top: var(--header-h);
}
.white { background: var(--white); color: var(--ink); }
.peach { background: var(--peach); color: var(--ink); }
.dark { background: var(--night); color: var(--cream); }

/* Заголовки (R72, R80): Rubik обычным регистром, иерархия весом и размером */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-text);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(24px, 6.6vw, 30px); font-weight: 700; line-height: 1.15; }
h2 { font-size: 26px; font-weight: 650; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }

p { margin: 0 0 12px; }

/* Текстовая ссылка внутри заголовка или абзаца (R67): обычная ссылка, не кнопка */
.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Зона нажатия ссылок связи и маршрута на телефоне — не меньше 44 px по высоте (задача 12).
   Внутристрочный отступ расширяет только зону нажатия, строки и вид не сдвигаются. */
.tap { padding-block: var(--tap-pad, 13px); }
h2 .tap { --tap-pad: 7px; }
/* Заголовок со ссылками: строки разведены, чтобы зоны нажатия «WhatsApp» и «Telegram» не перекрывались */
#write h2 { line-height: 1.75; }
.footer-contacts .tap { --tap-pad: 14px; }

.lead { font-size: 16px; line-height: 1.6; max-width: 60ch; }
.lead { color: var(--ink-soft); }
.muted { color: var(--sand); }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }

/* Кнопки */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-accent { background: var(--orange); color: var(--orange-ink); }
.btn-accent:hover { background: var(--orange-hover); }
/* Вторичная кнопка — тёмный контур */
.btn-line { border: 1px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }

/* Шапка */
/* Закреплена на всех ширинах (R65, R78): в потоке, контент не перекрывает; тень после начала прокрутки */
.site-header {
  position: -webkit-sticky;   /* старые iPhone */
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--peach-line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(16, 20, 20, .09); }
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}
/* Знак не выше надписи: высота — одна строка текста */
.brand-mark { width: auto; height: 1.25em; flex: none; }
.header-cta { display: none; }
.site-nav a {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.nav-phone { display: none; }
.header-phone { display: none; }

/* Телефон (R78, R79): иконки «Позвонить» и «Написать в WhatsApp» перед бургером, 44×44, зазор 8 px.
   Только на сенсорных экранах: на компьютере (даже в узком окне) иконок в шапке нет. */
.header-icons { display: none; gap: 8px; margin-left: auto; }
@media (max-width: 899px) and (hover: none) and (pointer: coarse) {
  .header-icons { display: flex; }
  /* Иконки вплотную к бургеру: зоны нажатия 44×44 с зазором 8 px, значки сдвинуты внутри зон друг к другу */
  .header-row { gap: 8px; }
  .js .header-row .menu-toggle { margin-left: 0; margin-right: -16px; padding: 0 16px 0 4px; }
  .header-icons .icon-call { justify-content: flex-end; padding-right: 4px; }
}
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
}
.icon-link .icon { display: block; }
/* WhatsApp (R83, палитра v3): белый знак на ржавом круге 36 px (5,2:1); зона нажатия 44 px */
.icon-wa { padding: 4px; background: var(--orange); background-clip: content-box; color: var(--orange-ink); }

/* Телефон без JS: меню — обычный ряд ссылок под названием */
.no-js .header-row { flex-wrap: wrap; padding: 8px var(--gutter); }
.no-js .site-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; width: 100%; }
.menu-toggle { display: none; }

/* Телефон с JS: бургер и меню поверх страницы */
.js .menu-toggle {
  display: grid;
  align-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: -10px;
  padding: 0 10px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.js .site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  padding: 16px var(--gutter) 32px;
  padding: 16px max(var(--gutter), env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: var(--white);
  border-top: 1px solid var(--peach-line);
  overflow-y: auto;
}
.js .site-nav.is-open { display: flex; }
.js .site-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--peach-line);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
/* Номер в мобильном меню — ссылка для звонка (R68), выглядит как строка с номером */
.js .site-nav .nav-phone {
  display: block;
  margin: 12px 0 0;
  padding: 12px 0;
  border: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
/* Прокрутку под открытым меню запрещаем только у html: overflow: hidden у body делает его контейнером прокрутки,
   и закреплённая шапка (с кнопкой закрытия меню) уезжает вверх, если меню открыли посреди страницы */
.menu-open { overflow: hidden; }

/* Первый экран. Телефон: картинка-полоса 16:10 от края до края над заголовком, низ тает в кремовый
   (маска от 60% до прозрачного); кнопки при этом остаются в первом экране 360×740 (тест H1). */
.hero { position: relative; isolation: isolate; padding: 0 0 32px; }
.hero-media { display: block; }
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 45% 50%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.hero-body { position: relative; }
.hero h1 { margin-bottom: 14px; }
.hero .lead { margin-bottom: 14px; }
/* Оранжевый на белом не проходит AA как цвет текста: цена тёмная, оранжевый — метка */
.hero-price {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.hero-price::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: var(--orange);
  border-radius: 50%;
  vertical-align: 1px;
}
.hero .actions { margin-top: 18px; }
.actions .btn { flex: 1 1 140px; }
.hero-trust {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.only-desktop, .only-desktop-block { display: none; }

/* Услуги (раздел «Блок услуг со слайдером»): заголовок, слайдер с фото мастерской, три услуги списком.
   Телефон: заголовок → слайдер 4:3 → услуги. Десктоп — сетка ниже, в @media (min-width: 900px). */
.services-list { margin-top: 8px; }
.service { padding: 18px 0; }
.service + .service { border-top: 1px solid var(--peach-line); }
.service:last-child { padding-bottom: 0; }
.service h3 { margin-bottom: 8px; }
.service p { margin: 0 0 6px; }
.service p:last-child { margin-bottom: 0; }

/* Слайдер. Слайды лежат стопкой и сменяются затуханием 500 мс (при reduced-motion — без анимации,
   общее правило внизу файла). Размер задаёт рамка: на телефоне 4:3, на десктопе — высота текстового
   столбца. Поэтому смена фото и загрузка не сдвигают вёрстку. Без JS кадры 2–5 скрыты атрибутом hidden. */
.slider { position: relative; margin-bottom: 8px; }
.slider:focus-visible { outline-offset: 4px; }
.slider-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  touch-action: pan-y;   /* вертикальная прокрутка — браузеру, горизонтальный свайп — слайдеру */
}
.slider-track { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.slide.is-current {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease, visibility 0s;
}
/* Дальние слайды не рисуются: их фото не грузятся, пока до них не дойдёт очередь */
.slide.is-far { display: none; }
.slide img,
.approach-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
}
/* Низ фото растворяется в фон блока: от 70% высоты до прозрачного. Только маска, без размытия.
   У слайдера маска на слайде целиком, стрелки и точки лежат рядом и под неё не попадают. */
.slide,
.approach-media {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}
/* Главное в кадре: плата, лазер, манипула, бар (подобрано по каждому фото) */
.slide-01 img { object-position: 12% 55%; }
.slide-03 img { object-position: 40% 50%; }
.slide-04 img { object-position: 70% 55%; }
.slide-05 img { object-position: 50% 40%; }
.slide-06 img { object-position: 45% 55%; }

/* Стрелки по бокам, по вертикальному центру. Кнопка 44×44 (зона нажатия), круг внутри.
   С мышью — скрыты и плавно появляются при наведении на рамку или фокусе с клавиатуры;
   на сенсорных экранах видны всегда, круг меньше и прозрачнее. */
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: opacity .2s ease;
}
.slider-arrow::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--hero-rgb), .72);   /* кремовый полупрозрачный; значок --ink, контраст ≥ 3:1 на любом фото */
  transition: background-color .15s ease;
}
.slider-arrow svg { position: relative; width: 20px; height: 20px; }
.slider-prev { left: 6px; }
.slider-next { right: 6px; }
.slider-arrow[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .slider-arrow { opacity: 0; }
  .slider-arrow::before { width: 44px; height: 44px; background: rgba(var(--hero-rgb), .86); }
  .slider-arrow svg { width: 22px; height: 22px; }
  .slider-prev { left: 12px; }
  .slider-next { right: 12px; }
  .slider-viewport:hover .slider-arrow,
  .slider:focus-visible .slider-arrow,
  .slider:has(:focus-visible) .slider-arrow { opacity: 1; }
  .slider-arrow:hover::before { background: var(--white); }
}

/* Точки — внизу поверх растворённой части фото */
.slider-dots {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 2px;
  display: flex;
  justify-content: center;
}
.slider-dots[hidden] { display: none; }
.slider-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.slider-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--ink);
  transition: width .2s ease, background-color .2s ease;
}
/* Активная точка — ржавая и длиннее: отличается не только цветом */
.slider-dot[aria-current="true"]::before { width: 20px; background: var(--orange); }

.price { color: var(--ink); }
.price strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* Говорим как есть: фото 02 с подписью и отзывы (раздел «Говорим как есть: отзывы») */
.approach-figure { margin: 24px 0 0; }
.approach-media { aspect-ratio: 4 / 3; height: auto; object-position: 45% 60%; }
.approach-figure figcaption {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.reviews { margin-top: 32px; }
.reviews h3 { margin-bottom: 14px; }
/* Телефон: карточки в горизонтальной прокрутке со snap, следующая выглядывает; без JS и стрелок */
.reviews-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter));
  padding: 2px var(--gutter) 10px;
  scroll-padding: 0 var(--gutter);
}
.reviews-list:focus-visible { outline-offset: -2px; }
.review {
  flex: 0 0 min(85vw, 420px);   /* ~85% ширины экрана, следующая карточка выглядывает */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--peach-line);
  border-radius: 6px;
}
.review p { margin: 0; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--orange-ink);
  font-weight: 600;
  font-size: 17px;
}
.review-name { font-weight: 600; line-height: 1.3; }
.review-date { display: block; font-size: 13px; color: var(--ink-soft); }
.review-stars { display: flex; gap: 2px; color: var(--orange); }
.review-text { font-size: 15px; line-height: 1.55; }
.review-source { margin-top: auto !important; font-size: 13px; color: var(--ink-soft); }
.reviews-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 500;
  text-underline-offset: 3px;
}
.reviews-more:hover { color: var(--orange-hover); }

.points {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding-left: 14px;
  border-left: 2px solid var(--orange);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.points strong { color: var(--ink); font-weight: 600; }

/* Говорим как есть — главный блок (R55): насыщенная персиковая панель на белом */
.approach {
  padding-top: 28px;
  padding-bottom: 28px;
  background: var(--peach-deep);
}
.approach-quote {
  margin: 18px 0 18px;
  padding-left: 16px;
  border-left: 3px solid var(--orange);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

/* Как мы работаем: настоящая последовательность, поэтому номера */
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 8px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-soft);
}
.steps h3 { font-size: 17px; }
.steps p { margin: 2px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }

/* Регионы */
.two-col { display: grid; gap: 20px; }
.two-col h3 { margin-bottom: 8px; }
.two-col p { margin: 0; color: var(--ink-soft); }

/* Частые вопросы */
.faq-list { border-top: 1px solid var(--peach-line); }
.faq-item { border-bottom: 1px solid var(--peach-line); }
.faq-item h3 { font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.faq-item button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 14px 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.js .faq-item button::after {
  content: "+";
  flex: none;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);   /* на кремовом фоне; --orange-ink теперь белый */
  transition: transform .2s ease;
}
.js .faq-item button[aria-expanded="true"]::after { transform: rotate(45deg); }
.no-js .faq-item button { cursor: default; }
.faq-a { padding: 0 0 16px; color: var(--ink-soft); }
.faq-a p { margin: 0; }
.faq-a a { color: var(--ink); }

/* Где мы находимся */
.facts { display: grid; gap: 4px 16px; margin: 0; }
.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin: 0 0 10px; }
.facts a { text-decoration: none; }
.route-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 8px; }
.route-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--ink); }
.map-slot {
  position: relative;
  min-height: 320px;   /* телефон: не меньше 280 px; 320 — чтобы карточка фирмы 2ГИС с кнопками помещалась целиком */
  margin-top: 24px;
  background: var(--peach);
  border: 1px solid var(--peach-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Фокус на карте при навигации клавиатурой (задача 14): рамка внутри, чтобы не обрезалась */
.map-slot iframe:focus, .map-slot:focus-within iframe, .map-slot.has-focus iframe { outline: 2px solid var(--ink); outline-offset: -2px; }
.map-slot.is-loaded .map-fallback { display: none; }
/* Телефон: вместо живой карты плашка со ссылками на 2ГИС (R110); живая карта — только на десктопе */
.map-slot { display: none; }
.map-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 320px;   /* размер прежней заглушки карты на телефоне */
  margin-top: 24px;
  padding: 24px 20px;
  background: var(--peach);
  border: 1px solid var(--peach-line);
  border-radius: 6px;
}
.map-card-pin { color: var(--orange); margin-bottom: 4px; }
.map-card p { margin: 0; }
.map-card-address { font-size: 17px; font-weight: 600; line-height: 1.35; }
.map-card-note { font-size: 15px; color: var(--ink-soft); }
.map-card-actions { display: grid; gap: 10px; margin-top: 18px; }
.map-card-actions .btn { width: 100%; }
.map-fallback {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 8px 12px;
  background: var(--night);
  color: var(--cream);
  font-size: 14px;
  border-radius: var(--radius);
}

/* Подвал: контакты */
.footer-contacts { display: grid; gap: 22px;   /* зоны нажатия 44 px не перекрываются (задача 12) */
  margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--sand); }
.footer-contacts a { color: var(--cream); }

/* Подвал */
.site-footer { padding: 40px 0 32px; padding-bottom: max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; gap: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--sand); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--cream); }
.copyright { font-size: 13px; margin: 0; }

/* Десктоп */
@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --section-y: 96px;
    --header-h: 56px;   /* закреплённая шапка (R65) */
  }
  .only-desktop { display: inline; }
  .only-desktop-block { display: block; }
  .only-mobile, .only-mobile-block { display: none; }

  .header-row { gap: 24px; }
  .header-icons { display: none; }
  .header-cta .btn { min-height: 44px; }

  /* Первый экран («Первый экран: дуотон», заменяет R62/R66): картинка от 30% ширины до правого края
     на всю высоту блока, cover, 45% 50% (руки с паяльником и плата). Поверх — кремовая вуаль слева направо
     и снизу; проценты градиентов — от ширины и высоты картинки. Маска телефона здесь снята. */
  .hero-media {
    position: absolute;
    z-index: -2;
    top: 0;
    bottom: 0;
    left: 30%;
    right: 0;
  }
  .hero-media img {
    height: 100%;
    aspect-ratio: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 30%;
    right: 0;
    background:
      linear-gradient(to bottom, rgba(var(--hero-rgb), 0) 65%, var(--white) 100%),
      linear-gradient(90deg, var(--white) 0%, rgba(var(--hero-rgb), .85) 20%, rgba(var(--hero-rgb), .3) 45%, rgba(var(--hero-rgb), 0) 60%);
  }

  /* Услуги: слева текст (~45%), справа слайдер (~55%), верх слайдера — на уровне заголовка */
  .services {
    display: grid;
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    grid-template-rows: auto 1fr;
    column-gap: 64px;
  }
  .services > h2 { grid-column: 1; grid-row: 1; }
  .services-list { grid-column: 1; grid-row: 2; margin-top: 0; }
  /* Рамка во всю высоту текстового столбца (≈4:5), верх — на уровне заголовка */
  .slider { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; margin-bottom: 0; }
  .slider-viewport { aspect-ratio: auto; height: 100%; min-height: 480px; }
  .service { padding: 22px 0; }
  .service:first-child { padding-top: 4px; }
  .service h3 { margin-bottom: 10px; }

  .approach {
    padding: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "text figure" "reviews reviews";
    gap: 56px;
    align-items: center;
  }
  .approach-text { grid-area: text; }
  .approach-figure { grid-area: figure; margin: 0; }
  .reviews { grid-area: reviews; margin-top: 0; padding-top: 40px; border-top: 1px solid var(--peach-line); }
  .reviews h3 { font-size: 24px; margin-bottom: 20px; }
  .reviews-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .review { padding: 24px; }
  .review-text { font-size: 16px; }
  .points { grid-template-columns: 1fr 1fr; gap: 20px 28px; margin-top: 32px; }

  .steps { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .steps li { grid-template-columns: 1fr; row-gap: 10px; align-content: start; }
  .steps li::before { grid-row: auto; font-size: 26px; font-weight: 650; }
  .steps h3 { font-size: 18px; }

  h2 { font-size: 36px; margin-bottom: 28px; }
  h3 { font-size: 19px; }
  .approach-section h2 { font-size: 44px; }
  .approach-quote { font-size: 24px; margin: 26px 0; padding-left: 22px; }

  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
  .faq-item h3 { font-size: 17px; }

  .contacts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: stretch; }
  .map-slot { display: block; margin-top: 0; min-height: 420px; }
  .map-card { display: none; }


  .site-nav,
  .js .site-nav,
  .no-js .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 28px;
    width: auto;
    margin-left: auto;
    padding: 0;
    background: none;
    border: 0;
    overflow: visible;
  }
  .js .site-nav a,
  .no-js .site-nav a {
    padding: 0;
    border: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-soft);
  }
  .js .site-nav a:hover { color: var(--ink); }
  .js .site-nav .nav-phone { display: none; }
  .js .menu-toggle { display: none; }
  .no-js .header-row { flex-wrap: nowrap; padding: 0 var(--gutter); }
  .header-cta { display: flex; align-items: center; gap: 12px; }
  /* Номер текстом перед «Написать в WhatsApp» (R73, R79: без иконки), виден на всех десктопных ширинах */
  .header-phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--ink);
  }
  .header-phone:hover { text-decoration: underline; }
  .brand { font-size: 17px; }

  .hero { padding: 72px 0 96px; }
  /* Текстовый столбец первого экрана — до 600 px. Подзаголовок уже — 560 px: при 600 px его строки
     ложатся на тёмную плату на фото и контраст падает ниже AA (1366 px — 3,33:1); при 560 — не ниже 5,46:1.
     560, а не 540: при 540 запасной шрифт (DejaVu) переносит абзац в 4 строки вместо 3, и после загрузки
     Rubik текст прыгает (сдвиг вёрстки); при 560 и Rubik, и DejaVu, и Arial дают 3 строки */
  .hero-body > * { max-width: 600px; }
  .hero .lead { max-width: 560px; }
  /* Не больше 44 px: при 46 px в столбце 600 px запасной шрифт переносит «оборудования в Астане» на лишнюю строку,
     и после загрузки Rubik текст первого экрана прыгает вверх (сдвиг вёрстки) */
  .hero h1 { font-size: clamp(34px, 3.2vw, 44px); line-height: 1.12; }
  .lead { font-size: 17px; }
  .hero-price { font-size: 19px; }
  .actions .btn { flex: 0 0 auto; }

  .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; align-items: start; }
  /* Мышью попадают точно: расширенные зоны нажатия и большие зазоры — только на телефоне */
  .tap { padding-block: 0; }
  #write h2 { line-height: 1.2; }
  .footer-contacts { gap: 6px; }
  .copyright { grid-column: 1 / -1; }
}

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

/* Узкий десктоп: номер, меню и WhatsApp в одну строку — меньше отступы, пункты не убираются (R73) */
@media (min-width: 900px) and (max-width: 1199px) {
  /* Первый экран: текстовый столбец 600 px заходит на картинку до 59% её ширины, и при вуали из задания
     вступление не проходит AA (900 px — 1,75:1, 1024 — 3,13:1). Только здесь вуаль держится 0,85 до 50%
     (вместо 0,3 на 45%) и гаснет к 70% (вместо 60%). Минимум после правки — 6,5:1. */
  .hero::after {
    background:
      linear-gradient(to bottom, rgba(var(--hero-rgb), 0) 65%, var(--white) 100%),
      linear-gradient(90deg, var(--white) 0%, rgba(var(--hero-rgb), .85) 20%, rgba(var(--hero-rgb), .85) 50%, rgba(var(--hero-rgb), 0) 70%);
  }
  :root { --gutter: 24px; }
  .header-row { gap: 16px; }
  .site-nav, .js .site-nav, .no-js .site-nav { gap: 18px; }
  .header-cta { gap: 12px; }
  .header-cta .btn { padding: 0 14px; letter-spacing: 0.08em; }
  .brand { letter-spacing: 0.05em; }
}
