/* =========================================================================
   silau.ru — design system
   Чёрно-белый функциональный брутализм. Без скруглений, без теней.
   ========================================================================= */

/* ---------- Fonts: Onest (body) + Unbounded (display), self-hosted ----------
   Cyrillic subsets only — комплекты по 6–13 КБ.
   Onest — современный гротеск 2023 (Pavel Emelyanov), отличная кириллица.
   Unbounded — бруталистичный display от Eugene Khlamova / RaceSport. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Onest-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Onest-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Unbounded-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Unbounded-800.woff2') format('woff2');
}

/* ---------- Palette & tokens ---------- */
:root {
  --c-black: #000;
  --c-text: #1a1a1a;
  --c-meta: #666;
  --c-border: #e5e5e5;
  --c-bg-alt: #fafafa;
  --c-white: #fff;

  --border-strong: 2px solid var(--c-black);
  --border-thin: 1px solid var(--c-border);

  --container-max: 1200px;
  --pad-x-mobile: 20px;
  --pad-x-tablet: 32px;
  --pad-x-desktop: 48px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: 'Unbounded', 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-black);
}

h1 {
  font-size: clamp(40px, 11vw, 96px);
  word-break: break-word;
  hyphens: manual;
}

h2 {
  font-size: clamp(28px, 5.2vw, 56px);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(18px, 1.8vw, 22px);
}

p {
  margin: 0;
}

.meta {
  color: var(--c-meta);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* ---------- Links: black text, underline; hover = inverted highlighter ---------- */
a {
  color: var(--c-black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: background 80ms linear, color 80ms linear;
}

a:hover {
  background: var(--c-black);
  color: var(--c-white);
  text-decoration: none;
}

/* Block-level links (cards) — strip default underline, child elements style themselves */
a.block-link {
  text-decoration: none;
  color: inherit;
}

a.block-link:hover {
  background: transparent;
  color: inherit;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-x-mobile);
  padding-right: var(--pad-x-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--pad-x-tablet);
    padding-right: var(--pad-x-tablet);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--pad-x-desktop);
    padding-right: var(--pad-x-desktop);
  }
}

.section {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: var(--border-strong);
}

.section:first-of-type {
  border-top: none;
}

@media (min-width: 768px) {
  .section {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

@media (min-width: 1024px) {
  .section {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid var(--c-black);
  background: var(--c-black);
  color: var(--c-white);
  transition: background 80ms linear, color 80ms linear;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  background: var(--c-white);
  color: var(--c-black);
}

.btn-secondary {
  background: var(--c-white);
  color: var(--c-black);
}

.btn-secondary:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.btn-large {
  padding: 22px 40px;
  font-size: 18px;
}

@media (min-width: 768px) {
  .btn-large {
    padding: 26px 48px;
    font-size: 20px;
  }
}

/* ---------- Doc group placeholder (when category is empty by design) ---------- */
.doc-group__placeholder {
  border-left: 4px solid var(--c-black);
  background: var(--c-bg-alt);
  padding: 16px 20px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-meta);
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-black);
  color: var(--c-white);
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  outline: 3px solid var(--c-white);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: var(--border-strong);
  background: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* vertical only — horizontal padding comes from .container */
  padding-top: 16px;
  padding-bottom: 16px;
}

@media (min-width: 1024px) {
  .site-header__inner {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__logo:hover {
  background: transparent;
}

.site-header__logo img {
  height: 40px;
  width: auto;
}

@media (min-width: 1024px) {
  .site-header__logo img {
    height: 48px;
  }
}

.site-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
  }
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav__link {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 4px 6px;
}

.site-nav__link.is-active {
  background: var(--c-black);
  color: var(--c-white);
}

.site-mobile-menu__link.is-active {
  font-weight: 700;
}

.site-mobile-menu__link.is-active::before {
  content: "→ ";
}

.site-nav__cta {
  padding: 14px 24px;
  font-size: 15px;
}

.site-nav__cta.is-active,
.site-mobile-menu__cta.is-active {
  outline: 3px solid var(--c-black);
  outline-offset: 3px;
  pointer-events: none;
}

/* Hamburger */
.site-header__burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: var(--border-strong);
  background: var(--c-white);
}

.site-header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-black);
}

@media (min-width: 1024px) {
  .site-header__burger {
    display: none;
  }
}

/* Mobile menu */
.site-mobile-menu {
  display: none;
  border-top: var(--border-strong);
  background: var(--c-white);
  padding: 24px 0;
}

.site-mobile-menu.is-open {
  display: block;
}

.site-mobile-menu .container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-mobile-menu__link {
  display: block;
  padding: 12px 0;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  border-bottom: var(--border-thin);
}

.site-mobile-menu__cta {
  margin-top: 16px;
  align-self: flex-start;
}

@media (min-width: 1024px) {
  .site-mobile-menu {
    display: none !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 48px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 96px;
    padding-bottom: 120px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 160px;
  }
}

.hero__title {
  margin-bottom: 32px;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .hero__title {
    margin-bottom: 48px;
  }
}

.hero__lead {
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.35;
  font-weight: 400;
  max-width: 720px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .hero__lead {
    margin-bottom: 64px;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Section header ---------- */
.section__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .section__header {
    margin-bottom: 64px;
  }
}

.section__title {
  text-transform: uppercase;
}

/* ---------- Fundraiser cards ---------- */
.fundraisers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .fundraisers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .fundraisers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fundraiser-card {
  display: flex;
  flex-direction: column;
  border: var(--border-strong);
  background: var(--c-white);
  text-decoration: none;
  color: inherit;
  transition: background 80ms linear, color 80ms linear;
}

.fundraiser-card:hover {
  background: var(--c-bg-alt);
  color: inherit;
}

.fundraiser-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--border-strong);
  background: var(--c-bg-alt);
}

.fundraiser-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fundraiser-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  flex: 1;
}

.fundraiser-card__title {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.fundraiser-card__desc {
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.5;
}

.fundraiser-card__progress {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-bar {
  height: 16px;
  border: var(--border-strong);
  background: var(--c-white);
  position: relative;
  overflow: hidden;
}

.progress-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--c-black);
}

.fundraiser-card__amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--c-meta);
}

.fundraiser-card__amounts strong {
  color: var(--c-black);
  font-size: 16px;
}

/* ---------- Post cards (latest publications) ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: var(--border-strong);
  text-decoration: none;
  color: inherit;
  transition: background 80ms linear, color 80ms linear;
}

.post-card:hover {
  background: var(--c-bg-alt);
  color: inherit;
}

.post-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--border-strong);
  background: var(--c-bg-alt);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px 24px;
  flex: 1;
}

.post-card__type {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-black);
}

.post-card__title {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.post-card__desc {
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.5;
}

.section__footer {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

/* ---------- CTA / Become part section ---------- */
.cta-section {
  background: var(--c-black);
  color: var(--c-white);
  border-top: var(--border-strong);
}

.cta-section h2 {
  color: var(--c-white);
}

.cta-section .cta__lead {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  max-width: 720px;
  margin: 0 0 40px;
}

.cta-section .btn {
  background: var(--c-white);
  color: var(--c-black);
  border-color: var(--c-white);
}

.cta-section .btn:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.cta-section .cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-section a {
  color: var(--c-white);
}

.cta-section a:hover {
  background: var(--c-white);
  color: var(--c-black);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--border-strong);
  padding: 48px 0 32px;
  background: var(--c-white);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
  }
}

.site-footer__org {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  max-width: 480px;
}

.site-footer__org strong {
  color: var(--c-black);
  font-size: 16px;
  margin-bottom: 4px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
}

.site-footer__nav a {
  font-weight: 700;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
}

.site-footer__social a {
  color: var(--c-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Override the global "highlighter" a:hover (background black + color white)
   conflicting with our local color: black — иначе hover давал чёрный текст
   на чёрном фоне. */
.site-footer__social a:hover {
  background: var(--c-black);
  color: var(--c-white);
  text-decoration: none;
}

.site-footer__social-sep {
  color: var(--c-meta);
  font-weight: 400;
}

.site-footer__social-placeholder {
  color: var(--c-meta);
  text-decoration: line-through;
  cursor: help;
}

.site-footer__copy {
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--border-thin);
  font-size: 13px;
  color: var(--c-meta);
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================================
   STAGE 2 — public pages
   ========================================================================= */

/* ---------- Page header (compact, used on /posts, /about, etc.) ---------- */
.page-header {
  padding-top: 48px;
  padding-bottom: 32px;
  border-bottom: var(--border-strong);
}

@media (min-width: 768px) {
  .page-header {
    padding-top: 80px;
    padding-bottom: 48px;
  }
}

@media (min-width: 1024px) {
  .page-header {
    padding-top: 120px;
    padding-bottom: 56px;
  }
}

.page-header__title {
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header__lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  max-width: 720px;
  color: var(--c-meta);
}

/* ---------- Filters (pills) ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border: 2px solid var(--c-black);
  background: var(--c-white);
  color: var(--c-black);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 80ms linear, color 80ms linear;
}

.filter-pill:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.filter-pill.is-active {
  background: var(--c-black);
  color: var(--c-white);
  pointer-events: none;
}

/* ---------- Empty state ---------- */
.empty-state {
  border: var(--border-strong);
  padding: 48px 24px;
  text-align: center;
  font-size: 18px;
  color: var(--c-meta);
}

/* ---------- Post card extensions (date + thin progress) ---------- */
.post-card__meta {
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  color: var(--c-meta);
}

.post-card__date {
  font-variant-numeric: tabular-nums;
}

.progress-bar--thin {
  height: 6px;
  border: 1px solid var(--c-black);
  margin-top: 8px;
}

.progress-bar--thin.is-closed .progress-bar__fill {
  background: var(--c-meta);
}

/* ---------- Pagination ---------- */
.pagination {
  margin-top: 56px;
  padding-top: 32px;
  border-top: var(--border-thin);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 10px 14px;
  border: 2px solid var(--c-black);
  text-decoration: none;
  background: var(--c-white);
  color: var(--c-black);
  transition: background 80ms linear, color 80ms linear;
}

.pagination a:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.pagination .is-current {
  background: var(--c-black);
  color: var(--c-white);
}

.pagination .is-disabled {
  border-color: var(--c-border);
  color: var(--c-border);
  background: var(--c-white);
  cursor: default;
}

/* ---------- Post-page hero ---------- */
.post-hero {
  padding-top: 48px;
  padding-bottom: 40px;
  border-bottom: var(--border-strong);
}

@media (min-width: 768px) {
  .post-hero {
    padding-top: 80px;
    padding-bottom: 56px;
  }
}

@media (min-width: 1024px) {
  .post-hero {
    padding-top: 120px;
    padding-bottom: 72px;
  }
}

.post-hero__type {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding: 6px 12px;
  border: 2px solid var(--c-black);
}

.post-hero__title {
  font-size: clamp(36px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  word-break: break-word;
}

.post-hero__date {
  color: var(--c-meta);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Fundraiser block on post page ---------- */
.fundraiser-block {
  border-top: var(--border-strong);
  border-bottom: var(--border-strong);
  background: var(--c-bg-alt);
  padding: 40px 0;
}

@media (min-width: 768px) {
  .fundraiser-block {
    padding: 56px 0;
  }
}

.fundraiser-block.is-closed {
  background: var(--c-bg-alt);
}

.fundraiser-block__status {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--c-black);
  color: var(--c-white);
  padding: 6px 12px;
  margin-bottom: 24px;
}

.fundraiser-block.is-closed .fundraiser-block__status {
  background: var(--c-meta);
}

.fundraiser-block__numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
  margin-bottom: 24px;
}

.fundraiser-block__current {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fundraiser-block__target {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--c-meta);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.fundraiser-block__bar {
  height: 24px;
  border: 2px solid var(--c-black);
  background: var(--c-white);
  position: relative;
  margin-bottom: 16px;
}

.fundraiser-block__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--c-black);
}

.fundraiser-block.is-closed .fundraiser-block__bar-fill {
  background: var(--c-meta);
}

.fundraiser-block__percent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--c-meta);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fundraiser-block__percent strong {
  color: var(--c-black);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.fundraiser-block__cta {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 18px;
  padding: 22px 32px;
}

@media (min-width: 768px) {
  .fundraiser-block__cta {
    display: inline-flex;
    width: auto;
    min-width: 280px;
  }
}

.fundraiser-block__purpose {
  margin-top: 16px;
  font-size: 13px;
  color: var(--c-meta);
  max-width: 600px;
}

/* ---------- Post cover (full-width image after fundraiser block) ---------- */
.post-cover {
  margin: 0;
  border-bottom: var(--border-strong);
  background: var(--c-bg-alt);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Post body (blocks) ---------- */
.post-body {
  padding-top: 48px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .post-body {
    padding-top: 72px;
    padding-bottom: 96px;
  }
}

.post-body .container {
  max-width: 960px;
}

.post-block {
  margin: 0 0 40px;
}

.post-block:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .post-block {
    margin-bottom: 56px;
  }
}

.post-block--text .prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
}

.post-block--text .prose p {
  margin-bottom: 1.2em;
}

.post-block--text .prose p:last-child {
  margin-bottom: 0;
}

.post-block--text .prose strong,
.post-block--text .prose b {
  font-weight: 700;
}

.post-block--text .prose em,
.post-block--text .prose i {
  font-style: italic;
}

.post-block--text .prose u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-block--text .prose s {
  text-decoration: line-through;
}

.post-block--text .prose h2,
.post-block--text .prose h3,
.post-block--text .prose h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 1.6em 0 0.6em;
  letter-spacing: -0.01em;
}
.post-block--text .prose h2 { font-size: 32px; }
.post-block--text .prose h3 { font-size: 24px; }
.post-block--text .prose h4 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (min-width: 768px) {
  .post-block--text .prose h2 { font-size: 40px; }
  .post-block--text .prose h3 { font-size: 28px; }
  .post-block--text .prose h4 { font-size: 19px; }
}
.post-block--text .prose h2:first-child,
.post-block--text .prose h3:first-child,
.post-block--text .prose h4:first-child {
  margin-top: 0;
}

.post-block--text .prose ul,
.post-block--text .prose ol {
  margin: 0 0 1.2em 0;
  padding-left: 1.5em;
}
.post-block--text .prose ul { list-style: disc; }
.post-block--text .prose ol { list-style: decimal; }
.post-block--text .prose li {
  margin-bottom: 0.4em;
}
.post-block--text .prose li > ul,
.post-block--text .prose li > ol {
  margin: 0.4em 0 0.4em 0;
}

.post-block--text .prose blockquote {
  margin: 1.2em 0;
  padding: 0.6em 1em;
  border-left: 3px solid var(--c-black);
  background: var(--c-bg-alt);
  font-style: italic;
}
.post-block--text .prose blockquote p:last-child {
  margin-bottom: 0;
}

.post-block--text .prose a {
  color: var(--c-black);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Override the global a:hover so the more specific color: black above
   doesn't leave us with black text on a black background. */
.post-block--text .prose a:hover {
  background: var(--c-black);
  color: var(--c-white);
  text-decoration: none;
}

.post-block--text .prose br {
  display: block;
  content: "";
}

.post-block--image img {
  width: 100%;
  height: auto;
  display: block;
  border: var(--border-strong);
}

.post-block--image figcaption,
.post-block--gallery figcaption {
  margin-top: 12px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  font-size: 14px;
  color: var(--c-meta);
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-grid__item {
  margin: 0;
}

.gallery-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: var(--border-strong);
}

.post-block--quote {
  max-width: 720px;
  margin: 56px auto;
  padding-left: 24px;
  border-left: 4px solid var(--c-black);
}

.post-block--quote p {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.post-block--quote footer {
  font-size: 14px;
  color: var(--c-meta);
  font-style: normal;
  letter-spacing: 0.04em;
}

.post-block--video {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border: var(--border-strong);
  background: var(--c-black);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.post-block--divider {
  width: 50%;
  margin: 56px auto;
  border: 0;
  border-top: 2px solid var(--c-black);
}

.post-block--callout {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  border: var(--border-strong);
  background: var(--c-bg-alt);
  font-size: 16px;
  line-height: 1.55;
}

.post-block--callout-warning {
  background: var(--c-white);
  border-color: var(--c-black);
}

.post-block--callout p {
  margin: 0;
}

/* ---------- Document card (file block + documents page) ---------- */
.doc-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title  action"
    "meta   action";
  align-items: center;
  gap: 4px 24px;
  max-width: 720px;
  margin: 32px auto;
  padding: 20px 24px;
  border: var(--border-strong);
  background: var(--c-white);
  text-decoration: none;
  color: inherit;
  transition: background 80ms linear, color 80ms linear;
}

.doc-card:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.doc-card__title {
  grid-area: title;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
}

.doc-card__meta {
  grid-area: meta;
  font-size: 13px;
  color: var(--c-meta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.doc-card:hover .doc-card__meta {
  color: var(--c-border);
}

.doc-card__action {
  grid-area: action;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 20px;
  border: 2px solid currentColor;
  white-space: nowrap;
}

/* ---------- Post page navigation (prev / next / all) ---------- */
.post-nav {
  border-top: var(--border-strong);
  padding: 40px 0;
}

@media (min-width: 768px) {
  .post-nav {
    padding: 56px 0;
  }
}

.post-nav__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .post-nav__inner {
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
  }
}

.post-nav__prev,
.post-nav__next {
  display: block;
  padding: 24px;
  border: var(--border-strong);
  text-decoration: none;
  color: inherit;
  transition: background 80ms linear, color 80ms linear;
}

.post-nav__prev:hover,
.post-nav__next:hover {
  background: var(--c-black);
  color: var(--c-white);
}

.post-nav__next {
  text-align: right;
}

.post-nav__direction {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-meta);
  margin-bottom: 8px;
}

.post-nav__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.post-nav__all {
  display: inline-flex;
  align-self: center;
  justify-self: center;
}

/* ---------- Documents page (grouped list) ---------- */
.doc-group {
  margin-bottom: 56px;
}

.doc-group:last-child {
  margin-bottom: 0;
}

.doc-group__title {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: var(--border-strong);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-list .doc-card {
  max-width: none;
  margin: 0;
}

/* ---------- About page (long-form text layout) ---------- */
.about-section {
  padding: 48px 0;
  border-top: var(--border-thin);
}

.about-section:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 768px) {
  .about-section {
    padding: 72px 0;
  }
}

.about-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.about-prose {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.65;
}

.about-prose p {
  margin-bottom: 1.2em;
}

.about-prose ul {
  list-style: none;
  padding: 0;
}

.about-prose ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 1em;
}

.about-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 16px;
  height: 2px;
  background: var(--c-black);
}

/* ---------- Director card (about → Руководство) ---------- */
.director-card {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 32px;
  border: var(--border-strong);
  background: var(--c-white);
  padding: 28px;
  margin-top: 8px;
}

.director-card__photo {
  margin: 0;
  border: var(--border-strong);
  background: var(--c-bg-alt);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  align-self: start;
}

.director-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.director-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.director-card__name {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.director-card__role {
  align-self: flex-start;
  background: var(--c-black);
  color: var(--c-white);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 24px;
}

.director-card__bio p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 16px;
}

.director-card__bio p:last-child {
  margin-bottom: 0;
}

.director-card__bio strong {
  font-weight: 800;
  background: linear-gradient(transparent 60%, #ffe9b3 60%);
  padding: 0 2px;
}

.director-card__quote {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-left: 6px solid var(--c-black);
  background: var(--c-bg-alt);
  font-size: 17px;
  line-height: 1.55;
  font-style: normal;
}

.director-card__contact {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: var(--border-thin);
  font-size: 16px;
  color: var(--c-meta);
}

.director-card__contact a {
  color: var(--c-black);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

@media (max-width: 720px) {
  .director-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }

  .director-card__photo {
    max-width: 280px;
    width: 100%;
  }

  .director-card__quote {
    padding: 14px 16px;
    font-size: 16px;
  }
}

.requisites {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 32px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 720px;
}

@media (min-width: 600px) {
  .requisites {
    grid-template-columns: max-content 1fr;
  }
}

.requisites dt {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  color: var(--c-meta);
}

.requisites dd {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 600px) {
  .requisites dt {
    text-align: left;
  }
}

/* ---------- Forms ---------- */
.form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__label {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form__label .req {
  color: var(--c-black);
}

.form__hint {
  font-size: 13px;
  color: var(--c-meta);
}

.form__control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--c-black);
  background: var(--c-white);
  font: inherit;
  color: var(--c-text);
  transition: background 80ms linear;
}

.form__control:focus {
  outline: none;
  background: var(--c-bg-alt);
  border-color: var(--c-black);
  border-width: 3px;
  padding: 13px 15px;
}

/* ---- form errors / banners (Stage 6) ---- */
.form-flash {
  border: 2px solid var(--c-black);
  background: var(--c-white);
  padding: 14px 16px 14px 20px;
  margin-bottom: 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.4;
  max-width: 640px;
}

.form-flash::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #ff3b30;
}

.form__field.has-error .form__control {
  border-color: #ff3b30;
}

.form__consent.has-error span {
  color: #ff3b30;
}

.form__error {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ff3b30;
  margin-top: 4px;
}

.form__control--textarea {
  min-height: 160px;
  resize: vertical;
  font-family: inherit;
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.form__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--c-black);
  background: var(--c-white);
  cursor: pointer;
  position: relative;
}

.form__consent input[type="checkbox"]:checked {
  background: var(--c-black);
}

.form__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: solid var(--c-white);
  border-width: 0 3px 3px 0;
  width: 8px;
  height: 14px;
  left: 4px;
  top: 0;
  transform: rotate(45deg);
}

.form__honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form__submit {
  align-self: flex-start;
  margin-top: 8px;
}

/* ---------- Thanks page ---------- */
.thanks {
  padding: 96px 0;
  text-align: center;
}

@media (min-width: 768px) {
  .thanks {
    padding: 160px 0;
  }
}

.thanks__title {
  font-size: clamp(56px, 12vw, 144px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.thanks__lead {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto 48px;
  color: var(--c-text);
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 480px) {
  .thanks__actions { flex-direction: column; align-items: stretch; }
  .thanks__actions .btn { width: 100%; }
}

/* ---------- Mobile review additions (Stage 6) ---------- */
@media (max-width: 480px) {
  /* Form controls на узких экранах не должны вылезать */
  .form, .form-flash { max-width: 100%; }
  .form__submit { width: 100%; }

  /* Длинные ОГРН/ИНН должны уметь переноситься */
  .site-footer__org span { word-break: break-word; }

  /* Заголовок страницы записи на узких экранах */
  .post-hero__title { font-size: clamp(32px, 8vw, 48px); }

  /* CTA кнопки в hero — на всю ширину */
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- 404 page ---------- */
.error-page {
  padding: 80px 0 96px;
  text-align: center;
}

@media (min-width: 768px) {
  .error-page {
    padding: 140px 0 160px;
  }
}

.error-page__code {
  font-size: clamp(96px, 22vw, 240px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.error-page__title {
  font-size: clamp(24px, 3vw, 40px);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.error-page__lead {
  font-size: 18px;
  color: var(--c-meta);
  margin-bottom: 40px;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ---------- Legal pages (policy / offer) ---------- */
.legal {
  padding: 48px 0 96px;
}

@media (min-width: 768px) {
  .legal {
    padding: 80px 0 144px;
  }
}

.legal__body {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
}

.legal__body h2 {
  font-size: clamp(20px, 2.4vw, 28px);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 48px 0 16px;
}

.legal__body h2:first-child {
  margin-top: 0;
}

.legal__body p,
.legal__body ol,
.legal__body ul {
  margin-bottom: 1.2em;
}

.legal__body ol,
.legal__body ul {
  padding-left: 28px;
}

.legal__body ol li,
.legal__body ul li {
  margin-bottom: 0.4em;
}

.legal__date {
  margin-bottom: 32px;
  color: var(--c-meta);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.legal__body pre {
  font: inherit;
  white-space: pre-wrap;
}

/* ---------- Support page (donation block titles + ЮKassa stub) ---------- */
.support-block__title {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: clamp(18px, 1.8vw, 22px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.support-block__title:first-of-type {
  margin-top: 8px;
}

.support-stub {
  border: var(--border-strong);
  background: var(--c-bg-alt);
  padding: 24px;
  font-size: 16px;
  line-height: 1.55;
}

.support-stub p {
  margin-bottom: 0.8em;
}

.support-stub p:last-child {
  margin-bottom: 0;
}

.support-widget {
  margin-top: 16px;
}

.support-docs-link {
  margin-top: 24px;
  font-weight: 700;
}

/* ---------- Donation form (ЮKassa) ---------- */
.section--donate-top {
  padding-top: 24px;
}

.donate {
  border: var(--border-strong);
  background: var(--c-white);
  padding: 24px;
  margin-top: 16px;
}

@media (min-width: 720px) {
  .donate { padding: 32px; }
}

.donate__amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.donate__chip {
  flex: 1 1 auto;
  min-width: 96px;
  padding: 12px 16px;
  border: var(--border-strong);
  background: var(--c-white);
  color: var(--c-black);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.donate__chip:hover,
.donate__chip:focus-visible {
  background: var(--c-black);
  color: var(--c-white);
  outline: none;
}

.donate__field {
  margin-bottom: 16px;
}

.donate__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.donate__input {
  width: 100%;
  padding: 14px 16px;
  border: var(--border-strong);
  background: var(--c-white);
  color: var(--c-text);
  font: inherit;
  font-size: 18px;
}

.donate__input:focus {
  outline: 2px solid var(--c-black);
  outline-offset: -2px;
}

.donate__field.has-error .donate__input {
  background: #fff4f4;
}

.donate__error {
  display: block;
  min-height: 1em;
  margin-top: 4px;
  color: #b00020;
  font-size: 13px;
}

.donate__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 16px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.donate__consent.has-error span {
  color: #b00020;
}

.donate__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  appearance: none;
  border: var(--border-strong);
  background: var(--c-white);
  cursor: pointer;
  position: relative;
}

.donate__consent input[type="checkbox"]:checked {
  background: var(--c-black);
}

.donate__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-right: 3px solid var(--c-white);
  border-bottom: 3px solid var(--c-white);
  transform: rotate(40deg) translate(-1px, -2px);
  width: 6px;
  height: 12px;
  border-radius: 0;
}

.donate__submit {
  width: 100%;
}

.donate__methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 560px) {
  .donate__methods-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.donate__method {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border: var(--border-strong);
  background: var(--c-white);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.donate__method input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.donate__method:hover,
.donate__method:focus-within {
  background: var(--c-bg-alt);
}

.donate__method:has(input:checked) {
  background: var(--c-black);
  color: var(--c-white);
}

.donate__method-label {
  display: block;
}

.donate__flash {
  margin-top: 16px;
  padding: 12px 16px;
  border: 2px solid #b00020;
  background: #fff4f4;
  color: #b00020;
  font-size: 14px;
  line-height: 1.5;
}

.donate__widget {
  min-height: 360px;
}

.donate__widget iframe {
  width: 100% !important;
  border: 0;
}
