/* ============================================================
   hr.band — дизайн-система «Лента»
   Правило цвета: зелёный = деньги/живое, синий = Telegram,
   янтарь = внимание, красный = скам. Остальное — монохром.
   Моно считает, гротеск говорит.
   ============================================================ */

/* ---------- шрифты (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/site/golos-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/fonts/site/golos-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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/site/jbmono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/site/jbmono-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 {
  --bg: #0b0e0c;
  --surface: #111512;
  --surface-2: #161b17;
  --line: #232a24;
  --text: #e8ece8;
  --text-2: #9ba69d;
  --text-3: #7d877d; /* ≈5:1 on --bg — WCAG AA for small text */

  --money: #5be49b;
  --money-dim: rgba(91, 228, 155, 0.28);
  --tg: #2aabee;
  --tg-dim: rgba(42, 171, 238, 0.3);
  --warn: #f5b84b;
  --warn-dim: rgba(245, 184, 75, 0.3);
  --danger: #f26d5f;
  --danger-dim: rgba(242, 109, 95, 0.3);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-press: 120ms;
  --t-hover: 150ms;
  --t-enter: 300ms;

  --font-ui: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-data: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* легаси-алиасы: старые вьюхи ссылаются на эти имена */
  --violet: #9ba69d;
  --teal: #5be49b;
  --success: #5be49b;
}

/* ---------- база ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--money); color: var(--bg); }
:focus-visible { outline: 2px solid var(--money); outline-offset: 2px; border-radius: 2px; }

.container { width: 100%; max-width: 50rem; margin: 0 auto; padding: 0 1.25rem; }
main { flex: 1; padding: 2rem 0 3.5rem; }
.muted { color: var(--text-2); }

.mono, .num {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* ---------- шапка ---------- */
header.site-head { border-bottom: 1px solid var(--line); }
header.site-head .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.wordmark {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}
.wordmark::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.16em;
  background: var(--money);
  margin-left: 0.3em;
  border-radius: 1px;
}
.site-nav {
  display: flex;
  gap: 1.2rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--text-3);
}
.site-nav a { color: var(--text-2); text-decoration: none; transition: color var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--text); } }

/* ---------- тикер ---------- */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  user-select: none;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: hrb-tick 38s linear infinite;
}
@media (hover: hover) and (pointer: fine) { .ticker:hover .ticker-track { animation-play-state: paused; } }
@keyframes hrb-tick { to { transform: translateX(-50%); } }
.ticker-set {
  display: flex;
  gap: 2.2rem;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--text-2);
  white-space: nowrap;
}
.ticker-set .up { color: var(--money); }

/* ---------- заголовки страниц ---------- */
.page-title {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
/* легаси .grad: раньше градиентный текст — теперь просто деньги-зелёный */
.grad { color: var(--money); }

/* ---------- чипы (паспорт доверия) ---------- */
.chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38em;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-2);
  white-space: nowrap;
}
.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}
.chip-ok { color: var(--money); border-color: var(--money-dim); }
.chip-ok .dot { background: var(--money); }
.chip-warn { color: var(--warn); border-color: var(--warn-dim); }
.chip-warn .dot { background: var(--warn); }
.chip-bad { color: var(--danger); border-color: var(--danger-dim); }
.chip-bad .dot { background: var(--danger); }
.chip-tg { color: var(--tg); border-color: var(--tg-dim); }
.chip-tg .dot { background: var(--tg); }

/* легаси-цветные пилюли из старых вьюх — монохром */
.pill-violet, .pill-teal { color: var(--text-2); border-color: var(--line); }

.badges, .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: hrb-pulse 2.4s ease-in-out infinite; }
  @keyframes hrb-pulse { 50% { opacity: 0.35; } }
}

/* ---------- каталог: строки ---------- */
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 0.5rem; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1.4rem;
  padding: 0.95rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--surface); }
  .row:hover .row-pay { color: var(--money); }
}
.row:active { background: var(--surface-2); }
.row-title { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; }
.row-title-link { color: inherit; text-decoration: none; }
.row-title-link::after { content: ""; position: absolute; inset: 0; }
.row-sub {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-3);
}
.row-sub .chip, .row-sub .pill { padding: 0.06rem 0.5rem; font-size: 0.7rem; }
.row-sub .company-link {
  position: relative;
  z-index: 1;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) { .row-sub .company-link:hover { color: var(--text); } }
.row-pay {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  text-align: right;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--t-hover) var(--ease-out);
}
.row-pay small { display: block; font-size: 0.68rem; font-weight: 400; color: var(--text-3); }
.row-pay .nosalary { color: var(--text-3); font-weight: 400; }

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .row-pay { grid-row: auto; grid-column: 1; text-align: left; margin-top: 0.15rem; }
}

/* появление строк: однократно, мягко, с каскадом */
@media (prefers-reduced-motion: no-preference) {
  .rows .row {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out),
                background var(--t-hover) var(--ease-out);
    @starting-style { opacity: 0; transform: translateY(8px); }
  }
  .rows .row:nth-child(2) { transition-delay: 40ms; }
  .rows .row:nth-child(3) { transition-delay: 80ms; }
  .rows .row:nth-child(4) { transition-delay: 120ms; }
  .rows .row:nth-child(5) { transition-delay: 160ms; }
  .rows .row:nth-child(6) { transition-delay: 200ms; }
  .rows .row:nth-child(n+7) { transition-delay: 240ms; }
}

/* ---------- легаси-карточки (компания, кандидат) ---------- */
.vlist { display: flex; flex-direction: column; gap: 0.75rem; }
.vcard {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--t-hover) var(--ease-out), background var(--t-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .vcard:hover { border-color: var(--text-3); background: var(--surface-2); }
}
.vcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.vcard h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; }
.vcard-title-link { color: inherit; text-decoration: none; }
.vcard-title-link::after { content: ""; position: absolute; inset: 0; }
.company-link {
  position: relative;
  z-index: 1;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) { .company-link:hover { color: var(--money); } }
.ago {
  flex-shrink: 0;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--text-3);
}
.company { margin-top: 0.25rem; font-size: 0.9rem; color: var(--text-2); }
.salary {
  margin-top: 0.5rem;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--money);
}

/* ---------- страница вакансии ---------- */
.detail-head { margin-bottom: 1.5rem; }
.detail-head .company { font-size: 0.95rem; margin-top: 0.5rem; }
.pay-hero {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--money);
  margin-top: 0.9rem;
  line-height: 1.15;
}
.pay-hero .unit { font-size: 0.55em; font-weight: 400; color: var(--text-2); }
.pay-sub { margin-top: 0.35rem; font-size: 0.85rem; color: var(--text-2); }
.pay-sub .ok { color: var(--money); }

.passport {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin: 1.4rem 0 0;
}
.pass-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.pass-tile .k {
  display: block;
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 0.25rem;
}
.pass-tile .v { font-size: 0.86rem; font-weight: 600; line-height: 1.4; }
.pass-tile .v-sub { display: block; margin-top: 0.3rem; font-family: var(--font-data); font-size: 0.66rem; line-height: 1.45; color: var(--text-3); }
.pass-tile .v.ok { color: var(--money); }
.pass-tile .v .num { font-weight: 600; }

.section { margin-top: 1.75rem; }
.section h2 {
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.6rem;
}
.section p { color: var(--text-2); margin-bottom: 0.9rem; }
.section p:last-child { margin-bottom: 0; }
.section b { color: var(--text); font-weight: 600; }

/* ---------- кнопки ---------- */
.btn, .btn-tg, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), filter var(--t-hover) var(--ease-out);
}
.btn:active, .btn-tg:active, .btn-ghost:active { transform: scale(0.97); }

/* .btn — легаси-имя главной кнопки: теперь это TG-действие */
.btn, .btn-tg { background: var(--tg); color: #06121a; }
@media (hover: hover) and (pointer: fine) { .btn:hover, .btn-tg:hover { filter: brightness(1.08); } }

.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--surface); filter: none; } }

.back-link {
  font-family: var(--font-data);
  font-size: 0.78rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--text); } }

.apply { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.apply .hint { font-family: var(--font-data); font-size: 0.72rem; color: var(--text-3); }

/* ---------- пейджер ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.pager a { color: var(--text-2); font-weight: 600; text-decoration: none; transition: color var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .pager a:hover { color: var(--money); } }
.pager .off { color: var(--text-3); }

/* ---------- пустые состояния ---------- */
.empty { text-align: center; padding: clamp(3rem, 12vh, 6rem) 0; }
.empty h1, .empty .page-title { margin-bottom: 0.75rem; }
.empty p { color: var(--text-2); max-width: 28rem; margin: 0 auto; }
.empty .btn { margin-top: 1.75rem; }
.state-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

/* ---------- футер ---------- */
footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0;
  font-size: 0.8rem;
  color: var(--text-3);
}
footer.site-foot .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer.site-foot a { color: var(--text-2); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { footer.site-foot a:hover { color: var(--text); } }
footer.site-foot .foot-note { font-family: var(--font-data); font-size: 0.7rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .btn:active, .btn-tg:active, .btn-ghost:active { transform: none; }
  .row, .vcard, .btn, .btn-tg, .btn-ghost { transition: none; }
}
