@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic.e58febde317b.woff2") format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin.938c6e8019b6.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

.blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Шапка */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 20px 20px;
  border-radius: 16px;
  background: var(--card);
  text-align: center;
}

.profile__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.profile__caption {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}

.profile__title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}

.profile__description {
  font-size: 14px;
}

/* Текст из Markdown */

.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }

.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote {
  margin: 0 0 .6em;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  margin: .2em 0 .4em;
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}

.markdown h1 { font-size: 22px; }
.markdown h2 { font-size: 19px; }
.markdown h3 { font-size: 16px; }

.markdown a {
  color: inherit;
  text-underline-offset: 2px;
}

.text {
  padding: 4px 0;
}

.text--left { text-align: left; }
.text--center { text-align: center; }
.text--right { text-align: right; }

.text--center ul,
.text--center ol {
  list-style-position: inside;
  padding: 0;
}

/* Кнопки */

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 10px 60px;
  border-radius: 12px;
  background: var(--button-bg);
  color: var(--button-fg);
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgb(0 0 0 / .35);
  filter: brightness(1.04);
}

.button:active {
  transform: translateY(0) scale(.99);
  box-shadow: none;
}

.button:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

.button__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  display: flex;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
}

.button__icon svg,
.button__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.button__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.button__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
}

.button__subtitle {
  font-size: 13px;
  font-weight: 500;
  opacity: .9;
}

.button--icon-only {
  align-self: center;
  width: 60px;
  padding: 0;
}

.button--icon-only .button__icon {
  position: static;
  transform: none;
}

/* Картинка и видео */

.image {
  margin: 0;
}

.image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.video {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: rgb(0 0 0 / .08);
}

.video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Разделители */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.divider--line::before,
.divider--chevrons::before,
.divider--chevrons::after {
  content: '';
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.divider__icon {
  display: flex;
  width: 18px;
  height: 18px;
}

.divider__icon svg {
  width: 100%;
  height: 100%;
}

/* Ссылка внизу: прижата к низу экрана, даже если блоков мало, и всегда отделена отступом. */

.page-footer,
.edit-footer {
  margin-top: auto;
  padding-top: 36px;
}

.page-footer {
  text-align: center;
  font-size: 13px;
}

.page-footer a {
  color: inherit;
  opacity: .55;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: opacity .15s ease;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  opacity: .9;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
