/* PRO-дороги — оформление сайта.
   Палитра перенесена с сайта-образца https://pro-dorogi.lelivan.chatgpt.site/ :
   тёмный графит #101718, бумажный фон #f5f5f2, лаймовый акцент #c9ff00,
   тёмно-зелёный #1b5e20 для акцентов на светлом фоне. */

:root {
  /* Основные цвета — как на образце */
  --ink: #101718;
  --ink-soft: #667173;
  --ink-mute: #718173;
  --line: rgba(16, 23, 24, 0.14);
  --line-soft: #d5dcd6;
  --bg: #ffffff;
  --bg-muted: #f5f5f2;
  --bg-tint: #f6f7f3;
  --input-bg: #fafbf8;
  --label: #465153;
  --dark: #0a1111;
  --dark-panel: #101819;
  --dark-soft: #0b1213;
  --accent: #c9ff00;
  --accent-hover: #ddff59;
  --accent-ink: #0a0f0f;
  --accent-soft: rgba(201, 255, 0, 0.16);
  --green: #6cd373;
  --deep-green: #1b5e20;
  --danger: #a52f25;
  --ok: #1b5e20;
  --radius: 16px;
  --shadow: 0 12px 36px rgba(16, 23, 24, 0.08);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* iOS не раздувает текст и не растягивает страницу */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 700; }
h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 650; margin-bottom: 10px; }
p { margin: 0 0 16px; }
a { color: inherit; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.section { padding: 84px 0; scroll-margin-top: 84px; }
.section--muted { background: var(--bg-muted); }
.section--dark { background: var(--dark); color: #fff; border-top: 5px solid var(--accent); }
.section__lead { max-width: 720px; color: var(--ink-soft); font-size: 18px; margin-bottom: 44px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 650;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 36px;
  height: 1px;
  background: currentColor;
}
.eyebrow--dark { color: var(--deep-green); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--deep-green); outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible,
.section--dark :focus-visible,
.footer :focus-visible { outline-color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.32); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text b { font-size: 17px; letter-spacing: -0.01em; }
.logo__text small { font-size: 11.5px; color: var(--ink-mute); letter-spacing: 0.06em; text-transform: uppercase; }
.logo__text--footer b { font-size: 19px; }

.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15.5px; color: var(--ink-soft); }
.nav a:hover { color: var(--deep-green); }

.header__cta { padding: 12px 20px; font-size: 15px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); }

/* ---------- Главный экран ---------- */
/* Фон, фото и техническая сетка — как на образце. */
.hero {
  position: relative;
  padding: 92px 0 76px;
  background:
    linear-gradient(90deg, rgba(6, 11, 12, 0.98) 0%, rgba(6, 11, 12, 0.92) 31%, rgba(6, 11, 12, 0.3) 68%, rgba(6, 11, 12, 0.62) 100%),
    linear-gradient(rgba(6, 11, 12, 0.12) 0%, rgba(6, 11, 12, 0.26) 67%, rgba(6, 11, 12, 0.96) 100%),
    url("/img/hero-road.jpg") 50% / cover no-repeat,
    var(--dark);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 66%);
  mask-image: linear-gradient(90deg, #000, transparent 66%);
}
.hero > .container { position: relative; z-index: 1; }
.hero__title { max-width: 900px; }
/* Акцент — только цветом, без курсива */
.hero__title em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 660px; font-size: 19px; color: rgba(255, 255, 255, 0.78); }
/* Короткий вариант подписи — показывается только на телефоне */
.lead__short { display: none; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 56px; }

.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; }
.fact {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 13, 14, 0.82);
  backdrop-filter: blur(8px);
}
.fact__label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201, 255, 0, 0.45);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 12px;
}
.fact b { display: block; font-size: 17px; margin-bottom: 6px; }
.fact span:last-child { color: rgba(255, 255, 255, 0.68); font-size: 15px; }

/* ---------- О команде ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about__text { color: var(--ink-soft); font-size: 18px; }
.about__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-top: 26px;
  background: var(--line);
}

/* ---------- Карточки услуг ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.card__img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
  background: var(--line);
}
/* Наведение — как на образце: карточка темнеет, акценты становятся лаймовыми */
.card:hover { transform: translateY(-3px); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); }
.card:hover p { color: rgba(255, 255, 255, 0.6); }
.card__num, .step__num, .reason__num {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--deep-green);
  margin-bottom: 14px;
}
.card:hover .card__num { color: var(--accent); }
.reason__num { color: var(--accent); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 18px 0 0; }
.tags li {
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.card:hover .tags li { background: transparent; border-color: rgba(201, 255, 0, 0.38); color: rgba(255, 255, 255, 0.75); }

/* ---------- Этапы ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 0; padding: 0; counter-reset: none; }
.step { border-top: 3px solid var(--deep-green); padding-top: 22px; }
.step p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Преимущества: тёмный блок, как на образце ---------- */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 10px; }
.reason {
  background: var(--dark-panel);
  border: 1px solid rgba(201, 255, 0, 0.16);
  border-radius: var(--radius);
  padding: 28px;
}
.reason p { color: rgba(255, 255, 255, 0.57); font-size: 16px; margin: 0; }

/* ---------- Форма ---------- */
.request { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.request__intro h2 { color: var(--ink); }
.request__intro p { color: var(--ink-soft); font-size: 17px; }
.request__mail { margin-top: 24px; }
.request__mail a { color: var(--deep-green); }

.form {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; color: var(--label); }
.req { color: var(--danger); }

/* ---------- Приложенные файлы ---------- */
.field__hint { margin: 7px 0 0; font-size: 13.5px; color: var(--ink-mute); }
input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink-soft);
  background: var(--input-bg);
  border: 1px dashed var(--line-soft);
  border-radius: 11px;
  padding: 12px 14px;
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--deep-green); color: var(--deep-green); }
/* Safari на iPhone и iPad понимает только прежнюю, префиксную форму */
input[type="file"]::-webkit-file-upload-button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
input[type="file"][aria-invalid="true"] { border-color: var(--danger); }

.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.file-list__name { flex: 1 1 auto; color: var(--ink); overflow-wrap: anywhere; }
.file-list__size { flex: 0 0 auto; color: var(--ink-mute); font-size: 13px; }
.file-list__remove {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 6px 10px; /* по такому квадрату удобно попадать пальцем */
  border-radius: 8px;
  cursor: pointer;
}
.file-list__remove:hover { color: var(--danger); background: rgba(165, 47, 37, 0.08); }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--input-bg);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--deep-green);
  box-shadow: 0 0 0 3px rgba(108, 211, 115, 0.15);
}
textarea { resize: vertical; min-height: 120px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }

.field__error { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.field__error:empty { display: none; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 18px; }
.consent input { width: 19px; height: 19px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--deep-green); }

.form__status { margin: 16px 0 0; font-size: 15.5px; min-height: 0; }
.form__status--ok { color: var(--ok); font-weight: 600; }
.form__status--error { color: var(--danger); font-weight: 600; }
.form__note { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-mute); }
.form__note a { color: var(--deep-green); }

/* ---------- Подвал ---------- */
.footer { background: var(--dark-soft); color: rgba(255, 255, 255, 0.85); padding: 54px 0 28px; scroll-margin-top: 84px; }
.footer .logo__text b { color: #fff; }
.footer .logo__text small { color: rgba(255, 255, 255, 0.55); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: start; }
.footer__text { max-width: 520px; color: rgba(255, 255, 255, 0.62); font-size: 15.5px; margin: 16px 0 0; }
.footer__contacts { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.footer__contacts span { color: rgba(255, 255, 255, 0.55); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer__contacts a { color: var(--accent); text-decoration: none; font-size: 18px; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Планшет ---------- */
@media (max-width: 1000px) {
  .about, .request { grid-template-columns: 1fr; gap: 30px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: 1fr; }
  .header__cta { display: none; }
}

/* ---------- Телефон ---------- */
@media (max-width: 780px) {
  body { font-size: 16px; }
  .container { width: min(1180px, 100% - 28px); }
  .section { padding: 48px 0; scroll-margin-top: 68px; }
  .footer { scroll-margin-top: 68px; }

  /* Шапка: тонкая и прозрачная поверх фото; при прокрутке становится плотной */
  .header {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .header__inner { position: relative; min-height: 60px; gap: 12px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__text b { font-size: 16px; color: #fff; }
  .logo__text small { font-size: 10.5px; color: rgba(255, 255, 255, 0.68); }

  .burger { display: flex; border-color: rgba(255, 255, 255, 0.4); }
  .burger span { background: #fff; }

  .header--solid {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
  }
  .header--solid .logo__text b { color: var(--ink); }
  .header--solid .logo__text small { color: var(--ink-mute); }
  .header--solid .burger { border-color: var(--line); }
  .header--solid .burger span { background: var(--ink); }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 4px 0 10px;
    box-shadow: var(--shadow);
  }
  .nav--open { display: flex; }
  .nav a {
    padding: 15px 20px;
    font-size: 16.5px;
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-child { border-bottom: 0; }

  /* Первый экран — на всю высоту телефона, фото уходит под прозрачную шапку */
  .hero {
    margin-top: -60px;
    padding: calc(60px + 34px) 0 38px;
    min-height: 100vh;
    min-height: 100svh;
    background:
      linear-gradient(180deg, rgba(6, 11, 12, 0.92) 0%, rgba(6, 11, 12, 0.78) 40%, rgba(6, 11, 12, 0.96) 100%),
      url("/img/hero-road.jpg") 62% 50% / cover no-repeat,
      var(--dark);
  }
  .hero::before { opacity: 0.1; background-size: 48px 48px; }
  .hero__title { font-size: clamp(26px, 7.6vw, 34px); }
  .hero .lead { font-size: 16px; color: rgba(255, 255, 255, 0.82); }
  .lead__long { display: none; }
  .lead__short { display: inline; }
  .hero__actions { margin: 22px 0 28px; gap: 10px; }

  /* На телефоне вводные абзацы в разделах убираем: текста меньше, листать короче */
  .section__lead { display: none; }

  /* Карточки в один столбец, отступы меньше */
  .facts, .cards { grid-template-columns: 1fr; }
  .facts { gap: 12px; }
  .fact { padding: 16px 18px; }
  .fact b { font-size: 16px; }
  .fact span:last-child { font-size: 14.5px; }

  .about { gap: 24px; }
  .about__text { font-size: 17px; }
  .about__img { margin-top: 20px; }
  .section__lead { font-size: 17px; margin-bottom: 32px; }
  .cards { gap: 16px; }
  .card { padding: 20px; }
  .card__img { height: 170px; margin-bottom: 18px; }
  .steps { gap: 18px; }
  .step { padding-top: 16px; }
  .reasons { gap: 14px; }
  .reason { padding: 20px; }

  /* Форма: одна колонка, крупные поля, кнопка во всю ширину */
  .form { padding: 20px 16px; border-radius: 16px; }
  .field { margin-bottom: 16px; }
  .field label { font-size: 14px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  input[type="text"], input[type="tel"], input[type="email"], select, textarea { padding: 13px 14px; }
  .consent { font-size: 14px; }
  .consent input { width: 22px; height: 22px; }
  .btn { min-height: 48px; }
  .file-list li { padding: 10px 12px; }
  .file-list__remove { font-size: 22px; padding: 10px 12px; }
  .request__mail a, .footer__contacts a, .form__note a { overflow-wrap: anywhere; }

  .footer { padding: 40px 0 24px; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }

  /* Не залезаем под вырез экрана (iPhone в боковой ориентации) */
  .header__inner, .footer__inner, .footer__bottom {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

/* ---------- Узкий телефон ---------- */
@media (max-width: 480px) {
  .btn { width: 100%; font-size: 15.5px; }
  .hero__actions { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 38px 0; }
  .section__lead { margin-bottom: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  .hero__title { font-size: clamp(24px, 7.4vw, 30px); }
  .fact { padding: 15px; }
  .fact b { font-size: 15.5px; }
  .fact span:last-child { font-size: 14px; }
  .fact__label { font-size: 11px; }
  .card p, .step p, .reason p, .about__text { font-size: 15px; }
  .tags li { font-size: 13px; padding: 6px 11px; }
  .form { padding: 18px 14px; }
  .field label { font-size: 13.5px; }
  .form__note, .field__hint { font-size: 12.5px; }
}

/* ---------- Очень узкий экран (старые телефоны, 320 px) ---------- */
@media (max-width: 380px) {
  .container { width: min(1180px, 100% - 22px); }
  h1, .hero__title { font-size: 25px; }
  h2 { font-size: 21px; }
  .fact { padding: 13px; }
  .card { padding: 16px; }
  .form { padding: 16px 12px; }
}

/* ---------- Устройства без курсора ---------- */
/* На телефоне состояние наведения «залипает» после касания — убираем его. */
@media (hover: none) {
  a, button { -webkit-tap-highlight-color: transparent; }
  .btn, .nav a, .burger, .file-list__remove { touch-action: manipulation; }

  .card:hover { transform: none; background: var(--bg-tint); color: var(--ink); box-shadow: none; }
  .card:hover p { color: var(--ink-soft); }
  .card:hover .card__num { color: var(--deep-green); }
  .card:hover .tags li { background: var(--bg); border-color: var(--line); color: var(--ink-soft); }
  .nav a:hover { color: var(--ink-soft); }
  .btn--primary:hover { background: var(--accent); }
  .btn--ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: transparent; }
  .file-list__remove:hover { color: var(--ink-mute); background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
