:root {
  --curtain-open-distance: 360px;
  --transition-speed: 0.7s;
}

html {
  background: #030300;
  background: linear-gradient(180deg, rgba(3, 3, 0, 1) 0%, rgb(21, 36, 20) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.stage-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
}

.curtains {
  position: absolute;
  height: 57vh;
  z-index: 1;
  top: 21vh;
  justify-self: center;

}

.curtain {
  position: absolute;
  height: 100%;
  transition: transform var(--transition-speed) cubic-bezier(.65,.05,.36,1);
}

.left {
  left: 50%;
  transform: translateX(-100%);
}

.right {
  right: 50%;
  transform: translateX(100%);
}

.curtains.open .left {
  transform: translateX(calc(-100% - var(--curtain-open-distance)));
}

.curtains.open .right {
  transform: translateX(calc(100% + var(--curtain-open-distance)));
}

.enter-btn {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  font-size: 18px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.enter-btn:hover {
    background-color: red;
}

.enter-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.stage-frame {
  position: absolute;
  height: 100vh;
  object-fit: cover;
  z-index: 3;
  pointer-events: none;
  justify-self: center;
}

.interaction-zone {
  position: absolute;
  width: 49vw;
  height: 59vh;
  top: 52%;
  left: 50.5%;
  transform: translate(-50%, -50%);
  z-index: 2;
  /* border: green 1px solid; */
  .intro-text {
    z-index: 10;
    color: white;
    text-align: center;
    font-size: clamp(0.9em, 1.5vw, 1.8em);
    padding-top: 20px;
    opacity: 0;
    transition: 1.5s ease all;
  }
  .intro-text.visible {
    opacity: 1;
  }
  #continue-btn {
    display: none;
    opacity: 0;
    text-decoration: none;
    justify-self: center;
    padding-top: 15px;
    button {
      background: #046A38;
      border: #030300 1.5px solid;
      font-size: clamp(0.9em, 1vw, 1.5em);
      color: white;
      padding: 10px 60px;
      cursor: pointer;
    }
  }
  .options-card {
    margin-top: 30px;
    justify-self: end;
    margin-right: 20px;
    background-color: #F1E7D3;
    width: min(630px, 60%);
    height: auto;
    min-height: 180px;
    padding: 20px 15px;
    display: none;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 15px;
    transition: all .6s ease;
    .option-page {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: min-content min-content;
      row-gap: 16px;
      column-gap: 16px;
      p {
        font-size: clamp(1em, 1.1vw, 1.7em);
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
      }
      button {
        font-size: clamp(0.9em, 1vw, 1.7em);
        background-color: white;
        border: #046A38 1.5px solid;
        color: #030300;
        padding: 5px 6px;
        transition: all .25s ease;
      }
      button.disabled {
        pointer-events: none;
        background-color: rgb(129, 129, 129);
        border: none;
        color: #03030060;
      }
      button.active {
        background-color: #046A38;
        color: white;
      }
    }
    #next-btn {
      background: #046A38;
      border: #030300 1.5px solid;
      font-size: clamp(0.9em, 1vw, 1.5em);
      color: white;
      padding: 10px 60px;
      margin-top: 10px;
      cursor: pointer;
    }
    .option-page {
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
      display: none;
    }
    .option-page.active {
      display: grid;
      opacity: 1;
    }
  }
}

.horace-cont {
  margin: 0 27% 6%;
  align-self: end;
  align-content: end;
  pointer-events: none;
  /* border: 1px solid blue; */
  z-index: 5;
  position: absolute;
  img {
    height: clamp(150px, 55vh, 460px);
  }
  #horace-1 {
    display: block;
    opacity: 1;
    transition: .6s ease all;
  }
  #horace-2 {
    display: none;
    opacity: 0;
    padding-left: clamp(80px, 15vw, 200px);
    transition: .6s ease all;
  }
  #horace-3 {
    display: none;
    opacity: 0;
    padding-left: clamp(60px, 12vw, 150px);
    transition: .6s ease all;
    height: clamp(200px, 45vh, 460px) !important;
  }
  #horace-4 {
    display: none;
    opacity: 0;
    transition: .6s ease all;
  }
}

.rope-cont {
  width: min-content;
  /* border: 1px solid blue; */
  z-index: 10;
  #rope-btn {
    display: grid;
    cursor: pointer;
    background-color: transparent;
    border: none;
    width: min-content;
    height: min-content;
    transition: all .5s ease;
    margin-top: -50px;
    img {
      width: clamp(70px, 6vw, 140px);
      margin-left: 20px;
      grid-column: 1;
      grid-row: 1;
      transition: all .4s ease;
    }
    #rope1 {
      opacity: 1;
      z-index: 11;
    }
    #rope2 {
      opacity: 1;
      z-index: 6;
    }
  }
  #rope-btn:hover {
    margin-top: 0;
    #rope1 {
      opacity: 0;
    }
  }
}

#stage-1 {
  opacity: 1;
  transition: 1s ease all;
}

#stage-2 {
  opacity: 0;
  transition: 1s ease all;
}

/* Chromebook and small laptop screens (max 1366px height or 768px height) */
@media (max-height: 800px) {
  .interaction-zone {
    height: 55vh;
    width: 45vw;
    .intro-text {
      font-size: clamp(0.8em, 1.4vw, 1.2em);
      padding-top: 15px;
    }
    .options-card {
      margin-top: 20px;
      min-height: 150px;
      padding: 15px 12px;
      row-gap: 10px;
      .option-page {        
        row-gap: 10px;
        column-gap: 10px;
      }
    }
  }
  .horace-cont {
    margin-bottom: 4%;
    img {
      height: clamp(120px, 40vh, 400px);
    }
    #horace-3 {
      height: clamp(160px, 54vh, 400px) !important;
    }
  }
  .settings-overlay .content {
    .settings-tabs {
      margin-top: 30px;
      gap: 10px;
      .tab {
        min-height: 20px;
        padding: 8px 12px;
      }
    }
  }
}

/* Very small screens / tablets */
@media (max-width: 900px) {
  .interaction-zone {
    width: 60vw;
    .options-card {
      width: 100%;
      margin-right: 0;
      justify-self: center;
    }
  }
  .settings-overlay .content .settings-tabs {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 15px;
    .tab {
      width: 90%;
    }
  }
}

/* Mobile screens */
@media (max-width: 600px) {
  .interaction-zone {
    width: 75vw;
    .intro-text {
      font-size: 0.85em;
      padding-top: 10px;
    }
    #continue-btn button {
      padding: 8px 40px;
      font-size: 0.9em;
    }
    .options-card {
      padding: 12px 10px;
      min-height: 140px;
      .option-page button {
        font-size: 0.85em;
        padding: 4px 5px;
      }
      > button {
        padding: 8px 40px;
      }
    }
  }
  .horace-cont {
    margin: 0 20% 5%;
  }
  .rope-cont #rope-btn img {
    width: 60px;
    margin-left: 15px;
  }
}
