/* ==========================================================================
   Общие компоненты сайта. Фирменные цвета определены в brand.css.
   Здесь только роли цветов и базовая раскладка; shop.css добавляет
   компоненты витрины.
   ========================================================================== */

:root {
  --bg: var(--brand-bg);
  --paper: var(--brand-paper);
  --sand: var(--brand-section);
  --ink: var(--brand-ink);
  --muted: var(--brand-muted);
  --accent: var(--brand-blue);
  --accent-dark: var(--brand-header);
  --accent-soft: var(--brand-section);
  --line: var(--brand-line);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(var(--brand-ink-rgb), .04), 0 8px 24px rgba(var(--brand-ink-rgb), .06);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 740px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0; background: var(--accent); color: var(--brand-on-dark); padding: 12px 20px; z-index: 100; }

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

.header {
  position: relative; z-index: 41;
  background: var(--brand-header);
  color: var(--brand-on-dark);
  border-bottom: 1px solid var(--brand-line-on-dark);
}
.header__inner { display: flex; align-items: center; gap: 12px; min-height: 74px; max-width: 1200px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-on-dark); margin-right: auto; }
.brand:hover { color: var(--brand-on-dark); }
.brand__mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--paper);
  border: 1px solid var(--line); color: var(--accent); font-size: 20px;
}
.brand__logo {
  width: 44px; height: 44px; object-fit: contain;
  background: var(--paper); border-radius: 5px;
  box-shadow: 0 0 0 3px var(--paper);
}
.brand__name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; display: block; }
.brand__tagline { font-size: .78rem; color: var(--brand-muted-on-dark); text-transform: uppercase; letter-spacing: .04em; }

.nav { display: flex; gap: 4px; }
.nav a { color: var(--brand-on-dark); text-decoration: none; padding: 9px 13px; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a.is-current { color: var(--brand-on-dark); background: var(--brand-blue); }
.nav a.is-current { box-shadow: inset 0 -2px 0 var(--brand-muted-on-dark); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--brand-control-on-dark); background: var(--brand-header); color: var(--brand-on-dark); border-radius: 11px; font-size: 19px; cursor: pointer; }
.nav-toggle:hover { background: var(--brand-blue); border-color: var(--brand-on-dark); }

.header :where(a, button):focus-visible,
.footer :where(a, button):focus-visible { outline-color: var(--brand-focus-on-dark); }

@media (max-width: 1220px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 10px 18px 18px;
    background: var(--brand-header); border-bottom: 1px solid var(--brand-line-on-dark); box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px; }
}

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

.hero {
  position: relative; overflow: hidden;
  text-align: center;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(var(--brand-section-rgb), .82), rgba(var(--brand-section-rgb), .94) 60%, var(--sand));
}
.hero__inner { position: relative; padding: 76px 24px; max-width: 760px; margin: 0 auto; }
.hero__lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); margin: 0; }

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

.section { padding: 68px 0; }
.section--tight { padding: 40px 0 0; }
.section--sand { background: var(--sand); border-block: 1px solid var(--line); }
.section__title { margin-bottom: 28px; }

.announce {
  background: linear-gradient(180deg, var(--accent-soft), var(--paper));
  border: 1px solid var(--accent-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: .8rem; margin-bottom: 12px;
}

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

/* ---------- Расписание ---------- */

.day {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 14px;
}
.day__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.day__date { font-family: var(--serif); font-size: 1.2rem; color: var(--accent-dark); }
.day__weekday { color: var(--muted); font-size: .9rem; }
.day__note { width: 100%; font-weight: 500; }

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

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

/* ---------- Сбор средств ---------- */

.fund {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.fund__figures { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 20px 0 14px; }
.fund__figures b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--accent-dark); }
.fund__figures span { color: var(--muted); font-size: .92rem; }

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

.req { display: grid; grid-template-columns: 200px 1fr; gap: 6px 18px; margin: 22px 0 0; 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; }
  .req dt { margin-top: 12px; font-size: .85rem; }
}

.details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.details summary { cursor: pointer; font-weight: 500; }
.details p { margin-top: 12px; color: var(--muted); font-size: .95rem; }

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

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

.news__card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.news__card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.news__body { padding: 22px; }
.news__date { color: var(--accent-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.news__body h3 { font-size: 1.05rem; }
.news__body p { color: var(--muted); font-size: .95rem; }

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

.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 760px) { .contacts { grid-template-columns: 1fr; } }

.contacts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contacts__list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.contacts__list span { color: var(--accent); font-size: 19px; }

/* ---------- Страницы ---------- */

.page-head { padding: 52px 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--sand), var(--bg)); }
.page-photo { border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 28px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn--soft { background: var(--paper); border-color: var(--brand-control); color: var(--accent); }
.btn--soft:hover { background: var(--accent-soft); border-color: var(--accent); }

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

.footer { background: var(--brand-header); color: var(--brand-on-dark); border-top: 1px solid var(--brand-line-on-dark); padding: 48px 0 28px; font-size: .95rem; }
.footer a, .footer a:hover { color: var(--brand-on-dark); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; margin-bottom: 30px; }
.footer__social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer__social a {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--brand-control-on-dark);
  background: transparent; color: var(--brand-on-dark); text-decoration: none; font-size: .9rem;
}
.footer__social a:hover { background: var(--brand-blue); border-color: var(--brand-on-dark); }
.footer__bottom {
  border-top: 1px solid var(--brand-line-on-dark); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  color: var(--brand-muted-on-dark); font-size: .87rem;
}

/* Общее объявление для посетителей */
.order-notice {
  width: min(42rem, calc(100% - 28px));
  margin: 14px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand-red);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 25px rgba(var(--brand-ink-rgb), .18);
  font-size: .875rem;
  line-height: 1.45;
}
.order-notice[hidden] { display: none; }
.order-notice strong { display: block; color: var(--accent); font-size: .9375rem; }
.order-notice p { margin: .2em 0 0; }
.order-notice__close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 1.45rem/1 var(--sans);
  cursor: pointer;
}
.order-notice__close:hover { background: var(--line); }

/* Фирменный рельеф в публичной части сайта. */
main :is(h1, h2, h3, h4) {
  font-family: var(--sans);
  color: var(--brand-blue);
  overflow-wrap: anywhere;
}

main h1 {
  --relief-edge: #0c2851;
  font-weight: 820;
  line-height: 1.14;
  letter-spacing: -.035em;
}

main h1, .hero__title-accent {
  text-shadow:
    -1px -1px 0 #ffffffb0,
    1px 1px 0 var(--relief-edge),
    1.7px 2px 0 var(--relief-edge),
    2.3px 3px 0 var(--relief-edge),
    3px 5px 5px rgba(var(--brand-blue-rgb), .31);
}

.hero__inner h1 { font-size: clamp(1.85rem, 4.9vw, 3.56rem); }
.hero__title-accent {
  --relief-edge: #811b28;
  display: block;
  color: #be2636;
}

.hero__title-place {
  display: block;
  margin-top: .55rem;
  color: #324c6d;
  font-size: clamp(1rem, 2.45vw, 1.3rem);
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #fff;
}

main :is(h2, h3, h4) {
  font-weight: 760;
  line-height: 1.22;
  text-shadow: 0 1px 0 #9facbf85, 1px 2px 2px rgba(var(--brand-blue-rgb), .14);
}

main p { text-shadow: 0 1px 0 #dce8f970; }
.header :is(.nav a, .header__phone) { text-shadow: 0 1px 1px #071d3d; }
.btn--primary, .header__cart.is-full { text-shadow: 0 1px 1px #6e0f20; }
.order-notice strong { text-shadow: 0 1px 0 #dce8f9; }
