/* =========================================================
   LinkMap — системы безопасности
   ========================================================= */

:root {
  /* цвета */
  --bg: #0D1317;
  --panel: #111A1F;
  --line: #253038;
  --line-strong: #3A4852;
  --text: #ECEFEC;
  --text-soft: #C3CCD0;
  --muted: #A3AEB4;
  --accent: #F2A83B;          /* поменяйте здесь — изменится весь сайт */
  --accent-ink: #0D1317;

  --light-bg: #EFEEE8;
  --light-card: #FFFFFF;
  --light-line: #D9D7CE;
  --light-text: #12181C;
  --light-muted: #4E5960;
  --light-accent-text: #8A5A10;

  /* шрифты */
  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* размеры */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --header-h: 77px;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

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

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: var(--text); }
a:hover { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 920px; }

.muted { color: var(--muted); }
.small { font-size: 15px; }

/* ---------- типографика ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eyebrow--dark { color: var(--light-accent-text); }

.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.h2--sm { font-size: clamp(26px, 3vw, 40px); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #FFBF5E; color: var(--accent-ink); }

.btn--ghost { border-color: var(--line-strong); color: var(--text); font-weight: 500; }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }

.btn--outline-dark { border: 1.5px solid var(--light-text); color: var(--light-text); }
.btn--outline-dark:hover { background: var(--light-text); color: #fff; }

.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 19, 23, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
}
.logo__slogan {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 16px 40px;
}
.nav { display: flex; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding-block: 6px; }

.header__actions { display: flex; align-items: center; gap: 12px 20px; }
.header__phone { font-family: var(--f-mono); font-size: 16px; text-decoration: none; white-space: nowrap; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform .2s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- первый экран ---------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-block: clamp(48px, 8vw, 104px);
}
.hero__text {
  flex: 1.4 1 560px;
  min-width: 0;
  container-type: inline-size;   /* размер заголовка считается от ширины колонки */
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 52px);          /* для старых браузеров */
  font-size: clamp(24px, 6.8cqi, 56px);       /* «видеонаблюдения» всегда влезает в колонку */
  line-height: 1.08;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}
.hero__lead { font-size: 19px; color: var(--text-soft); max-width: 560px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__map {
  flex: 1 1 420px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.hero__map svg { width: 100%; height: auto; }

/* одна анимация на всю страницу: линии связи «прокладываются» при загрузке */
.map-links path {
  stroke-dashoffset: 0;
  animation: link-flow 1.8s linear infinite;
}
@keyframes link-flow { to { stroke-dashoffset: -22; } }

/* ---------- полоса преимуществ ---------- */
.band {
  background: var(--panel);
  border-block: 1px solid var(--line);
}
.facts__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: 32px;
}
.fact { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
.fact__title { font-family: var(--f-display); font-size: 18px; font-weight: 500; }
.fact__text { color: var(--muted); font-size: 15px; }

/* ---------- секции ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-block: clamp(64px, 9vw, 120px);
}
.section--tight { gap: 40px; padding-block: clamp(64px, 9vw, 112px); }
.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }

/* ---------- услуги ---------- */
.services { display: flex; flex-wrap: wrap; gap: 20px; }
.service {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.service p { color: var(--muted); }
.service__title { font-family: var(--f-display); font-size: 21px; font-weight: 500; }

.service--main {
  flex: 2 1 520px;
  gap: 18px;
  padding: 36px;
  border-color: var(--accent);
  background: var(--panel);
}
.service--main .service__title { font-size: 26px; }
.service--main p { color: var(--text-soft); }

.icon {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 40px; height: 40px; stroke: var(--accent); }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
}

/* ---------- объекты ---------- */
.objects {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.object {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--panel);
}
.object__num { font-family: var(--f-mono); font-size: 14px; color: var(--accent); }
.object h3 { font-size: 20px; font-weight: 700; }
.object p { color: var(--muted); font-size: 15px; }

/* ---------- этапы ---------- */
.steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.step {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  gap: 20px;
  padding-block: 24px;
  border-top: 1px solid var(--line-strong);
}
.step__num {
  font-family: var(--f-display);
  font-size: 32px;
  line-height: 1;
  color: var(--accent);
  min-width: 24px;
}
.step div { display: flex; flex-direction: column; gap: 6px; }
.step h3 { font-size: 19px; font-weight: 700; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- цены (светлая секция) ---------- */
.prices-wrap { background: var(--light-bg); color: var(--light-text); }
.prices-wrap a:not(.btn) { color: var(--light-text); }

.prices__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.prices__note { max-width: 400px; color: var(--light-muted); }

.prices { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.price {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: var(--light-card);
  border: 1px solid var(--light-line);
  border-radius: var(--radius);
}
.price__title { font-family: var(--f-display); font-size: 22px; font-weight: 500; }
.price__sub { font-size: 15px; color: var(--light-muted); }
.price__value { font-family: var(--f-display); font-size: 30px; font-weight: 700; }
.price__list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: #2B343A;
}
.price .btn { margin-top: auto; }

.price--featured {
  position: relative;
  background: var(--light-text);
  color: var(--text);
  border: 2px solid var(--accent);
}
.price--featured .price__sub { color: var(--muted); }
.price--featured .price__list { color: var(--text-soft); }

/* плашка сидит на верхней рамке карточки и не сдвигает содержимое */
.price--featured .badge {
  position: absolute;
  top: -15px;
  left: 30px;
}
.badge {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- зона работы ---------- */
.area { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.area__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cities { flex: 1 1 520px; min-width: 0; list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cities li { padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 8px; }
.cities .cities__more { border: 1px dashed var(--accent); color: var(--accent); }

/* ---------- вопросы ---------- */
.faq { display: flex; flex-direction: column; border-bottom: 1px solid var(--line-strong); }
.faq__item { border-top: 1px solid var(--line-strong); }
.faq__item summary {
  position: relative;
  padding: 24px 48px 24px 0;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-75%) rotate(45deg);
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq__item p { padding-bottom: 24px; color: var(--muted); max-width: 70ch; }

/* ---------- заявка ---------- */
.contact { flex-direction: row; flex-wrap: wrap; gap: 56px; }
.contact__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__info { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.contact__phone { font-family: var(--f-display); font-size: 24px; font-weight: 500; text-decoration: none; }
.contact__email { color: var(--text-soft); text-decoration: none; }
.contact__messengers { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }

.form {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3vw, 40px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--text-soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.field textarea { padding: 14px 16px; resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: #75828A; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }
.field input[aria-invalid="true"] { border-color: #FF8A7A; }

.field__error { color: #FF8A7A; font-size: 14px; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.form__status { font-size: 15px; min-height: 1.5em; }
.form__status.is-ok { color: #7BD389; }
.form__status.is-error { color: #FF8A7A; }

/* скрытое поле-ловушка для ботов */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- подвал ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
  font-size: 14px;
  color: var(--muted);
}
.footer__col { display: flex; flex-direction: column; gap: 4px; }
.footer__name { font-family: var(--f-display); font-size: 16px; color: var(--text); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1080px) {
  .burger { display: flex; }

  .header__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--gutter) 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .header__menu.is-open { display: flex; }

  .nav { flex-direction: column; gap: 0; font-size: 18px; }
  .nav a { padding-block: 12px; border-bottom: 1px solid var(--line); }

  .header__actions { flex-direction: column; align-items: stretch; }
  .header__phone { font-size: 20px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__lead { font-size: 17px; }
  .hero__buttons .btn { width: 100%; }
  .service, .service--main, .price { padding: 24px; }
  .object { padding: 24px; }
  .hero__map { padding: 12px; }
}

/* уважаем настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
