@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;600;700;800&family=Golos+Text:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============ Design tokens ============ */
:root {
  --bg: #14181d;
  --bg-raised: #191e24;
  --surface: #1d2329;
  --surface-2: #262d35;
  --border: #313841;
  --border-soft: #262c34;

  --text: #edeae2;
  --text-muted: #9ba3ac;
  --text-faint: #6b7480;

  --accent: #c6903f;
  --accent-bright: #e0ac5c;
  --accent-ink: #14181d;
  --steel: #5a87a8;
  --steel-bright: #7ba6c7;
  --success: #5e9b82;
  --danger: #c96a56;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1200px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 12px 32px -16px rgba(0,0,0,0.5);
  --ease: cubic-bezier(.22,.9,.32,1);
}

/* ============ Reset ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

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

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

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .section--tight { padding: 36px 0; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent-bright);
}

.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -0.01em; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.01em; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 2vw, 23px); line-height: 1.3; }
.lead-text { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-muted); line-height: 1.6; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: #1a1204; }
.btn--primary:hover { background: var(--accent-bright); }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--steel-bright); color: var(--steel-bright); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 24, 29, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border-soft); }
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--steel) 130%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  color: #14181d;
}
.brand span.dim { color: var(--text-muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent);
  border-radius: 2px;
}
.nav__cta { display: flex; align-items: center; gap: 18px; }
.nav__phone { font-family: var(--font-mono); font-size: 14px; color: var(--text); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 18px; height: 2px; background: var(--text);
  position: relative; transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 880px) {
  .nav__links, .nav__phone { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu {
  position: fixed;
  top: 66px;
  left: 0;
  width: 100%;
  height: calc(100dvh - 66px);

  background: rgba(0, 0, 0, 0.95);

  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);

  padding: 24px;

  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity .25s var(--ease),
    transform .25s var(--ease),
    visibility .25s;
    z-index: 39;
  }
  .mobile-menu.is-open {  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;}
  .mobile-menu a {
    display: block; padding: 16px 4px; font-size: 20px; font-family: var(--font-display);
    border-bottom: 1px solid var(--border-soft);
  }
}
@media (min-width: 881px) { .mobile-menu { display: none; } }

/* ============ Hero + route signature ============ */
.hero {
  position: relative;
  padding: 76px 0 40px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__eyebrow { margin-bottom: 22px; }
.hero__title { margin-bottom: 22px; }
.hero__title .accent-word { color: var(--accent-bright); }
.hero__desc { max-width: 46ch; margin-bottom: 34px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.route {
  width: 100%;
  aspect-ratio: 1 / 0.82;
}
.route__path {
  fill: none;
  stroke: var(--steel-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-route 2.1s var(--ease) 0.3s forwards;
}
.route__vehicle {
  offset-path: path('M 34 210 C 120 40, 260 260, 330 120 S 470 40, 526 96');
  animation: travel 6s linear 2.4s infinite;
  opacity: 0;
}
.route.is-ready .route__vehicle { animation: travel 6s linear 2.4s infinite, fade-in .01s 2.3s forwards; }
.route__node { fill: var(--bg); stroke-width: 2; }
.route__node--west { stroke: var(--accent-bright); }
.route__node--dest { stroke: var(--success); }
.route__pulse {
  fill: var(--success);
  animation: pulse-ring 2.4s var(--ease) infinite;
  transform-origin: center;
}
.route__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: var(--text-muted);
  text-transform: uppercase;
}

@keyframes draw-route { to { stroke-dashoffset: 0; } }
@keyframes travel { to { offset-distance: 100%; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes pulse-ring {
  0% { r: 5; opacity: 0.9; }
  70% { r: 15; opacity: 0; }
  100% { r: 15; opacity: 0; }
}

/* ============ Road strip (декоративная дорога с машинками) ============ */
.road-strip {
  position: relative;
  height: 44px;
  overflow: hidden;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.road-strip__line {
  position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  transform: translateY(-50%);
  background-image: repeating-linear-gradient(to right, var(--border) 0 22px, transparent 22px 40px);
}
.road-strip__vehicle {
  position: absolute; top: 50%; left: -44px;
  width: 32px; height: 18px;
  transform: translateY(-50%);
  animation: drive-across linear infinite;
}
.road-strip__vehicle svg { width: 100%; height: 100%; display: block; }
.road-strip__vehicle--1 { color: var(--accent-bright); animation-duration: 8s; animation-delay: 0s; }
.road-strip__vehicle--2 { color: var(--steel-bright); animation-duration: 12s; animation-delay: -5s; }
.road-strip__vehicle--3 { color: var(--accent); animation-duration: 10s; animation-delay: -2.2s; width: 25px; height: 14px; }
@keyframes drive-across {
  from { left: -44px; }
  to { left: 100%; }
}

/* ============ Trust bar ============ */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.trust-bar__item {
  padding: 26px 20px;
  text-align: center;
  border-left: 1px solid var(--border-soft);
}
.trust-bar__item:first-child { border-left: none; }
.trust-bar__num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent-bright); }
.trust-bar__label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 720px) {
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .trust-bar__item:nth-child(3) { border-left: none; }
}

/* ============ Section headers ============ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.section-head .h2 { margin-top: 10px; }
@media (max-width: 640px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ============ Machine chips / grid ============ */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.machine-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 22px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.machine-card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.machine-card__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.machine-card__meta { color: var(--text-muted); font-size: 13px; margin-top: 8px; font-family: var(--font-mono); }

/* ============ Product cards ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.product-card:hover { transform: translateY(-6px); border-color: var(--steel); }
.product-card__img {
  aspect-ratio: 4/3;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
}
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.35; }
.product-card__desc { font-size: 13.5px; color: var(--text-muted); flex: 1; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.product-card__price { font-family: var(--font-mono); font-weight: 600; color: var(--accent-bright); font-size: 15px; }
.product-card__link { font-size: 13.5px; color: var(--steel-bright); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
}
.empty-state .h3 { color: var(--text); margin-bottom: 10px; }

/* ============ Catalog layout ============ */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
}
@media (max-width: 880px) {
  .catalog-layout { grid-template-columns: 1fr; }
}
.filters {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 22px;
  position: sticky;
  top: 92px;
}
@media (max-width: 880px) { .filters { position: static; } }
.filters__title { font-family: var(--font-display); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 16px; }
.filters__group { margin-bottom: 20px; }
.filters__group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.select, .text-input, textarea.text-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  color: var(--text);
  transition: border-color .2s var(--ease);
}
.select:focus, .text-input:focus { border-color: var(--steel-bright); outline: none; }
.filters__reset { width: 100%; margin-top: 4px; }
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.catalog-count { color: var(--text-muted); font-size: 14px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination button {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}
.pagination button.is-active { border-color: var(--accent); color: var(--accent-bright); }
.pagination button:hover:not(.is-active) { border-color: var(--steel); color: var(--text); }

/* ============ Product detail ============ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; gap: 32px; } }
.gallery__main {
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumbs button {
  width: 64px; height: 64px;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0;
}
.gallery__thumbs button.is-active { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-meta__sku { font-family: var(--font-mono); color: var(--text-faint); font-size: 13px; margin-bottom: 12px; }
.product-meta__price { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--accent-bright); margin: 18px 0; }
.product-meta__desc { color: var(--text-muted); margin-bottom: 26px; }

.spec-table { border-top: 1px solid var(--border-soft); margin-bottom: 30px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14.5px;
}
.spec-row__label { color: var(--text-muted); }
.spec-row__value { font-family: var(--font-mono); text-align: right; }

.fit-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.fit-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ============ Lead form ============ */
.lead-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 26px;
}
.lead-card__title { margin-bottom: 6px; }
.lead-card__hint { color: var(--text-muted); font-size: 13.5px; margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; }
.form-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 6px;
  min-height: 16px;
}
.form-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  font-size: 14px;
  display: none;
}
.form-feedback.is-success { display: block; background: rgba(94,155,130,0.14); color: var(--success); border: 1px solid rgba(94,155,130,0.35); }
.form-feedback.is-error { display: block; background: rgba(201,106,86,0.12); color: var(--danger); border: 1px solid rgba(201,106,86,0.35); }

/* ============ Steps (real sequence) ============ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 26px;
  background: var(--surface);
}
.step__num { font-family: var(--font-mono); color: var(--accent-bright); font-size: 13px; margin-bottom: 14px; }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.step__desc { color: var(--text-muted); font-size: 14px; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(120deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 720px) { .cta-band { padding: 34px 26px; } }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border-soft); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 { font-family: var(--font-display); font-size: 14px; margin-bottom: 16px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-grid a, .footer-grid p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 10px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--text-faint); flex-wrap: wrap; gap: 10px; }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.20s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ============ Page hero (inner pages) ============ */
.page-hero { padding: 56px 0 20px; border-bottom: 1px solid var(--border-soft); }
.page-hero .eyebrow { margin-bottom: 16px; }

/* ============ About page ============ */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 780px) { .value-grid { grid-template-columns: 1fr; } }
.value-card { border: 1px solid var(--border-soft); border-radius: var(--radius-m); padding: 24px; background: var(--surface); }

/* ============ Contacts page ============ */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 880px) { .contacts-grid { grid-template-columns: 1fr; } }
.contact-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.contact-line__label { width: 130px; color: var(--text-muted); font-size: 13.5px; flex-shrink: 0; }
.contact-line__value { font-family: var(--font-mono); font-size: 14.5px; }
.map-placeholder {
  aspect-ratio: 16/10;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-soft);
  background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: var(--radius-m); }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
