/* QIUT • Новогоднее оформление 2027. Все элементы ограничены главной страницей. */
main#top {
  --ny-side: clamp(0px, calc((100vw - 1120px) / 2 + 70px), 460px);
  --ny-snow-height: clamp(23px, 3vw, 46px);
  --ny-card-snow: url('/new-year/card-snow-1.webp');
}

main#top > section.hero-gradient {
  isolation: isolate;
  background-color: #005a51;
  background-image:
    url('/new-year/snowman.webp'),
    url('/new-year/tree.webp'),
    radial-gradient(ellipse at 74% 92%, #0d9882 0%, transparent 54%),
    radial-gradient(ellipse at 17% 65%, #087f70 0%, transparent 48%),
    linear-gradient(135deg, #003f42 0%, #005e55 49%, #007c6b 100%);
  background-repeat: no-repeat;
  background-size: var(--ny-side) auto, var(--ny-side) auto, auto, auto, auto;
  background-position: left bottom, right bottom, center, center, center;
  padding-bottom: var(--ny-snow-height);
}

/* Гирлянда по краям шапки, не перекрывающая ссылки и выпадающие меню. */
main#top > section.hero-gradient > header::before,
main#top > section.hero-gradient > header::after {
  content: '';
  position: absolute;
  top: 0;
  width: min(var(--ny-side), 430px);
  aspect-ratio: 3.65;
  background: url('/new-year/garland-left.webp') left top / contain no-repeat;
  pointer-events: none;
  z-index: -1;
}
main#top > section.hero-gradient > header::before { left: 0; }
main#top > section.hero-gradient > header::after {
  right: 0;
  background-image: url('/new-year/garland-right.webp');
  background-position: right top;
}

/* Два независимых слоя снега: никаких обработчиков событий и блокировки интерфейса. */
main#top > section.hero-gradient > div:first-child::before,
main#top > section.hero-gradient > div:first-child::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('/new-year/snow-far.png');
  background-repeat: repeat;
  background-size: 360px 360px;
  opacity: .8;
  animation: qiut-ny-snow-far 20s linear infinite;
}
main#top > section.hero-gradient > div:first-child::after {
  background-image: url('/new-year/snow-near.png');
  background-size: 520px 520px;
  opacity: .86;
  animation: qiut-ny-snow-near 14s linear infinite;
}
@keyframes qiut-ny-snow-far {
  from { background-position: 0 0; }
  to { background-position: 360px 720px; }
}
@keyframes qiut-ny-snow-near {
  from { background-position: 0 0; }
  to { background-position: -520px 1040px; }
}

/* Снежная граница разделов. */
main#top > section.hero-gradient::after {
  content: '';
  position: absolute;
  z-index: 21;
  inset: auto 0 0;
  height: var(--ny-snow-height);
  background: url('/new-year/snow-bank.webp') left bottom / auto 100% repeat-x;
  pointer-events: none;
}

/* Оригинальная композиция сайта с колпаком на девушке, все карточки и лицо сохранены. */
main#top > section.hero-gradient img[src*='hero-composite'] {
  content: url('/new-year/hero.webp');
}
main#top > section.hero-gradient h1 > span {
  position: relative;
  color: #66ebc9;
}

/* Светлый зимний раздел возможностей с оригинальным фоновым паттерном. */
main#top > section.hero-gradient + div {
  background-color: #eef9fb;
  background-image: linear-gradient(180deg, #e7f7fb 0%, #f2fbfa 450px, #f8fcfa 1100px);
}
main#top #features {
  position: relative;
  isolation: isolate;
}
main#top #features > div:first-child::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(100% + 12px);
  width: min(calc((100vw - 1152px) / 2 - 20px), 243px);
  aspect-ratio: 2.34;
  background: url('/new-year/sleigh.webp') center / contain no-repeat;
  pointer-events: none;
}
main#top #features h2::after {
  content: '❄';
  display: inline-block;
  margin-left: .34em;
  color: #078c82;
  font-size: .72em;
  vertical-align: .08em;
}

/* Разные текстуры сугробов на карточках. Текст и активные элементы остаются доступны. */
main#top #features article:nth-child(3n+2) { --ny-card-snow: url('/new-year/card-snow-2.webp'); }
main#top #features article:nth-child(3n) { --ny-card-snow: url('/new-year/card-snow-3.webp'); }
main#top #features article::before {
  content: '❄';
  position: absolute;
  z-index: 11;
  top: 12px;
  right: 14px;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  opacity: .8;
  text-shadow: 0 0 8px rgba(100, 178, 195, .65);
  pointer-events: none;
}
main#top #features article::after {
  content: '';
  position: absolute;
  z-index: 12;
  inset: auto 0 0;
  height: 24px;
  background: var(--ny-card-snow) left bottom / auto 100% repeat-x;
  pointer-events: none;
}
main#top #features article#calls {
  background-image: radial-gradient(ellipse at bottom right, #0bba9c, transparent 70%), linear-gradient(145deg, #006b60, #008d75);
}

@media (min-width: 1024px) {
  main#top > section.hero-gradient img[src*='hero-composite'] { bottom: calc(10px - var(--ny-snow-height)); }
}

/* Боковой декор занимает только свободные поля на больших экранах. */
@media (max-width: 1479px) {
  main#top { --ny-side: clamp(0px, calc((100vw - 1150px) / 2 + 30px), 270px); }
  main#top #features > div:first-child::after { display: none; }
}
@media (max-width: 1199px) {
  main#top > section.hero-gradient {
    background-image: radial-gradient(ellipse at 80% 95%, #0d9882 0%, transparent 60%), linear-gradient(135deg, #003f42, #007c6b);
    background-size: auto;
    background-position: center;
  }
  main#top > section.hero-gradient > header::before,
  main#top > section.hero-gradient > header::after { width: 110px; opacity: .8; }
}
@media (max-width: 639px) {
  main#top > section.hero-gradient > header::before { display: none; }
  main#top > section.hero-gradient > header::after { width: 88px; opacity: .65; }
  main#top > section.hero-gradient > div:first-child::after { opacity: .5; }
  main#top #features article::after { height: 17px; }
  main#top #features article::before { font-size: 16px; right: 10px; top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  main#top > section.hero-gradient > div:first-child::before,
  main#top > section.hero-gradient > div:first-child::after { animation: none; }
}
