/* ============================================================
   Проект «Крыша» — Храм св. прав. Иоанна Кронштадтского
   Сбор средств на ремонт кровли.
   Вариант B («Кампания») — финальная версия из дизайн-хендоффа.
   Самодостаточная статика: шрифты и фото локально, без сборки.
   ============================================================ */

/* ---- Fonts (local, licensed) ---- */
@font-face {
  font-family: 'Rubik';
  src: url('../fonts/Rubik.ttf') format('truetype-variations'),
       url('../fonts/Rubik.ttf') format('truetype');
  font-weight: 300 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Rubik';
  src: url('../fonts/Rubik-Italic.ttf') format('truetype-variations'),
       url('../fonts/Rubik-Italic.ttf') format('truetype');
  font-weight: 300 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Ostrovsky';
  src: url('../fonts/Ostrovsky-Bold_0.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- Brand tokens (values as rendered by Variant B) ---- */
:root {
  --blue: #8AACBB;       --blue-deep: #6E8C9A;
  --olive: #A1A670;      --olive-deep: #848A55;
  --brown: #6E5423;      --cream: #F8E8CA;
  --ink: #222;           --ink2: #444;           --ink3: #666;
  --line: #E6E4E0;       --soft: #FAF9F6;        --paper: #FFFFFF;

  --display: 'Ostrovsky', 'Cormorant Garamond', serif;
  --sans: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.2,.6,.2,1);
  --maxw: 1140px;
  --pad: 32px;            /* боковые поля; на мобиле 20px (см. media) */
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: #fff; font-family: var(--sans); color: var(--ink); }
img { display: block; }
a { color: inherit; }

.display { font-family: var(--display); font-weight: 700; text-transform: uppercase; }
.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink3);
}

/* ---- Layout ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.band-pad { padding-left: var(--pad); padding-right: var(--pad); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 42px; }
.brand__name {
  font-family: var(--display); font-weight: 700; font-size: 11px;
  text-transform: uppercase; line-height: 1.18;
}
.btn-donate-top {
  padding: 10px 22px; border-radius: 8px; background: var(--blue);
  color: #fff; font-family: var(--sans); font-weight: 600; font-size: 13.5px;
  text-decoration: none; white-space: nowrap; transition: background var(--ease) .2s;
}
.btn-donate-top:hover { background: var(--blue-deep); }

/* ============================================================
   Hero (color block)
   ============================================================ */
.hero {
  background: linear-gradient(160deg, var(--blue), var(--blue-deep));
  color: #fff;
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 92px var(--pad);
}
.hero__center { text-align: center; max-width: 780px; margin: 0 auto; }
.hero__eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,.85);
}
.hero__title {
  font-family: var(--display); font-weight: 700; font-size: 64px;
  line-height: 1.0; text-transform: uppercase; margin: 22px 0 20px;
}
.hero__lede {
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,.92); margin: 0 auto; max-width: 560px;
}

/* Progress centerpiece */
.progress-card {
  margin-top: 52px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px; padding: 34px 38px;
}
.progress-card__row {
  display: flex; align-items: baseline; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.progress-card__raised { font-family: var(--display); font-weight: 700; font-size: 58px; line-height: 1; }
.progress-card__goal { font-family: var(--sans); font-size: 16px; color: rgba(255,255,255,.85); }
.progress-track {
  height: 16px; background: rgba(255,255,255,.25); border-radius: 999px;
  margin-top: 20px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: #fff; border-radius: 999px;
  transition: width .6s var(--ease); width: 0;
}
.progress-stats {
  display: flex; justify-content: space-around; margin-top: 26px; gap: 16px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__big { font-family: var(--display); font-weight: 700; font-size: 34px; color: #fff; line-height: 1; }
.stat__label {
  font-family: var(--sans); font-size: 12.5px; color: rgba(255,255,255,.8);
  margin-top: 6px; letter-spacing: 0.04em;
}

/* ============================================================
   Donate band
   ============================================================ */
.donate-band { background: var(--soft); border-bottom: 1px solid var(--line); padding: 88px var(--pad); }
.donate-band__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: start;
}
.donate-band__title {
  font-family: var(--display); font-weight: 700; font-size: 38px;
  text-transform: uppercase; color: var(--ink); line-height: 1.04;
}
.donate-band__lede {
  font-family: var(--sans); font-size: 15.5px; line-height: 1.65;
  color: var(--ink2); margin-top: 18px; max-width: 460px;
}
.facts-grid { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fact { padding: 20px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.fact__a { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--blue-deep); }
.fact__b { font-family: var(--sans); font-size: 13.5px; color: var(--ink2); margin-top: 4px; }

/* ---- Donate card ---- */
.donate-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
}
.donate-card__title {
  font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.01em;
}
.field { margin-top: 18px; }
.chips { display: flex; gap: 8px; margin-top: 8px; }
.chip {
  flex: 1; padding: 12px 8px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 15px; text-align: center;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  transition: all .15s;
}
.chip.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.freq-chips { display: flex; gap: 8px; margin-top: 8px; }
.freq-chip {
  flex: 1; padding: 10px 6px; border-radius: 9px; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 13.5px; text-align: center;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink2);
}
.freq-chip.is-active { border-color: var(--blue); background: #F3F6F7; color: var(--blue-deep); }
.text-input {
  width: 100%; box-sizing: border-box; margin-top: 8px; padding: 12px 14px;
  border-radius: 10px; border: 1.5px solid var(--line);
  font-family: var(--sans); font-size: 15px; color: var(--ink); outline: none;
}
.text-input.is-filled { border-color: var(--blue); }
.text-input:disabled { opacity: .5; }
.anon-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink2); cursor: pointer;
}
.donate-hint {
  margin-top: 16px; padding: 10px 14px; background: var(--soft); border-radius: 10px;
  font-family: var(--sans); font-size: 13px; color: var(--ink2);
}
.donate-hint b { color: var(--ink); }
.donate-hint .sqm { color: var(--brown); }
.btn-donate {
  width: 100%; margin-top: 16px; padding: 16px; border-radius: 12px; border: none;
  background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 600;
  font-size: 16px; letter-spacing: 0.02em; cursor: pointer;
}
.donate-note {
  margin-top: 10px; font-family: var(--sans); font-size: 11.5px;
  color: var(--ink3); text-align: center;
}

/* ============================================================
   Donate modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,18,14,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal {
  background: #fff; border-radius: 18px; max-width: 560px; width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.modal__head {
  padding: 26px 28px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal__title { font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: uppercase; color: var(--ink); }
.modal__sub { font-family: var(--sans); font-size: 14px; color: var(--ink2); margin-top: 6px; }
.modal__close { border: none; background: none; font-size: 24px; color: var(--ink3); cursor: pointer; line-height: 1; }
.modal__body {
  padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start;
}
.req-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.req-row__k { font-family: var(--sans); font-size: 13px; color: var(--ink3); }
.req-row__v { font-family: var(--sans); font-size: 13.5px; color: var(--ink); font-weight: 500; text-align: right; }
.sbp { text-align: center; }
.sbp__qr { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; display: inline-block; transition: border-color .2s var(--ease); }
a.sbp__qr:hover { border-color: var(--blue); }
.sbp__img { width: 170px; height: 170px; display: block; }
.sbp__hint { font-family: var(--sans); font-size: 13px; line-height: 1.55; color: var(--ink3); margin: 8px 0 0; }
.sbp__phone { font-family: var(--sans); font-size: 12px; color: var(--ink3); margin-top: 8px; }
.modal__actions { padding: 0 28px 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-confirm {
  flex: 1; min-width: 200px; padding: 14px; border-radius: 12px; border: none;
  background: var(--blue); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 15px; cursor: pointer;
}
.btn-secondary {
  padding: 14px 20px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink2); font-family: var(--sans); font-weight: 500; font-size: 15px; cursor: pointer;
}
.modal__sent { padding: 48px 40px; text-align: center; }
.modal__check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px;
}
.modal__sent-text {
  font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--ink2);
  margin: 12px auto 0; max-width: 420px;
}
.btn-done {
  margin-top: 24px; padding: 14px 28px; border-radius: 12px; border: none;
  background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 15px; cursor: pointer;
}

/* ============================================================
   Photo band
   ============================================================ */
.photo-band { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.photo-band img { width: 100%; height: 280px; object-fit: cover; }

/* ============================================================
   Updates timeline
   ============================================================ */
.section-h {
  font-family: var(--display); font-weight: 700; font-size: 42px; color: var(--ink);
  text-transform: uppercase; line-height: 1.04; text-align: center;
}
.section-sub {
  font-family: var(--sans); font-size: 15px; color: var(--ink3); text-align: center;
  margin: 16px auto 56px; max-width: 560px;
}
.updates { max-width: 760px; margin: 0 auto; }
.timeline { position: relative; padding-left: 28px; }
.timeline__rail { position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.update { position: relative; margin-bottom: 28px; }
.update__dot {
  position: absolute; left: -28px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
}
.update__date { font-family: var(--sans); font-size: 12.5px; color: var(--ink3); letter-spacing: 0.04em; }
.update__title {
  font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--ink);
  text-transform: uppercase; margin: 4px 0 6px; line-height: 1.1;
}
.update__body { font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--ink2); max-width: 620px; }
.update__spent {
  display: inline-block; margin-top: 10px; padding: 5px 12px; background: var(--soft);
  border-radius: 999px; font-family: var(--sans); font-size: 12.5px; color: var(--brown); font-weight: 600;
}

/* ============================================================
   Donor feed + allocation
   ============================================================ */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.col-h {
  font-family: var(--display); font-weight: 700; font-size: 28px; text-transform: uppercase;
  color: var(--ink); margin-bottom: 20px;
}
.alloc-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.alloc-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 16px; }
.alloc-item { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 13.5px; color: var(--ink2); }
.alloc-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.alloc-item b { color: var(--ink); }

.donor-feed { display: flex; flex-direction: column; gap: 2px; }
.donor {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.donor__avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; color: var(--blue); font-size: 16px; flex-shrink: 0;
}
.donor__main { flex: 1; min-width: 0; }
.donor__name { font-family: var(--sans); font-weight: 500; font-size: 14.5px; color: var(--ink); }
.donor__meta { font-family: var(--sans); font-size: 12.5px; color: var(--ink3); }
.donor__amount { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink); }
.donor-empty { font-family: var(--sans); font-size: 14px; color: var(--ink3); padding: 12px 0; }

/* ============================================================
   Spiritual band
   ============================================================ */
.spiritual { background: linear-gradient(160deg, var(--olive), var(--olive-deep)); padding: 88px var(--pad); }
.spiritual__inner { text-align: center; max-width: 720px; margin: 0 auto; }
.spiritual__quote {
  font-family: var(--display); font-weight: 700; font-size: 32px; color: #fff;
  text-transform: uppercase; line-height: 1.2;
}
.spiritual__ref { font-family: var(--sans); font-size: 13.5px; color: rgba(255,255,255,.85); margin-top: 10px; }
.spiritual__text {
  font-family: var(--sans); font-size: 15.5px; line-height: 1.65; color: rgba(255,255,255,.95); margin-top: 20px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #222; color: #fff; padding: 56px var(--pad); }
.site-footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center;
}
.site-footer img { height: 40px; filter: invert(1); }
.site-footer__name { font-family: var(--display); font-weight: 700; font-size: 11px; text-transform: uppercase; line-height: 1.2; }
.site-footer__contacts { font-family: var(--sans); font-size: 13px; opacity: .8; line-height: 1.6; }
.site-footer__admin { font-family: var(--sans); font-size: 12px; opacity: .55; text-decoration: none; }
.site-footer__admin:hover { opacity: .9; }

/* ============================================================
   Spacing rhythm for sections
   ============================================================ */
.pt-updates { padding-top: 96px; padding-bottom: 36px; }
.pb-donors { padding-top: 40px; padding-bottom: 104px; }

/* ============================================================
   Responsive — tablet ≤1000px, mobile ≤760px
   ============================================================ */
@media (max-width: 1000px) {
  .donate-band__grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; }

  .brand img { height: 36px; }
  .brand__name { font-size: 9.5px; }
  .btn-donate-top { padding: 9px 16px; }

  .hero__inner { padding: 52px var(--pad); }
  .hero__eyebrow { font-size: 11px; }
  .hero__title { font-size: 40px; margin: 18px 0 16px; }
  .hero__lede { font-size: 15.5px; }
  .progress-card { margin-top: 40px; padding: 24px 20px; }
  .progress-card__raised { font-size: 42px; }
  .progress-card__goal { font-size: 15px; }
  .stat { flex: 1 1 30%; }
  .stat__big { font-size: 26px; }
  .stat__label { font-size: 11.5px; }

  .donate-band { padding: 56px var(--pad); }
  .donate-band__grid { gap: 36px; }
  .donate-band__title { font-size: 30px; }
  .donate-band__lede { font-size: 15px; }
  .facts-grid { gap: 12px; }
  .fact { padding: 16px; }
  .fact__a { font-size: 19px; }

  .photo-band { grid-template-columns: 1fr; gap: 0; }
  .photo-band img { height: 260px; }

  .pt-updates { padding-top: 56px; padding-bottom: 20px; }
  .section-h { font-size: 30px; }
  .section-sub { margin: 14px auto 36px; }
  .pb-donors { padding-top: 24px; padding-bottom: 64px; }
  .two-col { gap: 48px; }
  .col-h { font-size: 24px; }

  .modal__body { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .sbp { justify-self: center; }
  .modal__sent { padding: 36px 24px; }

  .spiritual { padding: 56px var(--pad); }
  .spiritual__quote { font-size: 26px; }
  .spiritual__text { font-size: 15px; }

  .site-footer { padding: 40px var(--pad); }
}
