/* ============================================================
   Брендбук · концепция 01 — «Регламент»
   Строго по бренд-буку 2025:
   — палитра: navy #19286d, гос-синий #0068b4, cyan #00a6ca,
     стальной #296695; фоны белые и светло-синие;
   — шрифты: Inter (основной) + Raleway (заголовки);
   — паттерн из диагональных потоков знака;
   — тон: реестр, паспорт, параметры — без лозунгов.
   ============================================================ */

:root {
  --navy: #19286d;
  --gov-blue: #0068b4;
  --cyan: #00a6ca;
  --steel: #296695;
  --ink: #17203a;
  --muted: #5a6780;
  --line: #d7e0ec;
  --bg: #f5f8fc;
  --white: #fff;
  --shell: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Raleway", var(--sans);
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -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; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* Паттерн из знака: наклонные потоки одной толщины */
.hero-pattern,
.figures-pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 34px,
    rgba(25, 40, 109, 0.045) 34px 48px
  );
  pointer-events: none;
}

/* ---------- Служебная полоса ---------- */

.topbar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding-block: 4px;
}

.topbar-tools { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.topbar a:hover { color: #fff; }

.lang { display: inline-flex; gap: 2px; }
.lang a { padding: 2px 7px; border-radius: 4px; }
.lang a.is-active { background: rgba(255, 255, 255, 0.16); color: #fff; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  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: 12px; }

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

.btn-lk:hover { background: var(--navy); color: #fff; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  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); }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-block: 56px 64px;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

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

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

.hero h1 {
  font-family: var(--head);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
  max-width: 18ch;
}

.hero-lead {
  margin-top: 16px;
  max-width: 54ch;
  font-size: 17px;
  color: var(--muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn-solid {
  padding: 13px 26px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease;
}

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

.btn-line {
  padding: 13px 26px;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-line:hover { background: var(--navy); color: #fff; }

/* Паспорт организации */

.passport {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  font-size: 14px;
}

.passport th,
.passport td { padding: 13px 16px; text-align: left; vertical-align: top; }

.passport tr + tr th,
.passport tr + tr td { border-top: 1px solid var(--line); }

.passport th {
  width: 34%;
  font-weight: 600;
  color: var(--steel);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding-top: 15px;
}

.passport a { color: var(--gov-blue); font-weight: 500; }
.passport a:hover { text-decoration: underline; }

/* ---------- Заголовки секций ---------- */

section { position: relative; padding-block: 56px; }

.sect-head { margin-bottom: 30px; max-width: 640px; }

.sect-num {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.sect-head h2 {
  font-family: var(--head);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.sect-head p { margin-top: 8px; font-size: 15px; color: var(--muted); }

.sect-head--light h2 { color: #fff; }
.sect-head--light .sect-num { color: var(--cyan); }

/* ---------- 01. Направления ---------- */

.directions { padding-bottom: 20px; }

.dir-rows { border-top: 1px solid var(--line); }

.dir-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 0.85fr) minmax(0, 1.6fr) 40px;
  gap: 20px;
  align-items: baseline;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.dir-row:hover { background: var(--bg); }

.dir-idx { font-size: 13px; font-weight: 600; color: var(--cyan); }

.dir-name {
  font-family: var(--head);
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
}

.dir-desc { font-size: 14.5px; color: var(--muted); }

.dir-go { text-align: right; color: var(--steel); font-size: 18px; }

.dir-row:hover .dir-go { color: var(--gov-blue); }

/* ---------- 02. Реестр программ ---------- */

.reg-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 14.5px;
  background: var(--white);
}

.reg-table thead th {
  padding: 12px 16px;
  text-align: left;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reg-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.reg-table tbody tr:hover { background: var(--bg); }

.reg-table td:first-child a {
  font-weight: 600;
  color: var(--gov-blue);
  border-bottom: 1px solid transparent;
}

.reg-table td:first-child a:hover { border-bottom-color: var(--gov-blue); }

.reg-table td:nth-child(2) { white-space: nowrap; color: var(--steel); font-size: 13.5px; }
.reg-table td:nth-child(3) { color: var(--muted); }
.reg-table td:last-child { color: var(--steel); text-align: right; }

.reg-all {
  display: inline-block;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gov-blue);
}

.reg-all:hover { text-decoration: underline; }

/* ---------- 03. Параметры ---------- */

.figures {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.figures-pattern {
  background: repeating-linear-gradient(
    115deg,
    transparent 0 34px,
    rgba(255, 255, 255, 0.05) 34px 48px
  );
}

.figures .shell { position: relative; }

.fig-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.fig {
  padding: 6px 24px 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.fig dt {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.fig dd {
  margin-top: 8px;
  font-family: var(--head);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.fig dd span {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  max-width: 24ch;
}

/* ---------- 04. Материалы ---------- */

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

.materials-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: 56px;
  align-items: start;
}

.materials .sect-head { margin-bottom: 0; }

.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: 96px minmax(0, 1fr);
  gap: 18px;
  padding-block: 16px;
  align-items: baseline;
}

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

.news-list span {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.15s ease;
}

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

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

.contact { padding-block: 48px; }

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

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

.contact p { margin-top: 6px; max-width: 56ch; 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, 32px);
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

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

.contact-links {
  display: flex;
  gap: 18px;
  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: 48px 40px;
}

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

.footer-col h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  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.14);
  font-size: 12.5px;
}

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

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

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .passport { max-width: 640px; }
  .fig-grid { grid-template-columns: repeat(2, 1fr); border-left: 0; }
  .fig { padding: 14px 20px; border-left: 1px solid rgba(255, 255, 255, 0.18); margin-bottom: 14px; }
  .materials-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .btn-lk { display: none; }
  .topbar-row p { display: none; }
  .topbar-row { justify-content: flex-end; }
}

@media (max-width: 720px) {
  section { padding-block: 44px; }
  .hero { padding-block: 40px 48px; }

  .dir-row {
    grid-template-columns: 52px minmax(0, 1fr) 28px;
    grid-template-areas:
      "idx name go"
      "idx desc go";
    row-gap: 4px;
  }
  .dir-idx { grid-area: idx; }
  .dir-name { grid-area: name; }
  .dir-desc { grid-area: desc; }
  .dir-go { grid-area: go; align-self: center; }

  /* Таблица реестра превращается в строки */
  .reg-table thead { display: none; }
  .reg-table, .reg-table tbody, .reg-table tr, .reg-table td { display: block; }
  .reg-table tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  .reg-table tr:first-child { border-top: 0; }
  .reg-table tbody td { padding: 2px 0; border-top: 0; }
  .reg-table td:nth-child(2) { font-size: 12.5px; }
  .reg-table td:last-child { display: none; }

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

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

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

  .news-list a { grid-template-columns: 1fr; gap: 4px; }
}
