:root {
  --ink: #16181b;
  --paper: #f4f3f0;
  --sand: #e9e7e2;
  --white: #fff;
  --red: #c8201a;
  --red-dark: #94140f;
  --red-soft: #fbe7e5;
  --accent-light: #ff6a5f;
  --muted: #55595f;
  --muted-dark: #c9cacc;
  --on-dark: #e9e9e6;
  --line: #e2e0db;
  --line-dark: #3a3e44;
  --field-border: #c9c6bf;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --container: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

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

a { color: var(--red); }
a:hover { color: var(--red-dark); }

input, select, textarea { font: inherit; font-size: 16px; }

input:focus, select:focus, textarea:focus,
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

.container { max-width: var(--container); margin: 0 auto; }

.section { padding: 72px 24px; }
.section > .container { display: flex; flex-direction: column; gap: 32px; }
.section--dark { background: var(--ink); color: var(--white); }
.section--red { background: var(--red); color: var(--white); }
.section--sand { background: var(--sand); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  align-items: end;
  justify-content: space-between;
}
.section-head p { margin: 0; max-width: 480px; color: var(--muted); font-size: 16px; }

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
}

.grid { display: grid; gap: 16px; }

.btn {
  display: inline-block;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--white); background: #b01c16; }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { color: var(--ink); background: #f1f0ec; }
.btn--start { align-self: start; }

.muted { color: var(--muted); line-height: 1.55; }

/* Header */
.site-header { background: var(--ink); color: var(--white); }
.site-header .container {
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; gap: 12px; align-items: center; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand__logo {
  width: 64px; height: 44px;
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  flex: none;
}
.brand__logo img { width: 100%; height: 100%; object-fit: cover; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 18px; }

.nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--white); }

.phone-btn { padding: 12px 20px; min-height: 0; white-space: nowrap; }

/* Hero */
.hero { background: var(--ink); color: var(--white); overflow: hidden; }
.hero .container {
  padding: 48px 24px 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.hero__text { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__badge {
  align-self: start;
  background: var(--red);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 2vw, 24px);
  padding: 10px 18px;
  border-radius: 8px;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 8vw, 58px);
  line-height: 1.05;
  text-wrap: balance;
  text-transform: uppercase;
}
.hero__lead { margin: 0; font-size: 20px; line-height: 1.5; color: var(--on-dark); max-width: 580px; }
.hero__lead b { color: var(--white); }

.search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.search input {
  flex: 1 1 260px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 8px;
  border: 0;
  background: var(--white);
  color: var(--ink);
}
.search .btn { padding: 0 26px; }
.search-note { margin: 0; font-size: 15px; color: #ffd3cf; }

.checks { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--on-dark); }
.checks span { display: flex; gap: 8px; align-items: center; }

.hero__media { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; }
.hero__photo {
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

/* Catalog */
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.cat-card:hover { color: var(--ink); border-color: var(--red); transform: translateY(-2px); }
.cat-card__num {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--red-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--red);
  font-size: 18px;
}
.cat-card__title { font-weight: 700; font-size: 19px; }
.cat-card__desc { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Engines */
.section--red .section-head p { font-size: 17px; line-height: 1.55; color: #ffe3e0; }
.engines-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.engine-card {
  background: var(--ink);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.engine-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
.engine-card__title { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.engine-card__desc { color: var(--muted-dark); line-height: 1.55; }

/* Products banner */
.banner { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.banner img { width: 100%; height: auto; }

/* Service */
.service-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service-card {
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card__title { font-weight: 700; font-size: 20px; }
.service-card__desc { color: var(--muted-dark); line-height: 1.55; }

/* Gallery */
.gallery-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.gallery-item { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery-item img { width: 100%; height: 280px; object-fit: cover; border-radius: 14px; }
.gallery-item figcaption { display: flex; flex-direction: column; gap: 2px; }
.gallery-item__title { font-weight: 700; font-size: 17px; }
.gallery-item__sub { color: var(--muted); font-size: 15px; }

/* Why */
.why-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.why-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}
.why-item__title { font-weight: 700; font-size: 19px; }

/* Steps */
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step {
  background: var(--white);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step__num { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--red); }
.step__title { font-weight: 700; font-size: 18px; }
.step__desc { color: var(--muted); line-height: 1.5; }

/* Partner (factory representative) */
.section > .container.partner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.partner__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.partner__text > p { margin: 0; font-size: 17px; }
.partner__facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  font-size: 16px;
}
.partner__facts dt { font-weight: 700; }
.partner__facts dd { margin: 0; }
.partner__card {
  flex: 1 1 420px;
  min-width: 0;
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 16px 40px rgba(22, 24, 27, .18);
}
@media (max-width: 600px) {
  .partner__facts { grid-template-columns: 1fr; gap: 2px; }
  .partner__facts dd { margin-bottom: 10px; }
}

/* Request */
.section.request > .container { flex-direction: row; flex-wrap: wrap; gap: 40px; }
.contacts { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contacts > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.contacts__list { display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.contacts__list a { white-space: nowrap; }

.request-form {
  flex: 1 1 460px;
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--line);
}
.request-form label { font-weight: 700; font-size: 15px; }
.request-form input,
.request-form textarea {
  border: 1px solid var(--field-border);
  border-radius: 8px;
  margin-top: -8px;
  color: var(--ink);
  background: var(--white);
}
.request-form input { min-height: 48px; padding: 0 14px; }
.request-form textarea { padding: 12px 14px; resize: vertical; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #9ea1a6; padding: 32px 24px; }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-size: 14px;
}
.site-footer__brand { display: flex; gap: 12px; align-items: center; }
.site-footer__logo {
  width: 52px; height: 36px;
  border-radius: 6px;
  background: var(--white);
  overflow: hidden;
  flex: none;
}
.site-footer__logo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .section { padding: 56px 16px; }
  .site-header .container, .hero .container { padding-left: 16px; padding-right: 16px; }
  .site-footer { padding: 32px 16px; }
  .request-form { padding: 24px; }
  .hero__lead { font-size: 18px; }
}
