@font-face {
  font-family: Bricolage Grotesque;
  src: url("./bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #102e64;
}

body {
  margin: 0;
}

main {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 4rem 1.25rem 3rem;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 54% at 52% 114%, #9cc6ec 0%, #3f7ebc 38%, transparent 83%),
    radial-gradient(ellipse at 47% 55%, #255791 0%, #173f78 50%, transparent 83%),
    linear-gradient(160deg, #152d60, #0a1d46);
}

h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff9ec;
  font: 800 clamp(3.65rem, 11vw, 10.5rem) / 0.92 Bricolage Grotesque, system-ui, sans-serif;
  letter-spacing: -0.027em;
  text-align: center;
  text-shadow: 0 0.035em 0.19em #081a427a;
}

.word {
  position: relative;
  display: inline-block;
}

.hat {
  position: absolute;
  top: -0.41em;
  left: -0.10em;
  width: 0.74em;
  height: 0.59em;
  transform: rotate(-18deg);
}

.hat > span {
  position: absolute;
  display: block;
}

.cap {
  inset: 3% 5% 12% 6%;
  background: linear-gradient(143deg, #ff776b 4%, #ef494b 43%, #b71e38 89%);
  clip-path: polygon(6% 96%, 12% 72%, 20% 45%, 31% 23%, 47% 9%, 60% 6%, 71% 11%, 83% 24%, 95% 44%, 98% 57%, 91% 65%, 80% 56%, 70% 51%, 67% 58%, 71% 76%, 78% 99%);
  clip-path: shape(from 6% 96%, curve to 48% 9% with 15% 61% / 25% 19%, curve to 98% 57% with 71% -4% / 90% 24%, curve to 70% 51% with 93% 73% / 86% 61%, curve to 78% 99% with 59% 47% / 72% 84%, close);
}

.brim {
  left: 2%;
  bottom: 6%;
  width: 75%;
  height: 25%;
  border-radius: 45% 39% 44% 44% / 47% 52% 51% 50%;
  background: linear-gradient(170deg, #fffef7 27%, #e7edf7 77%, #cbd8ed);
  box-shadow: 0 0.025em 0.045em #112b5666;
  transform: rotate(-5deg);
}

.pom {
  right: 0;
  top: 43%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 46% 54% 50% 50%;
  background: radial-gradient(circle at 31% 27%, #fffef6 31%, #e2eaf8 76%, #c6d5ef);
  box-shadow: 0 0.018em 0.035em #112b564d;
}

.snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.flake {
  position: absolute;
  top: -12px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: var(--opacity);
  background: #eaf4ff;
  box-shadow: 0 0 0.35rem #d7eaff85;
  animation: snowfall var(--duration) var(--delay) linear infinite;
}

@keyframes snowfall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drift), calc(100svh + 24px), 0); }
}

@media (max-width: 38rem) {
  h1 {
    max-width: 6ch;
    font-size: clamp(3.65rem, 17vw, 6rem);
    line-height: 0.88;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flake {
    top: var(--rest);
    animation: none;
  }
}
