/* ============ Основа ============ */
:root {
  --ink: #1d232b;
  --ink-soft: #4a5563;
  --ink-faint: #8a94a3;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --accent: #c8552e;        /* тёплый сигнальный — кнопки помощи */
  --accent-dark: #a84523;
  --hero-bg: #182230;       /* глубокий горный синий */
  --hero-ink: #eef2f7;
  --line: #e3e8ee;
  --radius: 14px;
  --font-serif: "PT Serif", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--font-serif); line-height: 1.25; }
h2 { font-size: 1.9rem; margin-bottom: 1.2rem; }
h3 { font-size: 1.2rem; }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--ink-soft); max-width: 720px; margin-bottom: 1.6rem; }

/* ============ Кнопки ============ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  color: var(--hero-ink);
  border: 1.5px solid rgba(238, 242, 247, .5);
}
.btn-ghost:hover { border-color: var(--hero-ink); }
.btn-small { padding: 8px 18px; font-size: .9rem; }
.btn-block { display: block; text-align: center; }

/* ============ Шапка ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: rgba(24, 34, 48, .92);
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.topbar-title {
  color: var(--hero-ink);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

/* ============ Главный экран ============ */
.hero {
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(80, 110, 150, .35), transparent),
    linear-gradient(180deg, #182230 0%, #1d2a3c 70%, #223349 100%);
  color: var(--hero-ink);
  padding: 72px 0 64px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 48px;
  align-items: center;
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: #9fb2c8;
  margin-bottom: 14px;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 18px; }
.hero-sub { color: #c4cfdc; font-size: 1.08rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }

.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Прогресс сбора */
.hero-progress { max-width: 460px; }
.progress-track {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .15);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #e8804f, var(--accent));
  transition: width .8s ease;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .92rem;
  color: #c4cfdc;
}
.progress-labels span:first-child { color: #fff; font-weight: 600; }

/* ============ Заглушки фото ============ */
.photo-placeholder { display: none; }
.photo-missing img { display: none; }
.photo-missing .photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2c3d54, #3a4f6b);
  color: rgba(255, 255, 255, .65);
  font-size: .95rem;
  text-align: center;
  line-height: 1.5;
}

/* ============ Последнее сообщение ============ */
.lastmsg {
  background: var(--bg);
  padding: 64px 0;
  text-align: center;
}
.lastmsg-label {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.lastmsg-quote {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto 18px;
}
.lastmsg-note { color: var(--ink-soft); }

/* ============ Карточки людей ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 22px;
}
.card-photo {
  aspect-ratio: 1 / 1;
  position: relative;
  background: var(--bg-alt);
  margin-bottom: 18px;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .photo-placeholder { font-family: var(--font-serif); font-size: 2.4rem; }
.card h3 { padding: 0 20px; margin-bottom: 4px; }
.card-meta { padding: 0 20px; color: var(--ink-faint); font-size: .9rem; margin-bottom: 12px; }
.card-badge {
  display: inline-block;
  margin: 0 20px 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fdf1ea;
  color: var(--accent-dark);
  font-size: .82rem;
  font-weight: 600;
}
.card-bio { padding: 0 20px; color: var(--ink-soft); font-size: .95rem; }

/* ============ Хронология ============ */
.timeline { list-style: none; position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--ink-faint);
}
.timeline li.tl-alert::before { border-color: var(--accent); background: #fdece5; }
.tl-date {
  display: block;
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: 4px;
}
.tl-alert .tl-date { color: var(--accent-dark); }
.timeline p { color: var(--ink-soft); font-size: .97rem; }

/* ============ Карта ============ */
#map {
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  z-index: 1;
}
.map-note { color: var(--ink-faint); font-size: .88rem; margin-top: 12px; }

/* ============ Расходы ============ */
.costs { list-style: none; margin-bottom: 28px; }
.costs li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cost-name { color: var(--ink-soft); }
.cost-value { font-weight: 700; white-space: nowrap; }

.why-example {
  background: #fdf1ea;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-bottom: 24px;
}
.why-promise { color: var(--ink-soft); font-size: .95rem; }

/* ============ Как помочь ============ */
.donate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.donate-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  background: var(--bg);
}
.donate-card h3 { margin-bottom: 10px; }
.donate-how { color: var(--ink-soft); font-size: .93rem; margin-bottom: 14px; }
.donate-alt { color: var(--ink-soft); font-size: .9rem; margin-top: 14px; }
.donate-requisites { font-size: .95rem; line-height: 1.9; }

.share-block {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}
.share-block h3 { margin-bottom: 8px; }
.share-block > p { color: var(--ink-soft); margin-bottom: 20px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color .15s, background .15s;
}
.share-btn:hover { border-color: var(--ink-faint); }

/* ============ Новости ============ */
.news-feed { display: flex; flex-direction: column; gap: 18px; }
.news-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.news-date { font-weight: 700; font-size: .88rem; color: var(--accent-dark); margin-bottom: 6px; }
.news-text { color: var(--ink-soft); font-size: .97rem; white-space: pre-line; }

/* ============ Организатор ============ */
.organizer-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 26px;
  align-items: start;
}
.organizer-photo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt);
}
.organizer-photo img { width: 100%; height: 100%; object-fit: cover; }
.organizer-text p { margin-bottom: 10px; color: var(--ink-soft); }
.organizer-text a { color: var(--accent-dark); }

/* ============ Подвал ============ */
.footer {
  background: var(--hero-bg);
  color: #9fb2c8;
  text-align: center;
  padding: 44px 0;
  font-size: .95rem;
}
.footer p + p {
  margin-top: 8px;
  color: var(--hero-ink);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* ============ Мобильная версия ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 2rem; }
  .cards, .donate-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  #map { height: 380px; }
  .lastmsg-quote { font-size: 1.25rem; }
  .organizer-card { grid-template-columns: 1fr; }
  .organizer-photo { width: 140px; }
}
