/*
 * rabota-novaya.ru — editorial shell / «умный каталог»
 * Тема: холодный офисный день + одна фиолетовая опора (сигнал к действию), без «крем+терракота» и без SaaS-карточек.
 * Шрифты: Epilogue (навигация, заголовки-герой) + Newsreader (длинные тексты).
 */

:root {
  color-scheme: light;
  --mist: #dde4ec;
  --fog: #e8ecf2;
  --page: #f3f5f8;
  --sheet: #fbfcfe;
  --ink: #0d1117;
  --muted: #4a5360;
  --faint: #7a8494;
  --rail: #b8c3d1;
  --signal: #4f3d8c;
  --signal-dim: rgba(79, 61, 140, 0.14);
  --focus: #1c4b82;
  --font-ui: "Epilogue", system-ui, sans-serif;
  --font-body: "Newsreader", "Georgia", "Times New Roman", serif;
  /* Основной контейнер страницы */
  --container: 1240px;
  --measure: 72ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --step--1: 0.9rem;
  --step-0: 1rem;
  --step-1: 1.12rem;
  --step-2: 1.35rem;
  --step-3: clamp(1.55rem, 1.2rem + 1.6vw, 2.1rem);
  --step-4: clamp(2rem, 1.55rem + 2.4vw, 2.75rem);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  text-rendering: optimizeLegibility;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  padding: 0.45rem 0.9rem;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  z-index: 200;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* --- Masthead --- */
.masthead {
  border-bottom: 1px solid var(--rail);
  background: linear-gradient(180deg, var(--fog) 0%, var(--page) 100%);
}

.masthead__inner {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 1.35rem var(--gutter) 1.15rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: inherit;
}

.brand__title {
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.brand__hint {
  font-size: var(--step--1);
  color: var(--muted);
  font-weight: 450;
  max-width: 26rem;
}

.brand:hover .brand__title {
  color: var(--signal);
}

.brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* --- Main + hero (единственное «смелое» место) --- */
.main {
  flex: 1;
  width: 100%;
}

.hero {
  position: relative;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 2.25rem var(--gutter) 1.5rem;
}

.hero__frame {
  position: absolute;
  left: var(--gutter);
  top: 2.1rem;
  bottom: 1.1rem;
  width: 5px;
  background: var(--signal);
  border-radius: 1px;
  opacity: 0.92;
}

.hero__content {
  position: relative;
  padding-left: calc(var(--gutter) + 1.15rem);
  max-width: calc(var(--measure) + 2rem);
}

.hero__label {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-ui);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 22ch;
}

.hero__lede {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
  max-width: 38rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crumbs {
  margin-top: 1.25rem;
}

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--faint);
}

.crumbs__item a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--rail);
  text-underline-offset: 0.15em;
}

.crumbs__item a:hover {
  color: var(--signal);
  text-decoration-color: var(--signal-dim);
}

.crumbs__item--current {
  color: var(--ink);
  font-weight: 500;
  max-width: 100%;
}

/* --- Sheet (контентная колонка) --- */
.sheet {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) 3.5rem;
}

.prose {
  font-family: var(--font-body);
  font-size: var(--step-1);
  line-height: 1.72;
  color: var(--ink);
  max-width: var(--measure);
}

.prose--intro {
  padding: 1.75rem 1.5rem 1.5rem;
  margin: 0 0 1rem;
  background: var(--sheet);
  border: 1px solid var(--rail);
  border-left: 4px solid var(--signal);
  box-shadow: 0 1px 0 var(--mist);
}

.prose--reading {
  padding-top: 0.25rem;
}

.prose p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--signal);
  text-underline-offset: 0.18em;
}

.prose a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* --- Индексы городов / вакансий --- */
.index-block {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rail);
}

.index-block__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  max-width: var(--measure);
}

.index-block__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--step-2);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.index-block__note {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--muted);
  font-style: italic;
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rail);
}

.index-list li {
  margin: 0;
  border-bottom: 1px solid var(--rail);
}

.index-list__link {
  display: block;
  padding: 0.65rem 0.15rem 0.65rem 0;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 480;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.45;
  transition: background 0.12s ease, color 0.12s ease, padding-left 0.12s ease;
}

.index-list__link:hover {
  background: var(--signal-dim);
  padding-left: 0.35rem;
  color: var(--signal);
}

@media (min-width: 52rem) {
  .index-list--dense {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .index-list--dense li:nth-child(odd) {
    border-right: 1px solid transparent;
  }
}

/* --- Footer --- */
.foot {
  margin-top: auto;
  border-top: 1px solid var(--rail);
  background: var(--fog);
}

.foot__inner {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 1.1rem var(--gutter) 1.75rem;
}

.foot__line {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--muted);
}

/* --- 404 --- */
.page-404 .hero__title {
  font-size: var(--step-3);
}

.sheet-title {
  font-family: var(--font-ui);
  font-size: var(--step-3);
  margin: 0 0 1rem;
}
