@font-face {
  font-family: "Ruslan Display";
  src: url("../assets/fonts/RuslanDisplay-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Размер элемента включает его внутренние отступы и границы */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-background);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;

  color: var(--color-text);
  background: var(--color-background);

  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: var(--line-height-body);
  isolation: isolate;

}

/* Элементы форм используют шрифт приложения */
button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: var(--line-height-heading);
  overflow-wrap: break-word;
}

/* Видимый фокус при управлении с клавиатуры */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

/* Атрибут hidden должен скрывать элемент при любом оформлении */
[hidden] {
  display: none !important;
}

/* Общая оболочка приложения */
.app {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;

  padding-top: var(--safe-area-top);
  padding-bottom: calc(
    var(--navigation-height) +
    var(--safe-area-bottom) +
    var(--space-4)
  );
}

#app-header {
  padding: var(--space-4);
}

#app-content {
  padding: var(--space-4);
}

/* Пустые области не занимают место до загрузки компонентов */
#app-header:empty,
#app-navigation:empty {
  display: none;
}

.loading-message {
  padding-block: var(--space-7);
  color: var(--color-text-muted);
  text-align: center;
}

noscript {
  display: block;
  padding: var(--space-4);
  color: var(--color-error);
  text-align: center;
}

/* Текст для скринридеров, скрытый визуально */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Затемнённый лес с лёгким размытием */
body::before {
  content: "";
  position: fixed;
  inset: -4px;
  z-index: -1;

  background-image:
    linear-gradient(
      rgb(8 17 12 / 72%),
      rgb(8 17 12 / 80%)
    ),
    url("../assets/images/forest-background.webp");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: blur(1px);
  pointer-events: none;
}

/* Область страницы получает фокус без рамки */
#app-content:focus {
  outline: none;
}

#app-content:focus,
#app-content:focus-visible {
  outline: none;
}