/* ============================================================
   ЗИМНИЙ РЕЖИМ — градиент фона + обледенение
   Активируется классом .is-winter на <html> (ставит snow.js)
   ============================================================ */

/* ---- 1. Фон: холодный градиент ---- */
html.is-winter body {
  background-image:
    radial-gradient(ellipse 120% 55% at 50% -8%, rgba(120, 170, 255, 0.075), transparent 62%),
    radial-gradient(ellipse 90% 45% at 12% 8%, rgba(140, 200, 255, 0.045), transparent 58%),
    radial-gradient(ellipse 90% 45% at 88% 4%, rgba(120, 160, 255, 0.04), transparent 58%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background-image 1.2s ease;
}

/* Тёмные темы — верхний слой холоднее */
html.is-winter .landing,
html.is-winter .pr-page,
html.is-winter .auth {
  position: relative;
}

/* ---- 2. Иней на шапке сайта ---- */
html.is-winter .site-nav {
  position: relative;
}

html.is-winter .site-nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 220, 255, 0.16) 22%,
    rgba(210, 235, 255, 0.34) 46%,
    rgba(180, 220, 255, 0.14) 74%,
    transparent 100%
  );
  pointer-events: none;
}

/* ---- 3. Иней на карточках ---- */
html.is-winter .stat-card,
html.is-winter .panel,
html.is-winter .pro-card,
html.is-winter .section-card,
html.is-winter .pr-card,
html.is-winter .pr-stat,
html.is-winter .auth-card,
html.is-winter .pro-status-card,
html.is-winter .pro-trio > *:not(.pro-card) {
  position: relative;
  overflow: hidden;
  border-color: rgba(150, 190, 240, 0.14) !important;
  background-image:
    linear-gradient(158deg, rgba(190, 225, 255, 0.055) 0%, transparent 34%),
    linear-gradient(158deg, transparent 66%, rgba(190, 225, 255, 0.025) 100%);
}

/* Тонкая морозная кромка сверху карточки */
html.is-winter .stat-card::before,
html.is-winter .panel::before,
html.is-winter .pro-card::before,
html.is-winter .section-card::before,
html.is-winter .pr-card::before,
html.is-winter .pr-stat::before,
html.is-winter .auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 230, 255, 0.34), transparent);
  pointer-events: none;
  z-index: 2;
}

/* Лёгкий иней в углу карточки */
html.is-winter .stat-card::after,
html.is-winter .panel::after,
html.is-winter .pr-card::after {
  content: '';
  position: absolute;
  top: -34px;
  right: -34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 225, 255, 0.09), transparent 68%);
  pointer-events: none;
  z-index: 1;
}

/* ---- 4. Иней на кнопках-акцентах ---- */
html.is-winter .btn-hero,
html.is-winter .btn-primary,
html.is-winter .pro-card-btn--year {
  box-shadow:
    0 8px 28px -8px rgba(198, 245, 74, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* ---- 5. Заголовок — иней на акценте ---- */
html.is-winter .hero h1 span,
html.is-winter .pr-title span {
  text-shadow: 0 0 26px rgba(198, 245, 74, 0.20);
}

/* ---- 6. Значок «Прозрачность без усилий» — зимний ---- */
html.is-winter .badge {
  background: rgba(150, 200, 255, 0.07) !important;
  border-color: rgba(150, 200, 255, 0.22) !important;
  color: #B9E0FF !important;
}

html.is-winter .badge svg {
  color: #B9E0FF;
}

/* ---- 7. Футер — морозная кромка ---- */
html.is-winter .site-footer {
  border-top-color: rgba(150, 190, 240, 0.16) !important;
}

/* ---- 8. Таблицы и списки в панели ---- */
html.is-winter .list-item,
html.is-winter .tx-item {
  border-color: rgba(150, 190, 240, 0.09) !important;
}

/* ---- 9. Юзер-карточка и PRO-блок в сайдбаре ---- */
html.is-winter .sidebar-quote {
  border-color: rgba(150, 200, 255, 0.20) !important;
  background: linear-gradient(
    150deg,
    rgba(150, 200, 255, 0.055) 0%,
    rgba(198, 245, 74, 0.02) 58%,
    transparent 100%
  ) !important;
}

/* ---- 10. Адаптив: меньше инея на мобилке ---- */
@media (max-width: 760px) {
  html.is-winter .stat-card::after,
  html.is-winter .panel::after,
  html.is-winter .pr-card::after {
    display: none;
  }

  html.is-winter body {
    background-image:
      radial-gradient(ellipse 130% 40% at 50% -6%, rgba(120, 170, 255, 0.065), transparent 60%);
  }
}

/* ---- 11. Уважение к reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  html.is-winter body {
    transition: none;
  }
}
