/* ============ Кинония — в стиле сайта Троицкого храма ============
   Шрифты и цвета те же, что на shodnyahramnew.ru:
   Lovelace — заголовки, TildaSans — текст,
   красный #A12F2F, охра #AD731D, светлый фон #F0F0F0. */
@font-face {
  font-family: "Lovelace";
  src: url("../fonts/Lovelace.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
  /* пробная версия шрифта рисует штамп TRIAL вместо цифр и «№» — их берём из Georgia */
  unicode-range: U+0000-002F, U+003A-2115, U+2117-FFFF;
}
@font-face {
  font-family: "TildaSans";
  src: url("../fonts/TildaSans-VF.woff2") format("woff2");
  font-weight: 250 1000; font-style: normal; font-display: swap;
}

[hidden] { display: none !important; }

:root {
  --red: #A12F2F;
  --red-dark: #8A2424;
  --ochre: #9A6416;
  --ochre-hi: #C28A2E;
  --paper: #FFFFFF;
  --mist: #F0F0F0;
  --line: #E0DCD6;
  --ink: #2B2522;
  --ink-2: #5F5752;
  --ink-3: #6F6862;

  --display: "Lovelace", Georgia, "Times New Roman", serif;
  --sans: "TildaSans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

.h2 {
  font: 400 clamp(32px, 2.2rem + 1.6vw, 54px)/1.1 var(--display);
  color: var(--red); margin: 0 0 .5em; text-wrap: balance;
}
.h2--center { text-align: center; }

/* ============ Кнопки — «пилюли», как на сайте храма ============ */
.btn {
  --bg: transparent; --fg: currentColor; --bd: currentColor; --fill: var(--red-dark); --fg-h: #fff;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 54px; padding: 0 32px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd); border-radius: 30px;
  font: 600 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: color .35s, border-color .35s, transform .25s var(--ease), box-shadow .35s;
}
/* заливка «поднимается» снизу при наведении */
.btn::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: var(--fill); transform: translateY(102%); transition: transform .5s var(--ease);
}
@media (hover: hover) {
  .btn:hover { color: var(--fg-h); border-color: var(--fill); }
  .btn:hover::before { transform: none; }
}
.btn:active { transform: scale(.97); }
.btn--red { --bg: var(--red); --fg: #fff; --bd: var(--red); box-shadow: 0 10px 24px -12px #a12f2fb3; }
.btn--red:hover { box-shadow: 0 16px 30px -12px #8a2424cc; }
.btn--outline { --fg: var(--red); --bd: var(--red); --fill: var(--red); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn--arrow::after { content: "→"; transition: transform .35s var(--ease); }
.btn--arrow:hover::after { transform: translateX(4px); }

/* ============ Шапка ============ */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 16px var(--gutter);
  color: var(--red);
  transition: background .35s, box-shadow .35s, padding .35s;
}
.bar.is-solid, .bar.is-menu { background: #fffffff0; box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(10px); padding-block: 10px; }
.bar__logo { display: block; text-decoration: none; position: relative; z-index: 2; }
.bar__logo img { width: clamp(138px, 13vw, 176px); height: auto; }
.bar__nav { display: flex; gap: clamp(16px, 2.2vw, 30px); margin-left: auto; }
.bar__nav a { position: relative; text-decoration: none; font-size: 16px; padding: 6px 0; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.bar__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.bar__burger { display: none; position: relative; z-index: 2; width: 46px; height: 46px; border: 1.5px solid #a12f2f40; border-radius: 50%; background: #fff; cursor: pointer; }
.bar__burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--red); transition: transform .4s var(--ease), top .4s var(--ease); }
.bar__burger span:first-child { top: 18px; }
.bar__burger span:last-child { top: 26px; }
.bar.is-menu .bar__burger span:first-child { top: 22px; transform: rotate(45deg); }
.bar.is-menu .bar__burger span:last-child { top: 22px; transform: rotate(-45deg); }
.no-scroll, .no-scroll body { overflow: hidden; }
.bar.is-menu { backdrop-filter: none; background: #fff; }
.bar > .btn { position: relative; z-index: 2; }

@media (max-width: 980px) {
  .bar { gap: 10px; }
  .bar > .btn { margin-left: auto; }
  .bar__burger { display: block; order: 3; }
  .bar__nav {
    position: fixed; inset: 0; z-index: 1; margin: 0;
    flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    background: #fff; padding: 90px var(--gutter) 40px;
    clip-path: circle(0 at calc(100% - 46px) 38px); visibility: hidden;
    transition: clip-path .7s var(--ease), visibility 0s .7s;
  }
  .bar.is-menu .bar__nav { clip-path: circle(150% at calc(100% - 46px) 38px); visibility: visible; transition: clip-path .7s var(--ease); }
  .bar__nav a { font: 400 clamp(30px, 7vw, 44px)/1.3 var(--display); opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .5s var(--ease); }
  .bar.is-menu .bar__nav a { opacity: 1; transform: none; }
  .bar.is-menu .bar__nav a:nth-child(2) { transition-delay: .05s; }
  .bar.is-menu .bar__nav a:nth-child(3) { transition-delay: .1s; }
  .bar.is-menu .bar__nav a:nth-child(4) { transition-delay: .15s; }
  .bar.is-menu .bar__nav a:nth-child(5) { transition-delay: .2s; }
}
@media (max-width: 420px) { .bar > .btn { padding: 0 16px; } }

/* ============ Первый экран ============ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 980px);
  display: grid; align-items: center;
  padding: 120px 0 90px;
  background:
    radial-gradient(60% 70% at 78% 45%, #f6e7e3 0%, transparent 70%),
    linear-gradient(180deg, #fff 0%, #faf6f3 100%);
}
.hero::before { /* тонкая орнаментальная сетка, как на старой бумаге */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(#a12f2f14 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 40%, #000 80%);
}
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 80px); align-items: center; width: 100%; }
.hero__text { min-width: 0; }
.hero__title { margin: 0; line-height: 0; }
.hero__title img { width: min(560px, 100%); height: auto; }
.hero__gloss { margin: 22px 0 0; font: 400 19px/1.4 var(--display); color: #80510E; }
.hero__gloss i { font-style: normal; }
.hero__lead { margin: 10px 0 0; max-width: 26em; font-size: clamp(19px, 1rem + .4vw, 23px); line-height: 1.5; color: var(--ink-2); }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero__facts { list-style: none; display: flex; gap: clamp(18px, 3vw, 40px); margin: 44px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); }
.hero__facts li { display: grid; gap: 4px; }
.hero__facts b { font: 400 clamp(30px, 2.6vw, 40px)/1 var(--display); color: var(--red); }
.hero__facts span { font-size: 15px; line-height: 1.35; color: var(--ink-3); max-width: 9em; }

/* арки-окна, как окна здания центра и купол на логотипе */
.hero__stage {
  --mx: 0; --my: 0;
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: center;
}
.hero__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: spin 60s linear infinite; }
.hero__ring text { font: 400 21px var(--display); letter-spacing: .12em; fill: var(--red); }
.hero__ring-line { fill: none; stroke: var(--ochre); stroke-width: 1; stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: draw 2.6s .2s var(--ease) forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
.arch {
  position: absolute; bottom: 23%; overflow: hidden; background: #ead9d3;
  border-radius: 999px 999px 10px 10px;
  box-shadow: 0 30px 60px -30px #5a1c1c80, inset 0 0 0 1px #ffffff40;
  transform: translate(calc(var(--mx) * var(--k) * 1px), calc(var(--my) * var(--k) * 1px));
  transition: transform .9s var(--ease);
}
.arch::after { content: ""; position: absolute; inset: 7px; border: 1px solid #ffffffa6; border-radius: inherit; pointer-events: none; }
.arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1.4s ease, transform 6s linear; }
.arch img.is-on { opacity: 1; transform: scale(1); }
.arch--c { --k: -26; left: 33%; width: 34%; height: 60%; z-index: 2; }
.arch--l { --k: 16; left: 18.5%; width: 23%; height: 42%; }
.arch--r { --k: 22; right: 18.5%; width: 23%; height: 42%; }
.hero__stage .arch { animation: archUp 1.3s var(--ease) both; }
.arch--c { animation-delay: .25s !important; }
.arch--r { animation-delay: .45s !important; }
@keyframes archUp { from { clip-path: inset(100% 0 0 0 round 999px 999px 10px 10px); translate: 0 40px; } to { clip-path: inset(0 0 0 0 round 999px 999px 10px 10px); translate: 0 0; } }

.hero__text > * { animation: rise 1.1s var(--ease) both; }
.hero__text > :nth-child(1) { animation: logoIn 1.4s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: .35s; }
.hero__text > :nth-child(3) { animation-delay: .45s; }
.hero__text > :nth-child(4) { animation-delay: .6s; }
.hero__text > :nth-child(5) { animation-delay: .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes logoIn { from { opacity: 0; filter: blur(10px); transform: translateY(18px) scale(.97); } to { opacity: 1; filter: none; transform: none; } }

.hero__down { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid #a12f2f66; border-radius: 20px; }
.hero__down span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--red); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 980px) {
  .hero { padding: 100px 0 70px; min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__title img { margin: 0 auto; width: min(520px, 92%); }
  .hero__lead { margin-inline: auto; }
  .hero__cta, .hero__facts { justify-content: center; }
  .hero__facts span { margin: 0 auto; }
  .hero__stage { max-width: 520px; order: -1; margin-bottom: -10px; }
  .hero__down { display: none; }
}
@media (max-width: 560px) {
  .hero__stage { width: 100%; }
  .hero__ring text { font-size: 25px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__facts { gap: 14px; justify-content: space-between; }
  .hero__facts span { font-size: 13px; }
}

/* ============ Бегущая строка ============ */
.ticker { background: var(--red); color: #fff; overflow: hidden; padding: 18px 0; }
.ticker__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__row { display: flex; align-items: center; flex: none; }
.ticker span { font: 400 clamp(22px, 2vw, 30px)/1 var(--display); white-space: nowrap; padding: 0 28px; }
.ticker i { width: 9px; height: 9px; flex: none; background: var(--ochre-hi); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Появление при прокрутке ============ */
.rv { opacity: 0; transform: translateY(34px); }
.rv.in { opacity: 1; transform: none; transition: opacity .9s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
.h2.rv { transform: translateY(26px); clip-path: inset(0 0 100% 0); }
.h2.rv.in { clip-path: inset(0 0 -20% 0); transition: opacity .9s var(--ease), transform 1s var(--ease), clip-path 1.1s var(--ease); }

/* ============ О центре ============ */
.about { padding: clamp(70px, 9vw, 120px) 0; }
.about__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.about__mission { font-size: clamp(20px, 1rem + .5vw, 24px); line-height: 1.45; color: var(--red); margin: 0 0 1em; }
.about__text p { max-width: 34em; margin: 0 0 1em; color: var(--ink-2); }
.about__photo { margin: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 24px 50px -30px #5a1c1c66; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.quote { margin-top: clamp(50px, 7vw, 90px); text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 30em; font: 400 clamp(22px, 1rem + 1vw, 30px)/1.4 var(--display); color: var(--ink); }
.quote figcaption { margin-top: 16px; color: var(--ochre); font-size: 16px; }
.quote::before { content: ""; display: block; width: 60px; height: 2px; background: var(--ochre); margin: 0 auto 30px; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* ============ Каталог ============ */
.catalog { padding: clamp(70px, 9vw, 110px) 0; background: var(--mist); }
.catalog__lead { text-align: center; max-width: 36em; margin: -.4em auto 34px; color: var(--ink-2); }
.filters { display: grid; gap: 10px; justify-items: center; margin-bottom: 26px; }
.filters__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid #d3cdc6; border-radius: 30px; background: #fff;
  font-size: 15px; cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.chip.is-on i { box-shadow: 0 0 0 2px #fff; }
.catalog__count { text-align: center; color: var(--ink-3); font-size: 15px; margin: 0 0 18px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card { transition: opacity .35s, transform .35s var(--ease); }
.card.is-out { opacity: 0; transform: translateY(10px); }
.card__btn {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  padding: 0; border: 0; background: #fff; border-radius: 6px; overflow: hidden; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px #2b25220f; transition: box-shadow .3s, transform .3s var(--ease);
}
.card__btn:hover { box-shadow: 0 22px 44px -18px #5a1c1c55; transform: translateY(-6px); }
.card__btn:hover .card__title { color: var(--red); }
.card__title { transition: color .3s; }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e6e2dc; }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform 1.2s var(--ease); }
.card__btn:hover .card__img img { transform: scale(1.08); }
.card__age { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 30px; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; flex: 1; }
.card__cat { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--c); font-weight: 600; }
.card__cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.card__title { font: 400 25px/1.15 var(--display); color: var(--ink); }
.card__name { font-size: 16px; color: var(--ink-3); margin-top: -2px; }
.card__when { margin-top: auto; padding-top: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.card__more { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--red); display: inline-flex; gap: 6px; }
.card__more::after { content: "→"; transition: transform .35s var(--ease); }
.card__btn:hover .card__more::after { transform: translateX(5px); }
.empty { padding: 40px 0; text-align: center; color: var(--ink-2); }

/* ============ Расписание ============ */
.week { padding: clamp(70px, 9vw, 110px) 0; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day__name { font: 400 clamp(15px, 1.2vw, 19px)/1.1 var(--display); white-space: nowrap; color: var(--red); padding-bottom: 10px; border-bottom: 2px solid var(--ochre); margin-bottom: 10px; }
.day__name small { display: block; font: 400 13px var(--sans); color: var(--ink-3); margin-top: 6px; }
.slot {
  display: block; width: 100%; margin-bottom: 7px; padding: 10px 12px;
  text-align: left; cursor: pointer; background: var(--mist);
  border: 0; border-left: 3px solid var(--c); border-radius: 3px 6px 6px 3px;
  transition: background .25s, opacity .25s, transform .25s var(--ease);
}
.slot b { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.slot span { display: block; font-size: 15px; line-height: 1.35; }
.grid.is-hl .slot { opacity: .35; }
.grid.is-hl .slot.is-hl { opacity: 1; background: color-mix(in srgb, var(--c) 14%, #fff); transform: translateX(3px); }
.flex { margin-top: 40px; text-align: center; }
.flex h3 { font: 400 26px var(--display); color: var(--red); margin: 0 0 16px; }
.flex ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.flex li button { display: inline-flex; gap: 8px; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 30px; border: 1px solid #d3cdc6; background: #fff; cursor: pointer; font-size: 15px; }
.flex li button:hover { border-color: var(--red); color: var(--red); }
.flex li i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
@media (max-width: 960px) {
  .grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 60%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .day { scroll-snap-align: start; }
}

/* ============ Шаги ============ */
.steps { padding: clamp(70px, 9vw, 110px) 0; background: var(--mist); }
.steps__list { list-style: none; counter-reset: s; margin: 10px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps__list li { transition: transform .4s var(--ease), box-shadow .4s; counter-increment: s; display: grid; gap: 8px; align-content: start; background: #fff; border-radius: 6px; padding: 28px 26px 30px; }
.steps__list li:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px #5a1c1c55; }
.steps__list li::before { content: counter(s); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--red); font: 400 30px/1 Georgia, serif; color: var(--red); margin-bottom: 6px; }
.steps__list b { font: 400 24px/1.2 var(--display); color: var(--red); }
.steps__list span { color: var(--ink-2); }
.steps__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 760px) { .steps__list { grid-template-columns: 1fr; } }

/* ============ Контакты ============ */
.visit { padding: clamp(70px, 9vw, 110px) 0; }
.visit__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 60px); align-items: stretch; }
.visit__addr { font: 400 26px/1.3 var(--display); font-style: normal; margin-bottom: 22px; }
.visit__dl { margin: 0 0 26px; }
.visit__dl dt { font-size: 15px; color: var(--ink-3); margin-top: 14px; }
.visit__dl dd { margin: 2px 0 0; }
.visit__dl a { color: var(--red); text-underline-offset: 3px; }
.visit__links { display: flex; gap: 10px; flex-wrap: wrap; }
.map { min-height: 400px; border-radius: 6px; overflow: hidden; background: var(--mist); }
.map iframe { width: 100%; height: 100%; min-height: 400px; border: 0; }
@media (max-width: 860px) { .visit__grid { grid-template-columns: 1fr; } }

.foot { background: var(--mist); border-top: 1px solid var(--line); padding: 34px 0; font-size: 15px; color: var(--ink-2); }
.foot__in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot__brand { display: flex; align-items: center; gap: 22px; max-width: 640px; flex-wrap: wrap; }
.foot__brand img { width: 200px; height: auto; flex: none; }
.foot__brand p { margin: 0; }
.foot__name { display: block; font: 400 20px/1.2 var(--display); color: var(--red); }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; }
.foot__links a { color: var(--red); text-decoration: none; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ Боковые панели ============ */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.sheet[hidden] { display: none; }
.sheet__veil { position: absolute; inset: 0; background: #2b1a1499; opacity: 0; transition: opacity .4s; }
.sheet__panel {
  position: relative; width: min(540px, 100%); height: 100%; overflow-y: auto;
  background: #fff; padding: 34px clamp(20px, 4vw, 40px) 40px;
  transform: translateX(100%); transition: transform .5s var(--ease); overscroll-behavior: contain;
}
.sheet.is-open .sheet__veil { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__x { position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 10px #0002; cursor: pointer; display: grid; place-items: center; }
.sheet__x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 1.8; fill: none; }

.sheet__panel--info { padding: 0 0 36px; }
.info__img { background: #f1ede7; overflow: hidden; }
.ph { position: relative; overflow: hidden; background-size: cover; background-position: center; }
.ph::before { content: ""; position: absolute; inset: -40px; background: inherit; filter: blur(28px) saturate(1.1); opacity: .85; }
.ph.is-doc { background: #fff; }
.ph img { position: relative; display: block; width: 100%; height: auto; max-height: min(72vh, 640px); object-fit: contain; }
.gal { position: relative; }
.gal__track { display: flex; align-items: center; overflow-x: auto; overflow-y: hidden; transition: height .35s ease; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal__track::-webkit-scrollbar { display: none; }
.gal__track > .ph { flex: 0 0 100%; scroll-snap-align: start; }
.gal__btn { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: #ffffffe6; color: var(--red); font: 400 30px/1 var(--display); cursor: pointer; box-shadow: 0 2px 10px #0002; display: grid; place-items: center; padding-bottom: 4px; }
.gal__btn--prev { left: 12px; }
.gal__btn--next { right: 12px; }
.gal__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.gal__dots i { width: 8px; height: 8px; border-radius: 50%; background: #ffffff99; box-shadow: 0 0 0 1px #0002; transition: background .3s, transform .3s; }
.gal__dots i.is-on { background: #fff; transform: scale(1.25); }
@media (hover: none) { .gal__btn { display: none; } }
.info__body { padding: 26px clamp(20px, 4vw, 40px) 0; }
.info__cat { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--c); }
.info__cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.info__title { font: 400 34px/1.1 var(--display); color: var(--red); margin: 8px 0 4px; }
.info__name { color: var(--ink-3); margin: 0 0 16px; }
.info__desc { margin: 0 0 22px; color: var(--ink); }
.info__dl { margin: 0 0 26px; padding: 18px 20px; background: var(--mist); border-radius: 6px; display: grid; gap: 12px; }
.info__dl dt { font-size: 14px; color: var(--ink-3); }
.info__dl dd { margin: 2px 0 0; }
.info__dl dd span { display: block; font-size: 15px; color: var(--ink-2); }
.info__act { display: grid; gap: 10px; }

.form__title { font: 400 32px/1.1 var(--display); color: var(--red); margin: 0 0 .4em; padding-right: 50px; }
.form__sub { color: var(--ink-2); margin: 0 0 24px; font-size: 16px; }
.form__two { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.field { display: grid; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 15px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.field > span i { font-style: normal; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: 400 17px/1.3 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #d3cdc6; border-radius: 8px;
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23A12F2F' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px; }
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ochre); box-shadow: 0 0 0 4px #ad731d26; }
.field__err { display: none; font-style: normal; font-size: 14px; color: var(--red); }
.field.is-bad input { border-color: var(--red); }
.field.is-bad .field__err, .field__err--check.is-on { display: block; }
.field__err--check { margin: -6px 0 14px 30px; }
.field--seg { display: flex; flex-wrap: wrap; gap: 6px; }
.field--seg legend { width: 100%; }
.field--seg label { position: relative; }
.field--seg input { position: absolute; opacity: 0; pointer-events: none; }
.field--seg span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid #d3cdc6; border-radius: 30px; cursor: pointer; font-size: 15px; transition: background .2s, color .2s; }
.field--seg input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }
.field--seg input:focus-visible + span { outline: 2px solid var(--ochre); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin: 2px 0 0; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__fail { color: var(--red); font-size: 15px; margin: 12px 0 0; }
.form__fail a { color: inherit; }
#submit[disabled] { opacity: .6; cursor: progress; }

.done { text-align: center; padding-top: 50px; display: grid; gap: 12px; }
.done .form__title { padding: 0; }
.done__mark { width: 110px; height: 110px; margin: 0 auto 10px; fill: none; stroke: var(--ochre); stroke-width: 2; }
.done__mark path { stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 64; stroke-dashoffset: 64; }
.done.is-on .done__mark circle { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1s var(--ease) forwards; }
.done.is-on .done__mark path { animation: draw .7s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* юридические подсказки в форме и в подвале */
.form__legal { margin: -6px 0 14px; font-size: 13.5px; color: var(--ink-3); }
.form__legal a, .foot__legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.check a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.field__hint { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.foot__legal { width: 100%; font-size: 13.5px; margin-top: 4px; }
.foot__legal a { color: var(--ink-3); }
