
@font-face {
  font-family: 'ToughAsNailsBB';
  src: local('ToughAsNailsBB'), url(assets/fonts/ToughAsNailsBB_reg.otf) format('opentype');
}

@font-face {
  font-family: 'ToughAsNailsBB';
  font-weight: 900;
  src: local('ToughAsNailsBB'), url(assets/fonts/ToughAsNailsBB_bold.otf) format('opentype');
}

@font-face {
  font-family: 'ToughAsNailsBB';
  font-style: italic;
  src: local('ToughAsNailsBB'), url(assets/fonts/ToughAsNailsBB_ital.otf) format('opentype');
}

@font-face {
  font-family: 'ToughAsNailsBB';
  font-style: italic;
  font-weight: 900;
  src: local('ToughAsNailsBB'), url(assets/fonts/ToughAsNailsBB_boldital.otf) format('opentype');
}

:root {
  --white: white;
  --newsPaper: rgb(231, 228, 221);
  --black: black;
  --darkGray: rgb(37, 37, 37);
  --bgColor: rgb(0, 0, 0);
  --textColorLight: white;
  --textColorDark: black;
  --textBubbleBg: rgb(235, 235, 235);

  --success: hsl(97, 34%, 34%);
  --danger: #f05010;
  --dangerHover: #f3591c;
  --navBtnColor: rgb(235, 235, 235);
  --btnColor: hsl(41, 100%, 47%);
  --btnFocusColor: hsl(44, 90%, 53%);
  --btnOnSelectColor: hsl(34, 88%, 52%);
  --btnSelectedColor: rgb(235, 235, 235);
  --btnBorder: hsl(34, 97%, 45%);
  --btnDisabledBorder: hsl(41, 100%, 47%);
}

* {
  font-family: 'ToughAsNailsBB', sans-serif;
  font-size: 20px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  background-color: var(--bgColor);
  margin: 0 auto;
}

h1 {
  color: var(--textColorLight);
  font-size: 1em;
  margin: 0.4em;
}

a, button {
  font-weight: 900;
  cursor: pointer;
}

footer {
  width: 100%;
  padding: 2.3em 1.5em;
  background-color: var(--white);
  display: flex;
  justify-content: flex-start;
}

footer > div {
  min-width: 700px;
  width: 60%;
  height: min-content;
  display: grid;
  grid-template-columns: repeat(2, 1fr) 0.8fr;
  gap: 1.5em;
}


.logo p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.7em;
  font-weight: normal;
  text-decoration: none;
  color: var(--black);
}

.logo svg,
.logo img {
  width: 100%;
  box-sizing: content-box;
}

.logo {
  display: grid;
  height: 100%;
  grid-template-columns: max-content 1fr;
  gap: 0.5em;
  align-items: center;
}

.logo a,
.logo a:hover,
.logo a:focus,
.logo a:active,
.logo a:focus-visible {
  padding: 0 0.2em;
  text-decoration: none;
  border: none;
  background-color: transparent;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.logo:not(.disabled) a:hover,
.logo:not(.disabled) a:focus-visible {
  border-bottom: 5px solid var(--btnFocusColor);
  margin-bottom: -5px;
}

.logo:not(.disabled) a:active {
  border-color: var(--btnColor);
}

.main-container {
  z-index: 4;
}

.start-page-wrapper {
  background-color: black;
  width: 100%;
  padding: 5%;
  padding-top: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

}

header {
  width: 100%;
  padding: 1em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.start-heading {
  text-align: center;
  font-size: 2rem;
  margin-bottom: .5rem;

  padding: 0 1% .5% 1%;
  border-bottom: 2px solid white;

}

@media (max-width: 950px) {
  .start-heading {
    margin-top: 50px;
  }
}

.start-subheading {
  margin: 0;
  color: lightgray;
  text-align: center;
  font-size: .9rem;
  max-width: 40vw;

  color: hsl(96, 15%, 57%);
  padding: .3%;
}

@media (max-width: 1100px) {
  .start-subheading {
    max-width: 70vw;
  }
}

#stories-wrapper {
  background-color: white;
  width: 100%;
  height: 100%;
  padding: 10px;

  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
}

#body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.scene-wrapper {
  height: 86%;
  position: relative;
  width: calc(86vh * 1.333);
  border: 8px solid var(--navBtnColor);
  box-sizing: content-box;
}

/* BACKGROUND & ANIMATIONS */

.bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.img-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.black-overlay {
  position: absolute;
  /* Apply for static filter */
  /* width: calc(100% + 50px);
  height: calc(100% + 50px);
  top: -50px;
  left: -50px;
  background: repeating-linear-gradient(#111, #111, 70%, rgba(175, 175, 175, 0.637), 30%, rgba(202, 202, 202, 0.815));
  background-size: 7px 7px;
  z-index: 3;
  filter: url(#noise) */
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--black);
}

.black-overlay svg {
  width: 100%;
  height: 100%;
}

.main-container {
  position: absolute;
  top: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}


.main-container.end-scene {
  justify-content: center;
  align-items: center;
  height: 100%;
}
.end-scene .content-container {
  width: 100%;
  height: 100%;
  overflow: auto;
  
}

.end-scene .text-container {
  margin: 5% 10%;
  background-color: var(--newsPaper);
  background-image: url(./assets/img/grain.svg);
  background-blend-mode: screen;
  margin-bottom: 2%;
  padding: 5% 10%;
  max-width: 100%;
  min-height: 120%;
}

.end-header {
  font-weight: bold;
  display: block;
  border: 5px solid var(--success);
  border-radius: 3px;
  transform: rotate(-7deg);
  color: var(--success);
  font-size: 1.5em;
  padding: 5px;
  margin-bottom: 1.2em;
  margin-left: -1em;
  /* margin-top: -.1em; */
  width: max-content;
}
.end-subheader {
  font-weight: bold;
  display: block;
  text-align: center;
}

.end-scene .content-container .text-wrapper {
  overflow: visible;
}

.end-scene .content-container .text {
  padding-bottom: 1em;
}

.end-scene .options {
  margin-top: 0;
  height: unset;
}

.end-scene .post-answer-wrapper {
  position: absolute;
  z-index: 4;
  bottom: 0;
  right: 3.8em;
  margin: 0;
}

.bg1, 
.bg2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.startpage-bg1,
.startpage-bg2 {
  position: absolute;
  width: 100%;
  height: auto;
}

/* if screen i narrower than image and higher than image */
@media (max-aspect-ratio: 40/34) {
  .scene-wrapper {
    width: 90%;
    position: relative;
    height: calc(90vw * 0.75);
    border: 8px solid var(--navBtnColor);
  }
  .bg-wrapper {
    align-items: flex-start;
  }
}

.laptop-wrapper {
  right: -10px;
  bottom: -12px;
  height: 200px;
  width: 270px;
  display: none;
  position: absolute;
}

.laptop-window {
  left: 30%;
  top: 10%;
  width: 60%;
  height: 50%;

  position: absolute;
  background-color: rgb(40, 40, 40);
}

.laptop {
  top: 0;
  left: 0;
  right: 0;
  margin: auto;

  position: absolute;
  height: 100%;
}

.stats-wrapper {
  top: 14%;
  right: 6%;
  height: 33.5%;
  width: 57.5%;
  display: none;
  justify-content: center;

  position: absolute;
  margin: 0 1em;
  padding: 9px;
  border-radius: 3px;
  color: rgb(83, 220, 83);
  font-family: "Source Code Pro", monospace;
  font-size: .8rem;
  
  animation: fadeIn 1s;
}

.stats-text {
  font-family: inherit;
  text-align: left;
  font-size: .5rem;
  display: flex;
  align-self: center;
  max-width: 50%;
}

.stats-text.loading {
  text-align: center;
  width: unset;
}

.donut-wrap {
  font-family: inherit;
  margin-right: 12px;
}

#donut {
  font-family: inherit;
  width: 100%;
  height: 100%;
}

/* percent text % */
.donut-wrap text {
  font-family: inherit;
  font-size: 1.2em;
  fill: rgb(83, 220, 83);
}

.anime-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.black-bg {
  background-color: black;
  height: 100%;
}

.flame {
  position: absolute;
  bottom: 34.5%;
  left: 4.7%;
  width: 15%;
  height: auto;
}

.guard {
  position: absolute;
  bottom: -17%;
  right: 0;
  width: 160%;
  height: 160%;
}

.shooting-star {
  position: absolute;
  
  width: .8%;
  height: 0;
  padding-bottom: .8%;
  
  border-radius: 50%;
  top: 50%;
  left: 50%;
  
  background-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 
  0 0 0 8px rgba(255, 255, 255, 0.1),
  0 0 20px rgba(255, 255, 255, 1);
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  height: 20%;
  width: 200px;

  background: linear-gradient(90deg, white, transparent)
}

.slightly-larger {
  width: 105%;
  top: unset;
  bottom: -2%;
}

.grow-bottom {
  top: unset;
  bottom: 0;
}

.from-right {
  left: 100%;
}

.hidden {
  opacity: 0;
}

.fade-out {
  opacity: 1;
}

.start-header {
  text-align: center;
  font-size: 1.5em;
}

#stories-wrapper {
  background-color: white;
  width: 100%;
  height: 100%;
  padding: 10px;

  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
}

/* each story */
.story-wrapper {
  display: inline-block;
  width: 50%;
  position: relative;
}


.story-wrapper:not(.story-playable) {
  filter: saturate(0%);
  cursor: default;
}

.story-wrapper.story-playable:hover::before,
.story-wrapper.story-playable:focus-within::before {
  position: absolute;
  top: 0;
  left: 0;  
  content: '';
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
}

.story-wrapper.story-playable {
  cursor: pointer;
}

.btn-style.play-btn {
  display: flex;
  flex-direction: row;
  max-width: max-content;
  margin: .3em;
  margin-top: .5em;
  float: right;
}

.title {
  background-color: white;
  border: 2px solid var(--black);
  position: absolute;
  bottom: 0;
  padding: .6em;
  left: 0;
  font-size: calc(0.7em + 0.5vw);
}

.description {
  background-color: white;
  position: absolute;
  padding: 1%;
  border: 2px solid var(--black);
  font-size: calc(0.6em + 0.5vw);
}

.story-1 > .title {
  bottom: 11%;
}

.story-1 > .description {
  width: 50%;
}

@media(max-width: 850px) {
  .story-1 > .description {
    width: 100%;
  }
}

.story-2 > .title {
  bottom: 20%;
}

.story-2 > .description {
  top: 17%;
  max-width: 90%;
}

.story-3 > .title {
  bottom: 20%;
  left: 7%;
}

.story-3 > .description {
  right: 0;
  top: 9%;
  max-width: 80%;
}

.story-4 > .description {
  top: 10%;
  max-width: 50%;
}

.start-story-bg {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  display: inline-block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

@supports (display: grid) {
  .story-wrapper {
    width: auto;
    min-height: 0;
  }
  
  .story-1 {
    grid-column: 1 / span 2;
    grid-row: 1 / 50;
    -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 75px), 0 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 75px), 0 100%);
  }

  .story-2 {
    grid-column: 1 / span 1;
    grid-row: 50 / 100;
    -webkit-clip-path: polygon(0 14%, 0 86%, 90% 81%, 100% 6%);
    clip-path: polygon(0 14%, 0 86%, 90% 81%, 100% 6%);
    margin-top: -73px;
  }

  .story-3 {
    grid-column: 2 / span 1;
    grid-row: 50 / 100;
    -webkit-clip-path: polygon(13% 6%, 4% 84%, 100% 100%, 100% 0%);
    clip-path: polygon(13% 6%, 4% 84%, 100% 100%, 100% 0%);
    margin-top: -73px;
    margin-left: -15%;
    margin-bottom: 18px;
  }

  .story-4 {
    grid-column: 1 / span 2;
    grid-row: 100 / 150;
    -webkit-clip-path: polygon(45% 0, 100% 15%, 100% 100%, 0 100%, 0 5%);
    clip-path: polygon(45% 0, 100% 15%, 100% 100%, 0 100%, 0 5%);
    margin-top: -107px;
  }

  @media (min-aspect-ratio: 4/3) {

    #stories-wrapper {
      background-color: white;
      width: 100%;
      height: 72vh;
      padding: 10px;
    
      display: grid;
      grid-gap: 10px;
      grid-template-columns: repeat(26, 1fr);
      grid-auto-rows: unset;
      grid-template-rows: repeat(20, 1fr);
    }
    .story-wrapper {
      display: inline-block;
      width: 100%;
      cursor: pointer;
      position: relative;
      min-height: 0;
    }
    
    /* green */
    .story-1 {
      grid-column: 1 / span 8;
      grid-row: 1 / span 20;
      -webkit-clip-path: polygon(0 0, 95% 0%, 80% 100%, 0 100%);
      clip-path: polygon(0 0, 95% 0%, 80% 100%, 0 100%);
    }
    .story-1 .start-story-bg {
      background-position: right center;
    }
    
    .story-1 > .title {
      top: 0;
      bottom: unset;
    }
    .story-1 > .description {
      top: 12%;
      width: 78%;
    }
    
    /* purple */
    .story-4 {
      grid-column: 8 / span 12;
      grid-row: 1 / span 11;
      -webkit-clip-path: polygon(92% 0%, 97% 85%, 0% 100%, 5% 0%);
      clip-path: polygon(92% 0%, 97% 85%, 0% 100%, 5% 0%);
      margin-top: 0;
    }

    .story-4 > .title {
      bottom: 16%;
      left: 6%;
    }
    .story-4 > .description {
      top: 0%;
      left: 6%;
      max-width: 51%;
    }
    
    /* yellow */
    .story-3 {
      grid-column: 7 / span 14;
      grid-row: 10 / span 11;
      -webkit-clip-path: polygon(7.5% 19%, 4% 100%, 97% 100%, 90.2% 4%);
      clip-path: polygon(7.5% 19%, 4% 100%, 97% 100%, 90.2% 4%);
      margin-top: 0;
      margin-left: 0;
      margin-bottom: 0;
    }
    .story-3 > .title {
      bottom: 0;
      left: unset;
      right: 8%;
    }

    .story-3 > .description {
      right: unset;
      left: 26%;
      top: 24%;
      max-width: 48%;
    }
      
    /* blue */
    .story-2 {
      grid-column: 19 / span 8;
      grid-row: 1 / span 20;
      -webkit-clip-path: polygon(0 0%, 20% 100%, 100% 100%, 100% 0%);
      clip-path: polygon(0 0%, 20% 100%, 100% 100%, 100% 0%);
      margin-top: 0;
    }

    .story-2 > .title {
      top: 10%;
      right: 0;
      left: unset;
      bottom: unset;
      max-width: 90%;
    }
    .story-2 > .description {
      top: unset;
      bottom: 12%;
      max-width: 70%;
      right: 0;
    }
  }
}

/* NAV */

.nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 5;
  margin: .2em;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

@media (max-width: 1570px) {
  .nav-in-story #nav-btn {
    font-size: 0.77em;
    padding: 5px;
  }
}

#nav-btn {
  --tooltipArrowSize: 6px;
  --tooltipBgColor: white;

  cursor: pointer;
  outline: none;
  background-color: var(--navBtnColor);
  color: var(--textColorDark);
  text-decoration: none;
  margin: 0.4em 0.2em;
  padding: .7em;
  border-radius: 50%;
  text-align: center;
  align-self: center;
  position: relative;
}
/* tool tip */
#nav-btn::before {
  content: attr(data-tooltip);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .7rem;
  position: absolute;
  top: calc(110% + 6px);
  right: 0;
  width: max-content;
  padding: .4rem;
  background-color: var(--tooltipBgColor);
  opacity: 0;
  display: none;
}

#nav-btn:hover::before {
  display: block;
  opacity: 1;
  transition: opacity 200ms;
  transition-delay: .5s;
}

#nav-btn span {
  display: flex;
  pointer-events: none;
}

#nav-btn svg {
  height: 1.3rem;
  pointer-events: none;
}

.restart {
  height: max-content;
  padding: .5rem;
  align-self: center;
  margin-right: 1vw;
}

.restart:hover {
  background-color: var(--btnFocusColor);
}

@supports selector(:focus-visible) {

  .restart:focus,
  svg:focus {
    outline: none;
  }

  .restart:focus-visible,
  #nav-btn:focus-visible {
    outline: 2px solid var(--btnBorder);
    outline-offset: 2px;
  }

}

.show-hide-nav {
  width: 120px;
  position: absolute;
  left: -130px; 
}

/* For dev only */
.jump-to-scene {
  display: none;

  background-color: rgb(255, 174, 174);
  border: 2px solid black;
  padding: 10px;
}

.text-container {
  z-index: 4;
  height: min-content;
  max-width: 25em;
  background-color: var(--textBubbleBg);
  padding: 15px;
  border-radius: 3px;
  border: 2px solid var(--black);
  position: relative;
}

.text-container .btn-style {
  position: absolute;
  bottom: 0;
  right: 0;
}

.text-wrapper {
  overflow-y: auto;
  width: 100%;
}



.text {
  align-self: flex-start;
}

a, button {
  font-weight: 900;
  border: 2px solid var(--darkGray);
}

a:focus:focus-visible {
  outline: none;
}

#nav-btn:hover {
  background-color: lightgray;
}

#nav-btn:active {
  background-color: lightgray;
}

.next-btn-wrapper button {
  cursor: pointer;
  margin: 0;
}

.next-btn-wrapper button:disabled,
.next-btn-wrapper button[disabled] {
  background-color: lightgray;
  pointer-events: none;
  box-shadow: -4px 4px 0 0 gray;
  border: 2px solid black;
}

.post-answer-wrapper { 
  position: absolute;
  bottom: 1em;
  right: 1em;
  margin: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.post-answer-wrapper.isShowing {
  height: min-content;
}

/* so they don't take up space when they are not rendered */
.loader-wrapper,
.end-stats-wrapper,
.stats-wrapper {
  display: none;
}

.loader-wrapper {
  justify-content: center;
  align-items: center;
  margin: 1em;

  background-color: var(--textBubbleBg);
  padding: 15px;
  border-radius: 3px;
  border: 2px solid var(--black);
}

.end-stats-wrapper {
  margin-top: 2%;
  padding: 1%;
}

.end-stats-wrapper .header {
  display: grid;
  grid-template-columns: 1fr minmax(90px, 20%);
  align-items: center;
  margin-bottom: .4em;
}

.end-stats-wrapper hr {
  height: 4px;
  border-style: dashed;
  background-color: var(--textColorDark);
}

.end-stats-wrapper img {
  width: 100%;
}

.end-stats-wrapper > h1 {
  color: black;
  font-weight: 900;
  font-size: 0.9em;
  margin: 0;
  margin-bottom: .5em;
}

.end-stats-wrapper > p {
  font-size: 0.8em;
  margin: 0;
  margin-bottom: 1.2em;
}

.options {
  margin-top: 0.5em;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  overflow: auto;
}

.btn-grid {
  padding-left: 1.5em;
  display: flex;
  flex-flow: column wrap;
  max-height: -webkit-fill-available;
  justify-content: space-between;
}

.btn-style {
  text-decoration: none;
  position: relative;
  display: block;
  max-width: 14em;
  margin: 2em;
  margin-top: 0;
  cursor: pointer;
  background-color: var(--btnColor);
  border: 2px solid var(--btnBorder);
  box-shadow: -4px 4px 0 0 var(--btnBorder);
  border-radius: 5px;
  padding: .4em .8em;
  color: var(--textColorDark);
  outline: none;
  animation: fadeIn 0.5s;
  display: inline-block;
  transition: background-color 0.1s ease-in-out;

  border-color: var(--darkGray);
  box-shadow: -4px 4px 0 0 var(--darkGray);
  background-color: var(--btnColor);
}

.btn-grid div:nth-child(even) {
  margin-left: .3em;
}
.btn-grid div:nth-child(3) {
  margin-top: .6em;
  margin-left: .1em;
}

.btn-style:focus,
.btn-style:hover {
  background-color: var(--btnFocusColor);
  box-shadow: -4px 4px 0 0 var(--btnBorder);
  border: 2px solid var(--btnBorder);
}

@supports selector(:focus-visible) {
  
  .btn-style:focus-visible {
    outline: 6px solid var(--btnBorder);
  }

}
/* Pointer next to button */
/* .btn-style:focus:not(.btn-disabled):not(.next-btn-wrapper button)::after,
.btn-style:hover:not(.btn-disabled):not(.next-btn-wrapper button)::after {
  position: absolute;
  top: calc(50% - 15px);
  left: -2.5em;
  content: url(./assets/img/pointer.svg);
  display: inline-block;
  -webkit-transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  transform: rotate(90deg);
  width: 20px;
} */

.restart-btn-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.restart-btn-wrapper button {
  background-color: var(--danger);
  border: 2px solid var(--black);
  box-shadow: -4px 4px 0 0 var(--black);
}

.restart-btn-wrapper button:focus,
.restart-btn-wrapper button:hover {
  background-color: var(--dangerHover);
}

.restart-btn-wrapper button:active {
  background-color: var(--danger);
}

/* Pointer next to button */
/* .next-btn-wrapper button:focus:not(.btn-disabled)::after,
.next-btn-wrapper button:hover:not(.btn-disabled)::after {
  position: absolute;
  top: calc(50% + 20px);
  left: -1.8em;
  content: url(./assets/img/pointer.svg);
  display: inline-block;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  width: 20px;
} */

/* @media (max-width: 760px) {
  .next-btn-wrapper button:focus:not(.btn-disabled)::after,
  .next-btn-wrapper button:hover:not(.btn-disabled)::after {
    left: -40px;
    top: -4px;
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
    width: 20px;
  }
} */

.btn-style:active {
  background-color: var(--btnOnSelectColor);
}

.btn-disabled {
  pointer-events: none;
}

.btn-disabled:not(.btn-selected) {
  visibility: hidden;
}

.btn-selected {
  background-color: var(--btnSelectedColor);
  border-color: var(--black);
  box-shadow: -4px 4px 0 0 var(--black);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* end stats */

.end-stats > h1 {
  color: var(--textColorDark);
  font-weight: 900;
  text-decoration: underline;
  font-size: 0.9em;
  margin: 1em 0 .5em 0;
}

.end-stats > p {
  font-size: 0.8em;
  margin: 0;
}

/* MEDIA QUERIES - LARGE */

@media (max-width: 1100px) {
  button {
    font-size: .8em;
  }
}

/* MEDIA QUERIES - MEDIUM */

@media (max-width: 760px) and (orientation: portrait) {

  #body {
    margin-top: 3em;
    align-items: flex-start;
    height: 100vh;
    overflow: hidden;
  }
  .scene-wrapper {
    height: unset;
    width: 90vw;
    border: none;

  }
  
  .bg-wrapper {
    height: calc(90vw * 0.75);
    position: unset;
    border: 8px solid var(--navBtnColor);
    margin-bottom: .5em;
  }

  .nav {
    justify-content: space-between;
  }

  .show-hide-nav {
    width: 60px;
    left: -67px;
  }

  #nav-btn {
    font-size: 0.77em;
    padding: 5px;
  }

  .main-container {
    position: unset;
    height: unset;
    top: unset;
    margin: unset;
    max-width: 100%;
    overflow: auto;
  }
  
  .text-container {
    padding: 15px;
    max-height: calc(calc(90vh - calc(90vw * 0.75)) - 1.5em);
    max-width: unset;
    position: unset;
    overflow: auto;
  }

  .end-scene .text-container {
    position: relative;
    margin: 0;
  }

  .text-container .btn-style {
    position: inherit;
    float: right;
    margin: 0;
    margin-right: -2em;
  }

  .text,
  .btn-style {
    font-size: 0.8em;
  }

  .options {
    width: 100%;
    height: calc(90vw * 0.75);
    position: absolute;
    top: 0;
    left: 0;
    padding: 2em 1em;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    overflow: visible;
  }
  
  .btn-grid {
    padding-left: 0;
    justify-content: flex-start;
    margin: .5em;
    flex-flow: row wrap; 
    max-width: calc(100vw - 250px);
  }

  .btn-style:focus:not(.btn-disabled)::after,
  .btn-style:hover:not(.btn-disabled)::after {
    display: none;
  }

  .btn-style {
    padding: 5px 5px;
  }

  .post-answer-wrapper {
    z-index: 5;
    right: 0;
    margin: 0;
  }

  .next-btn-wrapper {
    position: unset;
    margin-right: .5em;
  }
  
  .next-btn-wrapper button {
    z-index: 5;
    margin: 13px;
  }

  .stats-wrapper {
    flex-direction: row;
    justify-content: space-evenly;
  }

  .donut-wrap {
    margin: 0;
  }

  .stats-wrapper > p {
    width: 50%;
  }
}

/* STORY 2 ANIMATIONS */
.limousine {
  opacity: 0;
  position: absolute;
  top: 0;
  width: auto;
  height: 100%;

  left: -25%;
}


/* MEDIA QUERIES - MOBILE LANDSCAPE */

@media (max-width: 850px) and (orientation: landscape) {
  .bg-wrapper {
    height: 100%;
    position: absolute;
  }
  
  .text-wrapper {
    overflow-y: auto;
  }

  .btn-grid {
    left: 2em;
    top: unset;
  }

  .next-btn-wrapper button {
    margin: 10px 0 0;
  }

  .btn-selected {
    text-align: start;
    display: inline-flex;
    align-items: center;
    flex-direction: row;
  }
}

@media (max-height: 750px) { 
  .btn-style {
    font-size: .8em;
  }

  .story-4 > .description {
    max-width: 81%;
  }
  
  .story-3 > .description {
    left: 9%;
    max-width: 81%;
  }
}

@media (max-width: 800px) {
  .text {
    font-size: 0.8em;
  }
  .btn-style {
    font-size: 0.65em;
  }

  .laptop-wrapper {
    right: -5px;
    bottom: -10px;
    height: 180px;
    width: 243px;
  }
}

/* MOBILE LANDSCAPE */

@media (max-height: 500px) and (orientation: landscape) { 
  .options {
    justify-content: space-between;
  }

  .btn-grid {
    flex-wrap: none;
  }
  .btn-style {
    font-size: .7em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 1em;
    max-width: unset;
  }
  .btn-disabled:not(.btn-selected) {
    display: none;
  }
}

/* MOBILE PORTRAIT */

@media (max-width: 560px) and (orientation: portrait) { 
  .main-container {
    background-color: var(--textBubbleBg);
    border: 2px solid var(--black);
    height: calc(calc(90vh - calc(90vw * 0.75)) - 1.5em);
  }
  
  .end-scene {
    max-height: calc(90vh - calc(90vw * 0.75));
    background-color: transparent;
  }
  
  .end-scene .content-container {
    min-height: 100%;
    overflow: auto;
  }
  
  .end-scene .text-container {
    min-height: 100%;
    margin: 0;
  }
  
  .end-scene .post-answer-wrapper {
    right: -1em;
    bottom: 0.5em;
  }


  .text-container {
    border: none;
    max-height: unset;
    overflow: visible;
  }

  .text-container .btn-style {
    position: unset;
    float: unset;
    margin: 0.5em;
  }
  .text-wrapper {
    padding-right: 0;
  }
  .options {
    justify-content: space-between;
    position: unset;
    height: unset;
    width: unset;
    padding: 0;
  }

  .btn-grid {
    max-width: unset;
  }

  .laptop-wrapper {
    right: -40px;
    bottom: -32px;
  }

  .post-answer-wrapper {
    bottom: 0px;
  }

  .laptop-window {
    height: 43%;
  }

  
  .btn-disabled:not(.btn-selected) {
    visibility: visible;
    opacity: .5;
    background-color: rgb(172, 172, 172);
    border-color: rgb(172, 172, 172);
    box-shadow: -4px 4px 0 0 gray;
  }
}

@media (max-width: 800px) {
  .logo p {
    font-size: 0.5em;
  }
  footer > div {
    min-width: 480px;
    gap: 0.8em;
  }
  .logo {
    gap: 0.2em;
  }
}

@media (max-width: 550px) { 
  footer {
    flex-wrap: wrap;
    padding-top: 1.5em;
  }

  footer > div {
    grid-template-columns: unset;
    width: 25%;
    min-width: 180px;
    grid-template-rows: 1fr 1fr 20%;
  }
}

@media (max-width: 450px) {

  .show-hide-nav {
    width: 50px;
    left: -57px;
  }

  #nav-btn {
    font-size: 0.55rem;
    padding: 5px;
  }
}

/* Accessibility */

.sr-only {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}