/* ============================================================
   Брендбук · концепция 07 — «Бланк»
   Главная как современный бланк обращения в учреждение:
   реквизиты, поля, коды программ, справка, объявления.
   Палитра и шрифты — строго бренд-бук 2025.
   ============================================================ */

:root {
  --navy: #19286d;
  --gov-blue: #0068b4;
  --cyan: #00a6ca;
  --steel: #296695;
  --ink: #151c2e;
  --muted: #5a6780;
  --line: #c9d4e3;
  --rule: #19286d;
  --bg: #eef2f7;
  --paper: #fbfcfe;
  --white: #fff;
  --shell: 1120px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Raleway", var(--sans);
}

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; }
ol, ul { list-style: none; }

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

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

/* ---------- Letterhead ---------- */

.letterhead {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.letterhead-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
}

.letterhead-row p:last-child { white-space: nowrap; }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 254, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

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

.logo img { width: 168px; }

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

.nav a {
  padding: 8px 10px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
}

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

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

.header-lang {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.btn-lk {
  padding: 8px 14px;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
}

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

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s, opacity 0.2s;
}

.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 {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-block: 14px 22px;
}

.drawer-inner > a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.drawer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(72vh, 580px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}

.hero-field {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(17, 28, 82, 0.92) 0%, rgba(17, 28, 82, 0.55) 58%, rgba(0, 104, 180, 0.35) 100%),
    repeating-linear-gradient(
      115deg,
      transparent 0 36px,
      rgba(0, 166, 202, 0.14) 36px 38px
    ),
    linear-gradient(160deg, #111c52 0%, #19286d 45%, #0068b4 120%);
  animation: field-drift 22s linear infinite;
}

.hero-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--cyan);
}

@keyframes field-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 72px 0, 0 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: 64px 56px;
  max-width: calc(var(--shell) + 44px);
}

.hero-brand {
  margin-bottom: 20px;
  font-family: var(--head);
  font-size: clamp(36px, 5.6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  animation: rise 0.65s ease both;
}

.hero-brand span {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7ed7ea;
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: 14px;
  font-family: var(--head);
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  animation: rise 0.65s ease 0.06s both;
}

.hero-lead {
  max-width: 44ch;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15.5px;
  line-height: 1.6;
  animation: rise 0.65s ease 0.12s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 0.65s ease 0.18s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.btn-solid,
.btn-line {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 700;
}

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

.btn-solid:hover { background: #e8f6fa; }

.btn-line {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-line:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Blank sheet ---------- */

.blank {
  padding: 36px 0 10px;
}

.blank-sheet {
  position: relative;
  padding: 34px 36px 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(25, 40, 109, 0.04);
}

.blank-sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(25, 40, 109, 0.12);
  pointer-events: none;
}

.blank-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 3px double var(--rule);
}

.blank-mark {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blank-head h2 {
  font-family: var(--head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.blank-meta {
  max-width: 220px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: right;
}

.field {
  position: relative;
  margin-top: 28px;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Categories: form cells, not cards */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}

.categories a {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  background: var(--white);
  transition: background 0.18s, color 0.18s;
}

.categories a:last-child { border-right: 0; }

.categories a:hover {
  background: var(--navy);
  color: #fff;
}

.categories em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.categories a:hover em { color: #7ed7ea; }

.categories strong {
  font-family: var(--head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.categories span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.categories a:hover span { color: rgba(255, 255, 255, 0.72); }

/* Programs as form lines */
.programs {
  border-top: 1px solid var(--line);
}

.programs a {
  display: grid;
  grid-template-columns: 64px 1.2fr 0.9fr 1.5fr 24px;
  gap: 12px;
  align-items: baseline;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.programs a:hover { background: rgba(0, 104, 180, 0.04); }

.programs .code {
  color: var(--gov-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.programs .name {
  font-weight: 600;
  color: var(--ink);
}

.programs .whom {
  color: var(--steel);
  font-size: 12.5px;
}

.programs .note {
  color: var(--muted);
  font-size: 13px;
}

.programs .go {
  color: var(--navy);
  font-weight: 700;
  text-align: right;
  transition: transform 0.15s;
}

.programs a:hover .go { transform: translateX(3px); }

.blank-all {
  display: inline-block;
  margin-top: 16px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.blank-all:hover { color: var(--gov-blue); }

/* Ledger + stamp */
.field--stamp {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}

.field--stamp .field-label { grid-column: 1 / -1; }

.ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.ledger > div {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
}

.ledger > div:last-child { border-right: 0; }

.ledger dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger dd {
  font-family: var(--head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.1;
}

.ledger dd span {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.stamp {
  width: 118px;
  height: 118px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  transform: rotate(-8deg);
  animation: stamp-in 0.7s ease 0.4s both;
}

.stamp span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stamp strong {
  margin-top: 4px;
  font-family: var(--head);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-18deg) scale(1.12); }
  to { opacity: 1; transform: rotate(-8deg) scale(1); }
}

/* ---------- Board ---------- */

.board {
  padding: 48px 0 20px;
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
}

.board-head h2 {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.board-head a {
  color: var(--gov-blue);
  font-size: 13px;
  font-weight: 700;
}

.board-list li + li { border-top: 1px dashed var(--line); }

.board-list a {
  display: grid;
  grid-template-columns: 70px 88px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 2px;
}

.board-list a:hover .board-title { color: var(--gov-blue); }

.board-no {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

.board-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

/* ---------- Desk ---------- */

.desk {
  padding: 36px 0 64px;
}

.desk-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.desk h2 {
  margin-bottom: 8px;
  font-family: var(--head);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.desk p {
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
}

.desk-side { text-align: right; }

.desk-phone {
  display: block;
  margin-bottom: 10px;
  font-family: var(--head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.desk-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gov-blue);
}

/* ---------- Footer ---------- */

.footer {
  padding: 42px 0 28px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

.footer-col h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.footer-social {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .categories { grid-template-columns: repeat(2, 1fr); }
  .categories a:nth-child(2n) { border-right: 0; }
  .categories a:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }

  .programs a {
    grid-template-columns: 56px 1fr 24px;
    grid-template-areas:
      "code name go"
      "code note go"
      "code whom go";
  }
  .programs .code { grid-area: code; }
  .programs .name { grid-area: name; }
  .programs .whom { grid-area: whom; }
  .programs .note { grid-area: note; }
  .programs .go { grid-area: go; }

  .field--stamp { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger > div:nth-child(2) { border-right: 0; }
  .ledger > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .stamp { justify-self: start; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .letterhead-row {
    flex-direction: column;
    gap: 2px;
  }
  .letterhead-row p:last-child { white-space: normal; }
}

@media (max-width: 640px) {
  .blank-sheet { padding: 22px 16px 28px; }
  .blank-sheet::before { inset: 6px; }
  .blank-head { flex-direction: column; }
  .blank-meta { text-align: left; max-width: none; }

  .categories { grid-template-columns: 1fr; }
  .categories a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .categories a:last-child { border-bottom: 0; }

  .board-list a {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "no date"
      "title title";
    gap: 6px 12px;
  }
  .board-no { grid-area: no; }
  .board-list time { grid-area: date; }
  .board-title { grid-area: title; }

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

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }

  .hero { min-height: 70vh; }
  .hero-inner { padding-block: 56px 48px; }
}
