/* Храм прп. Сергия Радонежского, г. Лермонтов — стили сайта.
   Палитра — раздел 18 claude.md: тёплый молочно-белый, тёмно-зелёный,
   графитовый, мягкий бордовый; приглушённое золото — только акцент. */

@font-face { font-family: "PT Serif"; font-weight: 400; font-display: swap;
  src: local("PT Serif"), local("PTSerif-Regular"), url("/assets/fonts/PTSerif-Regular.woff2") format("woff2"); }
@font-face { font-family: "PT Serif"; font-weight: 700; font-display: swap;
  src: local("PT Serif Bold"), local("PTSerif-Bold"), url("/assets/fonts/PTSerif-Bold.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 400; font-display: swap;
  src: local("PT Sans"), local("PTSans-Regular"), url("/assets/fonts/PTSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 700; font-display: swap;
  src: local("PT Sans Bold"), local("PTSans-Bold"), url("/assets/fonts/PTSans-Bold.woff2") format("woff2"); }

:root {
  --ground: #F6F3EC;
  --surface: #FFFDF8;
  --ink: #2A2C2B;
  --muted: #5B5F5A;
  --line: #E2DCCF;
  --green: #1E3B2F;
  --green-soft: #E6EDE7;
  --on-green: #FFFDF8;
  --link: #1E5A43;
  --burgundy: #7B3039;
  --on-burgundy: #FFFDF8;
  --gold: #A8864F;
  --todo-bg: #FBF1DA;
  --todo-line: #C9A24A;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
  --text: 70ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #131915; --surface: #1A221D; --ink: #ECE8DF; --muted: #A9AEA7; --line: #2D3731;
    --green: #2C5443; --green-soft: #1F2B24; --on-green: #F6F3EC; --link: #9CCBB2;
    --burgundy: #9B4650; --on-burgundy: #FFF7F4; --gold: #CDAE72; --todo-bg: #2E2717; --todo-line: #8F7535;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #131915; --surface: #1A221D; --ink: #ECE8DF; --muted: #A9AEA7; --line: #2D3731;
  --green: #2C5443; --green-soft: #1F2B24; --on-green: #F6F3EC; --link: #9CCBB2;
  --burgundy: #9B4650; --on-burgundy: #FFF7F4; --gold: #CDAE72; --todo-bg: #2E2717; --todo-line: #8F7535;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 18px/1.6 var(--sans);
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.prose { max-width: var(--text); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; text-wrap: balance; color: var(--ink); margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(24px, 3.4vw, 30px); }
h3 { font-size: 21px; }
p { margin: 0; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.eyebrow { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 20px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.mark { color: var(--gold); font-family: var(--serif); }

/* ——— header ——— */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand .mark { font-size: 26px; line-height: 1; }
.brand b { font-family: var(--serif); font-size: 17px; line-height: 1.2; display: block; }
.brand small { color: var(--muted); font-size: 13px; }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav a:hover { color: var(--link); }
.header-cta { display: none; gap: 8px; }
@media (min-width: 1200px) { .nav, .header-cta { display: flex; } .menu-toggle { display: none; } }

.menu-toggle { position: relative; }
.menu-toggle summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; }
.menu-toggle summary::-webkit-details-marker { display: none; }
.menu-toggle[open] summary { background: var(--green-soft); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel a { display: block; padding: 12px 14px; color: var(--ink); text-decoration: none; border-radius: 8px; font-size: 18px; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--green-soft); }
.menu-panel .btn { margin-top: 8px; width: 100%; }

/* ——— buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: var(--radius);
  font: 700 17px/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green); }
.btn-donate { background: var(--burgundy); color: var(--on-burgundy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; } }

/* ——— sections ——— */
main { display: block; }
.section { padding-block: 48px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.page-head { padding-block: 40px 8px; }
.page-head .lead { margin-top: 12px; }
.breadcrumbs { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }

/* ——— hero ——— */
.hero { background: var(--green); color: var(--on-green); }
.hero .wrap { padding-block: 44px 40px; display: grid; gap: 28px; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.3fr 1fr; align-items: end; padding-block: 64px 56px; } }
.hero h1 { color: var(--on-green); }
.hero .city { display: block; font-size: .62em; font-weight: 400; margin-top: 6px; opacity: .9; }
.hero .eyebrow { color: var(--on-green); opacity: .8; }
.hero .rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 20px 0; }
.hero-info { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 16px; opacity: .92; margin-top: 18px; }
.hero-info a { color: var(--on-green); }
.hero .btn-outline { color: var(--on-green); border-color: rgba(255,253,248,.45); }

.next-service {
  background: var(--surface); color: var(--ink); border-radius: var(--radius);
  padding: 22px 24px; display: grid; gap: 6px;
}
.next-service .label { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.next-service .when { font-family: var(--serif); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.next-service .what { font-size: 19px; }
.next-service .btn-row { margin-top: 12px; }

/* ——— cards ——— */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  display: grid; gap: 6px; align-content: start; padding: 22px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
a.card:hover { border-color: var(--green); }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); font-size: 16px; }
.card .go { color: var(--link); font-weight: 700; font-size: 16px; margin-top: 6px; }

/* ——— schedule ——— */
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.week li { display: grid; grid-template-columns: 120px 1fr; gap: 4px 20px; padding: 16px 20px; }
.week li + li { border-top: 1px solid var(--line); }
.week .day { font-weight: 700; font-variant-numeric: tabular-nums; }
.week .day small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }
.week .today .day { color: var(--link); }
.svc { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.svc + .svc { margin-top: 6px; }
.svc time { font-variant-numeric: tabular-nums; font-weight: 700; }
.svc .feast { display: block; color: var(--muted); font-size: 15px; }
@media (max-width: 520px) { .week li { grid-template-columns: 1fr; } }
.schedule-note { margin-top: 14px; font-size: 16px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ——— steps, facts ——— */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(s); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green);
  font-weight: 700; font-family: var(--serif);
}
:root[data-theme="dark"] .steps li::before { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li::before { color: var(--ink); } }
.facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.fact dt { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 6px 0 0; font-size: 19px; }
.fact dd a { font-weight: 700; }
ul.list { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }

/* ——— details / FAQ ——— */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 18px; }
.faq .answer > * + * { margin-top: 12px; }

/* ——— callouts ——— */
.note { border-left: 3px solid var(--gold); padding: 12px 18px; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.todo { border: 1px dashed var(--todo-line); background: var(--todo-bg); padding: 12px 16px; border-radius: var(--radius); font-size: 16px; }
.todo::before { content: "Нужно от прихода: "; font-weight: 700; }
.review { display: inline-block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--todo-bg); border: 1px solid var(--todo-line); color: var(--ink); }

/* ——— band ——— */
.band { background: var(--green-soft); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
@media (min-width: 800px) { .band { grid-template-columns: 1.4fr 1fr; align-items: center; } }

/* ——— news ——— */
.news { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.news article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.news time { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ——— forms ——— */
form.ask { display: grid; gap: 14px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 16px; align-items: start; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); }
.form-msg { padding: 12px 16px; border-radius: var(--radius); background: var(--green-soft); }

/* ——— footer ——— */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 48px; }
.site-footer .wrap { padding-block: 36px; display: grid; gap: 28px; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { font-size: 18px; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 16px; }
.site-footer .legal { grid-column: 1 / -1; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 6px; }

/* ——— mobile bottom bar ——— */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.bottom-bar a {
  display: grid; justify-items: center; gap: 2px; padding: 6px 4px; min-height: 56px;
  color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; border-radius: 8px;
}
.bottom-bar a:hover { background: var(--green-soft); }
.bottom-bar svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.8; }
:root[data-theme="dark"] .bottom-bar svg { stroke: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bottom-bar svg { stroke: var(--link); } }
@media (min-width: 900px) { .bottom-bar { display: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ——— подать записку ——— */
.zap { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .zap { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
.zap-form { display: grid; gap: 28px; }
.zap-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.zap-form legend { font-family: var(--serif); font-weight: 700; font-size: 21px; padding: 0; margin-bottom: 12px; }
.zap-form legend small { font-family: var(--sans); font-weight: 400; font-size: 15px; color: var(--muted); margin-left: 8px; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: grid; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.choice-body small { color: var(--muted); font-size: 15px; }
.choice-price { font-variant-numeric: tabular-nums; color: var(--link); font-weight: 700; font-size: 16px; }
.choice input:checked + .choice-body { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--green-soft); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--gold); outline-offset: 2px; }
.kind-z .choice-body b::before { content: "☦ "; color: var(--burgundy); }
.kind-u .choice-body b::before { content: "☦ "; color: var(--ink); }

.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.name-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 44px; gap: 8px; align-items: center; }
@media (max-width: 560px) { .name-row { grid-template-columns: minmax(0, 1fr) 44px; } .name-row select { grid-column: 1 / -1; } }
.name-row select, .name-row input, .zap-form .field input {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 48px; width: 100%;
}
.row-del { min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; font-size: 22px; cursor: pointer; }
.row-del:hover { color: var(--burgundy); border-color: var(--burgundy); }
.name-warn { grid-column: 1 / -1; font-size: 15px; color: var(--burgundy); }
.add-name { justify-self: start; }
.hint { font-size: 16px; color: var(--muted); }
.hint b { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-variant-numeric: tabular-nums; }
.chip input:checked + span { background: var(--green); color: var(--on-green); border-color: var(--green); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.zap-summary { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); display: grid; gap: 16px; }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 12px; }
.summary-box h2 { font-size: 21px; }
.summary-box dl { margin: 0; display: grid; gap: 8px; }
.summary-box dl div { display: flex; justify-content: space-between; gap: 12px; }
.summary-box dt { color: var(--muted); }
.summary-box dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary-box .total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; font-size: 20px; }
.summary-box .total dt { color: var(--ink); }
.summary-box .btn { width: 100%; }
.summary-note { font-size: 14px; color: var(--muted); }

.paper { background: #FFFEFA; color: #2A2C2B; border: 1px solid var(--line); border-radius: 4px; padding: 18px 22px 22px; box-shadow: 0 2px 10px rgba(0,0,0,.06); text-align: center; }
.paper .cross { color: #8E2B35; font-size: 28px; line-height: 1; }
.paper.repose .cross { color: #2A2C2B; }
.paper h3 { font-family: var(--serif); color: #2A2C2B; font-size: 20px; margin: 6px 0 12px; }
.paper ul { list-style: none; margin: 0; padding: 0; text-align: left; font-family: var(--serif); font-size: 18px; }
.paper li { border-bottom: 1px solid #E2DCCF; padding: 4px 2px; min-height: 32px; }
.paper li.empty { color: #8A8C86; font-style: italic; }
[data-unconfirmed] { margin-bottom: 24px; }
