/*
  Лендинг церкви «Благодать».
  Язык страницы задаёт сама вывеска: красный неон и холодный белый на чёрной кирпичной стене.
  Тема одна, тёмная: светлый вариант потерял бы узнаваемость вывески.
  Правило форм: кнопки и ссылки-таблетки полностью скруглены, карточек нет.
  Встроенные стили запрещены политикой CSP, всё оформление только здесь.
*/

:root {
  --bg: #070708;
  --ink: #f3f5fa;
  --ink-2: #a9aebb;
  --on-ink: #0b0b0d;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.42);
  --neon: #ff3030;
  --font-d: "Sofia Sans Extra Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-b: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- шапка ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.top__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang a,
.top__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lang a:hover,
.lang a[aria-current="true"] {
  color: var(--ink);
}

.top__link {
  min-height: 40px;
  margin-left: 6px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--ink);
}

.top__link:hover {
  border-color: var(--line-strong);
}

/* На узком телефоне (от 360 px) шапка обязана уместиться в одну строку */
@media (max-width: 419.98px) {
  .brand {
    gap: 8px;
    font-size: 22px;
  }

  .brand img {
    width: 26px;
    height: 26px;
  }

  .lang a {
    padding: 0 7px;
    font-size: 14px;
  }

  .top__link {
    margin-left: 2px;
    padding: 0 12px;
    font-size: 14px;
  }
}

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

.hero {
  position: relative;
  isolation: isolate;
}

/* Отсвет вывески на стене страницы: продолжает свечение креста за края картинки */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(46% 50% at 50% 30%, rgba(255, 48, 48, 0.14), transparent 72%);
}

/*
  Картинка показывается целиком: на ней есть и крест, и надпись, обрезать их нельзя.
  Ширина ограничена так, чтобы высота не превышала 64% экрана и под вывеской
  на первом экране уместились заголовок и кнопки.
*/
.hero__sign {
  width: min(100%, calc(64dvh * 1672 / 941));
  aspect-ratio: 1672 / 941;
  margin-inline: auto;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 5%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 5%, #000 91%, transparent);
  mask-composite: intersect;
}

.hero__sign picture,
.hero__sign img {
  width: 100%;
  height: 100%;
}

.hero__sign img {
  object-fit: cover;
}

.hero__body {
  display: grid;
  gap: 24px;
  padding-block: 10px 44px;
}

.hero__text h1 {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(42px, 5.4vw, 66px);
  line-height: 0.95;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lead {
  max-width: 44ch;
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.25vw, 18px);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 519.98px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 860px) {
  .hero__body {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
    padding-block: 6px 56px;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--primary:hover {
  background: #ffffff;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.icon {
  flex: none;
  width: 22px;
  height: 22px;
}

/* Единственный акцент страницы: красный неон вывески */
.btn--primary .icon--brand {
  color: #d81414;
}

/* ---------- стих ---------- */

.verse {
  padding-block: clamp(48px, 9vw, 112px);
  border-top: 1px solid var(--line);
}

.verse blockquote {
  max-width: 880px;
  margin: 0;
}

.verse p {
  margin: 0;
  font-size: clamp(25px, 3.5vw, 46px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.verse cite {
  display: block;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 15px;
  font-style: normal;
}

@media (min-width: 860px) {
  .verse blockquote {
    margin-left: clamp(0px, 16vw, 230px);
  }
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 16px 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.foot p {
  margin: 0;
}

.made {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
}

/* Логотип и имя студии не разрываются: на узком экране переносятся на вторую строку вместе */
.made__who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.made img {
  width: 30px;
  height: 25px;
}

.made b {
  color: var(--ink);
  font-weight: 600;
}

.made:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- страница ошибки ---------- */

.oops {
  padding-block: clamp(64px, 16vh, 160px);
}

.oops h1 {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  text-transform: uppercase;
}

.oops .lead {
  margin-bottom: 28px;
}

/* ---------- движение ---------- */

/*
  Вывеска «включается» один раз при загрузке, как настоящая неоновая трубка.
  Анимация стартует не с нуля, чтобы картинка сразу считалась отрисованной.
*/
@media (prefers-reduced-motion: no-preference) {
  .hero__sign img {
    animation: neon-on 1.5s linear both;
  }

  .hero::before {
    animation: glow-in 1.5s linear both;
  }

  .hero__text,
  .hero__actions {
    animation: rise 0.7s var(--ease) both;
  }

  .hero__text {
    animation-delay: 0.12s;
  }

  .hero__actions {
    animation-delay: 0.22s;
  }
}

@keyframes neon-on {
  0% { opacity: 0.25; }
  7% { opacity: 0.9; }
  11% { opacity: 0.3; }
  19% { opacity: 1; }
  24% { opacity: 0.5; }
  31%, 100% { opacity: 1; }
}

@keyframes glow-in {
  0%, 11% { opacity: 0.2; }
  19% { opacity: 1; }
  24% { opacity: 0.4; }
  31%, 100% { opacity: 1; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
