/* ─────────────────────────────────────────────
   workivo · главная страница
   Крупная типографика, полосы во всю ширину,
   живая полоса совпадений как подпись страницы
   ───────────────────────────────────────────── */

:root {
  --hm-ink: #0b0d12;
  --hm-muted: #6a7280;
  --hm-panel: #f4f5f7;
  /* тёмная полоса — глубокий синий, а не чёрный */
  --hm-dark: #142a54;
  --hm-dark-deep: #0e1e3d;
  --hm-dark-lift: #17305f;
  --hm-on-dark: #eaf1ff;
  --hm-on-dark-muted: rgba(214, 229, 255, .78);
  --hm-cta-dark: #10224a;
  --font-display: 'Onest', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* заголовки всего сайта — на дисплейной гарнитуре */
h1, h2, h3,
.section__title,
.detail-head__title,
.profile-hero__name,
.ai-band__title {
  font-family: var(--font-display);
}

/* ── полосы во всю ширину ── */
.hm-band {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0;
  background: var(--surface);
}
.hm-band + .hm-band { padding-top: clamp(64px, 9vw, 128px); }
.hm-band--panel { background: var(--hm-panel); }
/* тёмная полоса — ровный глубокий синий, без свечений и разлиновки */
.hm-band--dark {
  position: relative;
  color: var(--hm-on-dark);
  background: var(--hm-dark);
  border-radius: clamp(0px, 3vw, 28px);
  margin-inline: clamp(0px, 2vw, 28px);
  overflow: hidden;
}

.hm-band--dark .hm-title { color: var(--hm-on-dark); }
/* карточки должны отрываться от синего фона */
.hm-band--dark .job-card { box-shadow: 0 26px 52px -32px rgba(4, 12, 30, .95); }
.hm-band--dark .job-card:hover { box-shadow: 0 34px 64px -30px rgba(4, 12, 30, 1); }

/* кнопка на тёмном */
.btn-on-dark {
  --btn-bg: rgba(255, 255, 255, .1);
  --btn-ink: #fff;
  --btn-border: rgba(163, 195, 255, .28);
}
.btn-on-dark:hover { --btn-bg: rgba(255, 255, 255, .18); --btn-border: rgba(163, 195, 255, .45); }
.hm-band--tight { padding-top: clamp(40px, 5vw, 72px); }

.hm-inner { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hm-inner--wide { max-width: 1240px; }

/* ── заголовки секций ── */
.hm-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 52px); }
.hm-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.hm-head--row {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.hm-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.06;
}
.hm-sub {
  margin-top: 14px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--hm-muted);
  max-width: 58ch;
}
.hm-band--dark .hm-sub { color: var(--hm-on-dark-muted); }

/* ═══════════ ГЕРОЙ ═══════════ */
.hm-hero {
  position: relative;
  padding: clamp(44px, 6vw, 84px) 0 clamp(36px, 4vw, 56px);
  text-align: center;
}

.hm-hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.04;
  margin: 0 auto;
  max-width: 16ch;
  text-wrap: balance;
}

.hm-hero__lead {
  margin: clamp(18px, 2.2vw, 24px) auto 0;
  max-width: 52ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  color: #3c4351;
  text-wrap: pretty;
}

/* живые цифры площадки под поиском — тихой строкой, без «счётчиков» */
.hm-facts {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* переключатель сторон + поиск */
.hm-search { margin: clamp(26px, 3.2vw, 40px) auto 0; max-width: 720px; }
.hm-switch { display: flex; justify-content: center; margin-bottom: 14px; }

.hm-field {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: 0 22px 48px -34px rgba(11, 13, 18, .5);
  transition: border-color var(--normal), box-shadow var(--normal);
}
.hm-field:focus-within {
  border-color: #c9d8ff;
  box-shadow: 0 26px 56px -32px rgba(26, 107, 255, .55);
}
.hm-field svg { color: var(--muted-2); flex: none; }
.hm-field input {
  flex: 1; min-width: 0; height: 48px;
  border: 0; outline: none; background: transparent;
  font-size: 17px; letter-spacing: -.015em;
}
.hm-field input::placeholder { color: var(--muted-2); }

.hm-chips {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.hm-chips span { font-size: 13.5px; color: var(--muted); }
.hm-chips button {
  height: 32px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); color: #3c4351;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all var(--fast);
}
.hm-chips button:hover { border-color: #ccd4e2; color: var(--ink); transform: translateY(-1px); }

/* ═══════════ ПОДПИСЬ: ПОЛОСА СОВПАДЕНИЙ ═══════════ */
.hm-match {
  margin: clamp(40px, 5vw, 68px) auto 0;
  max-width: 940px;
  padding: 0 24px;
}
.hm-match__label {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13.5px; color: var(--muted);
  margin-bottom: 18px;
}
.hm-match__label::before,
.hm-match__label::after {
  content: ''; height: 1px; flex: 1; max-width: 120px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.hm-match__label::after { background: linear-gradient(90deg, var(--line), transparent); }

.hm-pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
}
/* метка «Пример» в углу пары — не занимает ячейку сетки */
.hm-pair__example { position: absolute; top: -10px; right: 0; z-index: 1; }

.hm-side {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
  min-width: 0;
  transition: border-color var(--fast);
}
.hm-side:hover { border-color: #cfd7e4; }
.hm-side:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-side--job { flex-direction: row-reverse; text-align: right; }
.hm-side__name, .hm-side__role, .hm-side__meta { display: block; }
.hm-side__name { font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; }
.hm-side__meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.hm-side__role { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 3px; }

.hm-score {
  position: relative;
  display: grid; place-items: center;
  width: 92px; height: 92px; flex: none;
}
.hm-score__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--pct, 0%), #e6eaf2 0);
  transition: background .8s var(--ease);
}
.hm-score__ring::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface);
}
.hm-score__value {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-size: 23px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.hm-score__caption {
  position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}

.hm-match__foot {
  margin-top: 46px;
  text-align: center;
  font-size: 14px; color: var(--muted);
}
.hm-match__foot b { color: var(--ink); font-weight: 600; }

/* ═══════════ ДВА СЦЕНАРИЯ ═══════════ */
.hm-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hm-path {
  display: flex; flex-direction: column;
  min-height: 200px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color var(--normal), box-shadow var(--normal);
}
.hm-path:hover {
  box-shadow: var(--shadow-md);
  border-color: #d3dae6;
}
.hm-path:focus-visible, .hm-cat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-path__title, .hm-path__text { display: block; }
.hm-path__icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 20px;
}
.hm-path--hire .hm-path__icon { background: #e8f6ee; color: var(--success); }
.hm-path__title { font-family: var(--font-display); font-size: 23px; font-weight: 650; letter-spacing: -.03em; }
.hm-path__text { font-size: 15px; color: var(--hm-muted); margin-top: 8px; max-width: 32ch; }
.hm-path__go {
  margin-top: auto; padding-top: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: var(--accent);
}
.hm-path--hire .hm-path__go { color: var(--success); }
.hm-path:hover .hm-path__go svg { transform: translateX(3px); }
.hm-path__go svg { transition: transform var(--normal); }

/* ═══════════ КАТЕГОРИИ ═══════════ */
.hm-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hm-cat {
  display: flex; align-items: center; gap: 13px;
  /* без этого плитка не может стать уже своего текста, колонка грида
     распирается под неё, и на узком экране страница едет вбок */
  min-width: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid transparent;
  transition: border-color var(--fast);
}
.hm-band--panel .hm-cat { border-color: var(--line); }
.hm-cat:hover { border-color: #c9d2e0; }
.hm-cat__name, .hm-cat__count { display: block; }
.hm-cat__icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--bg-soft); color: #43495a;
  transition: all var(--fast);
}
.hm-cat:hover .hm-cat__icon { background: var(--accent-soft); color: var(--accent); }
.hm-cat__name { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; }
.hm-cat__count { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ═══════════ ПОДРАБОТКА (тёмная полоса) ═══════════ */
.hm-gigs {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}
.hm-gigs > * { flex: 0 0 328px; scroll-snap-align: start; }
.hm-gigs::-webkit-scrollbar { height: 6px; }
.hm-gigs::-webkit-scrollbar-thumb { background: rgba(163, 195, 255, .32); border-radius: 99px; border: 0; }
.hm-gigs::-webkit-scrollbar-track { background: rgba(255, 255, 255, .07); border-radius: 99px; }
/* та же лента на светлом фоне — для кандидатов */
.hm-gigs--light::-webkit-scrollbar-thumb { background: #cfd6e2; }
.hm-gigs--light::-webkit-scrollbar-track { background: var(--bg-soft); }

/* блок для работодателей — тот же глубокий синий, что и у подработки */
.cta-band { background: var(--hm-cta-dark); }
.cta-band p { color: var(--hm-on-dark-muted); }
.cta-band__list li { color: rgba(226, 236, 255, .84); }
.cta-preview__cap { font-size: 13px; color: rgba(214, 229, 255, .78); margin-bottom: 6px; }
.cta-preview__row { color: #fff; border-radius: 10px; }
.cta-preview__row:hover .cta-preview__name { text-decoration: underline; }
.cta-preview__row:focus-visible { outline: 2px solid #9fc2ff; outline-offset: 2px; }
.cta-preview__name, .cta-preview__meta { display: block; }
.cta-preview__exp { margin-left: auto; font-size: 12.5px; color: rgba(214, 229, 255, .78); white-space: nowrap; }

/* ═══════════ ЦИФРЫ ═══════════ */
.hm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); }
.hm-stat__value {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 700; letter-spacing: -.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hm-stat__label { margin-top: 10px; font-size: 14.5px; color: var(--hm-muted); }

/* ═══════════ ПРЕИМУЩЕСТВА ═══════════ */
.hm-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3.5vw, 56px); }
.hm-feature__icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.hm-feature__title { font-family: var(--font-display); font-size: 19px; font-weight: 650; letter-spacing: -.025em; }
.hm-feature__text { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--hm-muted); }

/* ═══════════ ФИНАЛЬНЫЙ ПРИЗЫВ ═══════════ */
.hm-final { text-align: center; }
.hm-final__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 68px);
  font-weight: 700; letter-spacing: -.045em; line-height: 1.02;
  max-width: 16ch; margin: 0 auto;
}
.hm-final__text {
  margin: 20px auto 0; max-width: 46ch;
  font-size: clamp(16px, 1.5vw, 18px); color: var(--hm-muted); line-height: 1.5;
}
.hm-final__actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .hm-score__ring { transition: none; }
}

/* ═══════════ АДАПТИВ ═══════════ */
@media (max-width: 1024px) {
  .hm-cats { grid-template-columns: repeat(3, 1fr); }
  .hm-stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
}

@media (max-width: 820px) {
  .hm-features { grid-template-columns: 1fr; gap: 30px; }
  .hm-paths { grid-template-columns: 1fr; }
  .hm-pair { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .hm-side { width: 100%; }
  .hm-side--job { flex-direction: row; text-align: left; }
  .hm-score { transform: rotate(90deg); }
  .hm-score__value { transform: rotate(-90deg); }
  .hm-score__caption { display: none; }
  .hm-match__foot { margin-top: 24px; }
}

@media (max-width: 620px) {
  .hm-cats { grid-template-columns: 1fr 1fr; }
  /* длинные названия сфер переносятся, а не выталкивают плитку за экран */
  .hm-cat { padding: 14px; gap: 10px; }
  .hm-cat > div { min-width: 0; }
  .hm-cat__name { overflow-wrap: anywhere; }
  .hm-gigs > * { flex: 0 0 82%; }
  .hm-field { padding: 7px 7px 7px 18px; }
  .hm-field input { height: 44px; font-size: 16px; }
  /* подсказки запросов — одной лентой с прокруткой, а не стеной на пол-экрана */
  .hm-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .hm-chips::-webkit-scrollbar { display: none; }
  .hm-chips > * { flex: none; }
  .hm-path { min-height: 0; padding: 22px; }
}
