/* Общие стили. Цвета и шрифт приходят из темы (/theme/theme.css). */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
}

/* текстовые стили по шкале */
.heading-1 { font-size: 60px; line-height: 60px; }
.heading-2 { font-size: 48px; line-height: 48px; }
.heading-3 { font-size: 36px; line-height: 40px; }
.heading-4 { font-size: 30px; line-height: 36px; }
.heading-5 { font-size: 24px; line-height: 32px; }
.heading-6 { font-size: 20px; line-height: 28px; }
.title-2 { font-size: 18px; line-height: 28px; }
.title-3 { font-size: 16px; line-height: 24px; }
.title-4 { font-size: 14px; line-height: 20px; }
.body-3 { font-size: 16px; line-height: 24px; }
.body-6 { font-size: 14px; line-height: 20px; }
.caption-4 { font-size: 12px; line-height: 16px; }
.button-lg { font-size: 18px; line-height: 28px; }
.button-md { font-size: 16px; line-height: 24px; }
.display-8 { font-size: 96px; line-height: 1; }
.display-9 { font-size: 128px; line-height: 1; }

.muted { color: var(--muted); }
.gold { color: var(--gold); }
.c-a { color: var(--team-a); }
.c-b { color: var(--team-b); }

/* снег и конфетти */
.snow,
.confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.snow { z-index: 0; }
.confetti { z-index: 50; }

/* гирлянда */
.garland {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
  z-index: 1;
}
.garland::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 2px;
  background: var(--surface-3);
}
.bulb {
  position: relative;
  width: 8px;
  height: 12px;
  margin-top: 4px;
  border-radius: 9999px;
  animation: twinkle 1.4s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}
.bulb-1 { background: var(--bulb-1); box-shadow: 0 0 8px var(--bulb-1); }
.bulb-2 { background: var(--bulb-2); box-shadow: 0 0 8px var(--bulb-2); }
.bulb-3 { background: var(--bulb-3); box-shadow: 0 0 8px var(--bulb-3); }
.bulb-4 { background: var(--bulb-4); box-shadow: 0 0 8px var(--bulb-4); }

@keyframes twinkle {
  from { opacity: 1; }
  to { opacity: 0.3; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.rise { animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.pop { animation: pop 500ms cubic-bezier(0.22, 1, 0.36, 1) both; }

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