/* ==========================================================================
   Строящийся храм святителя Николая Чудотворца — г. Набережные Челны, п. ГЭС
   Светлая и воздушная тема
   ========================================================================== */

:root {
  --bg: #FFFDF8;
  --paper: #FFFFFF;
  --sand: #FAF5EA;
  --ink: #2B2724;
  --muted: #6E645C;
  --gold: #C9A227;
  --gold-deep: #A6851C;
  --gold-soft: #F3E7C4;
  --line: #E8E0D2;
  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(43, 39, 36, .04), 0 8px 24px rgba(43, 39, 36, .06);
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); }

p { margin: 0 0 1.1em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: var(--sand);
  color: var(--gold-deep);
  font-size: 22px;
  line-height: 1;
}

.brand-text { display: flex; flex-direction: column; }
.brand-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.15;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .brand-title { font-size: .95rem; }
}
.brand-sub {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  color: var(--ink);
  font-size: .93rem;
  padding: 9px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover { background: var(--sand); text-decoration: none; }
.nav a.is-current { color: var(--gold-deep); background: var(--sand); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  color: var(--ink);
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1.02rem; border-radius: 10px; }
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 6px 18px rgba(201, 162, 39, .28);
}
.btn-gold:hover { background: var(--gold-deep); }

.btn-outline {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--gold); }

.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--sand); }

.btn-wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  min-height: min(74vh, 640px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFDF8 0%, #FAF5EA 100%);
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 253, 248, .72) 0%, rgba(255, 253, 248, .88) 60%, var(--bg) 100%);
}

.hero-inner { position: relative; z-index: 1; padding: 72px 24px; }

.hero-cross {
  font-size: 34px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 18px;
}

.hero h1 { margin-bottom: .35em; }

.hero-lead {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.rule {
  width: 120px;
  height: 1px;
  background: var(--gold-soft);
  margin: 24px auto;
  position: relative;
}
.rule::after {
  content: "☦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: var(--gold);
  font-size: 14px;
  padding: 0 10px;
}

/* ---------- Секции ---------- */

.section { padding: 72px 0; }
.section-sand { background: var(--sand); border-block: 1px solid var(--line); }

.section-head { margin-bottom: 36px; max-width: 720px; }
.section-head p { color: var(--muted); margin: 0; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 10px;
  font-weight: 600;
}

.page-head {
  padding: 56px 0 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--sand), var(--bg));
}
.page-head p { color: var(--muted); max-width: 680px; }

/* ---------- Сетки и карточки ---------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.card-link {
  display: block;
  color: inherit;
  transition: transform .15s ease, border-color .2s ease;
}
.card-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--gold);
}

.card-icon {
  font-size: 26px;
  color: var(--gold);
  margin-bottom: 12px;
  line-height: 1;
}

.card-arrow { color: var(--gold-deep); font-weight: 500; margin-top: 14px; display: inline-block; }

/* ---------- Ближайшие службы ---------- */

.services { display: grid; gap: 0; border-top: 1px solid var(--line); }

.service {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}

.service-date {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold-deep);
}
.service-name { font-weight: 500; }
.service-note { color: var(--muted); font-size: .93rem; display: block; font-weight: 400; }
.service-time { font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }

@media (max-width: 620px) {
  .service { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .service-date { grid-column: 1 / -1; }
}

/* ---------- Объявление ---------- */

.announce {
  background: linear-gradient(180deg, #FFFBEF, var(--paper));
  border: 1px solid var(--gold-soft);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.announce .tag { margin-bottom: 14px; }
.announce h2 { margin-bottom: .35em; }
.announce-when {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 20px 0 24px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}
.announce-when div { min-width: 150px; }
.announce-when b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-deep); }
.announce-when span { color: var(--muted); font-size: .93rem; }

/* ---------- Расписание по дням ---------- */

.week-title {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.week-title:first-of-type { margin-top: 0; }

.sday {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 14px;
}
.sday.is-feast { border-left-color: var(--gold); background: #FFFDF4; }

.sday-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 12px;
}
.sday-date { font-family: var(--serif); font-size: 1.2rem; color: var(--gold-deep); }
.sday-dow { color: var(--muted); font-size: .9rem; text-transform: lowercase; }
.sday-feast {
  width: 100%;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 2px;
}

.sday-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sday-list li { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: baseline; }
.sday-list .t { font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; }
.sday-list .n { color: var(--ink); }
.sday-list .n small { display: block; color: var(--muted); font-size: .88rem; }

@media (max-width: 520px) {
  .sday { padding: 18px; }
  .sday-list li { grid-template-columns: 66px 1fr; gap: 10px; }
}

/* ---------- Прогресс стройки ---------- */

.progress-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.progress-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
  margin-bottom: 16px;
}
.progress-num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold-deep);
}
.progress-label { color: var(--muted); font-size: .95rem; }

.bar {
  height: 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
}

.stage-list { list-style: none; margin: 0; padding: 0; }
.stage-list li {
  position: relative;
  padding: 0 0 18px 34px;
  border-left: 1px solid var(--line);
  margin-left: 10px;
}
.stage-list li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
}
.stage-list li.done::before { background: var(--gold); border-color: var(--gold); }
.stage-list li.now::before { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.stage-list li:last-child { border-left-color: transparent; }
.stage-title { font-weight: 500; display: block; }
.stage-note { color: var(--muted); font-size: .95rem; display: block; }

/* ---------- Пожертвования ---------- */

.donate-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .donate-grid { grid-template-columns: 1fr; } }

.req {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 6px 18px;
  margin: 0 0 18px;
  font-size: .97rem;
}
.req dt { color: var(--muted); }
.req dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) {
  .req { grid-template-columns: 1fr; gap: 0 0; }
  .req dt { margin-top: 12px; font-size: .85rem; }
}

.copy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.copy-btn {
  border: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .9rem;
  font-family: var(--sans);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--gold); }
.copy-btn.is-done { background: var(--gold-soft); border-color: var(--gold); }

.qr-box {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--sand);
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}

/* ---------- Галерея ---------- */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

.gallery figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 12px 16px; font-size: .9rem; color: var(--muted); }

/* ---------- Формы ---------- */

.form { display: grid; gap: 20px; }

.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .97rem; }
.field .hint { color: var(--muted); font-size: .88rem; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 400;
}
.radio-row input { accent-color: var(--gold-deep); width: 18px; height: 18px; }
.radio-row label:has(input:checked) { border-color: var(--gold); background: var(--sand); }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.5;
}
.check input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--gold-deep); flex: none; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.form-status {
  margin: 0;
  padding: 0;
  font-size: .95rem;
  line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status.is-ok {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #6B5310;
}
.form-status.is-warn {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--sand);
  border: 1px solid var(--line);
  color: var(--muted);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.note {
  background: var(--sand);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 18px 22px;
  color: var(--muted);
  font-size: .95rem;
}
.note strong { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }

.todo {
  background: #FFF8E6;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: 16px 20px;
  color: #7A5E12;
  font-size: .92rem;
}
.todo p:last-child { margin-bottom: 0; }

/* ---------- Цитата ---------- */

.quote {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.quote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--sans);
  font-size: .92rem;
  font-style: normal;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------- Новости ---------- */

.news-embed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 180px;
  box-shadow: var(--shadow);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.news-card .news-date {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 10px;
}
.news-card h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: .005em;
  margin-bottom: .5em;
}
.news-card p { color: var(--muted); font-size: .95rem; }
.news-card .card-arrow { margin-top: auto; }

/* ---------- Контакты ---------- */

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.contact-list .ico { color: var(--gold); font-size: 20px; line-height: 1.4; }
.contact-list b { display: block; font-weight: 500; }
.contact-list span { color: var(--muted); font-size: .95rem; }

.map-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
}
.map-box iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--ink); }
.footer-grid a:hover { color: var(--gold-deep); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  color: var(--muted);
  font-size: .88rem;
}

.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: .92rem;
}
.social a:hover { border-color: var(--gold); text-decoration: none; }

/* ---------- Прочее ---------- */

.lead { font-size: 1.1rem; color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 18px; }

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7A5E12;
  font-size: .8rem;
  letter-spacing: .04em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

@media print {
  .site-header, .site-footer, .hero-actions, .btn { display: none; }
  body { font-size: 12pt; }
}
