/* ============================================================
   «Найкоротша молитва» — лендинг
   Естетика: luminous dawn / sacred editorial (recolored: dawn blue).
   Прохолодний світанковий папір + зерно, антиква Playfair Display + Lora,
   мʼяке світло, виразні цитати, благоговійний спокій.
   Mobile-first. Брейкпоінти: 480 / 768 / 1024.
   ============================================================ */

:root {
  --paper:     #fdf6e3;   /* тепла бумага (пергамент) */
  --paper-alt: #f5ead0;   /* чергування секцій */
  --paper-card:#fffcf4;   /* картки/цитати */
  --ink:       #3d2b1f;   /* теплий темно-коричневий */
  --ink-soft:  #6b5746;   /* приглушений текст */
  --ink-faint: #9a8a77;
  --gold:      #8b1a1a;   /* глибокий бордовий акцент */
  --gold-deep: #6e1414;
  --gold-soft: #c8918a;
  --line:      rgba(61, 43, 31, 0.14);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Lora', Georgia, 'Times New Roman', serif;

  --maxw:      62ch;
  --maxw-wide: 1000px;

  --step--1: clamp(0.9rem, 0.86rem + 0.18vw, 1rem);
  --step-0:  clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  --step-1:  clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
  --step-2:  clamp(1.9rem, 1.5rem + 1.7vw, 2.9rem);
  --step-3:  clamp(2.8rem, 1.9rem + 4.4vw, 5.6rem);

  --space: clamp(3rem, 2rem + 6vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background-color: var(--paper); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Тонке паперове зерно поверх усієї сторінки */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

p { margin: 0 0 1.15em; }
strong { font-weight: 600; color: var(--ink); }

::selection { background: rgba(139, 26, 26, 0.16); color: var(--ink); }

/* Індикатор прогресу читання — тонка золота смуга зверху */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 10001;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 8px rgba(139, 26, 26, 0.40);
  transition: width .1s linear;
}

/* --- Доступність --- */
.skip-link {
  position: absolute;
  left: -999px; top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6em 1em;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a { color: var(--gold-deep); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

/* --- Контейнери --- */
.container {
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding-inline: clamp(1.3rem, 6vw, 2.5rem);
}
.prose { max-width: var(--maxw); }

/* ============================================================
   HERO — світло свыше
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94vh;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #faf2dd 0%, rgba(250,242,221,0) 60%),
    linear-gradient(180deg, #fbf4e0 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
/* мʼякий промінь світла за заголовком */
.hero__glow {
  position: absolute;
  z-index: -1;
  top: -14%;
  left: 50%;
  width: min(78vw, 760px);
  height: min(78vw, 760px);
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(226,205,168,0.45) 0%, rgba(226,205,168,0.16) 38%, rgba(226,205,168,0) 70%);
  filter: blur(8px);
}
.hero__inner { padding-block: clamp(4rem, 10vh, 8rem); }

.hero__eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 0.9em;
  padding-left: 0.42em; /* компенсація трекінгу */
}
.hero__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  color: #2c1810;
}
.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin: clamp(1.4rem, 4vw, 2.4rem) auto;
  color: var(--gold);
}
.hero__rule::before,
.hero__rule::after {
  content: "";
  height: 1px;
  width: clamp(2.5rem, 12vw, 5.5rem);
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.hero__rule::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.hero__rule span { font-size: 0.8rem; }

.hero__lead {
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 0 auto 2.6em;
  line-height: 1.5;
}
.hero__scroll {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-faint);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero__scroll span {
  display: inline-block;
  margin-left: 0.4em;
  animation: bob 2.2s ease-in-out infinite;
}
.hero__scroll:hover { color: var(--gold-deep); }

/* Дві дії в hero: «Читати» та «Подивитися відео» */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 2rem;
}
.hero__scroll--video {
  position: relative;
  padding-left: 2rem;
}
.hero__scroll--video::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 1.1em;
  transform: translateY(-50%);
  background: var(--line);
}
.hero__scroll--video span {
  margin: 0 0.45em 0 0;
  font-size: 0.7em;
  color: var(--gold);
  animation: none;
}
@media (max-width: 479px) {
  /* На вузьких екранах прибираємо вертикальний розділювач */
  .hero__scroll--video { padding-left: 0; }
  .hero__scroll--video::before { display: none; }
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Оркестрований вхід hero (по таймінгах) */
/* Recolor build: entrance reveals never HIDE content via opacity, so a
   stalled animation timeline can't leave the page blank. riseIn slides
   on transform only; fadeIn is a no-op. */
@keyframes riseIn { from { transform: translateY(20px); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 1; } to { opacity: 1; } }
.hero__eyebrow { animation: riseIn .9s cubic-bezier(.2,.7,.2,1) both .15s; }
.hero__title   { animation: riseIn 1.1s cubic-bezier(.2,.7,.2,1) both .35s; }
.hero__rule    { animation: fadeIn 1.2s ease both .8s; }
.hero__lead    { animation: riseIn 1s cubic-bezier(.2,.7,.2,1) both 1s; }
.hero__scroll  { animation: fadeIn 1.2s ease both 1.35s; }

/* ============================================================
   СЕКЦІЇ
   ============================================================ */
.section { padding-block: var(--space); }
.section--alt { background: var(--paper-alt); }

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.85em;
  color: #2c1810;
}

/* Буквиця у вступі */
.dropcap {
  float: none;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  margin-right: 0;
  color: inherit;
}

.lead-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--ink);
  margin-block: 1.1em;
}

/* Список «фактів» — стримані картки */
.facts {
  list-style: disc;
  margin: 1.8em 0 0;
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.facts li {
  padding-left: 0.3em;
}

/* ============================================================
   ЦИТАТИ — виноски зі Слова
   ============================================================ */
.verse {
  position: relative;
  margin: 2.2em 0;
  padding: 2.4rem 0 0.4em 2.6rem;
}
/* лапка зверху в жолобі */
.verse::before {
  content: "\201C";
  position: absolute;
  left: 0.05rem;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.1em;
  line-height: 1;
  color: var(--gold);
  opacity: 0.5;
  pointer-events: none;
}
/* лінія починається НИЖЧЕ лапки — щоб не торкались */
.verse::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 2.7rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--gold);
  opacity: 0.55;
  border-radius: 2px;
}
.verse p {
  margin: 0 0 0.55em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.46;
  color: var(--ink);
}
.verse cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.verse cite::before { content: "— "; }

/* Велика фраза-молитва — «момент» */
.big-phrase {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.2rem);
  margin: 1.6em 0 0.4em;
}
.big-phrase::before,
.big-phrase::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.big-phrase span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--gold-deep);
  white-space: nowrap;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  text-align: center;
  background:
    radial-gradient(110% 70% at 50% 120%, #faf2dd 0%, rgba(250,242,221,0) 55%),
    var(--paper);
  border-top: 1px solid var(--line);
}
.cta__inner { max-width: var(--maxw-wide); }
.cta .section__title { text-align: center; }
.cta__text {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--ink-soft);
  font-style: italic;
}
.cta__address {
  max-width: 54ch;
  margin: 0 auto 2.6em;
  color: var(--ink-soft);
}

/* Головна кнопка — пілюля з стрілкою */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 2.4em;
  background: var(--gold-deep);
  color: #fdf6e3;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  padding: 1.05em 2em;
  border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(110,20,20,0.7);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn__arrow { font-size: 1.05em; transition: transform .2s cubic-bezier(.22,.61,.36,1); }
.btn:hover { background: #560f0f; transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(110,20,20,0.75); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:active { transform: translateY(0); }

/* «Я щойно помолився — що далі?» — головний перехід на другу сторінку */
.prayed-jump {
  text-align: center;
  padding: clamp(2.6rem, 6vw, 4.6rem) 1.25rem;
  border-top: 1px solid var(--line);
}
.btn--prayed { margin-top: 0; background: #8b1a1a; max-width: 100%; white-space: normal; text-align: center; }
.btn--prayed .btn__label { white-space: normal; }
.btn--prayed:hover { background: #6e1414; }

/* пояснення під кнопкою */
.cta__hint { margin: 1em 0 0; font-size: var(--step--1); color: var(--ink-faint); font-style: italic; }

/* тихий рядок з телефоном */
.cta__phone { margin: 1.9em 0 0; font-size: var(--step-0); color: var(--ink-soft); }
.cta__phone a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid rgba(139,26,26,0.40); padding-bottom: 1px; transition: border-color .15s ease; }
.cta__phone a:hover { border-color: var(--gold); }
.num { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; font-feature-settings: "tnum" 1; }

/* Другорядні дії — картки */
.cta__links {
  list-style: none;
  margin: 1.6rem auto 0;
  padding: 0;
  max-width: var(--maxw);
  display: grid;
  gap: 0.9rem;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.18em;
  height: 100%;
  padding: 1.05em 1.2em;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.link-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(61,43,31,0.22);
}
.link-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-0);
  color: var(--gold-deep);
}
.link-card__sub { font-size: var(--step--1); color: var(--ink-soft); }

/* --- QR — як памʼятна картка --- */
.qr { margin: 2.8rem 0 0; }
.qr__img {
  display: block;
  width: 196px;
  height: 196px;
  margin: 0 auto 0.8em;
  background: #fff;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px -12px rgba(61,43,31,0.28);
}
.qr__caption {
  font-style: italic;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ============================================================
   ФОРМА ЗВОРОТНОГО ЗВʼЯЗКУ
   ============================================================ */
.contact { text-align: center; }
.contact__inner { max-width: 36rem; }
.contact .section__title { text-align: center; }
.contact__text {
  max-width: 44ch;
  margin: 0 auto 2.4em;
  color: var(--ink-soft);
  font-style: italic;
}

/* без JS форму ховаємо й показуємо <noscript>-посилання на Telegram */
.contact__form { display: none; text-align: left; }
.js .contact__form:not([hidden]) { display: block; }

.form__row { margin: 0 0 1.2rem; }
.form__label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.45em;
}
.form__opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-faint);
}
.form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7em 0.85em;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form__input::placeholder { color: var(--ink-faint); }
.form__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.12);
}
.form__textarea { resize: vertical; min-height: 3.4em; }
.form__error {
  margin: 0 0 1rem;
  font-size: var(--step--1);
  color: var(--gold-deep);
}
.form__error a { color: var(--gold-deep); }
.form__submit {
  margin-top: 0.4em;
  width: 100%;
  justify-content: center;
  border: 0;
  cursor: pointer;
}
.form__submit[disabled] { opacity: 0.7; cursor: progress; }
.form__note {
  margin: 1em 0 0;
  font-size: var(--step--1);
  font-style: italic;
  color: var(--ink-faint);
}

.contact__done { padding: 1.4rem 0 0.4rem; }
.contact__done-mark {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold);
  margin: 0 0 0.25em;
}
.contact__done-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  color: #2c1810;
  margin: 0 0 0.3em;
}
.contact__done-text {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.footer {
  background: var(--ink);
  color: #f0e6d5;
  text-align: center;
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
}
.footer__inner { max-width: 60ch; }
.footer__phrase {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-2);
  color: var(--gold-soft);
  margin: 0 0 0.15em;
}
.footer__note {
  font-style: italic;
  color: #c9b9a6;
  margin: 0 0 1.6em;
}
.footer__phone { margin: 0 0 1.2em; font-weight: 600; }
.footer__phone a {
  color: #fdf6e3;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}
.footer__phone a:hover { color: #fff; }
.footer__contacts { margin: 0 0 1.2em; }
.footer__contacts a {
  color: #fdf6e3;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  margin-inline: 0.25em;
}
.footer__contacts a:hover { color: #fff; }
.footer__muted {
  font-size: var(--step--1);
  color: #9a8a77;
  margin: 0;
}

/* ============================================================
   ПОЯВА ПРИ СКРОЛІ (прогресивне покращення)
   Recolor build: content is visible by default (robust to stalled
   timelines); .in is a transform-only enhancement, never gates text.
   ============================================================ */
.js .reveal {
  opacity: 1;
  transform: translateY(14px);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in { transform: none; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (min-width: 768px) {
  .cta__links { grid-template-columns: repeat(2, 1fr); }
  .facts { flex-direction: column; }
}
@media (min-width: 1024px) {
  .section { padding-block: clamp(4.5rem, 7vw, 7.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__scroll span { animation: none; }
  .hero__eyebrow, .hero__title, .hero__rule, .hero__lead, .hero__scroll { animation: none; }
  .progress { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn--call, .link-card { transition: none; }
}
