:root {
  --bg: #070908;
  --bg-elevated: #0e120f;
  --surface: #141a16;
  --surface-2: #1b231d;
  --border: #263029;
  --text: #f1f3f7;
  --text-muted: #97a0b0;
  --accent: #35d67d;
  --accent-hover: #52e695;
  /* Заливка кнопок — темнее основного зелёного, чтобы белый текст проходил по контрасту */
  --accent-fill: #147a3d;
  --accent-fill-hover: #1a9049;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(53, 214, 125, 0.13);
  --accent-line: rgba(53, 214, 125, 0.34);
  --accent-line-strong: rgba(53, 214, 125, 0.55);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--text-muted); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-accent {
  background: var(--accent-fill);
  color: var(--accent-contrast);
}
.btn-accent:hover { background: var(--accent-fill-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 9px 18px; font-size: 14px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 8, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.logo { display: flex; align-items: center; gap: 11px; }
.logo-img { height: 36px; width: auto; display: block; flex-shrink: 0; }

.site-nav {
  display: flex;
  gap: 30px;
  margin-right: auto;
}

.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active { color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 18px; }

.header-phone {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent); }

.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ---------- Хиро ---------- */

.hero {
  position: relative;
  padding: 100px 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  /* diesel-hero.jpg — фигура вырезана на чёрный фон (см. scripts/clean-hero-photo.js),
     весь текст с исходного постера убран. contain, а не cover — фигура должна быть видна
     целиком, а не обрезана краями кадра; лишнее поле просто сливается с --bg. */
  background-image: url('/images/backgrounds/diesel-hero.jpg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right bottom;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0.15) 0%, rgba(7, 9, 8, 0.4) 75%, rgba(7, 9, 8, 0.05) 100%),
    radial-gradient(900px 480px at 78% 8%, rgba(53, 214, 125, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 780px; }

.hero-eyebrow {
  display: inline-block;
  padding: 7px 15px;
  margin-bottom: 26px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 5.6vw, 60px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 590px;
  margin-bottom: 38px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Своя секция под хиро со сплошным фоном — плашки не должны накладываться на фото. */
.hero-stats-band {
  padding: 40px 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label { font-size: 14px; color: var(--text-muted); }

/* ---------- Секции ---------- */

.section { padding: 84px 0; }
.section-alt { background: var(--bg-elevated); border-block: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head p { color: var(--text-muted); margin-top: 10px; max-width: 560px; }

/* ---------- Карточки-шаги (переиспользуются и для условий приёма, и для этапов сделки) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step {
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  color: var(--accent);
  font-size: 19px;
  font-weight: 800;
}

.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 9px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ---------- Списки-чеклисты ---------- */

.terms-list { display: grid; gap: 12px; }
.terms-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
  font-size: 15px;
}
.terms-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- Баннеры разделов (фоновые фото) ---------- */

.banner {
  position: relative;
  background-size: cover;
  background-position: center 30%;
  overflow: hidden;
}

/* Затемнение снизу — текст остаётся читаемым на любом участке фото,
   плюс плавный переход в сплошной фон страницы у нижнего края. */
.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 8, 0.45) 0%, rgba(7, 9, 8, 0.82) 65%, var(--bg) 100%);
  pointer-events: none;
}

.banner > .container { position: relative; z-index: 1; }

.section-banner {
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 58px 0 34px;
  border-bottom: 1px solid var(--border);
}

.section-banner .section-head { margin-bottom: 0; width: 100%; }

/* ---------- Страница-заголовок (без баннера) ---------- */

.page-head { padding: 60px 0 42px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(32px, 4.6vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--text-muted); margin-top: 12px; max-width: 620px; }

/* ---------- Контакты ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.contact-card {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-card h3 { font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; font-weight: 600; }
.contact-card .value { font-size: 20px; font-weight: 700; }
.contact-card a.value:hover { color: var(--accent); }
.contact-card .sub { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.about-block {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 60px;
}
.about-block h2 { font-size: 26px; font-weight: 800; margin-bottom: 20px; }
.about-block p { color: var(--text-muted); max-width: 780px; }
.about-block p + p { margin-top: 12px; }

/* ---------- CTA-полоса ---------- */

.cta-band {
  padding: 54px 44px;
  background: linear-gradient(120deg, rgba(53, 214, 125, 0.15), rgba(53, 214, 125, 0.03));
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-band h2 { font-size: clamp(22px, 3vw, 31px); font-weight: 800; letter-spacing: -0.02em; }
.cta-band p { color: var(--text-muted); margin-top: 8px; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Формы ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { resize: vertical; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.alert {
  padding: 14px 18px;
  margin-bottom: 22px;
  background: rgba(224, 133, 133, 0.1);
  border: 1px solid #6b2c2c;
  border-radius: var(--radius-sm);
  color: #e8a0a0;
  font-size: 14px;
}

/* ---------- Футер ---------- */

.site-footer {
  margin-top: 90px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand p { margin-top: 16px; font-size: 15px; max-width: 380px; }

.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; color: var(--text-muted); font-weight: 600; }
.footer-col a { display: block; font-size: 15px; padding: 4px 0; color: var(--text); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* ---------- 404 ---------- */

.error-page { padding: 130px 0; text-align: center; }
.error-page h1 { font-size: 72px; font-weight: 800; color: var(--accent); }
.error-page p { color: var(--text-muted); margin: 12px 0 28px; }

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

@media (max-width: 980px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .header-inner { height: 66px; gap: 16px; }
  .logo-img { height: 24px; width: auto; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
  }
  .nav-burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-elevated);
    border-bottom: 1px solid transparent;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .site-nav a { padding: 15px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav-toggle:checked ~ .site-nav {
    max-height: 160px;
    padding: 8px 24px 16px;
    border-bottom-color: var(--border);
  }

  .header-cta { order: -1; margin-left: auto; }
  .header-phone { display: none; }

  .hero { padding: 70px 0 60px; background-position: center bottom; }
  .section { padding: 60px 0; }
  .cta-band { padding: 36px 26px; }
  .about-block { padding: 28px 24px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .hero-stats { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
