/* Madras Waste Exchange — восстановление по снимку 2020-02-20 (Angular SPA).
   Контент извлечён из бандла приложения; символика госпрограмм и имена
   должностных лиц намеренно не воспроизводятся. */

:root {
  --blue: #1565c0;
  --blue-dark: #0d47a1;
  --blue-soft: #e8f1fb;
  --green: #2e7d32;
  --orange: #ef6c00;
  --ink: #1f2933;
  --ink-soft: #5b6b7a;
  --line: #dfe6ed;
  --paper: #fff;
  --bg: #f4f7fa;
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 82px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 500; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  flex: 0 0 auto;
}
.brand__mark svg { width: 24px; height: 24px; fill: currentColor; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-size: 1.18rem; font-weight: 500; color: var(--blue-dark); }
.brand__sub { font-size: .78rem; color: var(--ink-soft); }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: none;
}
.primary-nav a:hover { background: var(--blue-soft); color: var(--blue-dark); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  padding: 10px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; background: var(--blue-dark); margin: 5px 0; }

/* ---------- секции ---------- */

main { display: block; }

section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 60px 24px;
}

.section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--blue-dark);
  margin-bottom: 10px;
}
.section-lead { margin: 0 0 28px; color: var(--ink-soft); max-width: 70ch; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { background: var(--blue-dark); }

/* герой */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 46px;
  align-items: center;
  padding-top: 66px;
  padding-bottom: 66px;
}
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 700; color: var(--blue-dark); margin-bottom: 16px; }
.hero__lead { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 16px; }
.hero__note {
  margin: 0 0 24px;
  padding: 11px 15px;
  border-left: 4px solid var(--orange);
  background: #fff6ec;
  font-size: .9rem;
  color: #6b4a24;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 1.7rem; font-weight: 700; color: var(--green); }
.hero__stats span { font-size: .82rem; color: var(--ink-soft); }

.mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 22px rgba(21, 101, 192, .1);
}
.mock__head {
  margin: 0 0 12px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mock__list { list-style: none; margin: 0 0 12px; padding: 0; }
.mock__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.mock__list li:last-child { border-bottom: 0; }
.mock__mat { color: var(--ink); }
.mock__qty { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mock__bid { color: var(--green); font-weight: 500; }
.mock__list .is-empty .mock__bid { color: #b0392f; }
.mock__foot { margin: 0; font-size: .76rem; color: var(--ink-soft); }

/* идея */

.idea__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  align-items: start;
}
.idea__grid > * { min-width: 0; }
.idea__lead {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--blue-dark);
}
.idea__body p { margin: 0 0 14px; color: var(--ink-soft); }
.idea__body p:last-child { margin-bottom: 0; }

/* материалы */

.mat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.mat-grid > * { min-width: 0; }
.mat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.mat__swatch {
  display: block;
  width: 44px; height: 6px;
  border-radius: 3px;
  background: var(--swatch, var(--blue));
  margin-bottom: 14px;
}
.mat__swatch--1 { --swatch: #2f8f5b; }
.mat__swatch--2 { --swatch: #2b6cb0; }
.mat__swatch--3 { --swatch: #8a5cd1; }
.mat__swatch--4 { --swatch: #c0642c; }
.mat__swatch--5 { --swatch: #1f8a8a; }
.mat__swatch--6 { --swatch: #b4453c; }
.mat__swatch--7 { --swatch: #7a5230; }
.mat__swatch--8 { --swatch: #6b8f2f; }
.mat__swatch--9 { --swatch: #4a7c2f; }

.mat__title { font-size: 1.05rem; margin-bottom: 6px; }
.mat__desc { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* шаги */

.steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.steps > * { min-width: 0; }
.step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
}
.step__title { font-size: 1.04rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.how__note {
  margin: 0;
  padding: 13px 17px;
  border-left: 4px solid var(--orange);
  background: #fff6ec;
  font-size: .93rem;
  color: #6b4a24;
}

/* возможности */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.feature-grid > * { min-width: 0; }
.feature {
  background: var(--blue-soft);
  border-radius: 10px;
  padding: 22px;
}
.feature h3 { font-size: 1.04rem; color: var(--blue-dark); margin-bottom: 8px; }
.feature p { margin: 0; font-size: .93rem; color: #35506c; }

/* акты и правила */

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 90ch;
}
.rule-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 18px 20px;
}
.rule-list h3 { font-size: 1.02rem; margin-bottom: 6px; }
.rule-list p { margin: 0; font-size: .93rem; color: var(--ink-soft); }

/* FAQ */

.faq__list { display: grid; gap: 10px; max-width: 90ch; }
.faq__item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.faq__item summary {
  cursor: pointer;
  padding: 14px 18px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before { content: "+"; flex: 0 0 auto; font-weight: 700; color: var(--blue); }
.faq__item[open] summary::before { content: "–"; }
.faq__item summary h3 { font-size: 1rem; font-weight: 500; display: inline; }
.faq__item p { margin: 0; padding: 0 18px 16px 40px; color: var(--ink-soft); font-size: .95rem; }

/* контакты */

.contact p { color: var(--ink-soft); }

/* ---------- подвал ---------- */

.site-footer {
  background: var(--blue-dark);
  color: #cfe0f5;
  padding: 40px 24px 44px;
  text-align: center;
}
.site-footer__brand { margin: 0 0 10px; font-size: 1.2rem; font-weight: 500; color: #fff; }
.site-footer__note { max-width: 80ch; margin: 0 auto 16px; font-size: .88rem; }
.site-footer__legal { margin: 0; font-size: .8rem; color: #b9cff0; }

/* ---------- мобильные ---------- */

@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .idea__grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; flex: 1 1 100%; margin-left: 0; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: 12px; border-top: 1px solid var(--line); border-radius: 0; }
}

@media (max-width: 640px) {
  section { padding: 44px 18px; }
  .site-header__inner { padding: 10px 18px; }
  .hero__stats { gap: 18px; }
  .mock__list li { grid-template-columns: minmax(0, 1fr) auto; }
  .mock__bid { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* инлайновые ссылки в тексте различимы не только цветом (WCAG 1.4.1) */
p a:not(.btn):not(.link-arrow) { text-decoration: underline; }
p a:not(.btn):not(.link-arrow):hover { text-decoration: none; }
