/*
    Author: Sinuhe
*/
/*Game options*/
/*Theme Colors*/
/*Color*/
/*Light colors*/
/*Dark colors*/
/*Normal Color*/
* {
  padding: 0;
  margin: 0;
}

a,
i,
span {
  transition: all 0.5s;
}

hr {
  margin: 2.5em 0;
  opacity: 0.7;
}

/*******************
Headings
*******************/
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #caa02f;
  font-weight: 400;
}

h1 {
  line-height: 48px;
  font-size: 36px;
}

h2 {
  line-height: 36px;
  font-size: 24px;
}

h3 {
  line-height: 30px;
  font-size: 21px;
}

h4 {
  line-height: 22px;
  font-size: 18px;
}

h5 {
  line-height: 18px;
  font-size: 16px;
  font-weight: 400;
}

h6 {
  line-height: 16px;
  font-size: 14px;
  font-weight: 400;
}

/*******************
Buttons
******************/
.btn {
  padding: 12px 20px;
  font-size: 16px;
  font-family: sans-serif;
  text-decoration: none;
  border-radius: 7px;
  cursor: pointer;
  margin: 5px;
  transition: all 0.5s;
  color: #fff;
}

.btn-primary {
  background-color: #caa02f;
}
.btn-primary:hover {
  background: rgb(181.313253012, 143.6144578313, 42.186746988);
}

.btn-secondary {
  background-color: #25b7d3;
}
.btn-secondary:hover {
  background: rgb(33.1955645161, 164.1834677419, 189.3044354839);
}

.btn-danger {
  background-color: #e04f5f;
}
.btn-danger:hover {
  background: rgb(220.1811594203, 57.3188405797, 75.2898550725);
}

.btn-outline {
  background-color: transparent;
}
.btn-outline.btn-primary {
  color: #caa02f;
  border: 1px solid #caa02f;
}
.btn-outline.btn-primary:hover, .btn-outline.btn-primary:focus, .btn-outline.btn-primary.focus {
  background: rgb(181.313253012, 143.6144578313, 42.186746988);
  color: #ffffff;
  border-color: #caa02f;
}
.btn-outline.btn-secondary {
  color: #25b7d3;
  border: 1px solid #25b7d3;
}
.btn-outline.btn-secondary:hover, .btn-outline.btn-secondary:focus, .btn-outline.btn-secondary.focus {
  background: rgb(33.1955645161, 164.1834677419, 189.3044354839);
  color: #ffffff;
  border-color: #25b7d3;
}
.btn-outline.btn-danger {
  color: #e04f5f;
  border: 1px solid #e04f5f;
}
.btn-outline.btn-danger:hover, .btn-outline.btn-danger:focus, .btn-outline.btn-danger.focus {
  background: rgb(220.1811594203, 57.3188405797, 75.2898550725);
  color: #ffffff;
  border-color: #e04f5f;
}

.back {
  margin-top: -50px;
  margin-bottom: 50px;
  margin-left: -50px;
  display: block;
  opacity: 0.85;
  width: 24px;
  overflow: hidden;
  height: 24px;
  transition: all 0.5s;
  text-decoration: none;
  text-align: left;
}
.back img {
  vertical-align: middle;
}
.back span {
  color: #fff;
  font-family: sans-serif;
  margin-left: 10px;
}
.back:hover {
  opacity: 1;
  width: 200px;
}

/*******************
Container
******************/
.wrapper {
  width: 100%;
  height: 100%;
  background: #000;
  position: fixed;
}
.wrapper h1 {
  padding: 10px;
  color: #caa02f;
  text-align: center;
  animation-delay: 0.25s;
}

section {
  padding: 100px;
  right: 0;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: none;
  overflow: auto;
}
section.active {
  display: block;
}
section:not(.controls) .back, section:not(.controls) .story-nav {
  transition: all 1s;
  opacity: 0;
}

/*******************
Rotation
******************/
.reflect-y {
  transform: rotateY(180deg);
}

.reflect-x {
  transform: rotateX(180deg);
}
.reflect-x.reflect-y {
  transform: rotatex(180deg) rotateY(180deg);
}

/*******************
Modal
******************/
.modal {
  background: #fff;
  border-radius: 10px;
  padding: 20px 60px;
  opacity: 0;
  transition: all 1s;
  top: 100%;
}
.modal.modal-active {
  opacity: 1;
  top: 140px;
}
.modal .modal-close i {
  font-family: monospace;
  position: absolute;
  width: 50px;
  height: 50px;
  top: -15px;
  right: -15px;
  color: #fff;
  border-radius: 50%;
  line-height: 45px;
  font-size: 18px;
  padding: 0;
  text-transform: lowercase;
}

/*============================================================== 
 Home
 ============================================================== */
#home {
  text-align: center;
}
#home a {
  margin: 5px 15px;
  display: inline-block;
  width: 70px;
}

.decoration {
  text-align: center;
}
.decoration.middle-decoration-x {
  margin-top: -50px;
}

.ornament {
  width: 116px;
  height: 44px;
  display: inline-block;
  margin: 10px;
  position: relative;
}
.ornament.ornament-top {
  background: url(../assets/images/sprite-cerditos.svg#top-ornament) no-repeat;
  background-position: center center;
  background-size: contain;
}
.ornament.ornament-middle {
  background: url(../assets/images/sprite-cerditos.svg#middle-ornament) no-repeat;
  background-position: center center;
  background-size: contain;
}
.ornament.ornament-bottom {
  background: url(../assets/images/sprite-cerditos.svg#bottom-ornament) no-repeat;
  background-position: center center;
  background-size: contain;
  margin-bottom: 50px;
}
.ornament:before {
  content: "";
  position: absolute;
  width: 100%;
  background: black;
  top: 0;
  right: 0;
  height: 44px;
  animation-name: toggle-width;
  animation-fill-mode: forwards;
  animation-duration: 2s;
}

.fade-out {
  animation-name: fade-out;
  animation-fill-mode: forwards;
  animation-duration: 2s;
}

.fade-in {
  animation-name: fade-in;
  animation-fill-mode: forwards;
  animation-duration: 2s;
  margin-top: 20px;
  margin-bottom: 0px;
  opacity: 0;
}

@keyframes toggle-width {
  100% {
    width: 0;
  }
}
@keyframes fade-in {
  100% {
    margin-top: 0;
    margin-bottom: 20px;
    opacity: 1;
  }
}
@keyframes fade-out {
  100% {
    margin-top: 20px;
    margin-bottom: -20px;
    opacity: 0;
  }
}
@keyframes image-in {
  100% {
    box-shadow: inset 0 0 30px 15px #000000;
  }
}
/*============================================================== 
 Story
 ============================================================== */
.story {
  overflow: hidden;
}
.story li {
  display: none;
}
.story .active {
  display: block;
}
.story p {
  color: #ddd;
  font-size: 25px;
  margin-top: 40px;
  line-height: 40px;
  width: 650px;
  display: inline-block;
}
.story .story-img {
  height: 360px;
  position: relative;
  text-align: right;
  float: right;
}
.story .story-img:before {
  content: "";
  box-shadow: inset 0 0 30px 250px #000000;
  width: 405px;
  height: 100%;
  display: block;
  position: absolute;
  background: transparent;
  animation-name: image-in;
  animation-fill-mode: forwards;
  animation-duration: 2s;
}
.story .story-img img {
  width: auto;
  height: 100%;
}
.story .chapter-in p {
  animation-name: image-in;
  animation-fill-mode: forwards;
  animation-duration: 2s;
  animation-delay: 0.25s;
  margin-top: 20px;
  margin-bottom: 0px;
  opacity: 0;
}
.story .chapter-in .story-img:before {
  content: "";
  box-shadow: inset 0 0 30px 250px #000000;
}
.story .chapter-out p {
  animation-name: fade-in;
  animation-fill-mode: forwards;
  animation-duration: 2s;
  animation-delay: 0.25s;
  margin-top: 20px;
  margin-bottom: 0px;
  opacity: 0;
}
.story .chapter-out .story-img:before {
  content: "";
  box-shadow: inset 0 0 30px 250px #000000;
}

.story-nav {
  position: absolute;
  bottom: 20px;
  text-align: center;
  right: 0;
  left: 0;
  padding: 0 100px;
}
.story-nav .story-steps {
  display: inline-block;
}
.story-nav span {
  color: #fff;
  cursor: pointer;
  font-family: monospace;
  font-size: 26px;
  display: inline-block;
  vertical-align: super;
  opacity: 0.7;
}
.story-nav span:hover {
  opacity: 0.9;
}
.story-nav .story-position {
  float: right;
}
.story-nav .story-position i {
  width: 10px;
  height: 10px;
  display: inline-block;
  background: #f9f9f9;
  border-radius: 50%;
  margin: 10px 5px;
  cursor: pointer;
  opacity: 0.4;
}
.story-nav .story-position i.active {
  opacity: 1;
}
.story-nav .story-position span {
  margin: 0 20px;
}
.story-nav .story-music {
  float: left;
}
.story-nav .story-music span {
  width: 32px;
  height: 32px;
}
.story-nav .story-music span.play {
  background: url(../assets/images/audio-button.svg#play);
}
.story-nav .story-music span.pause {
  background: url(../assets/images/audio-button.svg#pause);
}
.story-nav .story-music span.volume {
  background: url(../assets/images/audio-button.svg#volume);
}
.story-nav .story-music span.muted {
  background: url(../assets/images/audio-button.svg#muted);
}
.story-nav .story-music span.reload {
  background: url(../assets/images/audio-button.svg#reload);
}

/*============================================================== 
 Game
 ============================================================== */
#game {
  text-align: center;
  font-family: sans-serif;
}
#game .backHome {
  opacity: 1;
}

.game {
  width: 400px;
  display: inline-block;
  position: relative;
  padding: 0 40px;
}
.game .turn {
  text-align: center;
  margin-bottom: 40px;
  color: #caa02f;
}
.game .turn img {
  vertical-align: middle;
  width: 40px;
}
.game .row {
  width: 100%;
  margin-bottom: -5px;
}
.game .row .box {
  width: 33%;
  position: relative;
  border: 2px dashed #ddd;
  margin-left: -6px;
  display: inline-block;
}
.game .row .box:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}
.game .row .box:first-child {
  border-left: 0;
}
.game .row .box:last-child {
  border-right: 0;
}
.game .row .box img {
  cursor: pointer;
  position: absolute;
  width: 80%;
  top: 10%;
  left: 10%;
  height: 80%;
}
.game .row:first-child .box {
  border-top: 0;
}
.game .row:last-child .box {
  border-bottom: 0;
}
.game #tictac {
  position: relative;
}
.game #tictac.win-y:after {
  transform: rotate(90deg);
  margin-top: 50%;
  top: -5px;
}
.game #tictac.win-d1:after {
  transform: rotate(45deg);
  margin-top: 50%;
}
.game #tictac.win-d2:after {
  transform: rotate(-45deg);
  margin-top: 50%;
}
.game #tictac.no-win:after {
  margin-top: -62px;
  left: calc(50% - 110px);
  width: 0;
}
.game #tictac:not(.no-win):after {
  width: 100%;
}
.game #tictac:after {
  content: "";
  width: 0;
  height: 0;
  top: 0;
  left: -5px;
  border: 5px solid #fff;
  position: absolute;
  border-radius: 5px;
  background: #fff;
  transition: all 1s;
}
.game #tictac.win-x-0:after {
  top: 16.6666666667%;
}
.game #tictac.win-y-0:after {
  left: -33.3333333333%;
}
.game #tictac.win-x-1:after {
  top: 50%;
}
.game #tictac.win-y-1:after {
  left: 0%;
}
.game #tictac.win-x-2:after {
  top: 83.3333333333%;
}
.game #tictac.win-y-2:after {
  left: 33.3333333333%;
}
.game:after {
  content: "";
  height: 100%;
  position: absolute;
  top: 0;
  right: -250px;
  width: 250px;
  background: #111;
  bottom: 0;
}
.game #game-win {
  position: absolute;
  left: 16.5%;
  font-size: 22px;
}
.game #game-win a {
  display: block;
  color: #fff;
  text-transform: uppercase;
  font-size: 14px;
}
.game #game-win a img {
  width: 22px;
  vertical-align: middle;
}

.game-options {
  display: inline-block;
  vertical-align: top;
  padding: 10px;
  text-align: center;
  width: 250px;
  box-sizing: border-box;
  position: relative;
}
.game-options h3 {
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
}
.game-options h4 {
  display: inline-block;
  color: #fff;
  font-size: 30px;
  margin-left: 10px;
  vertical-align: super;
}
.game-options img {
  width: 50px;
}
.game-options a {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 15px;
}

/*-- ============================================================== 
 Small Desktop & above all (1200px) 
 ============================================================== */
@media (max-width: 1200px) {
  .story p {
    width: 400px;
  }
}
/*-- ============================================================== 
 Ipad & above all(769px) 
 ============================================================== */
/*-- ============================================================== 
Phone and below (768px) 
============================================================== */
@media (max-width: 768px) {
  section:not(.controls) .back, section:not(.controls) .story-nav {
    opacity: 1;
  }
  .story p {
    font-size: 22px;
    width: 100%;
  }
  .story-nav {
    padding: 0;
    position: relative;
    left: 0;
    bottom: -20px;
  }
  .game {
    margin-bottom: 50px;
    max-width: 100%;
  }
  .game:after {
    display: none;
  }
  section {
    padding: 70px 40px;
  }
  .back {
    margin-left: -20px;
  }
}
@media (max-width: 500px) {
  section {
    padding: 50px 40px;
  }
  .back {
    margin-left: 0;
    margin-top: -20px;
  }
  .ornament {
    width: 100px;
  }
  .game {
    padding: 0;
  }
  .game #game-win {
    left: 0;
    padding: 20px;
    z-index: 99;
  }
  .story-nav > div {
    width: 100%;
  }
  .story-nav > div.story-position span {
    margin: 0;
  }
  .story .story-img img {
    width: 100%;
    height: auto;
  }
}