:root {
  --winter-bg: #fff7ee;
  --winter-surface-rgb: 255, 247, 238;
  --winter-glow: 0.08;
  --winter-blue-glow: 0.10;
}

body.winter-season {
  background:
    radial-gradient(circle at 8% 5%, rgba(173, 216, 230, var(--winter-glow)), transparent 30%),
    radial-gradient(circle at 92% 28%, rgba(135, 206, 235, var(--winter-glow)), transparent 27%),
    radial-gradient(circle at 55% 100%, rgba(176, 196, 222, var(--winter-blue-glow)), transparent 32%),
    var(--winter-bg);
  background-attachment: fixed;
}

body.winter-season .topbar,
body.winter-season .footer {
  background: rgba(var(--winter-surface-rgb), 0.94);
}

body.winter-season .header {
  background: rgba(var(--winter-surface-rgb), 0.88);
  border-bottom-color: rgba(135, 206, 235, 0.12);
}

body.winter-season .logo-banner .brand-mark {
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.98), rgba(var(--winter-surface-rgb), 0.98));
}

.winter-snowflake-layer {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  overflow: hidden;
}

.winter-snowflake {
  position: absolute;
  top: -14vh;
  left: var(--flake-left);
  width: calc(var(--flake-size) * 2);
  height: calc(var(--flake-size) * 2);
  opacity: 0;
  transform-origin: 50% 50%;
  animation: winter-snowflake-fall var(--flake-duration) linear infinite;
  animation-delay: var(--flake-delay);
  will-change: transform, opacity;
  filter: drop-shadow(0 1px 2px rgba(100, 150, 200, 0.3));
}

/* SVG snowflake shape using CSS */
.winter-snowflake::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" stroke="%232b83c6" stroke-width="3" stroke-linecap="round"><line x1="50" y1="0" x2="50" y2="100"/><line x1="0" y1="50" x2="100" y2="50"/><line x1="14.64" y1="14.64" x2="85.36" y2="85.36"/><line x1="85.36" y1="14.64" x2="14.64" y2="85.36"/><line x1="50" y1="20" x2="58.66" y2="50"/><line x1="50" y1="20" x2="41.34" y2="50"/><line x1="80" y1="50" x2="50" y2="58.66"/><line x1="80" y1="50" x2="50" y2="41.34"/><line x1="50" y1="80" x2="41.34" y2="50"/><line x1="50" y1="80" x2="58.66" y2="50"/><line x1="20" y1="50" x2="50" y2="41.34"/><line x1="20" y1="50" x2="50" y2="58.66"/><line x1="29.29" y1="29.29" x2="50" y2="50"/><line x1="29.29" y1="70.71" x2="50" y2="50"/><line x1="70.71" y1="70.71" x2="50" y2="50"/><line x1="70.71" y1="29.29" x2="50" y2="50"/></g></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  color: var(--flake-color);
}

@keyframes winter-snowflake-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12vh, 0) rotate(0deg);
  }

  10%,
  82% {
    opacity: var(--flake-alpha);
  }

  38% {
    transform: translate3d(var(--flake-sway), 38vh, 0) rotate(190deg);
  }

  68% {
    transform: translate3d(var(--flake-counter-sway), 76vh, 0) rotate(355deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--flake-drift), 118vh, 0) rotate(var(--flake-spin));
  }
}

@media (max-width: 720px) {
  .winter-snowflake:nth-child(n + 9) {
    display: none;
  }

  .winter-snowflake {
    filter: saturate(1.1) drop-shadow(0 1px 1px rgba(100, 150, 200, 0.25));
  }
}

@media (prefers-reduced-motion: reduce) {
  .winter-snowflake-layer {
    display: none;
  }

  body.winter-season {
    background-attachment: scroll;
  }
}
