/* ==========================================================================
   ООО ПКО «Новаграф» — базовые стили
   Мотив: граф/сеть (узлы + связи) как визуальная метафора названия компании
   и системного процесса работы с задолженностью.
   ========================================================================== */

:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --ink: #16213a;
  --ink-70: rgba(22, 33, 58, 0.7);
  --muted: #5b6472;
  --line: #e2e5df;
  --line-strong: #cdd2c9;
  --accent: #1f7a6c;
  --accent-dark: #155a50;
  --accent-soft: #e2efec;
  --graph: #93b4c7;
  --graph-soft: #dbe6ec;
  --warn-bg: #fbf3e6;
  --warn-line: #e9d3ab;
  --warn-ink: #7a5a1f;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", "PT Serif", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img, svg { max-width: 100%; display: block; }

a {
  color: var(--accent-dark);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 .5em;
  color: var(--ink);
}

h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }

p { margin: 0 0 1em; color: var(--ink-70); }

.lead {
  font-size: 18px;
  color: var(--ink-70);
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.section--tight { padding: 56px 0; }
.section--muted { background: var(--surface); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head p { margin: 0; max-width: 520px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 246, 243, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
/* Обёртка мобильного меню — отдельный класс, чтобы НЕ наследовать
   высоту 76px и flex-row от правила выше (в этом и была причина
   обрезанного/нерабочего выпадающего меню). */
.site-header .mobile-nav-wrap {
  display: block;
  height: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-suffix {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--ink-70);
  font-size: 14.5px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--accent-dark); text-decoration: none; }
.main-nav a.is-active { color: var(--accent-dark); }

.header-side {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-phone {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.header-phone span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--muted); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 8px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 76px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

.hero-note {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 520px;
}
.hero-note svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.hero-note p { margin: 0; font-size: 14px; color: var(--ink-70); }
.hero-note strong { color: var(--ink); }

/* graph line-draw animation */
.graph-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 1.6s ease forwards;
}
.graph-node {
  opacity: 0;
  animation: fadein .5s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .graph-line, .graph-node { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- Principles / process ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.grid-4 .card { background: var(--surface); }

.card {
  padding: 28px 26px;
}
.card-icon {
  width: 38px; height: 38px;
  margin-bottom: 16px;
  color: var(--accent);
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; margin: 0; }

/* process / graph strip */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 8px;
}
.process-step {
  position: relative;
  padding: 22px 20px 0;
  text-align: left;
}
.process-step .dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}
.process-line {
  position: absolute;
  top: 28px;
  left: 0; right: 0;
  height: 2px;
  background: var(--graph-soft);
  z-index: 1;
}
.process-step .tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .05em;
}
.process-step h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  margin: 4px 0 6px;
  color: var(--ink);
}
.process-step p { font-size: 13.5px; margin: 0; color: var(--ink-70); }

/* ---------- Documents ---------- */
.doc-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.doc-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}
.doc-row:first-child { border-top: none; }
.doc-icon {
  width: 38px; height: 38px;
  color: var(--accent-dark);
}
.doc-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.doc-desc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.doc-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.doc-actions { display: flex; gap: 8px; }

.docs-note {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--warn-ink);
}
.docs-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.docs-note p { margin: 0; color: var(--warn-ink); }

/* ---------- Requisites ---------- */
.requisites {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.requisites-group { background: var(--surface); padding: 26px 28px; }
.requisites-group h3 {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 16px;
}
.req-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}
.req-row:first-of-type { border-top: none; }
.req-label { color: var(--ink-70); }
.req-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  text-align: right;
}

/* ---------- Contacts ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-cards .card svg { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 30px;
  background: var(--surface);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 30px;
}
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink-70);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--accent-dark); }
.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-bottom p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  padding: 56px 0 40px;
}
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 38px); }
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-dark); }

/* ---------- 404 ---------- */
.state-404 {
  padding: 120px 0;
  text-align: center;
}
.state-404 svg { width: 120px; height: 120px; margin: 0 auto 24px; color: var(--graph); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .process-line { display: none; }
  .requisites { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-phone { display: none; }
  .doc-row { grid-template-columns: 36px 1fr; }
  .doc-meta { display: none; }
  .doc-actions { grid-column: 2; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 12px 4px;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
