/* =========================================================================
   styles.css — скомпилировано из styles.scss (источник рядом).
   Тема «Заводская табличка» (build plate / homologation sheet):
   тёплая бумага, чернильные линии, единый акцент service-green.
   Светлая, техническая, адаптивная.
   ========================================================================= */

:root {
  /* ---- Бумага и чернила ---- */
  --paper:        #f1efe8;   /* фон страницы — тёплая бумага */
  --paper-inset:  #e9e6db;   /* углубления, сетка */
  --card:         #fcfbf7;   /* карточки */
  --plate:        #fffefa;   /* поверхность таблички VIN */

  --ink:          #17180f;   /* основной текст, рамки */
  --ink-soft:     #585749;   /* вторичный текст */
  --ink-faint:    #8a8979;   /* подписи, плейсхолдеры */
  --line:         #d8d5c8;   /* волосяные линии */
  --line-strong:  #c2bdac;

  /* ---- Акцент: service-green ---- */
  --green:        #1e5c3d;
  --green-bright: #2c7a50;
  --green-wash:   #e7efe7;
  --green-line:   rgba(30, 92, 61, .22);

  /* ---- Сигнальный (ошибка / «скоро») ---- */
  --amber:        #a8521c;
  --amber-wash:   #f4ead9;
  --amber-line:   rgba(168, 82, 28, .28);

  /* ---- Типографика ---- */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  /* Едва заметная инженерная сетка на бумаге */
  background-image:
    linear-gradient(rgba(23, 24, 15, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 15, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: 22px; }

.mono { font-family: var(--font-mono); font-weight: 600; letter-spacing: .02em; }

/* ---- Эйброу: монокодовая метка ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--green); border-radius: 1px;
}
.eyebrow--center { display: flex; justify-content: center; width: 100%; }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; line-height: 1; font-size: .98rem;
  padding: 13px 22px; border-radius: 8px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .12s var(--ease), background .15s var(--ease),
              box-shadow .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--green-line); }

.btn--primary {
  background: var(--green); color: #fdfdf9; border-color: var(--green);
  box-shadow: 0 10px 22px -16px rgba(30, 92, 61, .9);
}
.btn--primary:hover { background: var(--green-bright); border-color: var(--green-bright); color: #fff; text-decoration: none; }

.btn--ghost { background: var(--card); color: var(--green); border-color: var(--green-line); }
.btn--ghost:hover { background: var(--green-wash); border-color: var(--green); text-decoration: none; }

.btn--text { background: transparent; color: var(--ink-soft); border-color: transparent; padding: 10px 6px; font-weight: 500; }
.btn--text:hover { color: var(--ink); text-decoration: none; }

.btn--lg { padding: 16px 30px; font-size: 1.05rem; }

/* ---- Шапка ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(241, 239, 232, .85); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px;
  color: var(--green); background: var(--plate); border: 1.5px solid var(--ink);
}
.brand__text { letter-spacing: -.01em; font-size: 1.02rem; }

.header-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
}
.header-cta:hover { color: var(--green); text-decoration: none; }

/* ---- Героблок ---- */
.hero { padding: clamp(34px, 6vw, 74px) 0 clamp(40px, 6vw, 80px); }
.hero__inner {
  display: grid;
  gap: clamp(30px, 5vw, 66px); align-items: center;
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.06; letter-spacing: -.02em;
  margin: 0 0 18px;
}
.hero__lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--ink-soft); margin: 0 0 28px; max-width: 40ch; }
.hero__lead strong { color: var(--ink); }

/* ---- Рабочая карточка ---- */
.workcard {
  position: relative;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px;
  box-shadow: 14px 14px 0 -2px rgba(23, 24, 15, .06);
  padding: clamp(22px, 3vw, 30px);
}
/* Перфорированный «корешок» бланка сверху */
.workcard::before {
  content: ""; position: absolute; top: 13px; left: 18px; right: 18px; height: 0;
  border-top: 1.5px dashed var(--line-strong);
}
.panel { animation: fade-in .35s var(--ease) both; }

/* ---- Сигнатура: VIN как штампованная табличка ---- */
.field {
  position: relative; display: block;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--plate);
  padding: 11px 16px 13px;
  /* Заклёпки по углам */
  background-image:
    radial-gradient(circle at 11px 11px, var(--line-strong) 1.7px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 11px) 11px, var(--line-strong) 1.7px, transparent 2.4px),
    radial-gradient(circle at 11px calc(100% - 11px), var(--line-strong) 1.7px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), var(--line-strong) 1.7px, transparent 2.4px);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-line); }
.field__label {
  display: block; font-family: var(--font-mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 6px; padding-left: 14px;
}
.field__input {
  width: 100%; font-family: var(--font-mono); font-size: 1.22rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
  padding: 2px 0 2px 14px; border: none; background: transparent;
}
.field__input::placeholder { color: var(--ink-faint); letter-spacing: .08em; text-transform: none; font-weight: 400; font-size: .92rem; }
.field__input:focus { outline: none; }
.field__meta { min-height: 20px; margin-top: 10px; }
.field__hint { font-size: .8rem; color: var(--ink-soft); margin: 0; }
.field__error { font-family: var(--font-mono); font-size: .82rem; color: var(--amber); font-weight: 500; margin: 0; }

#vin-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; }
#vin-form .field { margin-bottom: 0; }
#vin-form .btn { white-space: nowrap; }

/* ---- Ожидание + таймер ---- */
.waiting { text-align: center; display: flex; flex-direction: column; align-items: center; }
.waiting__title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 8px 0 4px; }
.waiting__status { font-family: var(--font-mono); font-size: .85rem; color: var(--green); font-weight: 500; margin: 0 0 6px; min-height: 1.4em; }
.waiting__vin { color: var(--ink-soft); font-size: .85rem; margin: 0 0 20px; }
.waiting__vin span { font-family: var(--font-mono); font-weight: 600; color: var(--ink); letter-spacing: .06em; }

.countdown { position: relative; width: 168px; height: 168px; margin: 4px auto 16px; }
.countdown__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown__track { fill: none; stroke: var(--paper-inset); stroke-width: 8; }
.countdown__progress {
  fill: none; stroke: var(--green); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 339.292; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke .4s var(--ease);
}
.countdown__face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.countdown__time { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); }
.countdown__unit { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-faint); margin-top: 2px; }
.countdown.is-soon .countdown__progress { stroke: var(--amber); }

.promo {
  margin-top: 8px; width: 100%; text-align: left;
  background: var(--green-wash);
  border: 1px solid var(--green-line); border-radius: 10px; padding: 16px 18px;
}
.promo__text { font-size: .9rem; color: var(--ink-soft); margin: 0 0 12px; }
.promo__text strong { color: var(--ink); }

/* ---- Результат ---- */
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.result__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; margin-bottom: 6px; border: 1.5px solid currentColor; }
.result__icon--ok { color: var(--green); background: var(--green-wash); }
.result__icon--warn { color: var(--amber); background: var(--amber-wash); }
.result__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.result__text { color: var(--ink-soft); margin: 0 0 8px; }
.result .btn--lg { margin-top: 4px; }
.result .btn--text { margin-top: 2px; }

.manual {
  width: 100%; text-align: left; background: var(--amber-wash);
  border: 1px solid var(--amber-line); border-radius: 10px; padding: 18px 20px; margin-top: 6px;
}
.manual__lead { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.manual__steps { margin: 0 0 16px; padding-left: 20px; color: var(--ink-soft); }
.manual__steps li { margin: 4px 0; }
.manual .btn { margin-right: 8px; }

/* ---- Сигнатура-арт: лёгкий технический бланк ---- */
.hero__art { display: flex; justify-content: center; }
.blueprint {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 4 / 3;
  border-radius: 14px; padding: 26px; color: var(--ink);
  background: var(--plate); border: 1.5px solid var(--ink);
  box-shadow: 14px 14px 0 -2px rgba(23, 24, 15, .06);
  overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
.blueprint__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(23, 24, 15, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 15, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(120% 100% at 50% 50%, #000 60%, transparent 100%);
}
.blueprint__car { position: relative; width: 100%; height: auto; color: var(--ink); }
.blueprint__badge {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500; letter-spacing: .2em;
  color: var(--green); border: 1px solid var(--green-line); border-radius: 5px; padding: 4px 9px;
}
.blueprint__dims {
  position: relative; text-align: center; margin-top: 16px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .22em; color: var(--ink-faint);
}
/* угловые регистрационные кресты */
.blueprint::before, .blueprint::after {
  content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) center/100% 1.2px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) center/1.2px 100% no-repeat;
}
.blueprint::before { top: 12px; right: 14px; }
.blueprint::after { bottom: 12px; left: 14px; }

/* ---- Секции ---- */
.section { padding: clamp(44px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.section--info { background: linear-gradient(180deg, transparent, rgba(252, 251, 247, .6)); }
.section__title { font-family: var(--font-display); font-weight: 600; text-align: center; font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.15; letter-spacing: -.01em; margin: 0 auto 16px; max-width: 24ch; }
.section__lead { text-align: center; color: var(--ink-soft); max-width: 62ch; margin: 0 auto 40px; }
.section__lead strong { color: var(--ink); }

.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 940px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 26px 22px 24px; }
.step__num {
  display: inline-block; font-family: var(--font-mono); font-size: .82rem; font-weight: 700; letter-spacing: .1em;
  color: var(--green); margin-bottom: 16px;
}
.step__num::before { content: "0"; }
.step__num::after { content: " / 03"; color: var(--ink-faint); font-weight: 400; }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; margin: 0 0 7px; }
.step__text { color: var(--ink-soft); margin: 0; font-size: .94rem; }

.note { max-width: 760px; margin: 32px auto 0; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 8px; padding: 16px 20px; color: var(--ink-soft); font-size: .94rem; }
.note strong { color: var(--ink); }

/* ---- Сетка марок ---- */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; margin-top: 8px; }
.brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 18px 12px;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.brand-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 6px 6px 0 -1px rgba(23, 24, 15, .06); }
.brand-card img { width: 50px; height: 50px; object-fit: contain; }
.brand-card span { font-family: var(--font-mono); font-size: .74rem; font-weight: 500; color: var(--ink-soft); line-height: 1.3; letter-spacing: .01em; }

/* ---- Подвал ---- */
.site-footer { border-top: 1px solid var(--ink); background: var(--card); padding: 28px 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.site-footer__note { color: var(--ink-soft); font-size: .86rem; margin: 0; max-width: 64ch; }
.site-footer__copy { font-family: var(--font-mono); color: var(--ink-faint); font-size: .78rem; letter-spacing: .04em; margin: 0; }

/* ---- Анимации ---- */
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.is-busy { pointer-events: none; opacity: .75; }

/* ---- Адаптив ---- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .blueprint { max-width: 380px; }
  .hero__lead { max-width: none; }
  .steps { grid-template-columns: 1fr; max-width: 540px; }
}
@media (max-width: 560px) {
  .header-cta { display: none; }
  #vin-form { grid-template-columns: 1fr; }
  #vin-form .btn { width: 100%; }
  .countdown { width: 150px; height: 150px; }
  .brands-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
  .brand-card img { width: 42px; height: 42px; }
  .workcard { box-shadow: 8px 8px 0 -2px rgba(23, 24, 15, .06); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .countdown__progress { transition: none; }
}
