*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.scene {
  position: relative;
  height: 100vh;
  background: #0b132b radial-gradient(circle farthest-side at 50% 100%, #6d7daf, #0b132b) no-repeat;
  overflow: hidden;
}
.sky {
  position: absolute;
  width: 100%;
  height: 60%;
  /* outline: 1px dotted yellow; */
  /* outline-offset: -5px; */
}
.sky__stars {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background-color: snow;
  border-radius: 50%;
  box-shadow: -550px 5px 0 0 snow, -405px -45px 0 0 snow, -300px -165px 0 0 snow, -230px -75px 0 0 snow, -130px 100px 0 0 snow, -120px -160px 0 0 snow, 160px -135px 0 0 snow, 375px -50px 0 0 snow, 435px 80px 0 0 snow, 480px -75px 0 0 snow;
  -webkit-animation: shine 5s infinite;
          animation: shine 5s infinite;
}
.sky__stars::before {
  content: "";
  position: absolute;
  top: 35px;
  left: -60px;
  width: 2px;
  height: 2px;
  background-color: snow;
  box-shadow: -460px -145px 0 0 snow, -405px 45px 0 0 snow, -255px -40px 0 0 snow, -230px 75px 0 0 snow, -40px -100px 0 0 snow, 130px 90px 0 0 snow, 160px -115px 0 0 snow, 300px -40px 0 0 snow, 350px -185px 0 0 snow, 610px -175px 0 0 snow;
}
.sky__crescent {
  position: absolute;
  top: 70px;
  right: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: inset -20px 20px 0 -10px #fff;
  transform: rotate(40deg);
  -webkit-animation: shine 5s infinite;
          animation: shine 5s infinite;
}
.ground {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;
  overflow: hidden;
  /* outline: 1px dotted yellow; */
}
.ground__snowdrift {
  position: absolute;
  bottom: 0;
  -webkit-clip-path: polygon(0% 15%, 10% 5%, 20% 0%, 30% 2%, 40% 10%, 50% 15%, 60% 12%, 70% 6%, 80% 5%, 90% 10%, 100% 20%, 100% 100%, 0% 100%);
          clip-path: polygon(0% 15%, 10% 5%, 20% 0%, 30% 2%, 40% 10%, 50% 15%, 60% 12%, 70% 6%, 80% 5%, 90% 10%, 100% 20%, 100% 100%, 0% 100%);
}
.ground__snowdrift:first-child {
  width: 100%;
  height: 60%;
  background-color: snow;
}
.ground__snowdrift:nth-child(2) {
  width: 125%;
  height: 85%;
  background-color: rgba(255, 250, 250, 0.8);
}
.ground__snowdrift:nth-child(3) {
  left: -50px;
  width: 110%;
  height: 100%;
  background-color: rgba(255, 250, 250, 0.4);
  transform: scaleX(-1);
}
.xmass-tree {
  position: absolute;
  bottom: 20%;
  right: 20%;
  width: 350px;
  height: 450px;
  /* outline: 1px dotted yellow; */
}
.xmass-tree__bottom,
.xmass-tree__middle,
.xmass-tree__top {
  position: absolute;
  background-color: #254441;
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  box-shadow: inset -10px 15px 0 snow, inset 10px -10px 0 #1c3331;
}
.xmass-tree__bottom {
  bottom: 0;
  width: 350px;
  height: 225px;
}
.xmass-tree__middle {
  bottom: 190px;
  left: 50px;
  width: 250px;
  height: 150px;
  -webkit-animation: sway-middle 10s infinite ease-in-out;
          animation: sway-middle 10s infinite ease-in-out;
}
.xmass-tree__top {
  bottom: 320px;
  bottom: 310px;
  left: 115px;
  width: 100px;
  height: 120px;
  -webkit-animation: sway-top 10s infinite ease-in-out;
          animation: sway-top 10s infinite ease-in-out;
}
.snowman {
  position: absolute;
  bottom: 15%;
  left: 20%;
  width: 200px;
  height: 400px;
  /* outline: 1px dotted yellow; */
}
.snowman__snowball {
  position: absolute;
  background-color: snow;
  border-radius: 50%;
  box-shadow: inset 10px -10px 0 #d9e0f5;
}
.snowman__snowball:first-child {
  bottom: 0;
  width: 200px;
  height: 180px;
}
.snowman__snowball:nth-child(2) {
  bottom: 130px;
  left: 15px;
  width: 160px;
  height: 145px;
}
.snowman__snowball:nth-child(3) {
  bottom: 240px;
  left: 45px;
  width: 120px;
  height: 110px;
}
.guzik {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 300px;
  height: 300px;
  background-color: #21b8e6;
  border-radius: 50%;
  box-shadow: inset -25px 25px 0 #a3ddf8, inset 25px -25px 0 #15ccec, inset 0 0 0 50px #15ccec;
}
.guzik::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: -40px -40px 0 snow, 40px -40px 0 snow, 40px 40px 0 snow, -40px 40px 0 snow;
  transform: translate(-50%, -50%);
}
.guzik--bottom:first-child {
  top: -90px;
  left: -10px;
  transform: scale(0.11) rotate(160deg);
}
.guzik--bottom:last-child {
  top: -40px;
  left: 0;
  transform: scale(0.11) rotate(15deg);
}
.guzik--torso:first-child {
  top: -100px;
  left: -35px;
  transform: scale(0.1) rotate(50deg);
}
.guzik--torso:nth-child(2) {
  top: -60px;
  left: -25px;
  transform: scale(0.1) rotate(200deg);
}
.guzik--head:first-child {
  top: -100px;
  left: -95px;
  transform: scale(0.1) rotate(10deg);
}
.guzik--head:nth-child(2) {
  top: -110px;
  left: -55px;
  transform: scale(0.08) rotate(40deg);
}
.carrot {
  position: absolute;
  top: 60px;
  left: 73px;
  width: 40px;
  height: 20px;
  background-color: #ff6f59;
  border-radius: 20% 75% 75% 20% / 50% 50% 50% 50%;
  box-shadow: inset 0 -5px 0 #ff4326;
  transform: rotate(30deg);
}
.stick {
  position: absolute;
  width: 120px;
  height: 10px;
  background-color: #754f44;
  border-radius: 0 5px 5px 50%;
  box-shadow: inset 0 3px 0 #855a4d;
  transform-origin: top right;
  /* outline: 1px dotted yellow; */
}
.stick--left {
  top: 50px;
  left: -80px;
  transform: rotate(-10deg);
  -webkit-animation: wave-left-hand 5s 5s infinite ease-in-out;
          animation: wave-left-hand 5s 5s infinite ease-in-out;
}
.stick--right {
  top: 35px;
  right: 10px;
  width: 100px;
  box-shadow: inset 0 -3px 0 #855a4d;
  transform: rotate(140deg);
  -webkit-animation: wave-right-hand 5s 5s infinite ease-in-out;
          animation: wave-right-hand 5s 5s infinite ease-in-out;
}
.stick::after {
  content: "";
  position: absolute;
  top: calc(50% - 15px);
  width: 40px;
  height: 40px;
  border-top: 5px solid #754f44;
  border-right: 5px solid #754f44;
  border-radius: 5px 20px;
  transform-origin: top right;
  transform: rotate(45deg);
}
.snowflake {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 300px;
  height: 300px;
  filter: drop-shadow(0 0 5px snow);
  /* outline: 1px dotted yellow; */
}
.snowflake--big {
  width: 300px;
  height: 300px;
}
.snowflake--medium {
  width: 75px;
  height: 75px;
}
.snowflake--small {
  width: 80px;
  height: 80px;
  transform: scale(0.3);
}
.snowflake--air {
  top: 0;
  left: 60%;
  -webkit-animation: fall 10s ease-in-out infinite;
          animation: fall 10s ease-in-out infinite;
}
.snowflake--tree {
  top: 45px;
  right: 45px;
  left: auto;
  transform: rotate(20deg);
}
.snowflake--tree:hover {
  -webkit-animation: spin 10s;
          animation: spin 10s;
}
.snowflake__ray {
  position: absolute;
  top: calc(50% - 2.5%);
  width: 100%;
  height: 5%;
  background-color: snow;
  border-radius: 50%;
}
.snowflake__ray:first-child {
  transform: rotate(90deg);
}
.snowflake__ray:nth-child(2) {
  transform: rotate(150deg);
}
.snowflake__ray:nth-child(3) {
  transform: rotate(210deg);
}
.snowflake__ray::before,
.snowflake__ray::after {
  content: "";
  position: absolute;
  top: 45%;
  width: 20%;
  height: 400%;
  border-left: 3px solid snow;
  border-top: 3px solid snow;
  border-radius: 25%;
  filter: drop-shadow(10px 10px 0 snow);
}
.snowflake__ray::before {
  left: 20%;
  transform-origin: top left;
  transform: rotate(135deg);
}
.snowflake__ray::after {
  right: 0%;
  transform-origin: top left;
  transform: rotate(315deg);
}
.snowflake__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25%;
  height: 25%;
  background-color: snow;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  -webkit-clip-path: polygon(0% 33%, 50% 0%, 100% 33%, 100% 66%, 50% 100%, 0% 66%, 10% 66%, 50% 90%, 90% 66%, 90% 33%, 50% 10%, 10% 33%, 10% 66%, 0% 66%, 0% 33%);
          clip-path: polygon(0% 33%, 50% 0%, 100% 33%, 100% 66%, 50% 100%, 0% 66%, 10% 66%, 50% 90%, 90% 66%, 90% 33%, 50% 10%, 10% 33%, 10% 66%, 0% 66%, 0% 33%);
}
@-webkit-keyframes shine {
  0% {
    filter: none;
  }
  33% {
    filter: drop-shadow(0 0 5px snow);
  }
  66% {
    filter: drop-shadow(0 0 5px snow);
  }
  100% {
    filter: none;
  }
}
@keyframes shine {
  0% {
    filter: none;
  }
  33% {
    filter: drop-shadow(0 0 5px snow);
  }
  66% {
    filter: drop-shadow(0 0 5px snow);
  }
  100% {
    filter: none;
  }
}
@-webkit-keyframes sway-middle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform-origin: right;
    transform: rotate(-5deg) translate(-10%, -5%);
  }
  50% {
    transform-origin: left;
    transform: rotate(5deg) translate(5%, -5%);
  }
  75% {
    transform-origin: center;
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes sway-middle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform-origin: right;
    transform: rotate(-5deg) translate(-10%, -5%);
  }
  50% {
    transform-origin: left;
    transform: rotate(5deg) translate(5%, -5%);
  }
  75% {
    transform-origin: center;
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@-webkit-keyframes sway-top {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform-origin: right;
    transform: rotate(-10deg) translate(-40%, -5%);
  }
  50% {
    transform-origin: left;
    transform: rotate(10deg) translate(35%, 0%);
  }
  75% {
    transform-origin: center;
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes sway-top {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform-origin: right;
    transform: rotate(-10deg) translate(-40%, -5%);
  }
  50% {
    transform-origin: left;
    transform: rotate(10deg) translate(35%, 0%);
  }
  75% {
    transform-origin: center;
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@-webkit-keyframes wave-left-hand {
  0% {
    transform: rotate(-10deg);
  }
  25% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(-30deg);
  }
  75% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(-10deg);
  }
}
@keyframes wave-left-hand {
  0% {
    transform: rotate(-10deg);
  }
  25% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(-30deg);
  }
  75% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(-10deg);
  }
}
@-webkit-keyframes wave-right-hand {
  0% {
    transform: rotate(140deg);
  }
  25% {
    transform: rotate(130deg);
  }
  50% {
    transform: rotate(150deg);
  }
  75% {
    transform: rotate(140deg);
  }
  100% {
    transform: rotate(140deg);
  }
}
@keyframes wave-right-hand {
  0% {
    transform: rotate(140deg);
  }
  25% {
    transform: rotate(130deg);
  }
  50% {
    transform: rotate(150deg);
  }
  75% {
    transform: rotate(140deg);
  }
  100% {
    transform: rotate(140deg);
  }
}
@-webkit-keyframes fall {
  0% {
    transform: translate(0, -100%) scale(0.3);
  }
  20% {
    transform: translate(100px, 50px) scale(0.3);
  }
  40% {
    transform: translate(-100px, 200px) scale(0.3);
  }
  60% {
    opacity: 1;
    transform: translate(100px, 350px) scale(0.3);
  }
  80% {
    transform: translate(-100px, 550px) scale(0.3);
  }
  100% {
    opacity: 0;
    transform: translate(100px, 700px) scale(0.3);
  }
}
@keyframes fall {
  0% {
    transform: translate(0, -100%) scale(0.3);
  }
  20% {
    transform: translate(100px, 50px) scale(0.3);
  }
  40% {
    transform: translate(-100px, 200px) scale(0.3);
  }
  60% {
    opacity: 1;
    transform: translate(100px, 350px) scale(0.3);
  }
  80% {
    transform: translate(-100px, 550px) scale(0.3);
  }
  100% {
    opacity: 0;
    transform: translate(100px, 700px) scale(0.3);
  }
}
@-webkit-keyframes spin {
  5% {
    filter: none;
  }
  100% {
    transform: rotate(380deg);
    filter: none;
  }
}
@keyframes spin {
  5% {
    filter: none;
  }
  100% {
    transform: rotate(380deg);
    filter: none;
  }
}
#snowfall {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3000; /* pod listami, nad tłem */
}

.snowflake-js {
  position: absolute;
  top: -10px;
  color: white;
  font-size: 14px;
  opacity: 0.8;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh);
  }
}

/* ================== MOBILE ================== */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  .scene {
    height: 100svh;
  }

  /* CHOINKA */
  .xmass-tree {
    right: 50%;
    bottom: 22%;
    transform: translateX(50%) scale(0.65);
  }

  /* BAŁWAN */
  .snowman {
    left: 50%;
    bottom: 6%;
    transform: translateX(-50%) scale(0.65);
  }

  /* LISTY */
  .letter-box {
    width: 90%;
    max-width: 360px;
  }

  /* LAMPKI */
  .lightrope {
    transform: scale(0.9);
  }
}
/* ================== IPHONE (iOS SAFARI) ================== */
@media only screen 
  and (max-width: 430px)
  and (-webkit-touch-callout: none) {

  body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  /* FIX 100vh w iOS */
  .scene {
    height: 100svh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* CHOINKA */
  .xmass-tree {
    right: 50%;
    bottom: 28%;
    transform: translateX(50%) scale(0.55);
  }

  /* BAŁWAN */
  .snowman {
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%) scale(0.55);
  }

  /* LISTY */
  .letter-box {
    width: calc(100% - 32px);
    max-width: 340px;
    padding: 20px;
  }

  .letter-box p {
    font-size: 15px;
    line-height: 1.4;
  }

  /* LAMPKI */
  .lightrope {
    top: env(safe-area-inset-top);
    transform: scale(0.85);
  }

  /* USUŃ HOVER NA DOTYKU */
  .xmass-tree:hover,
  .snowman:hover {
    filter: none;
    transform: none;
  }
}




