/* ==========================================================================
   Твори Добро — фонд имени Александра Невского
   Стили сайта. Цвета вынесены в CSS-переменные (:root) — их удобно менять
   в одном месте. Брейкпоинт мобильной версии: 860px.
   ========================================================================== */

:root {
  --bg: #0f0c08;
  --bg2: #141009;
  --bg3: #171209;
  --bg4: #1c150d;
  --line: #2a2318;
  --line2: #3a3020;

  --text: #ece3d3;
  --text-strong: #f3ece0;
  --text-bright: #f6efe2;
  --muted: #9c8f76;
  --muted2: #8a7c60;
  --muted3: #b6a98c;
  --muted4: #cabfa9;

  --accent: #c9a24a;
  --accent-hover: #e0bd6e;
  --accent-ink: #14100a;
  --accent2: #a8524a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
}

.serif { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { display: block; max-width: 100%; }

.wrap { max-width: 1440px; margin: 0 auto; }

.btn {
  display: inline-block;
  padding: 15px 26px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #241d12;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--line2);
}

/* Тонкая зерновая текстура поверх всего сайта (по желанию — можно удалить) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: overlay;
  opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1.6px);
  background-size: 22px 22px;
}

/* ============ HEADER ============ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 64px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .brand { display: flex; align-items: center; gap: 14px; }
.site-header .brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.site-header .brand-name { font-size: 19px; font-weight: 700; line-height: 1.1; color: var(--text-strong); }
.site-header .brand-sub { font-size: 11px; letter-spacing: .03em; color: var(--muted2); margin-top: 2px; }

.site-header .header-right { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 28px; font-size: 14.5px; font-weight: 600; color: var(--muted4); }
.nav-links a { color: inherit; }

.header-phone { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--text-strong); white-space: nowrap; }

.nav-toggle { display: none; background: none; border: none; padding: 0; cursor: pointer; }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 900px 600px at 15% 20%, #241d12 0%, var(--bg) 60%);
}
.hero-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  padding: 56px 64px 64px;
  align-items: center;
}
.hero-badge { margin-bottom: 22px; }
.hero-title {
  font-size: 52px;
  line-height: 1.12;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 22px;
}
.hero-desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted3);
  max-width: 520px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; }
.hero-media { display: flex; align-items: center; justify-content: center; }
.hero-media img {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  border: 1px solid var(--line2);
}

/* ============ TRUST STRIP ============ */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.trust-strip .cell { padding: 28px 40px; border-right: 1px solid var(--line); }
.trust-strip .cell:last-child { border-right: none; }
.trust-strip .num { font-size: 30px; font-weight: 700; color: var(--accent); }
.trust-strip .label { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ============ ДЕВИЗ ФОНДА ============ */
.motto {
  padding: 40px 64px 44px;
  background: var(--bg2);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.motto .rule-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.motto .rule { width: 44px; height: 1px; background: var(--line2); }
.motto .kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; }
.motto .quote { font-size: 26px; font-style: italic; font-weight: 500; color: var(--text-strong); letter-spacing: .01em; }
.motto .author { font-size: 13.5px; color: var(--muted2); margin-top: 12px; }
.motto .note { font-size: 14px; color: var(--muted); margin-top: 16px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* ============ ЦИТАТА ============ */
.quote-section {
  background: var(--bg3);
  padding: 60px 64px;
  display: grid;
  grid-template-columns: .8fr 2fr;
  gap: 56px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote-section img {
  width: 100%;
  height: 340px;
  border-radius: 16px;
  object-fit: cover;
  object-position: 50% 12%;
  border: 1px solid var(--line2);
}
.quote-mark { margin-bottom: 18px; opacity: .9; }
.quote-text {
  font-size: 28px;
  line-height: 1.42;
  font-weight: 500;
  color: var(--text-bright);
  font-style: italic;
}
.quote-byline { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.quote-byline .rule { width: 36px; height: 2px; background: var(--accent); }
.quote-byline .name { color: var(--muted4); font-size: 14.5px; font-weight: 700; }

/* ============ НАПРАВЛЕНИЯ ============ */
.directions { padding: 60px 64px; background: var(--bg); }
.section-title { font-size: 36px; font-weight: 600; color: var(--text-strong); margin: 0 0 12px; }
.section-lead { font-size: 16px; color: var(--muted); margin: 0 0 44px; max-width: 600px; }

.directions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.directions-grid .card { background: var(--bg2); padding: 26px 30px; }
.directions-grid .card svg { margin-bottom: 12px; }
.directions-grid .card-title { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; color: var(--text-strong); }
.directions-grid .card-text { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ============ ПАРТНЁРЫ ============ */
.partners { padding: 40px 64px; background: var(--bg); border-top: 1px solid var(--line); }
.partners .kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted2); margin-bottom: 22px; text-align: center; }
.partners-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.partner-slot {
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141009;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #f3ece0;
}

/* ============ О ФОНДЕ / ИСТОРИЯ ============ */
.about {
  padding: 60px 64px;
  background: var(--bg2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-text p { font-size: 16px; line-height: 1.7; color: var(--muted3); margin: 0; }
.about-text .note { font-size: 15px; line-height: 1.7; color: var(--muted); margin-top: 16px; }

.about-cards { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.about-cards .card {
  background: var(--bg3);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
}
.about-cards .card svg { flex: none; }
.about-cards .card-text { font-size: 14.5px; color: var(--muted4); line-height: 1.5; }

/* ============ ПРАВЛЕНИЕ И ПОПЕЧИТЕЛЬСКИЙ СОВЕТ (чистые CSS-вкладки) ============ */
.board { padding: 60px 64px; background: var(--bg); }
.board-lead { font-size: 15.5px; line-height: 1.7; color: var(--muted3); max-width: 640px; margin-bottom: 32px; }

.board-tabs-input { position: absolute; opacity: 0; width: 0; height: 0; }

.board-tabs-row {
  display: flex;
  gap: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.board-tabs-row label {
  padding: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: -1px;
  color: var(--muted2);
  border-bottom: 2px solid transparent;
}
.board-tabs-row label:hover { color: var(--text-strong); }
.board-tabs-row label[for="tab-pravlenie"] { color: var(--text-strong); border-bottom-color: var(--accent); }

#tab-popech:checked ~ .board-panels #panel-pravlenie { display: none !important; }
#tab-popech:checked ~ .board-panels #panel-popech { display: grid !important; }
#tab-popech:checked ~ .board-tabs-row label[for="tab-pravlenie"] { color: var(--muted2); border-bottom-color: transparent; }
#tab-popech:checked ~ .board-tabs-row label[for="tab-popech"] { color: var(--text-strong); border-bottom-color: var(--accent); }

.board-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
#panel-popech { display: none; }

.board-panel .member-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg3);
  transition: transform .15s ease, border-color .15s ease;
}
.board-panel .member-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.board-panel .member-photo { width: 100%; height: 280px; object-fit: cover; object-position: 50% 12%; }
.board-panel .member-photo-placeholder {
  width: 100%;
  height: 280px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-panel .member-info { padding: 16px; }
.board-panel .member-name { font-size: 15px; font-weight: 700; color: var(--text-strong); line-height: 1.3; }
.board-panel .member-role { font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 4px; line-height: 1.4; }

/* ============ НУЖНА ПОМОЩЬ ============ */
.need-help {
  padding: 44px;
  background: radial-gradient(ellipse 700px 400px at 85% 20%, rgba(168,82,74,0.12) 0%, transparent 60%), #150e0d;
  margin: 48px 64px;
  border-radius: 20px;
  border: 1px solid rgba(168,82,74,0.35);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.need-help .eyebrow.need-help-tag { background: rgba(168,82,74,0.14); color: var(--accent2); border-color: rgba(168,82,74,0.4); margin-bottom: 22px; }
.need-help .title { font-size: 32px; font-weight: 600; color: var(--text-strong); margin: 0 0 18px; line-height: 1.25; }
.need-help .desc { font-size: 16px; line-height: 1.7; color: #c9b6ae; max-width: 440px; }
.need-help .phone-line { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 14.5px; font-weight: 700; color: var(--text-strong); }

.need-help-form { background: #1c1210; border: 1px solid rgba(168,82,74,0.35); border-radius: 16px; padding: 30px; }
.need-help-form .field { display: flex; flex-direction: column; gap: 16px; }
.need-help-form label { font-size: 12.5px; font-weight: 700; color: #a8938a; margin-bottom: 7px; display: block; }
.need-help-form input,
.need-help-form textarea {
  width: 100%;
  border-radius: 8px;
  background: #120b0a;
  border: 1px solid rgba(168,82,74,0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
}
.need-help-form input { height: 44px; }
.need-help-form textarea { height: 88px; resize: vertical; }
.need-help-form .submit {
  text-align: center;
  padding: 14px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  background: var(--accent2);
  color: #fff3f0;
  border: none;
  font-family: inherit;
  width: 100%;
}

/* ============ КАК ПОМОЧЬ ============ */
.how-to-help { padding: 60px 64px; background: var(--bg3); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-to-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.how-to-help-grid .card { background: var(--bg); border-radius: 16px; padding: 32px; border: 1px solid var(--line); }
.how-to-help-grid .card svg { margin-bottom: 18px; }
.how-to-help-grid .card-title { font-size: 19px; font-weight: 700; color: var(--text-strong); margin-bottom: 10px; }
.how-to-help-grid .card-text { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin-bottom: 22px; }
.how-to-help-grid .card-link { color: var(--accent); font-size: 14.5px; font-weight: 700; }

/* ============ FOOTER ============ */
.site-footer {
  background: #0a0806;
  padding: 64px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--line);
}
.site-footer .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.site-footer .brand-row img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.site-footer .brand-row .name { font-size: 17px; font-weight: 700; color: var(--text-strong); }
.site-footer .about-line { font-size: 13.5px; color: var(--muted2); line-height: 1.6; max-width: 320px; }
.site-footer .col-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted2); margin-bottom: 16px; }
.site-footer .contacts { font-size: 14px; color: var(--muted4); line-height: 2; }
.site-footer .social-row { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.site-footer .social-icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.site-footer .social-label { font-size: 12.5px; color: var(--muted2); }
.site-footer .footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer .footer-links a { color: var(--muted4); }

/* ==========================================================================
   МОБИЛЬНАЯ ВЕРСИЯ (<= 860px)
   ========================================================================== */
@media (max-width: 860px) {
  .site-header { padding: 16px 20px; }
  .site-header .brand img { width: 36px; height: 36px; }
  .site-header .brand-name { font-size: 16px; }
  .nav-links, .header-phone, .site-header .btn { display: none; }
  .nav-toggle { display: block; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px 28px;
    gap: 24px;
    text-align: left;
  }
  .hero-title { font-size: 30px; line-height: 1.18; margin-bottom: 14px; }
  .hero-desc { font-size: 15px; line-height: 1.55; margin-bottom: 24px; max-width: none; }
  .hero-media { order: -1; margin-bottom: 4px; }
  .hero-media img { width: 200px; height: 200px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; text-align: center; }

  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip .cell { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .trust-strip .cell:nth-child(2n) { border-right: none; }
  .trust-strip .cell:nth-child(3), .trust-strip .cell:nth-child(4) { border-bottom: none; }
  .trust-strip .num { font-size: 24px; }

  .motto { padding: 30px 20px 34px; }
  .motto .quote { font-size: 20px; }

  .quote-section { grid-template-columns: 1fr; padding: 32px 20px; gap: 20px; }
  .quote-section img { height: 260px; }
  .quote-text { font-size: 20px; }

  .directions, .about, .board, .partners, .how-to-help { padding: 36px 20px; }
  .section-title { font-size: 26px; margin-bottom: 8px; }
  .section-lead { margin-bottom: 24px; }
  .directions-grid { grid-template-columns: 1fr; }

  .partners-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .partner-slot { min-height: 56px; padding: 10px; font-size: 11px; }
  .partner-slot--wide { grid-column: 1 / -1; }

  .about { grid-template-columns: 1fr; gap: 28px; }

  .board-lead { margin-bottom: 20px; }
  .board-tabs-row { gap: 0; }
  .board-tabs-row label { flex: 1; text-align: center; padding-bottom: 14px; font-size: 13.5px; }
  .board-panel { grid-template-columns: 1fr; }
  .board-panel .member-photo,
  .board-panel .member-photo-placeholder { height: 280px; }

  .need-help { grid-template-columns: 1fr; margin: 28px 20px; padding: 28px; gap: 24px; }
  .need-help .title { font-size: 24px; }

  .how-to-help-grid { grid-template-columns: 1fr; }

  .site-footer { grid-template-columns: 1fr; padding: 32px 20px; gap: 28px; }
}

/* Форма «Нужна помощь»: скрытое поле-ловушка для спам-ботов и статус отправки */
.need-help-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.need-help-form .submit:disabled { opacity: 0.6; cursor: default; }
.need-help-form .form-status { margin: 0; font-size: 14px; line-height: 1.5; color: #a8938a; min-height: 1.5em; }
.need-help-form .form-status.is-ok { color: var(--accent); }
.need-help-form .form-status.is-error { color: #e07a70; }

/* Контакты в футере — кликабельные ссылки */
.site-footer .contacts a { color: inherit; }
.site-footer .contacts a:hover { color: var(--accent-hover); }
.site-footer a.social-row:hover .social-label { color: var(--accent-hover); }
