/* Основа: шрифты, сброс, типографика, слои, фон, уменьшенное движение. Цвета только из tokens.css. */
@font-face {
  font-family: "RKO Display";
  src: url("/fonts/firasansextracondensed-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RKO Text";
  src: url("/fonts/onest-var.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100dvh;
  font: 400 var(--t-body) / 1.5 var(--f-text);
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--accent-soft);
}

/* Фон: однотонный --bg, один статичный декор из двух колец-контуров справа вверху (только компьютер) */
.bg-rings {
  position: fixed;
  top: -450px;
  right: -450px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  border: 1px solid var(--line);
  pointer-events: none;
  display: none;
  z-index: 0;
}
.bg-rings::after {
  content: "";
  position: absolute;
  inset: -250px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .bg-rings {
    display: block;
  }
}

/* Типографика */
.t-h1 {
  font: 800 var(--t-h1) / 0.98 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.t-h1 em {
  font-style: normal;
  color: var(--accent-text);
  white-space: nowrap;
}
.t-h2 {
  font: 700 var(--t-h2) / var(--t-lh-h2) var(--f-text);
}
.t-label {
  font: 600 var(--t-label) / 1.3 var(--f-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.t-small {
  font-size: var(--t-small);
  line-height: 1.43;
}
.mute {
  color: var(--mute);
}
.text-2 {
  color: var(--text-2);
}
.num {
  font-family: var(--f-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.prose {
  max-width: 65ch;
}
.emoji {
  font-family: var(--f-emoji);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  flex: none;
  fill: currentColor;
}

/* Слои поверх экрана */
.layer-root,
.toast-root,
.pop-root,
.lock-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.layer-root {
  z-index: var(--z-sheet);
}
.toast-root {
  z-index: var(--z-toast);
}
.pop-root {
  z-index: var(--z-pop);
  /* «+N ₽» всплывает в верхней части экрана, под шапкой: не закрывает ни суммы, ни строки карточки */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(var(--h-topbar) + env(safe-area-inset-top) + 12px);
}
@media (min-width: 1024px) {
  /* компьютер: верхней полосы нет, «+N ₽» встаёт в свободный правый верхний угол над заголовком и кнопкой «Ещё» */
  .pop-root {
    justify-content: flex-end;
    padding: 20px 56px 0 0;
  }
}
.lock-root {
  z-index: var(--z-lock);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.fade-in {
  animation: fade-in 140ms var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
