@import url(../css/capture_it/font.css);

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  cursor: url(../img/glow_normal_white.cur), auto;
}

body {
  background: url(../img/sfondo_inverno.jpg) no-repeat center center fixed;
  background-size: cover;
}

::selection {
  color: #fff;
  background: #8dc692;
  text-shadow: none;
}

#capodanno {
  height: 100vh;
  display: flex;
  align-items: center;
}

#capodanno h2 {
  font-family: "Capture it";
  letter-spacing: 5px;
  text-shadow: -1px -1px #fff, -2px -2px #fff, -1px 1px #fff, -2px 2px #fff, 1px 1px #fff, 2px 2px #fff, 1px -1px #fff, 2px -2px #fff, -3px -3px 2px #bbb, -3px 3px 2px #bbb, 3px 3px 2px #bbb, 3px -3px 2px #bbb;
  opacity: 0.5;
  font-weight: 400;
  font-size: 50px;
  line-height: 1.3;
  color: #d5d5d5;
  padding: 0 20px;
}

#inverno {
  width: 300px;
  height: 155px;
  background: url(../img/inverno.png);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1;
  cursor: pointer;
  text-indent: -999px;
  -webkit-tap-highlight-color: transparent;
}

#pupazzo_di_neve {
  width: 96px;
  height: 96px;
  background: url(../img/pupazzo_di_neve.png);
  position: fixed;
  bottom: -96px;
  left: 0;
  z-index: 2;
  transition: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#musica {
  display: none;
}

#inverno img {
  display: block;
}

#playpause {
  width: 32px;
  height: 32px;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
}

#playpause svg {
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: 10011;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal_inner {
  max-width: 700px;
  max-height: 90vh;
  background: #fff;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal_header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.modal_content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  line-height: 22px;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  color: #3a3a3a;
}

.modal_content h4 {
  font-size: 1.25em;
  padding: 1em 0;
  text-align: center;
}

.modal_content img {
  float: left;
  max-width: 200px;
  width: auto;
  height: auto;
  margin: 1em 1em 1em 0;
  shape-outside: ellipse(50% 50% at 50% 50%);
}

.modal_content p::after {
  content: "";
  display: block;
  clear: both;
}

.modal_close {
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.link {
  text-decoration: none;
  cursor: pointer;
  color: black;
  background-size: 100% 200%;
  background-repeat: no-repeat;
  background-image: linear-gradient(to top, #8dc692 50%, rgba(0, 0, 0, 0) 50.1%);
  background-position: left 0 top 7.5%;
  transition: background 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.link:focus,
.link:hover,
.link:active {
  text-decoration: none;
  color: inherit;
}

.link:focus {
  outline: none;
}

.link:hover {
  background-size: 100% 200%;
  background-position: left 0 top 42.5%;
}

.link:active {
  background-size: 100% 200%;
  background-position: left 0 top 60%;
}

#snow-canvas {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

@media (max-width:575.98px) and (orientation:portrait) {
  body {
    background-position: right 35% center;
  }
}

@media (min-width:576px) and (max-width:767.98px) and (orientation:portrait) {
  body {
    background-position: right 40% center;
  }
}

@media (min-width:768px) and (max-width:991.98px) and (orientation:portrait) {
  body {
    background-position: right 41% center;
  }
}

@media (max-width: 768px) {
  .modal_inner {
    width: 90vw;
    height: 90vh;
  }
}

@media (max-width: 921px) {
  .modal_content img {
    float: none;
    display: block;
    margin: 0 auto 1em;
    max-width: 100%;
  }
}

@media (max-width:575.98px) {
  #capodanno h2 {
    font-size: 30px;
  }
}

@media (min-width:1920px) {
  #capodanno h2 {
    font-size: 70px;
  }
}

@keyframes easeOutBounceWithScale {
  0% {
    bottom: -100px;
    transform: scale3d(1, 1, 1);
  }

  30% {
    bottom: 20px;
    transform: scale3d(1.25, 0.75, 1);
  }

  40% {
    bottom: -10px;
    transform: scale3d(0.75, 1.25, 1);
  }

  50% {
    bottom: 0;
    transform: scale3d(1.15, 0.85, 1);
  }

  65% {
    bottom: 0;
    transform: scale3d(0.95, 1.05, 1);
  }

  75% {
    bottom: 0;
    transform: scale3d(1.05, 0.95, 1);
  }

  100% {
    bottom: 0;
    transform: scale3d(1, 1, 1);
  }
}

#pupazzo_di_neve.animate {
  animation: easeOutBounceWithScale 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-home {
  display: block;
  position: absolute;
  top: -32px;
  right: 20px;
  width: 32px;
  height: 32px;
  color: #dff0fe;
  transition: color 0.3s ease;
  animation: slide-bottom 1s ease-in 0.5s both;
}

.btn-home:hover {
  color: #fff;
}

.icon {
  width: 100%;
  height: 100%;
}

@keyframes slide-bottom {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(52px);
  }
}