/* ============================================================
   «За рулём 4x4» — стили сайта
   Цвета и шрифты взяты из дизайна Claude Design
   ============================================================ */

:root {
  --accent: #ec6f1b;        /* фирменный оранжевый */
  --dark: #16181c;          /* тёмный фон hero и панели контактов */
  --text: #16181c;          /* основной текст на светлом */
  --text-on-dark: #eceae5;  /* текст на тёмном */
  --muted: #6b665c;         /* приглушённый текст на светлом */
  --muted-dark: #8a8578;    /* подписи, моноширинные метки */
  --muted-hero: #c3beb4;    /* подзаголовок в hero */
  --border: #dcdad3;        /* границы полей */
  --border-light: #e7e5df;  /* граница шапки */
  --bg-field: #fbfbfa;      /* фон полей ввода */
  --success: #2f9e56;
  --error: #d84b2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* Скрытие элементов (input file, поле-ловушка) */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}
.no-scroll { overflow: hidden; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
  transition: filter .15s, opacity .15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--dark);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  filter: none;
}

.link-btn {
  font-family: inherit;
  font-size: 14px;
  color: var(--success);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ============ Шапка ============ */
.site-header {
  border-bottom: 1px solid var(--border-light);
  background: #fff;
}
.header-inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 26px; height: 26px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 4px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .3px;
}
.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted-dark);
  text-transform: uppercase;
  margin-top: 2px;
}
.header-phone {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}
.header-phone:hover { color: var(--accent); }

/* ============ Первый экран (hero) ============ */
.hero {
  background: var(--dark);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  padding-top: 72px;
  padding-bottom: 76px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #a7a196;
  border: 1px solid rgba(255,255,255,.13);
  padding: 7px 13px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 47px;
  line-height: 1.08;
  letter-spacing: -.5px;
  margin: 0 0 20px;
  text-wrap: balance;
}
.accent { color: var(--accent); }
.hero-lead {
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--muted-hero);
  max-width: 540px;
  margin: 0 0 32px;
}
.hero-lead strong {
  color: var(--text-on-dark);
  font-weight: 600;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.mono-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted-dark);
  margin: 20px 0 0;
  letter-spacing: .4px;
}
.hero-media img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  display: block;
}

/* ============ Секция заявки ============ */
.lead-section {
  background: #fff;
  scroll-margin-top: 20px;
}
.lead-inner {
  padding-top: 72px;
  padding-bottom: 84px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: start;
}
.kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.lead-section h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -.3px;
  margin: 0 0 8px;
}
.lead-sub {
  font-size: 15.5px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 480px;
}

/* ============ Форма ============ */
#lead-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #55524a;
}
.req { color: var(--accent); font-style: normal; }
.opt {
  color: #b8b4aa;
  text-transform: none;
  letter-spacing: 0;
}
.fld {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-field);
}
textarea.fld { resize: vertical; }
.fld:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236,111,27,.15);
}
.fld.invalid { border-color: var(--error); }
.field-error {
  font-size: 12.5px;
  color: var(--error);
}

/* Файлы */
.filebtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color .15s, color .15s;
  width: fit-content;
  position: relative;
}
.filebtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.file-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-dark);
  margin-top: 8px;
}
.file-error {
  font-size: 12.5px;
  color: var(--error);
  margin-top: 8px;
}
.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7f6f2;
  border-radius: 8px;
  padding: 9px 12px;
}
.file-item .icon { color: var(--accent); flex: none; display: flex; }
.file-item .fname {
  flex: 1;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item .fsize {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-dark);
  flex: none;
}
.file-item .fremove {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: none;
  background: none;
  color: var(--muted-dark);
  cursor: pointer;
  padding: 0;
}
.file-item .fremove:hover { color: var(--error); }

/* Согласие */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 4px;
}
.consent-row input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.consent-row label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-dark);
  line-height: 1.5;
  cursor: pointer;
}
.consent-row a {
  color: var(--muted-dark);
  text-decoration: underline;
}
.consent-row a:hover { color: var(--accent); }

/* Ошибка отправки формы */
.form-error {
  border: 1px solid #f0d0c5;
  background: #fdf3ef;
  color: #a13a1f;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}

/* Сообщение об успехе */
.success-box {
  border: 1px solid #d7e8d9;
  background: #f2f8f2;
  border-radius: 14px;
  padding: 34px 30px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.success-box[hidden] {
  display: none;
}
.success-icon { color: var(--success); flex: none; display: flex; }
.success-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 6px;
}
.success-text {
  font-size: 15px;
  color: #4d6b52;
  margin: 0 0 16px;
}

/* ============ Карточка контактов ============ */
.contact-card {
  background: var(--dark);
  color: var(--text-on-dark);
  border-radius: 16px;
  padding: 36px 34px;
}
.contact-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #a7a196;
  margin-bottom: 16px;
}
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-row { display: flex; gap: 14px; }
.contact-icon {
  color: var(--accent);
  flex: none;
  margin-top: 2px;
  display: flex;
}
.contact-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 4px;
}
.contact-value {
  font-size: 15.5px;
  color: var(--text-on-dark);
}
a.contact-value { text-decoration: none; }
.lnk:hover { color: var(--accent); }
.contact-tz {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin-top: 6px;
  display: inline-block;
}

/* ============ Подвал ============ */
.site-footer {
  border-top: 1px solid var(--border-light);
  background: #fff;
}
.footer-inner {
  padding-top: 22px;
  padding-bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-dark);
}
.site-footer a {
  color: var(--muted-dark);
  text-decoration: underline;
}
.site-footer a:hover { color: var(--accent); }

/* ============ Модальное окно ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22,24,28,.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: ovfade .2s ease;
}
.overlay[hidden] {
  display: none;
}
.modal {
  position: relative;
  width: 560px;
  max-width: 92%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  overflow: hidden;
  animation: mdin .2s ease;
}
.modal-accent { height: 3px; background: var(--accent); flex: none; }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 30px 16px;
  flex: none;
}
.modal-head h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}
.modal-close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: none;
  background: none;
  color: var(--muted-dark);
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.modal-divider { height: 1px; background: #eceae4; flex: none; margin: 0 30px; }
.modal-body {
  overflow-y: auto;
  padding: 22px 30px;
  font-size: 14px;
  line-height: 1.6;
  color: #3a3a3a;
}
.modal-body p { margin: 0 0 14px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body strong { color: var(--text); }
.modal-body a { color: var(--accent); text-decoration: underline; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; }
.modal-body::-webkit-scrollbar-track { background: #f2f0ea; }
.modal-foot {
  flex: none;
  padding: 16px 30px 24px;
  border-top: 1px solid #eceae4;
}
.modal-foot .btn { font-size: 15px; padding: 13px 28px; }

@keyframes ovfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdin {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ Страница политики ============ */
.policy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 72px;
}
.policy-page h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 24px;
}
.policy-page h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 19px;
  margin: 28px 0 10px;
}
.policy-page p {
  font-size: 15px;
  line-height: 1.65;
  color: #3a3a3a;
  margin: 0 0 12px;
}
.policy-page a { color: var(--accent); }
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted-dark) !important;
  text-decoration: none;
}
.back-link:hover { color: var(--accent) !important; }

/* ============ Адаптивность ============ */
@media (max-width: 900px) {
  .hero-inner,
  .lead-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero h1 { font-size: 38px; }
  .hero-inner { padding-top: 52px; padding-bottom: 56px; }
  .lead-inner { padding-top: 52px; padding-bottom: 60px; }
}

@media (max-width: 560px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: 30px; }
  .hero-lead { font-size: 16px; }
  .lead-section h2 { font-size: 25px; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 22px; }
  .btn { width: 100%; justify-content: center; }
  .header-phone { font-size: 14px; }
}
