/* ============================================================
   TruthAuto — «правда как документооборот»
   Палитра: бетонно-белый / бланк / графит / сталь / чернила
   Шкала отступов: 8 16 24 40 64 96 140
   ============================================================ */

:root {
  --paper: #F2F4F3;
  --blank: #FFFFFF;
  --ink-text: #16191B;
  --steel: #5E6A70;
  --line: #D6DCDA;
  --stamp: #2B3FD1;
  --stamp-soft: #E8EBFB;
  --wax: #B3341F;
  --ok: #1F7A46;

  --font-display: "Tektur", "Arial Narrow", sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 140px;

  --radius: 3px;
  --container: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- типографика ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 8.5vw, 118px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin-bottom: var(--s3);
  max-width: 20ch;
}

.h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
}

.lead {
  font-size: 20px;
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: var(--s4);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.muted-s { color: var(--steel); font-size: 12px; }

.eyebrow {
  display: block;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: var(--s3);
}

.ta-r { text-align: right; }

.note {
  color: var(--steel);
  max-width: 56ch;
  margin-top: var(--s3);
}

/* ---------- каркас ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section { padding-block: var(--s6) 0; }
.section:last-of-type { padding-bottom: var(--s6); }

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s3) var(--s5);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
}

.section-grid__label {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  position: sticky;
  top: 96px;
  align-self: start;
}

.section-grid__num {
  color: var(--stamp);
  font-weight: 700;
  font-size: 15px;
}

.section-grid__name {
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
}

/* ---------- бланки (поверхность документа) ---------- */

.blank {
  background: var(--blank);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- штампы ---------- */

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 1.5px solid currentColor;
  border-radius: 2px;
  padding: 5px 8px 4px;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.stamp--xs { font-size: 10px; padding: 4px 6px 3px; }
.stamp--wax { color: var(--wax); }
.stamp--ok { color: var(--ok); }

.stamp[data-reveal] { opacity: 0; }
.stamp.is-stamped {
  opacity: 1;
  animation: stamp-in 0.28s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-7deg) scale(1.35); }
  to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  color: var(--blank);
  background: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: var(--radius);
  padding: 17px 28px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: #1F30B4; border-color: #1F30B4; }

.btn--small { font-size: 14px; padding: 11px 16px; }

.btn--ghost {
  background: transparent;
  color: var(--stamp);
}
.btn--ghost:hover { background: var(--stamp-soft); color: var(--stamp); }

.link-more {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.link-more:hover { border-color: var(--ink-text); }

.link-plain { text-decoration-color: var(--line); }

/* ---------- шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__in {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding-block: var(--s2);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--stamp);
}

.wordmark__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--ink-text);
}

.nav {
  display: flex;
  gap: var(--s3);
  margin-left: auto;
}

.nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--steel);
}
.nav a:hover { color: var(--ink-text); }

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.header__tel {
  text-decoration: none;
  font-weight: 500;
}

/* ---------- hero ---------- */

.hero { padding-block: var(--s6) var(--s6); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5);
  align-items: start;
}

.hero__copy { padding-top: var(--s3); }

.hero__lead {
  font-size: 21px;
  line-height: 1.55;
  max-width: 42ch;
  margin-top: var(--s4);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s4);
}

.hero__hint {
  color: var(--steel);
  max-width: 46ch;
  margin-top: var(--s5);
  padding-left: var(--s2);
  border-left: 2px solid var(--stamp);
}

/* ---------- наряд-заказ (сигнатура) ---------- */

.workorder {
  padding: var(--s3);
  box-shadow: 0 24px 48px -32px rgba(22, 25, 27, 0.28);
}

/* строки бланка «печатаются» при загрузке */
.wo-line { opacity: 0; }
.is-printed .wo-line {
  animation: print-line 0.3s ease-out both;
}
.is-printed .wo-line:nth-child(1) { animation-delay: 0.15s; }
.is-printed .wo-line:nth-child(2) { animation-delay: 0.35s; }
.is-printed .wo-line:nth-child(3) { animation-delay: 0.55s; }
.is-printed .wo-line:nth-child(4) { animation-delay: 0.8s; }
.is-printed .wo-line:nth-child(5) { animation-delay: 0.8s; }
.is-printed .wo-line:nth-child(6) { animation-delay: 1.05s; }
.is-printed .wo-line:nth-child(7) { animation-delay: 1.25s; }

.no-motion .wo-line, .no-motion.is-printed .wo-line { opacity: 1; animation: none; }

@keyframes print-line {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

.workorder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 1px dashed var(--line);
}

.workorder__num { font-weight: 700; font-size: 14px; }

.workorder__car { padding-block: var(--s2); }

.workorder__model { font-weight: 600; margin-bottom: 2px; }

.workorder__rows {
  border-top: 1px dashed var(--line);
  padding-block: var(--s1);
}

.wo-row {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  padding-block: 10px;
}

.wo-row + .wo-row { border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }

.wo-row__name { flex: 1; font-size: 15px; }
.wo-row__name .muted-s { display: block; }
.wo-row__sum { font-size: 14px; white-space: nowrap; }
.wo-row--declined .wo-row__name,
.wo-row--declined .wo-row__sum { text-decoration: line-through; color: var(--steel); }

/* запрос на согласование */
.approval {
  background: var(--stamp-soft);
  border: 1px solid color-mix(in srgb, var(--stamp) 32%, transparent);
  border-radius: var(--radius);
  padding: var(--s2);
  margin-block: var(--s2);
}

.approval__label {
  color: var(--stamp);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
  margin-bottom: var(--s1);
}

.approval__text { font-size: 14.5px; line-height: 1.55; }
.approval__text .mono { font-size: 14px; font-weight: 700; }

.approval__actions {
  display: flex;
  gap: var(--s1);
  margin-top: var(--s2);
}

.approval-result {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s2);
  margin-block: var(--s2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}

.workorder__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  border-top: 2px solid var(--ink-text);
  padding-top: var(--s2);
  margin-top: var(--s1);
}

.workorder__total-label {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
  color: var(--steel);
}

.workorder__total-note { font-size: 11px; color: var(--steel); }
.workorder__total-note.is-changed { color: var(--stamp); }

.workorder__total-sum { font-size: 26px; font-weight: 700; white-space: nowrap; }

.workorder__seal-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s2);
  min-height: 96px;
}

.workorder__reset {
  font-size: 11px;
  color: var(--steel);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--steel);
  cursor: pointer;
  padding: 0 0 1px;
}
.workorder__reset:hover { color: var(--ink-text); border-color: var(--ink-text); }

.workorder__sig {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-left: auto;
}

.seal {
  color: var(--stamp);
  opacity: 0.82;
  transform: rotate(-8deg);
}

.seal__text {
  font-family: var(--font-mono);
  font-size: 10.4px;
  font-weight: 500;
  letter-spacing: 0.14em;
  fill: currentColor;
}

.autograph path {
  fill: none;
  stroke: var(--stamp);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.9;
}

/* ---------- §01 три запрета ---------- */

.bans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}

.ban { padding: var(--s3); }

.ban .stamp { margin-bottom: var(--s3); }
.ban .h3 { margin-bottom: var(--s1); }
.ban p { font-size: 15px; color: var(--steel); }
.ban p strong { color: var(--ink-text); }

/* ---------- §02 шаги ---------- */

.steps {
  list-style: none;
  max-width: 720px;
}

.step {
  display: flex;
  gap: var(--s3);
  padding-block: var(--s3);
  border-top: 1px solid var(--line);
}

.step__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--steel);
  padding-top: 3px;
  min-width: 32px;
}

.step--yours .step__num { color: var(--stamp); }

.step .h3 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s1);
}

.step p { color: var(--steel); max-width: 58ch; }

/* ---------- §03 кабинет ---------- */

.cabinet {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--s4);
  align-items: start;
}

.cabinet__screen { padding: var(--s3); }

.cabinet__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--line);
}
.cabinet__bar .mono:first-child { font-weight: 700; }

.cabinet__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.cabinet__table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  text-align: left;
  padding: var(--s2) var(--s1) var(--s1);
}
.cabinet__table th.ta-r { text-align: right; }

.cabinet__table td {
  padding: 12px var(--s1);
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  vertical-align: middle;
}

.cabinet__table .mono { font-size: 14px; }

.cabinet__declined td:first-child { color: var(--steel); text-decoration: line-through; }
.cabinet__declined s { text-decoration-color: var(--wax); }

.cabinet__table tfoot td {
  border-top: 2px solid var(--ink-text);
  font-weight: 600;
}
.cabinet__table tfoot .mono { font-size: 16px; font-weight: 700; }

.feed {
  list-style: none;
  margin-top: var(--s3);
  border-top: 1px dashed var(--line);
  padding-top: var(--s2);
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--steel);
}

.feed__t {
  color: var(--stamp);
  font-weight: 500;
  margin-right: var(--s1);
}

.cabinet__notes {
  list-style: none;
  display: grid;
  gap: var(--s3);
  font-size: 15px;
  color: var(--steel);
}

.cabinet__notes strong {
  display: block;
  color: var(--ink-text);
  font-weight: 600;
}

/* ---------- §04 удостоверения ---------- */

.badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}

.badge {
  padding: var(--s3);
  border-top: 3px solid var(--stamp);
}

.badge__id {
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin-bottom: var(--s3);
}

.badge__name { margin-bottom: var(--s3); }

.badge__meta { display: grid; gap: 10px; }

.badge__meta div {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.badge__meta dt { color: var(--steel); }
.badge__meta dd { font-weight: 500; text-align: right; }

/* ---------- §05 цена ---------- */

.formula {
  font-size: 15px;
  font-weight: 500;
  color: var(--stamp);
  border: 1px dashed color-mix(in srgb, var(--stamp) 45%, transparent);
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
  display: inline-block;
  margin-bottom: var(--s4);
}

.estimate { max-width: 720px; }

.estimate__head {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  flex-wrap: wrap;
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
}
.estimate__head .mono:first-child { font-weight: 700; }

.estimate__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.estimate__table td {
  padding: 14px var(--s3);
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.estimate__table tr td:first-child { padding-right: var(--s2); }
.estimate__table .mono { font-size: 14px; white-space: nowrap; }

.estimate__table tfoot td {
  border-top: 2px solid var(--ink-text);
  font-weight: 600;
}
.estimate__table tfoot .mono { font-size: 17px; font-weight: 700; }

.price-rules {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s4);
  max-width: 62ch;
}
.price-rules p { color: var(--steel); }
.price-rules strong { color: var(--ink-text); }

/* ---------- §06 журнал ---------- */

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.case { padding: var(--s3); }

.case__meta {
  color: var(--steel);
  font-size: 12px;
  margin-bottom: var(--s2);
}

.case p:not(.mono) { font-size: 15px; }

.case__result {
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px dashed var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--stamp);
}

/* ---------- §07 вопросы ---------- */

.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4) var(--s5);
  max-width: 980px;
}

.faq__item dt { margin-bottom: var(--s1); }
.faq__item dd { color: var(--steel); font-size: 15px; }

/* ---------- §08 запись ---------- */

.signup {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--s4);
  align-items: start;
}

.form { padding: var(--s3); display: grid; gap: var(--s3); }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.form__field { display: grid; gap: var(--s1); }

.form__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--steel);
}

.form input,
.form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink-text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px var(--s2);
  width: 100%;
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--stamp);
  outline-offset: -1px;
}

.form input.is-invalid { border-color: var(--wax); }

.form__submit { justify-self: start; }

.form__fine { font-size: 11px; color: var(--steel); max-width: 52ch; }

.form-done {
  padding: var(--s4);
  display: grid;
  gap: var(--s2);
  justify-items: start;
}

.signup__aside {
  display: grid;
  gap: var(--s1);
  align-content: start;
}
.signup__aside .muted-s {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin-top: var(--s2);
}
.signup__aside > .muted-s:first-child { margin-top: 0; }

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

.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s4);
  margin-top: var(--s6);
}

.footer__in {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  color: var(--steel);
}

.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--ink-text); }

/* ---------- адаптив ---------- */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .workorder { max-width: 560px; }
  .section-grid {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
  .section-grid__label {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: var(--s2);
  }
  .cabinet, .signup { grid-template-columns: 1fr; }
  .bans, .badges { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding-block: var(--s5) 0; }
  .section:last-of-type { padding-bottom: var(--s5); }
  .hero { padding-block: var(--s4) var(--s5); }
  .nav { display: none; }
  .header__tel { display: none; }
  .header__cta { margin-left: auto; }
  .bans, .badges, .cases, .faq { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .estimate__table td { padding-inline: var(--s2); }
  .estimate__table tr td:nth-child(2) { display: none; }
  .workorder__seal-row { min-height: 0; }
}

/* ---------- reduced motion ---------- */

@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;
  }
}
