@property --scene-progress {
  inherits: true;
  initial-value: 0;
  syntax: "<number>";
}


.nyc-decorations__wrapper {
  --animation-duration: 20s;
  --animation-timing-function: cubic-bezier(0.18, 0.52, 0.76, 0.42);
  --animation-delay: 1s;
  --scene-outmargin: 2rem;
  --scene-width: calc(100vw + calc(var(--scene-outmargin) * 2));
  --snow-hight: 12px;

  position: absolute;
  bottom: 0;
  left: 0;

  overflow-x: clip;

  width: 100vw;
  height: var(--snow-hight);

  opacity: 0;

  /* animation: fade-in 1s ease forwards, fade-out 1s ease 21s forwards; */
  animation:
    fade-in 1s ease forwards,
    fade-out 1s ease 21s forwards,
    scene-progress var(--animation-duration) var(--animation-timing-function) forwards;
  animation-delay:
    0s,
    21s,
    var(--animation-delay);
}

@keyframes scene-progress {
  to {
    --scene-progress: 1;
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}


.nyc-decorations {
  user-select: none;

  position: relative;
  left: calc(-1 * var(--scene-outmargin));

  /* transform: translateX(var(--scene-width)); */
  transform: translateX(calc((1 - var(--scene-progress)) * var(--scene-width)));

  display: flex;
  align-items: flex-end;

  width: var(--scene-width);
  height: var(--snow-hight);
}

.nyc-decorations__snow-wrapper {
  position: absolute;
  bottom: 0;
  left: calc(-1 * var(--scene-outmargin) + 2px);

  overflow-x: clip;

  width: calc((1 - var(--scene-progress)) * var(--scene-width));
  height: var(--snow-hight);
}


@keyframes boat-move {
  to {
    transform: translateX(0);
  }
}

@keyframes snow-move {
  to {
    width: 0;
  }
}

.nyc-decorations__snow {
  overflow: hidden;
  display: flex;
  justify-content: space-between;

  width: var(--scene-width);
  height: var(--snow-hight);
  border-top-right-radius: .75rem;

  font-size: 8px;
  line-height: 1;

  background: linear-gradient(to top, #93E7FB 0%, #e0ffff80 20%, transparent 100%);
}

.nyc-decorations__snow-item {
  position: absolute;
  bottom: 0;
}

@keyframes snowman {
  to {
    transform: translateY(-4px);
  }
}

.nyc-decorations__snowman {
  animation: snowman ease alternate infinite;
  animation-duration: var(--duration, 0.5s);
  animation-delay: var(--delay, 0s);
}

@keyframes snow-gift {
  to {
    transform: translateY(3px);
  }
}

.nyc-decorations__snow-gift {
  animation: snow-gift ease-in-out alternate infinite;
  animation-duration: var(--duration, 0.2s);
  animation-delay: var(--delay, 0s);
}

@keyframes snow-flake {
  to {
    transform: rotate(var(--rotate));
  }
}

.nyc-decorations__snowflake{
  animation: snow-flake ease alternate infinite;
  animation-duration: var(--duration, 0.5s);
  animation-delay: var(--delay, 0s);
}

.nyc-decorations__water {
  flex: 1;

  height: 4px;
  margin-left: -2px;
  border-top-left-radius: .75rem;

  background-color: var(--c-blue);
}


.nyc-decorations__boat-wrap {
  bottom: 0;

  width: 40px;
  height: 40px;
  margin-left: -4px;

  animation: boat-sway 1s ease alternate infinite;
}

@keyframes boat-sway {
  from {
    transform: translateY(1.5px);
  }

  to {
    transform: translateY(-1px);
  }
}

.nyc-decorations__boat {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 100%;
  margin: 0 -.5rem 0 0;

  font-size: 2.25rem;
  line-height: 1;
  color: var(--c-blue-dark);
}


.nyc-snow-particle {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: -4px;
  transform-origin: center;

  border-radius: 50%;

  animation:
    snowfall-horizontal 1000ms cubic-bezier(0.10, 0.59, 0.19, 1.00) forwards,
    snowfall-vertical 1000ms ease-in forwards,
    fade-out 500ms 500ms ease forwards;
}

@keyframes snowfall-horizontal {
  to {
    transform: translateX(var(--x))
  }
}

@keyframes snowfall-vertical {
  to {
    transform: translateY(var(--y))
  }
}
