/* 9g — главная в минималистичной подаче. Значения взяты из макета
   «Минимализм · главная целиком»: белый фон, чёрный текст, серый #6E6E6E,
   линии #E6E6E6, крупная типографика на clamp(). Шапка, меню, модальное
   окно и кнопка поиска общие с сайтом (style.css), здесь только их
   переопределения для этой страницы. */

.home-min { background: var(--c-bg); color: var(--c-ink);
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.home-min a:hover { color: var(--c-hover); }

/* ---------- Прокрутка ---------- */
/* Якоря встают под закреплённую шапку; общий scroll-margin-top не нужен */

/* ---------- Разделы ---------- */
/* «Проекты» ровно в экран: сетка забирает остаток высоты, ряды, которые не
   помещаются целиком, скрыты (высоту по целым рядам выставляет home.js) */
.hm-sec--work { height: calc(100vh - var(--head-compact)); height: calc(100svh - var(--head-compact)); display: flex; flex-direction: column; overflow: hidden; }
.hm-sec--work > .hm-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; width: 100%; }
.hm-sec--work .hm-grid { flex: 0 1 auto; min-height: 0; overflow: hidden; align-content: start; }
.hm-sec--work .hm-more { flex: 0 0 auto; margin-top: clamp(40px, 6vh, 84px); }

/* ---------- Проекты: фильтр и плотная сетка ---------- */
.hm-grid { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22%, 150px), 1fr)); grid-auto-rows: clamp(96px, 9.5vw, 150px); grid-auto-flow: dense; gap: clamp(16px, 1.6vw, 24px) clamp(8px, .8vw, 12px); }
.hm-tile { display: flex; flex-direction: column; min-width: 0; min-height: 0; color: var(--c-ink); }
.hm-tile[hidden] { display: none; }
/* Обложки — чёрно-белые фактуры с Unsplash, у каждой плитки своя. Подложка
   серым градиентом остаётся, если снимок не загрузился. */
.hm-tile__img { display: block; flex: 1 1 auto; min-height: 0; overflow: hidden; background: linear-gradient(135deg, #d9d9d9 0%, #9c9c9c 100%); }
.hm-tile:nth-child(3n) .hm-tile__img { background: linear-gradient(160deg, #e4e4e4 0%, #aaaaaa 100%); }
.hm-tile:nth-child(5n) .hm-tile__img { background: linear-gradient(115deg, #c6c6c6 0%, #7e7e7e 100%); }
.hm-tile__img img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--work-filter); }
.hm-tile__cap { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; font-size: var(--fs-caption); line-height: 1.25; }
.hm-tile__cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-tile__cap span + span { color: var(--c-text-2); }
/* Размер плитки в общей раскладке; в отфильтрованном списке остаются только крупные квадраты */
.hm-grid[data-f="all"] .hm-tile[data-s="b"], .hm-grid:not([data-f="all"]) .hm-tile[data-s="b"] { grid-column: span 2; grid-row: span 2; }
.hm-grid[data-f="all"] .hm-tile[data-s="w"] { grid-column: span 2; }
.hm-grid[data-f="all"] .hm-tile[data-s="t"] { grid-row: span 2; }

/* ---------- Типографская обложка: у проекта нет своего кадра ---------- */
.hm-grid .hm-tile .hm-tile__img.hm-tile__img--type { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; background: var(--c-ink); color: var(--c-bg); }
.hm-fig { font-size: clamp(14px, 1.3vw, 20px); font-weight: var(--fw-heading); letter-spacing: var(--ls-h3); line-height: 1.1; }
.hm-fig__sub { font-size: var(--fs-caption); line-height: 1.25; color: var(--c-soft-on-dark); }

/* ---------- Шар проектов (sphere.js) ---------- */
.hm-sec__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; }
/* Значок 20 px в кнопке 44 px: отступ −12 px ставит его край на правую направляющую */
.hm-modes { display: flex; flex: 0 0 auto; gap: 8px; margin-right: -12px; }
.hm-modes[hidden] { display: none; }
.hm-mode { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.hm-mode img { display: block; width: 20px; height: 20px; opacity: .45; }
.hm-mode[aria-pressed="true"] img, .hm-mode:hover img { opacity: 1; }
/* Заголовок занял всю строку: фильтры слева, значки у правого края */
@media (max-width: 1279px) {
  .hm-sec--work .hm-sec__tools { flex: 1 1 100%; flex-wrap: nowrap; justify-content: space-between; }
}
/* Телефон: фильтры в две строки, значки по верхней */
@media (max-width: 639px) {
  .hm-sec--work .hm-sec__tools { align-items: flex-start; }
}
.hm-sphere { position: relative; display: flex; justify-content: center; align-items: flex-start; flex: 1 1 auto; margin-top: clamp(16px, 2vw, 32px); }
.hm-sphere[hidden] { display: none; }
.hm-sphere canvas { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: block; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
/* Ссылки плиток скрыты визуально, поэтому фокус с клавиатуры показывает сам шар */
.hm-sphere.is-focus canvas { border-radius: 50%; outline: 2px solid var(--c-ink); outline-offset: 3px; }
/* Тень под шаром: локальное решение блока по макету владельца */
.hm-sphere::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(60%, 560px); height: 22px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0,0,0,.14), rgba(0,0,0,0)); pointer-events: none; }
.hm-sphere__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-top: clamp(12px, 1.6vw, 24px); }
.hm-sphere__foot[hidden] { display: none; }
.hm-sphere__t { margin: 0; font-size: var(--fs-label); font-weight: var(--fw-heading); }
.hm-sphere__hint { margin: 6px 0 0; font-size: var(--fs-body); color: var(--c-text-2); }
.hm-sphere__ctrl { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-sphere__btn { min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--c-ink); font: inherit; font-size: var(--fs-label); cursor: pointer; }
.hm-sphere__btn:hover { color: var(--c-hover); }
/* В режиме шара секция занимает экран и растёт, если тесно. Сетка скрыта визуально: ссылки остаются для клавиатуры и поисковиков */
.hm-sec--work.is-sphere { height: auto; overflow: visible; }
.hm-sec--work.is-sphere .hm-grid { position: absolute; width: 1px; height: 1px !important; margin: 0; overflow: hidden; clip-path: inset(50%); }
.hm-sec--work.is-sphere .hm-more { display: none; }

/* ---------- Услуги и маршрут: нумерованные списки ---------- */
.hm-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-h3); letter-spacing: var(--ls-h3); }
.hm-list a { display: flex; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--c-line); color: var(--c-ink); }
.hm-list .hm-n { flex: 0 0 48px; font-size: var(--fs-body); color: var(--c-text-2); letter-spacing: 0; }
.hm-list .hm-t { flex: 1 1 auto; min-width: 0; }
.hm-list .hm-p { font-size: var(--fs-body); letter-spacing: 0; color: var(--c-text-2); white-space: nowrap; }

@media (max-width: 639px) { .hm-list .hm-p { white-space: normal; text-align: right; flex: 0 0 auto; } }

/* ---------- Команда: узкая плашка ----------
   Заголовок слева, портреты справа в один ряд. Карточка размером с малую
   плитку проектов: квадратный портрет и подпись. Высота блока по содержимому,
   без привязки к экрану. На телефоне ряд уходит под заголовок и становится
   каруселью: листается пальцем, прилипает к карточкам, выходит к краям. */
/* Команда: кружки как истории в Instagram. Круг и цветное кольцо — решение владельца, только для этого блока */
.hm-sec--team { min-height: 0; }
.hm-crew { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin: 0; }
.hm-crew__item { display: flex; align-items: center; gap: 16px; max-width: 100%; color: var(--c-ink); text-decoration: none; }
.hm-crew__item { --crew: clamp(88px, 7.6vw, 110px); }
/* Кружок задан точной шириной и высотой. С aspect-ratio и высотой в процентах Safari на телефоне тянул его в овал */
.hm-crew__item picture { position: relative; display: block; flex: 0 0 var(--crew); width: var(--crew); height: var(--crew); min-width: var(--crew); min-height: var(--crew); border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.hm-crew__item img { position: absolute; left: 4px; top: 4px; display: block; box-sizing: border-box; width: calc(var(--crew) - 8px); height: calc(var(--crew) - 8px); max-width: none; object-fit: cover; border: 3px solid var(--c-bg, #fff); border-radius: 50%; filter: grayscale(1); }
.hm-crew__nick { min-width: 0; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.3; letter-spacing: -.01em; }
.hm-crew__item:hover .hm-crew__nick { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hm-crew__item:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 4px; }

/* ---------- База знаний ---------- */
.hm-sec--kb { min-height: 0; }

/* Карта тем. Без JS темы идут списком и раскрыты; на телефоне это дерево, с 1024 px карта с панелью справа */
/* Заголовок блока не виден, но остаётся в структуре страницы для поисковиков и экранных читалок */
#knowledge .hm-h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Конец главной: фраза отвечает первому экрану тем же сдвигом строки, но жирнее. Справа кнопка заявки */
.hm-final { display: flex; align-items: center; justify-content: space-between; gap: clamp(24px, 4vw, 64px); margin: clamp(48px, 7vh, 96px) 0 0; }
.hm-final__t { margin: 0; min-width: 0; font-size: min(7.1vw, 13vh, 118px); font-weight: 700; white-space: nowrap; }
/* На компьютере обе строки от левого края, сдвиг строки остаётся только на телефоне */
@media (min-width: 768px) {
  .hm-final__t .hm-ind { padding-left: 0; text-indent: 0; }
  /* Фраза по центру напротив планеты. Над планетой стоит надпись, поэтому у обоих одинаковый отступ сверху */
  .hm-final { --start-size: clamp(20px, 2.2vw, 32px); --start-gap: 14px; align-items: center; }
  .hm-final__t, .hm-start { margin-top: calc(var(--start-size) + var(--start-gap)); }
}
/* Круг и пульсация — решение владельца, только для этой кнопки. Двигаются transform и opacity */
.hm-start { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: clamp(128px, 15vw, 220px); aspect-ratio: 1 / 1; border-radius: 50%; background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-size: clamp(22px, 2.3vw, 34px); font-weight: 700; letter-spacing: var(--ls-h3); text-decoration: none; }
.hm-start canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: 50%; animation: hm-start-beat 1.8s ease-in-out infinite; }
/* Надпись серая и неподвижна: пульсируют только планета и кольца. Стоит над планетой, выше расходящихся колец */
.hm-start__t { position: absolute; left: 50%; bottom: calc(100% + var(--start-gap)); transform: translateX(-50%); color: var(--c-text-2); font-size: var(--start-size); font-weight: var(--fw-heading); line-height: 1; letter-spacing: var(--ls-h3); white-space: nowrap; }
/* Два кольца расходятся по очереди. В покое их нет: они появляются из прозрачности и не дают контура */
.hm-start::before, .hm-start::after { content: ""; position: absolute; inset: 0; z-index: 0; border: 1.5px solid var(--c-ink); border-radius: 50%; opacity: 0; pointer-events: none; animation: hm-start-ring 1.8s ease-out infinite; }
.hm-start::after { animation-delay: .6s; }
/* Чёрный круг только запасной вариант без WebGL: под планетой он просвечивал бы обводкой */
.hm-start.is-planet { background: none; }
.hm-start:hover canvas, .hm-start:focus-visible canvas, .hm-start:hover::before, .hm-start:hover::after, .hm-start:focus-visible::before, .hm-start:focus-visible::after { animation-play-state: paused; }
.hm-start:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 6px; }
.hm-start.is-off canvas, .hm-start.is-off::before, .hm-start.is-off::after { animation-play-state: paused; }
@keyframes hm-start-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes hm-start-ring { 0% { transform: scale(1); opacity: 0; } 12% { transform: scale(1.03); opacity: .55; } 75%, 100% { transform: scale(1.24); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hm-start canvas { animation: none; } .hm-start::before, .hm-start::after { display: none; } }
@media (max-width: 767px) {
  /* Фраза в две строки на любой ширине, кнопка под ней справа */
  .hm-final { flex-direction: column; align-items: stretch; gap: 24px; }
  /* Две строки на всю ширину: делитель подобран под самую длинную строку «чтобы вас выбирали.» */
  .hm-final__t { font-size: calc((100vw - 2 * var(--pad-x)) / 11.2); }
  html[lang="en"] .hm-final__t { font-size: calc((100vw - 2 * var(--pad-x)) / 10.6); }
  .hm-start { align-self: flex-end; }
  /* На телефоне надпись слева от планеты */
  .hm-start__t { left: auto; right: calc(100% + 20px); top: 50%; bottom: auto; transform: translateY(-50%); font-size: clamp(28px, 9vw, 40px); }
}
.hm-map__plot { position: relative; }
.hm-map__lines { display: none; }
.hm-map__list { position: relative; list-style: none; margin: 0; padding: 0; }
.hm-map__list::before { content: ""; position: absolute; left: 7px; top: 34px; bottom: 34px; width: 1px; background: var(--c-line); }
.hm-map__item { position: relative; padding-left: calc(var(--i) * 20px); }
.hm-map__item:not(:first-child)::before { content: ""; position: absolute; left: 7px; top: 34px; width: calc(var(--i) * 20px); height: 1px; background: var(--c-line); }
.hm-map__h { margin: 0; font: inherit; }
.hm-map__btn { position: relative; display: flex; align-items: center; gap: 18px; width: 100%; min-height: 68px; padding: 8px 0; border: 0; background: none; color: var(--c-text-2); font: inherit; font-size: clamp(22px, 6vw, 28px); letter-spacing: var(--ls-h3); text-align: left; cursor: pointer; }
.hm-map__dot { flex: 0 0 15px; width: 15px; height: 15px; box-sizing: border-box; border: 1.5px solid var(--c-text-2); border-radius: 50%; background: var(--c-bg); }
.hm-map__pm { margin-left: auto; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; }
.hm-map:not(.is-ready) .hm-map__pm { display: none; }
.hm-map__item.is-on .hm-map__btn { color: var(--c-ink); }
.hm-map__item.is-on .hm-map__dot { border-color: var(--c-ink); background: var(--c-ink); }
.hm-map__item.is-on .hm-map__t { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: var(--link-thickness); }
.hm-map__item.is-on .hm-map__pm { background-size: 100% 1.5px, 0 0; }
.hm-map__panel { padding: 0 0 24px 33px; min-height: var(--kb-panel-h, 0); box-sizing: border-box; }
.hm-map__panel[hidden] { display: none; }
.hm-map__head { margin: 0 0 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.hm-map__title { display: none; font-size: var(--fs-h3); font-weight: var(--fw-heading); letter-spacing: var(--ls-h3); }
.hm-map__count { font-size: var(--fs-body); color: var(--c-text-2); }
.hm-map__arts { list-style: none; margin: 0 0 20px; padding: 0; }
.hm-map__arts a { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; min-height: 44px; padding: 14px 0; box-sizing: border-box; border-top: 1px solid var(--c-line); color: var(--c-ink); font-size: clamp(17px, 1.6vw, 24px); line-height: 1.3; letter-spacing: var(--ls-h3); }
.hm-map__arr { flex: 0 0 auto; color: var(--c-text-2); }
.hm-map__all { display: inline-block; padding: 11px 0; }
@media (min-width: 1024px) {
  .hm-map.is-ready { min-height: var(--kb-panel-h, 340px); }
  .hm-map.is-ready .hm-map__plot { width: 62%; aspect-ratio: 2 / 1; }
  .hm-map.is-ready .hm-map__lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .hm-map__line { fill: none; stroke: var(--c-line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
  .hm-map__line.is-on { stroke: var(--c-ink); }
  .hm-map.is-ready .hm-map__list { position: static; }
  .hm-map.is-ready .hm-map__list::before, .hm-map.is-ready .hm-map__item::before, .hm-map.is-ready .hm-map__pm { display: none; }
  .hm-map.is-ready .hm-map__item { position: static; padding: 0; }
  .hm-map.is-ready .hm-map__btn { position: absolute; left: var(--x); top: var(--y); width: auto; min-height: 44px; padding: 0; gap: 14px; transform: translate(-7px, -50%); font-size: clamp(18px, 1.6vw, 24px); white-space: nowrap; }
  .hm-map.is-ready .hm-map__panel { position: absolute; top: 0; left: calc(100% + 40px); width: calc(61.3% - 40px); min-height: 100%; padding: 0 0 0 40px; border-left: 1px solid var(--c-line); }
  .hm-map.is-ready .hm-map__title { display: block; }
  .hm-map.is-ready .hm-map__arts a { padding: 18px 0; }
}

/* На главной от подвала осталась только строка с реквизитами */
.hm-foot.hm-foot--min { border-top: 0; padding-top: 0; margin-top: 0; }
.hm-foot--min .hm-foot__bot { margin-top: 0; }

/* ---------- Контакт и бриф ---------- */
.hm-eyebrow { margin: 0; font-size: var(--fs-label); color: var(--c-text-2); }
.hm-form { margin-top: clamp(48px, 6vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 36px 40px; font-size: 20px; }
.hm-form label { display: block; }
.hm-form .hm-lab { display: block; font-size: var(--fs-small); color: var(--c-text-2); }
.hm-form input[type="text"], .hm-form input[type="tel"], .hm-form input[type="email"], .hm-form textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 10px 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--c-ink); font: inherit; color: var(--c-ink); background: transparent; outline-offset: 4px; }
.hm-form textarea { resize: vertical; min-height: 0; }
.hm-form fieldset { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; min-width: 0; }
.hm-form legend { padding: 0; font-size: var(--fs-small); color: var(--c-text-2); }
.hm-pills { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 12px; font-size: 17px; }
.hm-pill { display: inline-flex; align-items: center; padding: 10px 18px; border: 1px solid var(--c-line); border-radius: 999px; cursor: pointer; }
.hm-pill input { margin: 0 8px 0 0; }
.hm-pill:has(input:checked) { border-color: var(--c-ink); }
.hm-pill:has(input:focus-visible) { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.hm-form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; padding-top: 8px; }
.hm-consent { display: flex; gap: 12px; align-items: flex-start; max-width: 52ch; font-size: var(--fs-small); line-height: 1.5; color: var(--c-text-2); }
.hm-consent input { margin: 1px 0 0; flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--c-ink); }
.hm-consent a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 3px; }
.hm-submit { border: 0; background: none; padding: 8px 0; cursor: pointer; font: inherit; font-size: var(--fs-h3); letter-spacing: var(--ls-h3); text-decoration: underline; text-underline-offset: 10px; text-decoration-thickness: var(--link-thickness); color: var(--c-ink); }
.hm-submit:disabled { color: var(--c-text-2); cursor: default; }
.hm-sent { margin-top: clamp(48px, 6vw, 88px); font-size: var(--fs-h3); letter-spacing: var(--ls-h3); }
.hm-sent[hidden] { display: none; }
.hm-direct { margin: clamp(40px, 5vw, 64px) 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--c-text-2); }
.hm-direct a { color: var(--c-ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Доступность и мелочи ---------- */
.home-min :focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }

/* ---------- Сетка карты на первом экране: цикл 12 с ----------
   Первая волна открывает сетку справа налево за 5 с, сетка стоит 4 с, вторая волна стирает её за 3 с.
   Анимируется только transform, страница не перерисовывается. */
.hm-hero { position: relative; }
.hm-hero > .hm-wrap { position: relative; z-index: 1; }
/* Карта начинается от верха страницы, за шапкой */
.hm-atlas { position: absolute; top: calc(-1 * var(--header-h)); right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; }
/* Наверху страницы плашки нет, белой она становится при прокрутке */
html:not(.head-compact) .hm-head::before { background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .hm-head::before { transition: height .2s, background-color .2s; }
}
/* Белый ореол вокруг всего текста первого экрана повторяет форму букв. Один фильтр на весь блок:
   тени считаются разом и лежат под всеми буквами, поэтому ореол одной строки не закрывает соседнюю */
.hm-hero > .hm-wrap { filter: drop-shadow(0 0 2px var(--c-bg)) drop-shadow(0 0 4px var(--c-bg)) drop-shadow(0 0 7px var(--c-bg)) drop-shadow(0 0 10px var(--c-bg)) drop-shadow(0 0 14px var(--c-bg)) drop-shadow(0 0 18px var(--c-bg)); }
/* На телефоне три тени вместо шести: тот же ореол, втрое меньше размытий на большом слое */
/* На телефоне ореол тенью самих букв: фильтр отправляет весь блок в отдельную картинку, и текст может терять резкость */
@media (max-width: 767px) { .hm-hero > .hm-wrap { filter: none; text-shadow: 0 0 3px var(--c-bg), 0 0 8px var(--c-bg), 0 0 16px var(--c-bg); } }
/* Мелкий текст первого экрана чёрный */
.hm-hero .hm-meta, .hm-hero .hm-h1-wrap__meta { color: var(--c-ink); }
.hm-atlas__map { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-atlas__map path { fill: none; stroke: #F0F0F0; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hm-atlas__map circle { fill: #BDBDBD; }
.hm-atlas__map text { fill: #BDBDBD; font-size: 10px; letter-spacing: .02em; }
/* Волна: белое полотно с волнистым прозрачным окном идёт справа налево. Сетка видна только в окне:
   впереди короткий край, сзади длинный затухающий хвост. Между волнами экран чистый, города меняются в это время. */
.hm-atlas__veil { position: absolute; top: 0; bottom: 0; left: 0; width: 320%; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 3000 1000%22 preserveAspectRatio=%22none%22%3E%3Cfilter id=%22b%22 x=%22-10%25%22 y=%22-10%25%22 width=%22120%25%22 height=%22120%25%22%3E%3CfeGaussianBlur stdDeviation=%2234 26%22/%3E%3C/filter%3E%3Cmask id=%22m%22 maskUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%223000%22 height=%221000%22%3E%3Crect width=%223000%22 height=%221000%22 fill=%22%23fff%22/%3E%3Cg filter=%22url%28%23b%29%22%3E%3Cpath d=%22M1204 -100L1244 -40L1279 20L1295 80L1288 140L1270 200L1257 260L1256 320L1261 380L1260 440L1242 500L1208 560L1172 620L1153 680L1159 740L1183 800L1211 860L1228 920L1230 980L1229 1040L1236 1100L1914 1100L1920 1040L1899 980L1871 920L1853 860L1852 800L1856 740L1848 680L1819 620L1775 560L1739 500L1729 440L1751 380L1792 320L1828 260L1845 200L1845 140L1843 80L1855 20L1883 -40L1913 -100Z%22 fill-opacity=%220.3%22/%3E%3Cpath d=%22M1204 -100L1244 -40L1279 20L1295 80L1288 140L1270 200L1257 260L1256 320L1261 380L1260 440L1242 500L1208 560L1172 620L1153 680L1159 740L1183 800L1211 860L1228 920L1230 980L1229 1040L1236 1100L1589 1100L1626 1040L1670 980L1701 920L1708 860L1695 800L1677 740L1668 680L1672 620L1678 560L1670 500L1642 440L1601 380L1567 320L1556 260L1571 200L1601 140L1627 80L1638 20L1636 -40L1637 -100Z%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M1204 -100L1244 -40L1279 20L1295 80L1288 140L1270 200L1257 260L1256 320L1261 380L1260 440L1242 500L1208 560L1172 620L1153 680L1159 740L1183 800L1211 860L1228 920L1230 980L1229 1040L1236 1100L1508 1100L1485 1040L1470 980L1467 920L1469 860L1464 800L1444 740L1415 680L1393 620L1389 560L1408 500L1440 440L1467 380L1480 320L1480 260L1477 200L1483 140L1500 80L1518 20L1523 -40L1506 -100Z%22 fill-opacity=%221%22/%3E%3C/g%3E%3C/mask%3E%3Crect width=%223000%22 height=%221000%22 fill=%22%23fff%22 mask=%22url%28%23m%29%22/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; animation: hm-atlas-wave 12s cubic-bezier(.45, .05, .55, .95) infinite; will-change: transform; --wave-from: -3.5%; }
@media (max-width: 767px) {
  .hm-atlas__veil { width: 460%; --wave-from: -13%; }
}
@keyframes hm-atlas-wave { 0% { transform: translateX(var(--wave-from)); } 78%, 100% { transform: translateX(-68%); } }
@media (prefers-reduced-motion: reduce) {
  .hm-atlas__veil { display: none; }
}

/* ---------- Блок услуг: 9g Kinetic Typography ----------
   Слева огромное слово активной услуги, справа спокойный список. Слово вписывается настоящими осями
   шрифта, без растягивания. Roboto Flex (SIL OFL), в файле только буквы этих слов: assets/RobotoFlex-OFL.txt */
@font-face { font-family: "9g Flex"; src: url("../assets/RobotoFlex-9g.woff2") format("woff2"); font-weight: 300 700; font-stretch: 25% 151%; font-style: normal; font-display: block; }
#services, #team { padding: 0; }
#services > .hm-two, #team > .hm-two { display: grid; grid-template-columns: minmax(0, 62.5%) minmax(0, 37.5%); max-width: none; padding: 0; gap: 0;
  min-height: calc(100vh - var(--head-compact)); min-height: calc(100svh - var(--head-compact)); }
/* Заголовок не виден, но остаётся в структуре страницы для поисковиков и экранных читалок */
#services .hm-h2, #team .hm-h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hm-stage { position: relative; overflow: hidden; min-height: 560px; }
/* Без скрипта слово стоит в естественной ширине; скрипт вписывает его точно */
.hm-word { position: absolute; left: 0; bottom: 0; margin: 0; display: flex; color: var(--c-ink); font-family: "9g Flex", var(--f-text), sans-serif; font-size: min(40vw, 80vh); line-height: 1; font-weight: 500; font-stretch: 40%; letter-spacing: -.012em; white-space: nowrap; user-select: none; -webkit-user-select: none; }
.hm-word__m { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; font-family: "9g Flex", var(--f-text), sans-serif; letter-spacing: -.012em; white-space: nowrap; }
.hm-l { display: block; flex: none; }
.hm-l.is-clip { overflow: hidden; }
.hm-l__g { display: inline-block; letter-spacing: 0; }
#services > .hm-two > .hm-two__body, #team > .hm-two > .hm-two__body { align-self: start; min-width: 0; padding: clamp(32px, 4vw, 56px) calc(var(--pad-x) + max(0px, (100vw - var(--wrap-max)) / 2)) clamp(32px, 4vw, 56px) 0; }
/* Услуги: список слева сверху, слово справа снизу. У команды наоборот */
#services > .hm-two { grid-template-columns: minmax(0, 37.5%) minmax(0, 62.5%); }
#services > .hm-two > .hm-stage { grid-column: 2; grid-row: 1; }
#services > .hm-two > .hm-two__body { grid-column: 1; grid-row: 1; padding: clamp(32px, 4vw, 56px) 0 clamp(32px, 4vw, 56px) calc(var(--pad-x) + max(0px, (100vw - var(--wrap-max)) / 2)); }
.hm-stage--end .hm-word { left: auto; right: 0; }
#services .hm-list { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.3; letter-spacing: -.01em; border-top: 1px solid var(--c-line); }
#services .hm-list a { gap: 12px; min-height: 44px; padding: 12px 0; }
#services .hm-list .hm-n { flex: 0 0 26px; font-size: 14px; font-variant-numeric: tabular-nums; }
#services .hm-list .hm-p { flex: 0 0 auto; font-size: 14px; white-space: nowrap; }
/* Активная строка не меняет размеры: чёрный номер и тонкое подчёркивание */
#services .hm-list a[aria-current] .hm-n { color: var(--c-ink); }
#services .hm-list a[aria-current] .hm-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#services .hm-list a:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
/* Телефон и низкий экран: слово и список одной группой по центру, сверху и снизу одинаковый отступ */
@media (max-width: 959px), (max-height: 700px) {
  #services > .hm-two, #team > .hm-two { grid-template-columns: minmax(0, 1fr); align-content: center; row-gap: 40px; padding: 20px 0; }
  .hm-stage { min-height: 170px; height: calc((100vh - var(--head-compact)) * .4 - 104px); height: calc((100svh - var(--head-compact)) * .4 - 104px); }
  .hm-word { font-size: min(62vw, 34vh); }
  #services > .hm-two > .hm-two__body, #team > .hm-two > .hm-two__body { padding: 0 var(--pad-x); }
  /* На телефоне у услуг слово сверху, список под ним, как у команды */
  #services > .hm-two > .hm-stage { grid-column: 1; grid-row: 1; }
  #services > .hm-two > .hm-two__body { grid-column: 1; grid-row: 2; }
  #services .hm-list { font-size: 17px; }
  #services .hm-list a { gap: 10px; padding: 9px 0; }
  #services .hm-list .hm-n { flex-basis: 24px; }
}

/* ---------- Переход от услуг к команде ----------
   Класс is-on ставит services-type.js, только если оба блока умещаются в экран.
   Без него блоки идут обычным потоком. Прокрутка остаётся родной. */
.hm-flip.is-on .hm-flip__pin { position: sticky; top: var(--head-compact); height: calc(100vh - var(--head-compact)); height: calc(100svh - var(--head-compact)); overflow: hidden; overflow: clip; }
.hm-flip.is-on #services, .hm-flip.is-on #team { position: absolute; inset: 0; }
.hm-flip.is-on:not(.is-b):not(.is-slide) #team, .hm-flip.is-on.is-b:not(.is-slide) #services { opacity: 0; pointer-events: none; }
.hm-flip.is-moving .hm-stage .hm-word { visibility: hidden; }
.hm-flip.is-moving #services .hm-two__body { pointer-events: none; }
.hm-flip__over { display: none; position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hm-flip.is-moving .hm-flip__over { display: block; }
.hm-flip__over .hm-word { will-change: transform; text-rendering: geometricPrecision; }
/* Движение идёт на своём слое: фото и текст не перерисовываются на каждом кадре */
.hm-flip.is-moving .hm-two__body, .hm-flip.is-slide #services, .hm-flip.is-slide #team { will-change: transform; }

/* ---------- Блоки в высоту экрана ----------
   База знаний занимает экран под закреплённой шапкой. Содержимое выше экрана растягивает блок. */
.hm-sec--kb { min-height: calc(100vh - var(--head-compact) - var(--foot-h, 0px)); min-height: calc(100svh - var(--head-compact) - var(--foot-h, 0px)); display: flex; flex-direction: column; }
.hm-sec--kb > .hm-wrap { flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; }
/* Компьютер: чтобы блоки уложились в экран, содержимое стоит в две колонки, заголовки зависят от высоты экрана */
@media (min-width: 1024px) {
  .hm-sec--kb { padding-top: clamp(24px, 3.4vh, 40px); padding-bottom: clamp(24px, 3.4vh, 40px); }
  .hm-final { margin-top: auto; padding-top: clamp(32px, 5vh, 64px); }
  .hm-foot { padding: 32px 0 20px; }
  .hm-foot__cols { font-size: 16px; line-height: 1.6; gap: 24px 32px; }
  .hm-foot__h { margin-bottom: 6px; }
  .hm-foot__bot { margin-top: 24px; padding-top: 16px; }
}
/* Низкий экран ноутбука: заголовок базы знаний меньше, чтобы блок остался в высоту экрана */
@media (min-width: 1024px) and (max-height: 820px) {
}

/* ---------- Кинематографический переход: камера летит к точке заголовка, точка становится планетой ----------
   Первый экран удерживается через sticky на отрезке прокрутки, секция проектов лежит под ним.
   Класс ставит map-globe.js, только если эффект поддерживается. Прокрутка остаётся родной. */
/* Увеличенный текст не должен расширять страницу: на телефоне иначе появляется прокрутка вбок. Вертикаль не трогаем, карта заходит под шапку */
.is-cine .hm-cine { position: relative; overflow-x: clip; }
/* Без чёрных линий: первый экран, проекты и услуги идут единым пространством */
#work, #services, #team, #knowledge { border-top: 0; }
/* Блок с глобусом ровно в экран под шапкой, кнопки видны сразу. Шар занимает то, что осталось */
.hm-sec--work.is-sphere { min-height: calc(100vh - var(--head-compact) - 8px); min-height: calc(100svh - var(--head-compact) - 8px); }
.hm-sec--work.is-sphere .hm-sphere { min-height: 280px; }
/* Телефон: значки режимов на строке заголовка, фильтры в одну строку, подсказка убрана, кнопки в один ряд.
   Видимая высота в Safari заметно меньше экрана, поэтому место экономится на всём, кроме шара */
@media (max-width: 767px) {
  .hm-sec--work.is-sphere { padding-bottom: 16px; }
  .hm-sec--work.is-sphere .hm-sphere { min-height: 200px; margin-top: 8px; }
  .hm-sec--work.is-sphere .hm-sec__head { position: relative; }
  /* Слово «Международные» не уже 7.7 кегля: на узком телефоне кегль уменьшается, чтобы оно влезало рядом со значками */
  .hm-sec--work.is-sphere .hm-sec__head .hm-h2 { padding-right: 104px; font-size: min(var(--fs-h2), calc((100vw - 2 * var(--pad-x) - 104px) / 7.8)); }
  .hm-sec--work.is-sphere .hm-modes { position: absolute; top: 0; right: 0; }
  .hm-sphere__hint { display: none; }
  /* Положение шара задаёт sphere.js: по центру экрана, тень сразу под ним */
  .hm-sphere canvas { top: var(--globe-y, 0px); }
  .hm-sphere::after { bottom: auto; top: calc(var(--globe-y, 0px) + var(--globe-size, 100%) + 6px); }
  .hm-sphere__foot { gap: 4px 0; margin-top: 8px; }
  .hm-sphere__ctrl { gap: 0; margin-left: -12px; }
  /* Цельный шар: фильтровать и поворачивать кнопками нечего, нажатие ведёт на кейсы */
  .is-solid .hm-tabs, .is-solid .hm-sphere__ctrl { display: none; }
  .is-solid .hm-sphere__hint { display: block; }
  /* Ссылка на кейсы: подчёркнута, область нажатия 44 px без сдвига текста */
  .is-solid .hm-sphere__hint a { display: inline-block; padding: 12px 0; margin: -12px 0; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .is-solid .hm-sphere__hint a:hover { color: var(--c-hover); }
  .is-solid .hm-sphere canvas { cursor: pointer; }
  .is-solid .hm-modes { margin-left: auto; }
}
/* Пока идёт переход, содержимое секции уже стоит на своих местах и проявляется. Настоящий глобус скрыт: его рисует слой */
/* На время перехода секция стоит в окне, а не на странице: нет дрожи от сдвига вслед за прокруткой */
#work.is-arriving > .hm-wrap { position: fixed; left: 0; right: 0; top: var(--cine-dock, 0px); will-change: transform, opacity; pointer-events: none; }
#work.is-arriving.is-open > .hm-wrap { pointer-events: auto; }
#work.is-arriving:not(.is-live) .hm-sphere canvas { visibility: hidden; }
.is-cine .hm-cine::after { content: ""; display: block; height: var(--cine-run, 140vh); }
.is-cine #top { position: sticky; top: var(--header-h); z-index: 2; background: rgba(255, 255, 255, var(--cine-bg, 1)); }
.is-cine #top.is-past { visibility: hidden; pointer-events: none; }
/* Волна первого экрана: огромный слой с размытием. Пока экран ушёл, он не занимает память и не считает города */
.is-cine #top.is-past .hm-atlas__veil { display: none; }
.is-cine #top.is-through { pointer-events: none; }
/* Ореол заголовка дорог: цепочка из шести теней пересчитывается в каждом кадре. На время движения снимается */
.is-cine #top.is-moving > .hm-wrap { filter: none; will-change: transform, opacity; }
.is-cine #top.is-moving > .hm-atlas { will-change: transform, opacity; }
.is-cine #work { position: relative; z-index: 1; margin-top: calc(-1 * var(--cine-hero, 100vh)); }
.hm-cine__gl { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; z-index: 0; pointer-events: none; visibility: hidden; }

/* ---------- Телефон: блоки в полный экран ----------
   svh меньше экрана, когда адресная строка спряталась: снизу выглядывал следующий блок */
@media (max-width: 959px) and (pointer: coarse) {
  @supports (height: 100lvh) {
    .hm-sec--work { height: calc(100lvh - var(--head-compact)); }
    .hm-sec--work.is-sphere { height: auto; min-height: calc(100lvh - var(--head-compact) - 8px); }
    #services > .hm-two, #team > .hm-two { min-height: calc(100lvh - var(--head-compact)); }
    .hm-flip.is-on .hm-flip__pin { height: calc(100lvh - var(--head-compact)); }
    .hm-sec--kb { min-height: calc(100lvh - var(--head-compact) - var(--foot-h, 0px)); }
  }
}

/* ---------- Последний экран вместе с подвалом ----------
   Низкое окно ноутбука: фраза, планета и отступы зависят от высоты, чтобы подвал не выходил за экран */
@media (min-width: 1024px) and (max-height: 1000px) {
  .hm-sec--kb { padding-top: 2.2vh; padding-bottom: 2.2vh; }
  .hm-final { padding-top: 3vh; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .hm-sec--kb { padding-top: 1.4vh; padding-bottom: 1.4vh; }
  .hm-final { --start-gap: 8px; padding-top: 2vh; }
  .hm-final__t { font-size: min(7.1vw, 10vh); }
  .hm-start { width: min(15vw, 19vh); }
}
/* Телефон: подвал в две строки, отступы поджаты, свободное место между списком и фразой */
@media (max-width: 767px) {
  .is-home .hm-sec--kb { padding-top: 8px; padding-bottom: 8px; }
  .is-home .hm-final { margin-top: auto; padding-top: 8px; gap: 12px; }
  .is-home .hm-foot { padding: 0 0 8px; }
  .is-home .hm-foot__bot { padding-top: 12px; gap: 4px 16px; }
}

/* Сенсорные экраны: блоки от зафиксированной высоты экрана (main.js), а не от единиц окна, которые меняются при прокрутке */
html.has-app-h.is-home .hm-sec--work { height: calc(var(--app-h) - var(--head-compact)); }
html.has-app-h.is-home .hm-sec--work.is-sphere { height: auto; min-height: calc(var(--app-h) - var(--head-compact) - 8px); }
html.has-app-h.is-home #services > .hm-two, html.has-app-h.is-home #team > .hm-two { min-height: calc(var(--app-h) - var(--head-compact)); }
html.has-app-h.is-home .hm-flip.is-on .hm-flip__pin { height: calc(var(--app-h) - var(--head-compact)); }
html.has-app-h.is-home .hm-sec--kb { min-height: calc(var(--app-h) - var(--head-compact) - var(--foot-h, 0px)); }
html.has-app-h.is-home .hm-sec--work .hm-more { margin-top: clamp(40px, calc(var(--app-sh) * .06), 84px); }
@media (max-width: 959px), (max-height: 700px) {
  html.has-app-h.is-home .hm-stage { height: calc((var(--app-sh) - var(--head-compact)) * .4 - 104px); }
  html.has-app-h.is-home .hm-word { font-size: min(62vw, calc(var(--app-sh) * .34)); }
}
