@font-face {
   font-family: 'Baloo';
   src: url('../fonts/baloo/Baloo-Regular.woff2') format('woff2'),
      url('../fonts/baloo/Baloo-Regular.woff') format('woff');
   font-weight: normal;
   font-style: normal;
}

@font-face {
   font-family: 'SourceSansPro';
   src: url('../fonts/source_sans_pro/SourceSansPro-Regular.woff2') format('woff2'),
      url('../fonts/source_sans_pro/SourceSansPro-Regular.woff') format('woff');
   font-weight: normal;
   font-style: normal;
}

@font-face {
   font-family: 'SourceSansPro';
   src: url('../fonts/source_sans_pro/SourceSansPro-Bold.woff2') format('woff2'),
      url('../fonts/source_sans_pro/SourceSansPro-Bold.woff2') format('woff');
   font-weight: bold;
   font-style: normal;
}






@keyframes mensaje {

   0%,
   20%,
   40%,
   60%,
   80%,
   100% {
      -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
      animation-timing-function: cubic-bezier(.215, .61, .355, 1);
   }

   0% {
      opacity: 0;
      -webkit-transform: scale3d(.3, .3, .3);
      transform: scale3d(.3, .3, .3);
   }

   20% {
      -webkit-transform: scale3d(1.1, 1.1, 1.1);
      transform: scale3d(1.1, 1.1, 1.1);
   }

   40% {
      -webkit-transform: scale3d(.9, .9, .9);
      transform: scale3d(.9, .9, .9);
   }

   60% {
      opacity: 1;
      -webkit-transform: scale3d(1.03, 1.03, 1.03);
      transform: scale3d(1.03, 1.03, 1.03);
   }

   80% {
      -webkit-transform: scale3d(.97, .97, .97);
      transform: scale3d(.97, .97, .97);
   }

   100% {
      opacity: 1;
      -webkit-transform: scaleX(1);
      transform: scaleX(1);
   }
}

@keyframes cierreModal {
   0% {
      opacity: 1;
      height: 100vh;
   }

   90% {
      height: 100vh;
   }

   100% {
      height: 0;
      opacity: 0;
   }
}

@keyframes sprite {
   0% {
      background-position: 2010px 0;
   }

   100% {
      background-position: 335px 0;
   }
}

@keyframes entrada {
   0% {
      opacity: 0;
   }

   100% {
      opacity: 1;
   }
}

@keyframes entradaContenedor {
   0% {
      transform: translateY(-50%);
   }

   100% {
      transform: translateY(0);
   }
}






:root {
   font-size: 22px;
}

body {
   font-size: 1rem;
   font-family: SourceSansPro, sans-serif;
}

button:focus {
   outline: none;
}





.escena {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   min-height: 100vh;

   background-color: #0fa5a6;
   background-image: url(../img/fondo-piso.png), url(../img/fondo.png);
   background-repeat: repeat-x, repeat;
   background-position: bottom center, center center;
   background-size: auto calc(50% - 205px), auto;
   padding-bottom: 6vh;

   overflow-x: hidden;
}

.escena__encabezado {
   padding-left: 15px;
   padding-right: 15px;
}

.escena__encabezadoLogo {
   display: block;
   max-width: 100%;
   width: 360px;
   margin: 15px auto 0;

   z-index: 5;
}

.arbol {
   max-width: 335px;
   width: 100%;
   position: relative;
}

.arbol__img {
   width: 335px;
   height: 496px;
   position: relative;
   z-index: 2;

   background-image: url(../img/arbol.png);
   background-size: 2010px;
   background-position: 0 0;
}

.arbol--encendido .arbol__img {
   animation: sprite 2s steps(5) backwards;
   background-position: 335px 0;
}

.ventana {
   position: absolute;
   top: 0;
   right: -50px;
   opacity: .45;
   transform: rotate(-30deg);
}

.escena .level1 {
   position: absolute;
   bottom: 0;
   left: 0;
   z-index: 3;
}

.mensaje,
.instruccion {
   display: flex;

   justify-content: center;
   align-items: center;

   width: 100%;
   overflow: auto;
   background-color: hsla(0, 0%, 0%, .7);
   color: #fff;
   position: fixed;
   left: 0;
   top: 0;
   z-index: 999;

   height: 0;
   opacity: 0;

   transition: opacity .8s;
}

.mensaje--visible,
.instruccion--visible {
   opacity: 1;
   height: 100vh;
}

.mensaje--invisible,
.instruccion--invisible {
   animation: cierreModal .6s backwards;
}

.mensaje__contenedor,
.instruccion__contenedor {
   max-width: 600px;
   margin: 10px;
   background-color: #0a6767;
   padding: 30px 25px 50px;
   border-radius: 20px;
   position: relative;
}

.mensaje__contenedor::after,
.instruccion__contenedor::after {
   content: "";
   position: absolute;
   top: 10px;
   bottom: 10px;
   left: 10px;
   right: 10px;
   border: 2px dashed #fff;
   border-radius: 15px;
}

.mensaje--visible .mensaje__contenedor {
   animation: mensaje .6s .3s backwards;
}

.mensaje__texto {
   text-align: center;
}

.mensaje__feliz,
.instruccion__titulo {
   font-size: 38px;
   line-height: 1.2;
   font-family: Baloo, sans-serif;
   text-align: center;
   color: #a8e74a;
   margin-bottom: 5px;
}

.muerdago {
   position: absolute;
   bottom: -10px;
   right: -10px;
   z-index: 2;
}

.marca {
   position: relative;
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   margin-top: 10px;
   margin-left: 10px;
   z-index: 5;
}

.marca__texto {
   margin-bottom: 3px;
   margin-right: 8px;
}

.marca__logo,
.marca__logoLink {
   width: 100%;
   max-width: 260px;
}

.reiniciar {
   --tamano: 40px;
   position: absolute;
   top: -5px;
   right: -5px;
   z-index: 5;
   width: var(--tamano);
   height: var(--tamano);
   border-radius: 50%;
   padding: 0;
   border: 0;
   background-color: #d97066;
   display: flex;
   justify-content: center;
   align-items: center;
}

.reiniciar__img {
   width: 60%;

   transition: transform .4s;
}

.reiniciar:hover  .reiniciar__img {
   transform: rotate(360deg);
}




.instruccion--visible {
   animation: entrada 1s .6s backwards;
   opacity: 1;
}

.instruccion__contenedor {
   text-align: center;
}

.instruccion--visible .instruccion__contenedor {
   animation: entradaContenedor 1s .6s backwards;
   transform: translateY(0);
}

.instruccion__texto {
   text-align: center;
   color: #fff;
}

.instruccion__tituloIcono {
   width: 31px;
   margin-left: -2px;
   margin-top: -2px;
}

.instruccion__textoImg {
   width: 40px;
   margin-right: 8px;
}

.instruccion__btn {
   z-index: 2;
   background-color: #a8e74a;
   color: #161b1c;
   border: 0;
   padding: 2px 15px 4px;
   border-radius: 10px;
   position: relative;
   top: -4px;
   box-shadow: 0 9px 0 hsl(84, 77%, 40%);
   transition: box-shadow .2s, top .2s;
}

.instruccion__btn:hover {
   cursor: pointer;
   top: 0;
   box-shadow: 0 5px 0 hsl(84, 77%, 40%);
}

.instruccion__btn:active {
   cursor: pointer;
   top: 5px;
   box-shadow: 0 0 0 hsl(84, 77%, 40%);
}