/*
  ООО «КОМПАНИЯ «ГАРАНТ» — стили сайта.
  Один файл, без внешних ресурсов. Шрифт Golos Text лежит в ../fonts.
  Макет перенесён из прототипа design/prototype без изменений во внешнем виде.
*/

/* ---------- Шрифт (подмножества cyrillic и latin, переменный 400–700) ---------- */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Переменные ---------- */
:root {
  --bg: #f6f9fd;
  --surface: #fff;
  --text: #10213f;
  --muted: #3b4d6b;
  --muted-2: #5a6b88;
  --accent: #1d5fd1;
  --accent-dark: #0e3f99;
  --accent-soft: #e8f1fd;
  --line: #e1e9f5;
  --line-strong: #dbe6f6;
  --line-btn: #c9d9f2;
  --radius: 18px;
  --radius-lg: 24px;
  --wrap: 1080px;
  --pad: 24px;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 30;
  padding: 10px 16px;
  background: #fff;
  border-radius: 8px;
}
.skip:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Заглушка на месте данных, которых ещё нет. Публикацию с ней блокирует scripts/check.sh --strict */
mark.todo {
  background: #fff1a8;
  color: #5c4400;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header { background: #fff; }
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .04em;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--accent); }

/* ---------- Первый экран ---------- */
.hero { background: linear-gradient(180deg, #e8f1fd 0%, #f6f9fd 100%); }

.hero-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 88px var(--pad) 40px;
}
.hero-text { max-width: 760px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 20px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.lead {
  margin-bottom: 32px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

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

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--accent); border: 1px solid var(--line-btn); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }

.facts-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad) 64px;
}
.facts {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  font-size: 15px;
}
.facts .k { color: var(--muted-2); }

/* ---------- Секции ---------- */
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px var(--pad) 24px;
}
.section h2 {
  margin-bottom: 32px;
  font-size: 30px;
  letter-spacing: -.01em;
}
#services { padding-top: 24px; }
#contacts { padding-bottom: 72px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: 12px; font-size: 18px; }
.card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 820px;
}
.card p + p { margin-top: 12px; }
.card .small { font-size: 14px; color: var(--muted-2); }
.card p a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Услуги ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 16px;
}
.services .card { padding: 24px; }
.services .card h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.3; }
.services .card p { font-size: 14px; line-height: 1.5; color: var(--muted-2); }

.num {
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* ---------- Стоимость ---------- */
.price-band {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
  align-items: center;
}
.price-band h2 { margin-bottom: 10px; }
.price-band p { font-size: 15px; line-height: 1.55; }
.price-band p + p { margin-top: 12px; }
.price-band a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.price-band a:hover { color: #fff; text-decoration-thickness: 2px; }
.price-links { margin-top: 12px; display: grid; gap: 4px; font-size: 15px; }
.price-note { font-size: 14px; }

.price-card {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 24px;
}
.price-label { margin-bottom: 6px; font-size: 14px; color: var(--muted-2); }
.price-value { font-size: 36px; font-weight: 700; color: var(--accent); }
.price-unit { font-size: 16px; font-weight: 500; color: var(--muted-2); }
.price-sub {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.price-sub .price-label { font-size: 14px; }
.price-sub strong { font-weight: 600; }

/* ---------- ПО, права, реестр ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.links-row { display: flex; flex-wrap: wrap; gap: 10px 40px; font-size: 15px; }
.card .label { margin-bottom: 8px; font-size: 14px; color: var(--muted-2); }
.card .links-row + p { margin-top: 16px; }

.tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tags li {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Реквизиты ---------- */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}
.req-grid .card { display: grid; gap: 14px; font-size: 15px; align-content: start; }
.req-grid h3 { margin-bottom: 0; }
.req-grid .group-title { margin-top: 8px; }

.req-list { display: grid; gap: 14px; }
.card h3 .small { font-weight: 500; }

.req-list-wide { margin-top: 16px; font-size: 15px; }
.req-list-wide + p { margin-top: 16px; }
.req-list-wide .req-row { grid-template-columns: 200px 1fr; }
.card p.small, .card .small { font-size: 14px; }
.card p.small.gap { margin-top: 16px; }
.card .label.gap { margin-top: 24px; }

.reg-list { display: grid; gap: 10px; font-size: 15px; }
.reg-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 24px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.reg-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.reg-list span { color: var(--muted); }
.reg-list a { white-space: nowrap; }

.req-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.req-row dt { color: var(--muted-2); }
.req-row dd { font-weight: 500; }

.code-list { display: grid; gap: 12px; }
.code-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.code-row b { color: var(--accent); }
.code-row span { color: var(--muted); line-height: 1.4; }

/* ---------- Контакты ---------- */
.contacts-box {
  background: #fff;
  border: 1px solid #d3e2f7;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.contacts-info {
  padding: 40px;
  display: grid;
  gap: 22px;
  align-content: center;
}
.contacts-info h2 { margin: 0; }
.contact-label { margin-bottom: 4px; font-size: 13px; color: var(--muted-2); }
.contact-link { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.contact-text { font-size: 17px; font-weight: 500; line-height: 1.4; font-style: normal; }

.map-link { display: block; min-height: 340px; position: relative; }
.map-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  display: block;
}

/* ---------- Подвал ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 24px var(--pad);
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}
.site-footer p { max-width: 760px; margin-left: auto; margin-right: auto; }
.site-footer p + p { margin-top: 6px; }

/* ---------- Страница 404 ---------- */
.notfound { padding: 96px var(--pad) 120px; max-width: var(--wrap); margin: 0 auto; }
.notfound h1 { margin: 0 0 16px; font-size: clamp(34px, 5vw, 48px); }
.notfound p { margin-bottom: 28px; font-size: 18px; color: var(--muted); }

/* ---------- Узкие экраны ---------- */
@media (max-width: 560px) {
  .hero-main { padding-top: 56px; }
  .price-band { padding: 28px 22px; }
  .contacts-info { padding: 28px 22px; }
  .card { padding: 22px; }
  .facts { padding: 18px 20px; }
}
@media (max-width: 640px) {
  .req-list-wide .req-row { grid-template-columns: 1fr; gap: 2px; }
  .reg-list li { grid-template-columns: 1fr; }
  .reg-list a { white-space: normal; }
}
@media (max-width: 420px) {
  .req-row { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Печать ---------- */
@media print {
  .site-header { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hero { background: none; }
  .map-link { display: none; }
  a { color: inherit; }
}
