/*
  Оформление в стиле постов автора: пергамент, золото, бордо,
  текст на «бумажных полосках» поверх тёмного фона.
  Цвета — только в блоке :root.
*/

@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-cyrillic-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-latin-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #f4ead3;       /* фон страницы */
  --paper-card: #faf3e2;  /* карточки */
  --strip: #efe0bd;       /* бумажные полоски */
  --line: #e0cda4;
  --ink: #2b1d14;
  --muted: #6d5741;
  --gold: #a8802f;
  --gold-light: #d9bd7e;
  --wine: #7a1f24;
  --wine-dark: #5e171b;
  --night: #24170f;       /* тёмный фон, как на фото икон */
  --night-2: #3b2518;
  --on-wine: #fbf3e0;
  --error: #a32020;
  --radius: 14px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Cormorant", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
}
img { max-width: 100%; }
a { color: var(--wine); }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0 0 14px; }
h1 { font-size: clamp(44px, 12vw, 64px); letter-spacing: .01em; }
h2 { font-size: clamp(30px, 8vw, 38px); }
h3 { font-size: 22px; }

/* --- Бумажные полоски, как в сторис --- */
.strips { margin: 0; font-size: 19px; line-height: 2.05; }
.strip {
  background: var(--strip);
  color: var(--ink);
  padding: .18em .5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .25);
  border-radius: 2px;
}

/* --- Тёмные блоки с золотой рамкой --- */
.dark {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(217, 189, 126, .22), transparent 60%),
    linear-gradient(180deg, var(--night-2), var(--night));
  color: var(--on-wine);
  position: relative;
}
.dark::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgba(217, 189, 126, .45);
  outline: 1px solid rgba(217, 189, 126, .2); outline-offset: 4px;
}

/* --- Первый экран --- */
.hero { text-align: center; padding-top: 56px; padding-bottom: 44px; }
.hero h1 { color: var(--gold-light); text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
/* Заголовок-фраза длиннее названия — кегль меньше, строка уже */
.hero__title { font-size: clamp(36px, 10vw, 54px); max-width: 12em; margin-left: auto; margin-right: auto; }
.hero__photo {
  width: 150px; height: 150px; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--gold-light); box-shadow: 0 0 0 6px rgba(217, 189, 126, .2);
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0 0 10px; color: var(--gold-light);
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
}
.hero__sub {
  margin: 4px auto 18px; color: var(--gold-light);
  font-family: var(--font-head); font-style: italic; font-size: 22px;
}
.hero .strips { margin: 8px auto 28px; max-width: 26em; }
.soft-link {
  display: inline-block; color: var(--gold-light); text-decoration: none;
  border-bottom: 1px solid rgba(217, 189, 126, .5); padding-bottom: 2px; font-size: 16px;
}

.spinner {
  width: 40px; height: 40px; margin: 8px auto 20px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Простые страницы (спасибо, 404) */
.hero--plain h1 { color: var(--ink); text-shadow: none; font-size: clamp(38px, 10vw, 52px); }
.lead { font-size: 19px; color: var(--muted); margin: 0 auto 24px; max-width: 30em; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* --- Разделы --- */
/* Только вертикальные отступы — боковые даёт .wrap */
.section { padding-top: 40px; padding-bottom: 40px; }
.section p { margin: 0 0 14px; }

.divider { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 0 auto; max-width: 640px; padding: 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); }

.about { display: grid; gap: 18px; align-items: center; }
.about__photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-light); }
/* Две колонки — только когда есть фото, иначе текст сжимается в колонку для фото */
@media (min-width: 560px) { .about--photo { grid-template-columns: 120px 1fr; } }

.quote { padding-top: 52px; padding-bottom: 52px; text-align: center; }
.quote .strips { font-family: var(--font-head); font-style: italic; font-weight: 500; font-size: 24px; line-height: 1.95; }
.quote__author { margin: 18px 0 0; color: var(--gold-light); font-size: 15px; letter-spacing: .08em; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.ticks li::before { content: "✦"; position: absolute; left: 4px; top: 0; color: var(--gold); }

.inside { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.inside li {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px 48px; position: relative; font-weight: 500;
}
.inside li::before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: var(--gold); transform: rotate(45deg); border-radius: 2px;
}
.inside li small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.inside li.more { background: transparent; border-style: dashed; color: var(--muted); }
.focus { border-left: 3px solid var(--gold); padding: 2px 0 2px 14px; color: var(--muted); }

/* --- Молитва-проба: страница старого молитвослова --- */
.sample__intro { color: var(--muted); }
.prayer {
  position: relative; margin: 18px 0 0; padding: 26px 22px 22px;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(120, 85, 40, .16)),
    #efe2c4;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 10px 30px rgba(60, 35, 15, .15);
}
.prayer__title {
  text-align: center; text-transform: uppercase; letter-spacing: .12em;
  font-size: 17px; color: var(--wine); margin-bottom: 14px;
}
.prayer__text p {
  /* Без выравнивания по ширине: на узком экране оно даёт дыры между словами */
  font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.45;
  margin: 0 0 12px;
}
.prayer__text i { font-weight: 500; color: var(--muted); }
.prayer__initial {
  float: left; font-size: 64px; line-height: .8; margin: 6px 8px 0 0;
  color: var(--wine); border: 1px solid var(--gold-light); padding: 6px 8px 4px; border-radius: 3px;
}
.prayer.is-collapsed .prayer__text {
  max-height: 15em; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.prayer__more {
  display: block; margin: 10px auto 0; cursor: pointer;
  background: transparent; border: 1px solid var(--gold); color: var(--wine);
  font: 600 15px/1 var(--font-body); padding: 12px 20px; border-radius: 999px;
}
.prayer__more[hidden] { display: none; }
.sample__cta { text-align: center; margin: 22px 0 0; }
.sample__cta a { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }

/* --- Цифры в «Обо мне» --- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 0; }
.stats div { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.stats dt { font: 600 34px/1 var(--font-head); color: var(--wine); margin-bottom: 6px; }
.stats dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.3; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 18px; min-height: 36px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font: 600 20px/1 var(--font-head); color: var(--wine); border: 1px solid var(--gold-light); background: var(--paper-card);
}

/* --- Предложение --- */
.offer { padding-top: 48px; padding-bottom: 40px; scroll-margin-top: 8px; }
.offer__card {
  background: var(--paper-card); border: 1px solid var(--gold-light); border-radius: 18px;
  padding: 28px 20px; text-align: center; box-shadow: 0 12px 40px rgba(60, 35, 15, .12);
  position: relative;
}
.offer__card::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); border-radius: 13px; pointer-events: none;
}
.offer__card > * { position: relative; }
.offer__title { margin-bottom: 6px; }
.price { margin: 12px 0 6px; font-family: var(--font-head); font-weight: 600; }
.price__old { font-size: 26px; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--wine); margin-right: 10px; }
.price__now { font-size: 54px; color: var(--wine); }
.badge {
  display: inline-block; background: var(--wine); color: var(--on-wine);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: 6px 14px; margin: 4px 0 16px;
}
.offer__promo { margin: 0 0 8px; color: var(--wine); font-weight: 600; font-size: 15px; }
.offer__list { list-style: none; text-align: left; margin: 4px auto 22px; padding: 0; max-width: 26em; }
.offer__list li { position: relative; padding-left: 30px; margin-bottom: 10px; line-height: 1.45; }
.offer__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wine); color: var(--on-wine); font-size: 12px; font-weight: 700; margin-top: 2px;
}

.trust { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.trust li::before { content: "✦"; color: var(--gold); margin-right: 6px; }

.button {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, var(--wine), var(--wine-dark)); color: var(--on-wine);
  font: 600 18px/1 var(--font-body); padding: 19px 30px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(94, 23, 27, .3);
  transition: transform .15s ease, filter .15s ease;
}
.button:hover { filter: brightness(1.1); }
.button:active { transform: scale(.98); }
.button--wide { width: 100%; }

.form { text-align: left; margin-top: 22px; }
.form[hidden] { display: none; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; color: var(--ink); background: #fffaf0;
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px;
}
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--wine); }
.error { display: block; color: var(--error); font-size: 14px; margin-top: 4px; }
.form .button { margin-top: 14px; }

/* --- Вопросы --- */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; color: var(--gold); font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* --- Липкая кнопка на телефоне --- */
.sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
  display: flex; justify-content: center;
  transform: translateY(140%); transition: transform .25s ease;
}
.sticky.is-visible { transform: none; }
.sticky .button { width: 100%; max-width: 480px; }
@media (prefers-reduced-motion: reduce) { .sticky { transition: none; } html { scroll-behavior: auto; } }

/* --- Юридические страницы --- */
.legal { padding-top: 40px; padding-bottom: 40px; }
.legal h1 { font-size: 36px; }
.legal h2 { font-size: 24px; margin-top: 28px; }
.legal p, .legal li { font-size: 15px; }
.legal .todo { background: #f3dfa6; padding: 2px 4px; border-radius: 4px; }

.footer { padding: 32px 16px 96px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }
.footer a { color: inherit; }
