/* winter.css — DamnDane.Network winter skin.
   Active only when <html> has class "winter" (set by winter.js by date, or ?season=winter).
   Remove the season: delete the two winter lines in <head>; nothing else depends on this file. */

html.winter {
  --chassis: #0b1219;
  --chassis2: #101b25;
  --line: #1c3344;
  --cream: #eef8ff;
  --muted: #9fb6c8;
  --amber: #8fe3ff;          /* accent goes ice-blue; logo art keeps its own amber */
  --amber-ink: #021320;
  --amber-ink2: #0b3550;
  --ice: #8fe3ff;
  --ice-deep: #2f9bd8;
  --frost: #f4fcff;
}

/* fall decorations off, even if something re-adds .fall */
html.winter canvas#leaves,
html.winter .hat,
html.winter .fall-floor,
html.winter .strut,
html.winter .unit-fall,
html.winter .fall-note { display: none !important; }

/* snow canvas sits where the leaves did */
canvas#snow {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; display: none;
}
html.winter canvas#snow { display: block; }
/* splash page paints #000 on body too, which would hide the snow layer; html keeps the black */
html.winter:has(> body > main > .stage) body { background: transparent; }

::selection { background: var(--amber); color: var(--amber-ink); }

/* icy glow on accents */
html.winter .btn-primary { box-shadow: 0 0 0 0 rgba(143,227,255,0); }
html.winter .btn-primary:hover,
html.winter .btn-primary:focus-visible { box-shadow: 0 0 22px rgba(143,227,255,.55), 0 0 2px #fff inset; }
html.winter .btn-line:hover,
html.winter .btn-line:focus-visible { box-shadow: 0 0 18px rgba(143,227,255,.35); background: rgba(143,227,255,.08); }
html.winter .proof { background: rgba(11, 18, 25, .72); }
html.winter .lcd { text-shadow: 0 0 12px rgba(143,227,255,.5); }
html.winter .row { border-bottom-color: rgba(2, 19, 32, .3); }
html.winter nav { border-bottom-color: rgba(143,227,255,.25); box-shadow: 0 1px 24px rgba(47,155,216,.12); }

/* cold halo behind the neon logo */
html.winter .logo-stage, html.winter .stage { isolation: isolate; }
html.winter .logo-stage::before, html.winter .stage::before {
  content: ""; position: absolute; inset: -8% -6%;
  background: radial-gradient(closest-side, rgba(143,227,255,.16), rgba(47,155,216,.06) 55%, transparent 75%);
  pointer-events: none; z-index: -1;
  animation: dn-breathe 6s ease-in-out infinite;
}
@keyframes dn-breathe { 50% { opacity: .55; } }

/* winter beanie — same spot and size as the pilgrim hat */
.winter-hat {
  display: none; position: absolute; left: 29.2%; top: 7.6%; width: 21%;
  transform-origin: 50% 100%; transform: rotate(-5deg);
  filter: drop-shadow(0 0 6px rgba(143,227,255,.65));
  overflow: visible;
}
html.winter .winter-hat { display: block; }
.winter-hat .pom { transform-origin: 60px 22px; animation: dn-pom 3.2s ease-in-out infinite; }
@keyframes dn-pom { 50% { transform: rotate(6deg) translateY(-1px); } }

/* hero floor: snow drift, ice stripe, and a snowman on patrol */
html.winter .hero { padding-bottom: 0; }
html.winter .floor { display: block; }
.winter-floor { display: none; }
html.winter .winter-floor { display: block; position: absolute; inset: 0; pointer-events: none; }
.winter-floor .drift { position: absolute; left: 0; right: 0; bottom: 9px; width: 100%; height: 46px; }
.winter-floor .stripe {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: linear-gradient(var(--frost) 0 3px, var(--ice) 3px 6px, var(--ice-deep) 6px 9px);
  box-shadow: 0 0 14px rgba(143,227,255,.45);
}

.snowman {
  position: absolute; left: 12px; bottom: 20px; width: 112px; height: 128px;
  --run: calc(100vw - 150px);
  pointer-events: auto; cursor: pointer;
  background: none; border: 0; padding: 0; color: inherit;
  animation: dn-glide 64s linear infinite;
  -webkit-tap-highlight-color: transparent;
}
.snowman svg { width: 100%; height: 100%; display: block; overflow: visible;
  filter: drop-shadow(0 0 5px rgba(143,227,255,.7)); }
.snowman .bob { transform-origin: 60px 128px; animation: dn-bob 1.6s ease-in-out infinite; }
.snowman.hop .bob { animation: dn-hop .55s cubic-bezier(.3,1.6,.5,1); }
.snowman:focus-visible { outline: 2px dashed var(--ice); outline-offset: 4px; }
.snowman:hover { animation-play-state: paused; }
@keyframes dn-glide {
  0%   { transform: translateX(0) scaleX(1); }
  48%  { transform: translateX(var(--run)) scaleX(1); }
  50%  { transform: translateX(var(--run)) scaleX(-1); }
  98%  { transform: translateX(0) scaleX(-1); }
  100% { transform: translateX(0) scaleX(1); }
}
@keyframes dn-bob { 50% { transform: rotate(2.5deg); } }
@keyframes dn-hop { 40% { transform: translateY(-26px) rotate(-6deg); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .snowman, .snowman .bob, .winter-hat .pom, html.winter .logo-stage::before, html.winter .stage::before { animation: none !important; }
}
