/* Plaquette Mécénat — 4 страницы A4, простой светлый стиль.
   Trim 1240×1754 CSS px = 210×297 мм; .sheet 1276×1790 (вылеты 18 px ≈ 3 мм).
   Рендер @2x → 2480×3508 px = 300 dpi. Токены — BRAND.md. */

@import url("assets/fonts.css");

:root {
  /* Cormorant по умолчанию даёт старостильные цифры — для сумм нечитаемо */
  --forest-green:       #1E3A2F;
  --deep-forest-black:  #121B17;
  --imperial-burgundy:  #5C2A2A;
  --warm-charcoal:      #1D1A17;
  --parchment:          #F7F2E9;
  --museum-paper:       #FBF8F3;
  --dusty-beige:        #EDE3D4;
  --antique-gold:       #C9B48A;
  --aged-bronze:        #9D7C4A;
  --soft-beige-line:    #D9CEC0;
  --ink:                #1D1A17;
  /* muted и бронза для мелкого текста затемнены до 4.5:1 на museum-paper:
     исходные #7E766D (4.22) и #9D7C4A (3.66) порог не проходили. */
  --ink-muted:          #6A6259;
  --bronze-text:        #82633A;
  --photo-outline:      rgba(157, 124, 74, 0.45);
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --sans:  'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

.sheet {
  width: 1276px; height: 1790px;
  display: flex; align-items: center; justify-content: center;
  background: var(--museum-paper);
  overflow: hidden;
}
.page {
  position: relative;
  width: 1240px; height: 1754px;
  overflow: hidden;
  background: var(--museum-paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  padding: 96px 88px 88px;
  display: flex; flex-direction: column;
}

.phead, .pfoot {
  position: absolute; left: 88px; right: 88px;
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--sans); font-weight: 500;
  font-size: 11.5px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.phead { top: 44px; }
.pfoot { bottom: 40px; }
.phead::after, .pfoot::after {
  content: ""; flex: 1 1 auto; height: 1px; align-self: center;
  background: currentColor; opacity: 0.35;
}
.phead .pright, .pfoot .pright { order: 9; }
.phead::after, .pfoot::after { order: 5; }

.eyebrow {
  font-family: var(--sans); font-weight: 500;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: 10px;
}
h1, h2 { font-family: var(--serif); font-weight: 500; }
.title {
  font-size: 42px; line-height: 1.12; letter-spacing: 0.2px;
  color: var(--imperial-burgundy);
  margin-bottom: 14px;
}
.title-hero {
  font-size: 52px; line-height: 1.08; text-align: center;
  color: var(--imperial-burgundy);
  margin: 8px 0 18px;
}
.subtitle {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 22px; color: var(--aged-bronze);
  margin-bottom: 18px;
}
.lead { font-size: 20px; font-weight: 300; line-height: 1.5; }
.manifesto {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 26px; line-height: 1.4; text-align: center;
  color: var(--warm-charcoal);
  margin: 22px 0 28px;
}
.rule {
  width: 72px; height: 1px; border: 0;
  background: var(--antique-gold);
  margin: 18px auto;
}

.logo {
  display: block; margin: 0 auto 18px;
  width: 220px; height: auto;
}
.logo-sm {
  display: block; margin: 0 auto 16px;
  width: 140px; height: auto;
}

.missions {
  display: flex; flex-direction: column; gap: 16px; margin-top: 4px;
  counter-reset: mission;
}
.mission-group .mg-title {
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--bronze-text);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.mission-group .mg-title::after { content: ""; flex: 1; height: 1px; background: var(--soft-beige-line); }
.mission-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.mission .m-name { font-family: var(--serif); font-weight: 600; font-size: 20px; margin-bottom: 2px; }
/* Номера 1.-10. есть в исходнике клиента; рисуем счётчиком, в content.json не вносим. */
.mission .m-name::before {
  counter-increment: mission;
  content: counter(mission) ". ";
  font-variant-numeric: lining-nums;
  color: var(--bronze-text);
}
.mission .m-desc { font-size: 15.5px; color: var(--ink-muted); line-height: 1.4; }

.budget-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  margin-top: 8px; flex: 0 0 auto;
  /* без этого строки Produits (6 шт.) растягиваются до высоты Charges (10 шт.) */
  align-items: start;
}
table.budget {
  width: 100%; border-collapse: collapse; font-size: 15.5px;
}
table.budget caption {
  caption-side: top; text-align: left;
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  color: var(--imperial-burgundy);
  padding-bottom: 8px;
}
table.budget td {
  padding: 7px 0; border-bottom: 1px solid var(--soft-beige-line);
  vertical-align: top;
}
table.budget td:first-child { padding-right: 12px; }
table.budget td.amount {
  /* onum во вложенном Inter отсутствует - объявление ничего не давало, снято. */
  text-align: right; white-space: nowrap;
  font-weight: 500; width: 110px;
}
table.budget tfoot td {
  border-bottom: none; border-top: 1.5px solid var(--warm-charcoal);
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  font-variant-numeric: lining-nums;
  padding-top: 10px;
}
table.budget .budget-error td { color: var(--imperial-burgundy); font-size: 13px; }

.footnote {
  font-size: 13.5px; color: var(--ink-muted); line-height: 1.45;
  margin-top: 16px;
}
.body-close { font-size: 17.5px; line-height: 1.5; margin-top: 16px; }

.vignette {
  margin-top: 26px; width: 700px;
}
.vignette img {
  display: block; width: 100%; height: 520px; object-fit: cover;
  outline: 1px solid var(--photo-outline); outline-offset: 5px;
}

.projects { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.project {
  border-top: 1px solid var(--soft-beige-line);
  padding: 14px 0 6px;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 4px 22px;
}
.project .pr-amount {
  font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1;
  color: var(--imperial-burgundy);
  font-variant-numeric: lining-nums;
}
.project .pr-title {
  font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2;
  align-self: center;
}
.project .pr-copy { grid-column: 1 / -1; }
.project .pr-copy [data-field]:empty { display: none; }
.project .pr-copy { font-size: 15.5px; color: var(--ink-muted); line-height: 1.4; }
.project .pr-copy [data-field] + [data-field]:not(:empty) { margin-top: 3px; }

.photos-row {
  display: flex; gap: 22px; margin-top: 24px;
}
.photos-row figure {
  flex: 1 1 0; min-width: 0;
}
.photos-row img {
  display: block; width: 100%; height: 430px; object-fit: cover;
  outline: 1px solid var(--photo-outline); outline-offset: 5px;
}

.cta-intro { text-align: center; font-size: 20px; line-height: 1.5; max-width: 820px; margin: 0 auto 28px; }
.donate-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start; margin: 8px 0 28px;
}
.donate-block { text-align: center; }
.donate-block .label {
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--bronze-text);
  margin-bottom: 12px;
}
.qr img {
  width: 173px; height: 173px; image-rendering: pixelated;
  display: block; margin: 0 auto;
}
.rib {
  max-width: 550px; margin: 0 auto;
  background: #fff; padding: 10px;
  outline: 1px solid var(--soft-beige-line);
}
.rib img { display: block; width: 100%; height: auto; }

.notes { font-size: 16.5px; line-height: 1.5; }
.notes p + p { margin-top: 8px; }
.closing {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 24px; line-height: 1.4; text-align: center;
  color: var(--imperial-burgundy);
  margin: 28px 0 22px;
}
.contact {
  text-align: center; font-size: 16px; line-height: 1.5;
  color: var(--ink);
}
.contact .org { margin-top: 8px; color: var(--ink-muted); font-size: 15px; }

/* Пустое необязательное поле не оставляет ни линейки, ни вертикального зазора.
   Ячейки таблиц исключены: display:none сломал бы строку. */
.subtitle:empty,
.lead:empty,
.footnote:empty,
.cta-intro:empty,
.donate-block .label:empty,
.notes p:empty,
.contact .org:empty { display: none; }

.spacer { flex: 1 1 auto; }
