/* Фонд Черниговской иконы Божьей Матери — общая дизайн-система
   по мотивам church-sanino.ru: белый фон с облаками, синий + золото, узкие заглавные заголовки */

:root {
  --navy: #03447a;
  --navy-deep: #022f55;
  --gold: #e2b137;
  --gold-soft: #f3dc9f;
  --text: #5e4947;
  --text-strong: #473735;
  --text-muted: #6f5b58;
  --sky: #f5f9ff;
  --sky-2: #e8f0fb;
  --line: #d6e2f0;
  --white: #ffffff;
  --radius: 6px;
  --container: 1200px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "PT Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white) url("assets/clouds.png") center top / max(100%, 1920px) auto repeat-y;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }

/* ---------- Типографика ---------- */
.display {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: 0.04em;
  line-height: 1.12;
  margin: 0;
}

/* Заголовок секции с тонкой линией и ромбом на конце — фирменный приём референса */
.section-title {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 0 0 56px;
}
.section-title h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
.section-title .line { flex: 1; height: 1px; background: var(--line); position: relative; }
.section-title .line::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px; background: var(--navy); transform: rotate(45deg);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.2;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--navy); color: var(--white); }
.btn--solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); font-weight: 700; }
.btn--gold:hover { background: #d3a02a; border-color: #d3a02a; color: var(--navy-deep); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--navy); font-weight: 700; font-size: 16px;
}
.link-arrow svg { transition: transform .25s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Шапка ---------- */
.header { position: relative; z-index: 20; padding: 26px 0; }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo { display: flex; align-items: center; gap: 14px; color: var(--navy); }
.logo__mark { height: 60px; width: auto; flex: none; }
.logo__text { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; line-height: 1.15; max-width: 210px; }
.logo__text small { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 3px; }

.nav { display: flex; gap: 36px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nav a {
  font-family: var(--display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .08em; font-size: 16px; color: var(--navy);
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .3s ease;
}
.nav a:hover::after { transform: scaleX(1); }

.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }

/* ---------- Золотые уголки (как рамка карты на референсе) ---------- */
.gold-corners { position: relative; }
.gold-corners::before, .gold-corners::after {
  content: ""; position: absolute; width: 56px; height: 56px; pointer-events: none;
}
.gold-corners::before { top: -10px; left: -10px; border-top: 3px solid var(--gold); border-left: 3px solid var(--gold); }
.gold-corners::after { bottom: -10px; right: -10px; border-bottom: 3px solid var(--gold); border-right: 3px solid var(--gold); }

/* ---------- Секции ---------- */
.section { padding: 110px 0; position: relative; }

/* ---------- Партнёры ---------- */
.partner {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid; place-items: center;
  aspect-ratio: 3 / 2;
  padding: 22px;
  min-width: 0;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.partner:hover { border-color: var(--gold); box-shadow: 0 10px 30px rgba(3, 68, 122, .08); }
.partner img { max-height: 110px; width: auto; object-fit: contain; }

/* ---------- Подвал ---------- */
.footer { padding: 70px 0 40px; position: relative; }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; border-bottom: 1px solid var(--line); }
.footer h4 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 15px; color: var(--navy); margin: 0 0 18px; }
.footer__item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 16px; }
.footer__item svg { flex: none; color: var(--gold); margin-top: 3px; }
.footer__links { display: grid; gap: 10px; font-size: 16px; }
.footer__links a:hover { color: var(--navy); }
.socials { display: flex; gap: 12px; }
.social {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--white);
  transition: background .25s ease, transform .25s ease;
}
.social:hover { background: var(--gold); color: var(--navy-deep); transform: translateY(-2px); }
.footer :focus-visible { outline-color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; font-size: 14px; color: var(--text-muted); }

/* ---------- Модальное окно «Нужна помощь?» ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(2, 47, 85, .55); backdrop-filter: blur(3px); }
.modal__box {
  position: relative; width: min(520px, 100%);
  background: var(--white) url("assets/clouds.png") center / cover;
  border-radius: 10px; padding: 44px 40px 36px;
  box-shadow: 0 30px 80px rgba(2, 47, 85, .3);
  animation: modalIn .35s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; top: 14px; right: 14px; background: none; border: 0; font-size: 28px; line-height: 1; color: var(--navy); cursor: pointer; padding: 6px 10px; }
.modal h3 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: 2px; font-size: 32px; color: var(--navy); margin: 0 0 8px; }
.modal p { font-size: 16px; margin-bottom: 24px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text-strong);
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field textarea { resize: vertical; min-height: 90px; }
.modal .btn { width: 100%; margin-top: 8px; }
.modal__note { font-size: 13px !important; color: var(--text-muted); margin: 14px 0 0 !important; text-align: center; }

/* ---------- Появление при скролле ---------- */
/* Прячем блоки только при работающем JS, иначе контент остаётся видимым */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .nav { gap: 22px; }
  .header .btn { padding: 12px 18px; font-size: 16px; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 100%; left: 20px; right: 20px;
    background: var(--white); padding: 24px; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 20px 40px rgba(3, 68, 122, .12);
  }
  .burger { display: block; }
  .header__cta { display: none; }
  .section { padding: 80px 0; }
  .section-title { gap: 20px; margin-bottom: 40px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .logo__text { font-size: 13px; max-width: 170px; }
  .logo__text small { display: none; }
  .section-title h2 { white-space: normal; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .modal__box { padding: 40px 22px 28px; }
}
