/* Общий вид текстовых страниц сайта (правовые, вакансии, /code, /desktop, /docs) в стиле прототипа
   redesign/: цвета, шрифты, кнопки, появление заголовка по словам и блоков при прокрутке. Значения —
   те же, что в src/pages/*.html. Подключается через build/site-head.html; анимации — assets/page/doc.js. */

:root {
  --p-paper: #F6F6F3;
  --p-ink: #121212;
  --p-soft: #55585E;
  --p-line: #DCDCD6;
  --p-card: #ECECE7;
  --p-card-hover: #E4E4DE;
  --p-accent: #FF5A1F;
  --p-wrap: 1376px;
  --p-ease: cubic-bezier(.16, 1, .3, 1);
}

/* Заголовок страницы: слова поднимаются по очереди, как у h1 прототипа (.sw .w). */
.dw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.dw > span { display: inline-block; }
.dja .dsw .dw > span { transform: translateY(110%); transition: transform 1.2s var(--p-ease); transition-delay: calc(var(--i) * 75ms); }
.dja .dsw.in .dw > span { transform: none; }
/* До разбивки на слова (скрипт отложенный) заголовок не показываем, иначе он мелькнёт целиком. */
.dja main h1:not(.dsw) { opacity: 0; }

/* Блоки проявляются при прокрутке (.rv прототипа). */
.dja .drv { opacity: 0; transform: translateY(32px); filter: blur(8px); transition: opacity 1s var(--p-ease), transform 1.2s var(--p-ease), filter 1s var(--p-ease); transition-delay: calc(var(--d, 0) * 100ms); }
.dja .drv.in { opacity: 1; transform: none; filter: none; }

/* Кнопки прототипа: тёмная (.bp) и с рамкой (.bg). */
.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 6px; box-sizing: border-box;
  font: 500 16px/1 Onest, system-ui, sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .1s ease-out, background-color .2s, color .2s;
}
.pbtn:active { transform: scale(.97); }
.pbtn-dark { background: var(--p-ink); color: #fff; border: 1px solid var(--p-ink); }
.pbtn-dark:hover { background: #2B2B2B; color: #fff; }
.pbtn-line { background: transparent; color: var(--p-ink); border: 1px solid var(--p-ink); }
.pbtn-line:hover { background: #EBEBE6; }

/* Оглавление: строки с номером, текущий раздел — жирнее (.tc прототипа). */
.ptoc a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 14px 0; border-top: 1px solid var(--p-line); font-size: 13.5px; line-height: 1.4; text-decoration: none; color: var(--p-ink); opacity: .55; transition: color .2s, opacity .2s; }
.ptoc a:hover { opacity: 1; }
.ptoc a.on { opacity: 1; font-weight: 600; }
.ptoc a > span:first-child { color: var(--p-soft); font-variant-numeric: tabular-nums; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .dja .dsw .dw > span, .dja .drv { transform: none !important; opacity: 1 !important; filter: none !important; transition: none !important; }
  .pbtn { transition: none; }
}
