/* ============================================================
   Брендбук · концепция 04 — «Схема линий»
   Услуги как маршрутная карта в традиции схем метро:
   три линии — три аудитории, станции — программы,
   пересадочный узел — личный кабинет.
   Цвета линий = дополнительные цвета бренд-бука:
   Л1 гос-синий #0068b4 · Л2 стальной #296695 · Л3 cyan #00a6ca.
   Основа: navy #19286d, Inter + Raleway.
   ============================================================ */

:root {
  --navy: #19286d;
  --gov-blue: #0068b4;
  --cyan: #00a6ca;
  --steel: #296695;
  --ink: #17203a;
  --muted: #5a6780;
  --line: #d7e0ec;
  --bg: #f5f8fc;
  --shell: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Raleway", var(--sans);
  --track: 8px; /* толщина линии маршрута */
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}
.skip:focus { left: 0; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header.is-stuck { box-shadow: 0 2px 16px rgba(25, 40, 109, 0.1); }

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 66px;
}

.logo img { width: 172px; height: auto; }

.nav { display: flex; gap: 2px; margin-left: auto; }

.nav a {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--gov-blue); border-bottom-color: var(--cyan); }

.header-tools { display: flex; align-items: center; gap: 14px; }

.header-lang { font-size: 13.5px; font-weight: 600; color: var(--steel); }
.header-lang:hover { color: var(--gov-blue); }

.btn-lk {
  padding: 9px 18px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.btn-lk:hover { background: var(--gov-blue); }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.menu-btn span { height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: sticky;
  top: 66px;
  z-index: 49;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drawer-inner { display: flex; flex-direction: column; padding-block: 12px 20px; }
.drawer-inner > a { padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Вступление ---------- */

.intro { padding-block: 52px 12px; }

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}

.intro-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.intro-brand span {
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro h1 {
  font-family: var(--head);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.intro-lead { margin-top: 14px; max-width: 58ch; font-size: 16.5px; color: var(--muted); }

/* Легенда */

.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
}

.legend p { display: flex; align-items: center; gap: 10px; }

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot--citizens { background: var(--gov-blue); }
.dot--invest { background: var(--steel); }
.dot--orgs { background: var(--cyan); }
.dot--hub { background: #fff; border: 3px solid var(--navy); }

/* ---------- Карта линий ---------- */

.map { padding-block: 36px 8px; }

.route { margin-bottom: 46px; }

.route-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 800;
  align-self: center;
}

.route--citizens .route-badge { background: var(--gov-blue); }
.route--invest .route-badge { background: var(--steel); }
.route--orgs .route-badge { background: var(--cyan); }

.route-head h2 {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
}

.route-head p { font-size: 14px; color: var(--muted); }

/* Полотно линии */

.stations {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.stations--4 { grid-template-columns: repeat(4, 1fr); }

/* сама линия */
.stations::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: var(--track);
  border-radius: 999px;
}

.route--citizens .stations::before { background: var(--gov-blue); }
.route--invest .stations::before { background: var(--steel); }
.route--orgs .stations::before { background: var(--cyan); }

.stations a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 34px 14px 6px 0;
}

/* станция */
.stations i {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--navy);
  transition: transform 0.15s ease;
}

.route--citizens .stations i { border-color: var(--gov-blue); }
.route--invest .stations i { border-color: var(--steel); }
.route--orgs .stations i { border-color: var(--cyan); }

.stations a:hover i { transform: scale(1.25); }

.stations strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  transition: color 0.15s ease;
}

.stations a:hover strong { color: var(--gov-blue); }

.stations span { font-size: 12.5px; color: var(--muted); max-width: 20ch; }

/* ---------- Пересадочный узел ---------- */

.hub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 10px 54px;
  padding: 22px 26px;
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  overflow: hidden;
  flex-wrap: wrap;
  transition: background 0.15s ease;
}

.hub:hover { background: #111c52; }

.hub-ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 6px double var(--cyan);
  box-shadow: 0 0 0 3px var(--gov-blue), 0 0 0 6px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.hub strong { font-family: var(--head); font-size: 19px; font-weight: 800; }

.hub > span:not(.hub-ring) { font-size: 13.5px; color: rgba(255, 255, 255, 0.75); flex: 1; min-width: 240px; }

.hub em { font-style: normal; font-size: 20px; color: var(--cyan); }

/* ---------- Сводка ---------- */

.stats { background: var(--bg); border-block: 1px solid var(--line); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 26px;
}

.stats p { font-size: 13px; color: var(--muted); line-height: 1.4; }

.stats b {
  display: block;
  font-family: var(--head);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* ---------- Новости ---------- */

.news { padding-block: 52px; }

.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.news-head h2 {
  font-family: var(--head);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  color: var(--navy);
}

.more-link { font-size: 14.5px; font-weight: 600; color: var(--gov-blue); white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

.news-list { list-style: none; border-top: 1px solid var(--line); }

.news-list li { border-bottom: 1px solid var(--line); }

.news-list a {
  display: grid;
  grid-template-columns: 44px 100px minmax(0, 1fr);
  gap: 16px;
  padding-block: 15px;
  align-items: center;
}

.news-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}

.news-line--citizens { background: var(--gov-blue); }
.news-line--invest { background: var(--steel); }
.news-line--orgs { background: var(--cyan); }
.news-line--all { background: var(--navy); }

.news-list time { font-size: 13px; color: var(--steel); font-variant-numeric: tabular-nums; }

.news-list a > span:last-child {
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.news-list a:hover > span:last-child { color: var(--gov-blue); }

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

.contact { padding-block: 0 56px; }

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}

.contact h2 { font-family: var(--head); font-size: 23px; font-weight: 800; color: var(--navy); }

.contact p { margin-top: 5px; font-size: 14.5px; color: var(--muted); }

.contact-side { text-align: right; flex-shrink: 0; }

.contact-phone {
  font-family: var(--head);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.contact-phone:hover { color: var(--gov-blue); }

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.contact-links a { color: var(--gov-blue); }
.contact-links a:hover { text-decoration: underline; }

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

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-block: 46px 38px;
}

.footer-col { display: flex; flex-direction: column; gap: 9px; }

.footer-col h3 {
  font-family: var(--head);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
}

.footer-social { display: flex; gap: 16px; }
.footer-social a:hover { color: #fff; }

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

@media (max-width: 1024px) {
  .intro-grid { grid-template-columns: 1fr; gap: 24px; }
  .legend { flex-direction: row; flex-wrap: wrap; gap: 12px 22px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .btn-lk { display: none; }
}

/* Мобильная карта: линии становятся вертикальными */
@media (max-width: 760px) {
  .intro { padding-block: 36px 8px; }

  .stations,
  .stations--4 {
    grid-template-columns: 1fr;
    padding-left: 7px;
  }

  .stations::before {
    top: 0;
    bottom: 0;
    left: 7px;
    right: auto;
    width: var(--track);
    height: auto;
  }

  .stations a {
    padding: 10px 0 10px 34px;
  }

  .stations i {
    top: 50%;
    transform: translateY(-50%);
    left: -4px;
  }

  .stations a:hover i { transform: translateY(-50%) scale(1.2); }

  .stations span { max-width: none; }

  .stats-row { grid-template-columns: 1fr 1fr; }

  .news-list a { grid-template-columns: 44px minmax(0, 1fr); }
  .news-list time { grid-column: 2; margin-top: -8px; order: 3; }

  .contact-row { flex-direction: column; align-items: flex-start; }
  .contact-side { text-align: left; }
  .contact-links { justify-content: flex-start; flex-wrap: wrap; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}
