/* CS2 Winter Site v6 — Twinkling garland and foreground snow */
:root {
  --cs2-winter-lights: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 264 24'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop stop-color='%23ffcc72' stop-opacity='.46'/%3E%3Cstop offset='1' stop-color='%23ffae48' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b'%3E%3Cstop stop-color='%237af7ca' stop-opacity='.38'/%3E%3Cstop offset='1' stop-color='%237af7ca' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c'%3E%3Cstop stop-color='%23ff7180' stop-opacity='.36'/%3E%3Cstop offset='1' stop-color='%23ff7180' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M0 3q33 14 66 0q33 14 66 0q33 14 66 0q33 14 66 0' fill='none' stroke='%236f7563' stroke-opacity='.66' stroke-width='1'/%3E%3Cg fill='url(%23a)'%3E%3Ccircle cx='20' cy='12' r='10'/%3E%3Ccircle cx='115' cy='9' r='10'/%3E%3Ccircle cx='183' cy='11' r='10'/%3E%3C/g%3E%3Cg fill='url(%23b)'%3E%3Ccircle cx='48' cy='12' r='9'/%3E%3Ccircle cx='212' cy='9' r='9'/%3E%3C/g%3E%3Cg fill='url(%23c)'%3E%3Ccircle cx='80' cy='9' r='9'/%3E%3Ccircle cx='150' cy='12' r='9'/%3E%3Ccircle cx='245' cy='9' r='9'/%3E%3C/g%3E%3Cg fill='%23ffe2a3'%3E%3Cellipse cx='20' cy='12' rx='2.1' ry='3.2'/%3E%3Cellipse cx='115' cy='9' rx='2.1' ry='3.2'/%3E%3Cellipse cx='183' cy='11' rx='2.1' ry='3.2'/%3E%3C/g%3E%3Cg fill='%239ff5d6'%3E%3Cellipse cx='48' cy='12' rx='2' ry='3'/%3E%3Cellipse cx='212' cy='9' rx='2' ry='3'/%3E%3C/g%3E%3Cg fill='%23ffa0a0'%3E%3Cellipse cx='80' cy='9' rx='2' ry='3'/%3E%3Cellipse cx='150' cy='12' rx='2' ry='3'/%3E%3Cellipse cx='245' cy='9' rx='2' ry='3'/%3E%3C/g%3E%3C/svg%3E");
}

.site-header::after,
.hero.section-glow::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.site-header::after {
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 18px;
  background: var(--cs2-winter-lights) repeat-x center top / 224px 20px;
}

/* Animate the three bulb colours out of phase; the wire stays still. */
@media (prefers-reduced-motion: no-preference) {
  .site-header::after {
    --cs2-winter-lights: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 264 24'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop stop-color='%23ffcc72' stop-opacity='.46'/%3E%3Cstop offset='1' stop-color='%23ffae48' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b'%3E%3Cstop stop-color='%237af7ca' stop-opacity='.38'/%3E%3Cstop offset='1' stop-color='%237af7ca' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c'%3E%3Cstop stop-color='%23ff7180' stop-opacity='.36'/%3E%3Cstop offset='1' stop-color='%23ff7180' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M0 3q33 14 66 0q33 14 66 0q33 14 66 0q33 14 66 0' fill='none' stroke='%236f7563' stroke-opacity='.66' stroke-width='1'/%3E%3Cg%3E%3Canimate attributeName='opacity' values='1;.32;.66;1' dur='5.4s' calcMode='spline' keyTimes='0;.333;.667;1' keySplines='.42 0 .58 1;.42 0 .58 1;.42 0 .58 1' repeatCount='indefinite'/%3E%3Cg fill='url(%23a)'%3E%3Ccircle cx='20' cy='12' r='10'/%3E%3Ccircle cx='115' cy='9' r='10'/%3E%3Ccircle cx='183' cy='11' r='10'/%3E%3C/g%3E%3Cg fill='%23ffe2a3'%3E%3Cellipse cx='20' cy='12' rx='2.1' ry='3.2'/%3E%3Cellipse cx='115' cy='9' rx='2.1' ry='3.2'/%3E%3Cellipse cx='183' cy='11' rx='2.1' ry='3.2'/%3E%3C/g%3E%3C/g%3E%3Cg%3E%3Canimate attributeName='opacity' values='.66;1;.32;.66' dur='5.4s' calcMode='spline' keyTimes='0;.333;.667;1' keySplines='.42 0 .58 1;.42 0 .58 1;.42 0 .58 1' repeatCount='indefinite'/%3E%3Cg fill='url(%23b)'%3E%3Ccircle cx='48' cy='12' r='9'/%3E%3Ccircle cx='212' cy='9' r='9'/%3E%3C/g%3E%3Cg fill='%239ff5d6'%3E%3Cellipse cx='48' cy='12' rx='2' ry='3'/%3E%3Cellipse cx='212' cy='9' rx='2' ry='3'/%3E%3C/g%3E%3C/g%3E%3Cg%3E%3Canimate attributeName='opacity' values='.32;.66;1;.32' dur='5.4s' calcMode='spline' keyTimes='0;.333;.667;1' keySplines='.42 0 .58 1;.42 0 .58 1;.42 0 .58 1' repeatCount='indefinite'/%3E%3Cg fill='url(%23c)'%3E%3Ccircle cx='80' cy='9' r='9'/%3E%3Ccircle cx='150' cy='12' r='9'/%3E%3Ccircle cx='245' cy='9' r='9'/%3E%3C/g%3E%3Cg fill='%23ffa0a0'%3E%3Cellipse cx='80' cy='9' rx='2' ry='3'/%3E%3Cellipse cx='150' cy='12' rx='2' ry='3'/%3E%3Cellipse cx='245' cy='9' rx='2' ry='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
}

.hero.section-glow { position: relative; }

.hero.section-glow::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 3%, #4d93d845 0%, transparent 47%),
    radial-gradient(ellipse at 99% 48%, #4ac2b124 0%, transparent 42%),
    linear-gradient(0deg, #a0d8ff19, transparent 22%);
}

@media (max-width: 640px) {
  .site-header::after { height: 12px; background-size: 176px 16px; }
}

/* Viewport overlays rise above the page content, below the sticky header and dialogs. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html::before,
  html::after {
    content: "";
    position: fixed;
    z-index: 40;
    top: calc(-1 * var(--cs2-flake-tile));
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    background-size: var(--cs2-flake-width) var(--cs2-flake-tile);
    animation: cs2-winter-fall var(--cs2-flake-duration) linear 3;
  }

  html::before {
    --cs2-flake-tile: 187px;
    --cs2-flake-width: 331px;
    --cs2-flake-duration: 18s;
    background-image:
      radial-gradient(circle at 23px 38px, #e7f6ffaa 0 1.2px, #9ed7ff38 2px, transparent 2.9px),
      radial-gradient(circle at 101px 135px, #d5ebff87 0 1px, transparent 2.2px),
      radial-gradient(circle at 168px 21px, #eff9ff90 0 1.4px, transparent 2.6px),
      radial-gradient(circle at 216px 77px, #ecf9ffab 0 1.8px, transparent 3px),
      radial-gradient(circle at 277px 173px, #e0f2ff8c 0 1.2px, transparent 2.3px),
      radial-gradient(circle at 312px 121px, #e3f2ff92 0 1px, transparent 2.2px);
  }

  html::after {
    --cs2-flake-tile: 251px;
    --cs2-flake-width: 419px;
    --cs2-flake-duration: 14s;
    background-image:
      radial-gradient(circle at 40px 108px, #e7f6ffc7 0 2px, #aadaff52 3px, transparent 4px),
      radial-gradient(circle at 93px 176px, #f4fbffe0 0 2.5px, #b8dfff64 3.6px, transparent 4.9px),
      radial-gradient(circle at 171px 46px, #e4f6ffb0 0 1.5px, transparent 3px),
      radial-gradient(circle at 290px 220px, #def0ffa6 0 1.4px, transparent 2.9px),
      radial-gradient(circle at 347px 15px, #f2faffd9 0 1.8px, transparent 3.4px),
      radial-gradient(circle at 396px 93px, #f5fbffcc 0 2.2px, #a7dbff4d 3px, transparent 4px);
  }

  @keyframes cs2-winter-fall {
    from { transform: translateY(0); }
    to { transform: translateY(var(--cs2-flake-tile)); }
  }
}
