/* ==========================================================================
   Автосервис «ОСЬ» — демонстрационный сайт агентства НАРТОС
   Направление: лист технологической карты.
   Холодная бумага, угольные выносные линии, номера позиций в кружках,
   один кислотный маркер разметки. Тёмная сталь — ровно одна полоса.
   ========================================================================== */

/* --- Шрифты: только локальные .woff2, ни одного внешнего запроса --------- */

@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-400-cyrillic.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-500-cyrillic.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-600-cyrillic.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-600-latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-700-cyrillic.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-700-latin.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-400-cyrillic.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-500-cyrillic.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-600-cyrillic.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-600-latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-700-cyrillic.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  src: url('../fonts/geologica-700-latin.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

/* --- Токены -------------------------------------------------------------- */

:root {
  /* Поверхности: холодная бумага, ни грамма тепла */
  --paper:      #edf0f1;
  --paper-hi:   #f8fafa;
  --paper-lo:   #e2e7e9;
  --steel:      #191f22;
  --steel-hi:   #242c30;

  /* Чернила. Вторичный тонирован в холод от бумаги, не нейтрально-серый */
  --ink:        #14181a;
  --ink-2:      #495256;
  --ink-3:      #626c70;
  --ink-on-steel:   #e6ebec;
  --ink-2-on-steel: #97a3a8;

  /* Линии чертежа */
  --rule:       #c3ccd0;
  --rule-soft:  #d6dde0;
  --rule-steel: #394348;

  /* Единственный акцент: разметочный маркер. Не более 10% экрана */
  --marker:     #d6ed17;
  --marker-lo:  #c2d800;
  --on-marker:  #2e3400;

  /* Сигнальный красный дефектовки. Только «требует замены» */
  --defect:     #c22b14;
  --defect-bg:  #fbe7e3;

  /* Типографика */
  --font-text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-tech: 'Geologica', 'Golos Text', system-ui, sans-serif;

  --t-display: clamp(2.25rem, 1.35rem + 4.1vw, 4.75rem);
  --t-h1:      clamp(1.85rem, 1.25rem + 2.5vw, 3rem);
  --t-h2:      clamp(1.45rem, 1.12rem + 1.4vw, 2.1rem);
  --t-h3:      clamp(1.12rem, 1rem + 0.5vw, 1.35rem);
  --t-body:    clamp(1rem, 0.96rem + 0.18vw, 1.075rem);
  --t-small:   0.9375rem;
  --t-meta:    0.8125rem;

  /* Крупные числа — главный носитель смелости в этой системе */
  --t-figure:  clamp(2.4rem, 1.6rem + 3.4vw, 4.25rem);
  --t-figure-s: clamp(1.6rem, 1.2rem + 1.7vw, 2.35rem);

  /* Ритм */
  --gap-section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --gap-block:   clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --pad-x:       clamp(1.15rem, 0.4rem + 3.2vw, 3.5rem);
  --measure:     68ch;

  --dur:  220ms;
  --dur-slow: 620ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Сброс и основа ------------------------------------------------------ */

/* На мелких экранах служебный текст крупнее: 13 px читается плохо,
   а половина посетителей приходит с телефона */
@media (max-width: 760px) {
  :root {
    --t-meta: 0.875rem;
    --pad-x: 1.15rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.62;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-tech);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.25; }

p { margin: 0 0 1.05em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--marker-lo); }

ul, ol { margin: 0 0 1.05em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

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

.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Ссылка «перейти к содержанию» проявляется при переходе с клавиатуры */
a.vh:focus {
  position: fixed;
  top: 0.5rem; left: 0.5rem;
  z-index: 100;
  width: auto; height: auto;
  margin: 0; overflow: visible; clip: auto;
  padding: 0.85rem 1.25rem;
  min-height: 2.75rem;
  display: inline-flex; align-items: center;
  background: var(--marker);
  color: var(--on-marker);
  font-family: var(--font-tech);
  font-weight: 600;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
}

/* Цифры — всегда табличные, это измерительная система */
.num, .figure, table, .spec, time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* --- Каркас листа -------------------------------------------------------- */

.wrap {
  width: min(1400px, 100%);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.wrap--narrow { width: min(920px, 100%); }

/* Полей листа по краям окна нет: линии position: fixed рисовались поверх
   тёмных секций и читались там как белые. Границу листа держат рамки
   блоков и приводочные уголки на схеме. */
.sheet {
  position: relative;
}

section { padding-block: var(--gap-section); }
section + section { padding-top: 0; }

/* --- Заголовок секции: позиция, название, выносная линия ----------------- */

.shead {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: clamp(0.9rem, 2vw, 1.5rem);
  margin-bottom: var(--gap-block);
}
.shead__pos {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.shead__body { min-width: 0; }
.shead__title {
  display: flex; align-items: baseline; gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.shead__title::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
  transform: translateY(-0.35em);
}
.shead__note {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: var(--t-small);
  margin: 0;
}
.shead__meta {
  font-family: var(--font-tech);
  font-size: var(--t-meta);
  color: var(--ink-3);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* На узком экране подпись переносится, а выносная линейка уходит на свою строку */
@media (max-width: 760px) {
  .shead__meta { white-space: normal; }
  .shead__title { gap: 0.3rem 1rem; }
  .shead__title::after { flex-basis: 100%; transform: none; margin-top: 0.35rem; }
}

/* --- Кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-tech);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper-hi); }
.btn:active { transform: translateY(1px); }

.btn--marker {
  background: var(--marker);
  border-color: var(--ink);
  color: var(--on-marker);
  font-weight: 600;
}
.btn--marker:hover { background: var(--ink); color: var(--marker); }

.btn--steel { border-color: var(--ink-2-on-steel); color: var(--ink-on-steel); }
.btn--steel:hover { background: var(--marker); border-color: var(--marker); color: var(--on-marker); }

.btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  border-style: dashed;
}
.btn[disabled]:hover { background: transparent; color: var(--ink); }

/* --- Демонстрационная полоса --------------------------------------------- */

.demo-strip {
  background: var(--ink);
  color: var(--paper-hi);
  font-family: var(--font-tech);
  font-size: var(--t-meta);
  line-height: 1.45;
  letter-spacing: 0.005em;
  padding-block: 0.6rem;
}
.demo-strip__in {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 1rem;
}
.demo-strip b {
  background: var(--marker);
  color: var(--on-marker);
  padding: 0.1rem 0.5rem;
  border-radius: 2px;
  font-weight: 600;
}

/* --- Шапка --------------------------------------------------------------- */

.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.hdr__in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
  flex: none;
}
.brand__mark {
  width: 2.5rem; height: 2.5rem;
  flex: none;
}
.brand__name {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__sub {
  display: block;
  font-family: var(--font-tech);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 0.2rem;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a {
  padding: 0.55rem 0.7rem;
  font-size: var(--t-small);
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.nav a:hover { background: var(--paper-lo); }
.nav a[aria-current='page'] {
  box-shadow: inset 0 -2px 0 var(--marker-lo);
  font-weight: 500;
}

.hdr__tel {
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.5rem 0;
}
.hdr__tel:hover { text-decoration: underline; }

.burger {
  display: none;
  width: 2.75rem; height: 2.75rem;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  flex: none;
}
.burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform var(--dur) var(--ease), background var(--dur);
}
.burger span::before,
.burger span::after {
  content: ''; position: absolute; left: 0;
  width: 18px; height: 1.5px; background: var(--ink);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.burger[aria-expanded='true'] span { background: transparent; }
.burger[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded='true'] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 1040px) {
  .burger { display: inline-flex; }
  .hdr__tel { display: none; }
  .nav {
    position: fixed;
    inset: auto 0 0 0;
    top: var(--hdr-offset, 4.5rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    padding: 0.5rem var(--pad-x) 2rem;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                visibility var(--dur);
  }
  .nav[data-open='true'] {
    transform: none; opacity: 1; visibility: visible;
  }
  .nav a {
    padding: 0.95rem 0.25rem;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 1.0625rem;
  }
  .nav .nav__tel {
    margin-top: 1.25rem;
    font-family: var(--font-tech);
    font-weight: 600;
    border: 1.5px solid var(--ink);
    border-radius: 2px;
    text-align: center;
  }
}
@media (min-width: 1041px) {
  .nav .nav__tel { display: none; }
}

/* --- Подвал -------------------------------------------------------------- */

.ftr {
  background: var(--steel);
  color: var(--ink-on-steel);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  margin-top: var(--gap-section);
}
.ftr a { color: inherit; }
.ftr__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
}
.ftr__title {
  font-family: var(--font-tech);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2-on-steel);
  margin-bottom: 1rem;
}
.ftr__list { list-style: none; margin: 0; padding: 0; }
.ftr__list li { margin-bottom: 0.15rem; }
.ftr__list a {
  text-decoration: none;
  font-size: var(--t-small);
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
}
.ftr__list a:hover { text-decoration: underline; text-decoration-color: var(--marker); }
.ftr__name {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.ftr__req {
  font-size: var(--t-meta);
  line-height: 1.65;
  color: var(--ink-2-on-steel);
}
.ftr__req b { color: var(--ink-on-steel); font-weight: 500; }
.ftr__bottom {
  margin-top: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-steel);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem;
  align-items: center;
  font-size: var(--t-meta);
  color: var(--ink-2-on-steel);
}
.ftr__bottom a {
  text-decoration-color: var(--rule-steel);
  display: inline-flex; align-items: center;
  min-height: 2.75rem;
}

/* Плейсхолдер незаполненных реквизитов — заметный, как требует методика */
.tbd {
  display: inline-block;
  background: var(--marker);
  color: var(--on-marker);
  padding: 0.05em 0.4em;
  border-radius: 2px;
  font-family: var(--font-tech);
  font-size: inherit;
  font-weight: 500;
}
