/* ------------------- */
/* Fonts               */
/* ------------------- */

/* Adobe fonts  */
@import url("https://use.typekit.net/dui0wne.css");

/* Icomoon fonts */
@font-face {
  font-family: "icomoon";
  src: url("../fonts/icomoon.eot?ojy48f");
  src: url("../fonts/icomoon.eot?ojy48f#iefix") format("embedded-opentype"),
    url("../fonts/icomoon.ttf?ojy48f") format("truetype"),
    url("../fonts/icomoon.woff?ojy48f") format("woff"),
    url("../fonts/icomoon.svg?ojy48f#icomoon") format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: "icomoon" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering  */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-chevron-left:before {
  content: "\e900";
}

.icon-rotate-ccw:before {
  content: "\e901";
}

/* ------------------- */
/* CSS Variables       */
/* ------------------- */

:root {
  --clr-white: #f9ebe8;
  --clr-black: #231d1d;
  --clr-cyan: #7dffff;

  --text-primary: "magistral", sans-serif;

  --base-grid-size: 4rem;
  --scale-factor: 8vw;
}

/* ------------------- */
/* CSS Reset           */
/* ------------------- */

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

html {
  /* Makes calculating REM units easier */
  font-size: 62.5%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

body {
  font-family: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  line-height: 1.5;
  min-height: 100vh;
  color: var(--clr-white);
  background-color: var(--clr-black);
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Remove animations for users who have turned them off */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------- */
/* Button Styles       */
/* ------------------- */

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 1.5rem;
  width: 150px;
  height: 35px;
  border: solid 1px var(--clr-cyan);
  border-radius: 5px;
  color: var(--clr-cyan);
  background-color: var(--clr-black);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.button:hover {
  background-color: var(--clr-cyan);
  color: var(--clr-black);
}

.button:active {
  transform: scale(0.95);
}

/* ------------------- */
/* Main Menu Styles    */
/* ------------------- */

.menu {
  position: absolute;
  width: 90%;
  max-width: 600px;
  min-width: 300px;
  height: 640px;
  border-radius: 30px;
  clip-path: polygon(8% 0%, 100% 0, 100% 92%, 92% 100%, 0 100%, 0% 8%);
}

.menu-frame {
  background-color: var(--clr-white);
  transform: scale(1.01);
}

.menu-content {
  display: flex;
  flex-direction: column;
  padding-block: 40px;
  padding-inline: 20px;
  background-color: var(--clr-black);
}

.menu-title {
  width: 100%;
  height: 50px;
}

.title-border {
  background-color: var(--clr-cyan);
  height: 5px;
  border: none;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 10px;
  margin: 20px auto;
}

.loading-bar {
  width: 75%;
}

.battery-meter {
  width: 20%;
}

.menu-design-elements {
  display: flex;
  width: 100%;
  height: 80px;
  justify-content: space-between;
}

.barcode {
  width: 35%;
  height: 100%;
}

.k-triangle {
  width: 20%;
  height: 100%;
}

.prototype {
  width: 35%;
  height: 100%;
}

.interactive-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: url("../images/menu/radar-background.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 300px;
  border: 2px solid var(--clr-white);
  border-radius: 15px;
  margin-inline: auto;
  overflow: hidden;
  filter: drop-shadow(0 0 50px #2bfed436);
}

.interactive-menu-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  align-items: center;
  gap: 20px;
}

.interactive-menu-text {
  font-size: 1.5rem;
  margin-block: -7px;
}

.instructions-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  position: relative;
  padding: 1rem;
  color: var(--clr-cyan);
  font-size: 1.3rem;
}

.instructions-button {
  width: 50px;
  position: absolute;
  bottom: 5%;
  right: 1%;
  cursor: pointer;
}

.instructions-back-button {
  margin-top: 10px;
}

/* Main Menu Media Queries */
@media screen and (min-width: 400px) {
  .menu-title {
    margin-block: 10px;
  }

  .menu-content {
    gap: 5px;
    padding-inline: 30px;
  }

  .interactive-menu-text {
    font-size: 1.7rem;
  }

  .instructions-button {
    width: 60px;
    right: 3%;
  }
}

@media screen and (min-width: 520px) {
  .menu-title {
    margin-block: 15px;
  }

  .menu-content {
    gap: 15px;
  }

  .instructions-text {
    padding: 1.5rem;
    font-size: 1.4rem;
  }
}

@media screen and (min-width: 670px) {
  .menu-content {
    padding-inline: 40px;
    gap: 20px;
  }

  .interactive-menu {
    height: 230px;
  }

  .instructions-text {
    font-size: 1.5rem;
  }
}

/* ------------------- */
/* Grid Styles         */
/* ------------------- */

.grid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.grid-heading {
  font-size: 2.5rem;
  text-align: center;
  color: var(--clr-cyan);
  position: relative;
  text-shadow: rgba(186, 242, 245, 0.6) 0px 0px 27px;
}

.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(
    4,
    calc(var(--base-grid-size) + var(--scale-factor))
  );
  grid-template-rows: repeat(
    4,
    calc(var(--base-grid-size) + var(--scale-factor))
  );
  padding: 2rem;
  gap: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  filter: drop-shadow(0 0 50px #ffffff36);
  animation: glow-pulse 5s infinite ease-in-out;
}

/* Grid Media Queries */
@media screen and (min-width: 800px) {
  .grid {
    grid-template-columns: repeat(4, 10rem);
    grid-template-rows: repeat(4, 10rem);
  }
}

/* -------------------- */
/* Grid Tile Styles     */
/* -------------------- */

.tile {
  position: relative;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  cursor: pointer;
  outline: 0.1px solid #ffffff86;
  outline-offset: 5px;
  border-radius: 1px;
  user-select: none;
}

.tile-face,
.tile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tile-face {
  filter: drop-shadow(0 0 5px #b3fffbac);
}

.tile-back {
  background: var(--clr-cyan);
  background-size: cover;
  backface-visibility: hidden;
}

.reveal-tile {
  transform: rotateY(180deg);
}

/* ------------------------ */
/* Countdown Bar Styles     */
/* ------------------------ */

.countdown-bar-container {
  width: 100%;
  opacity: 1;
}

.countdown-bar {
  display: flex;
  flex-direction: row-reverse;
  width: 80%;
  height: 5px;
  background: var(--clr-cyan);
  border: var(--clr-cyan) 0.1px solid;
  transform: skew(-25deg);
  transition: all 1s ease;
  margin-inline: auto;
  animation: glow-pulse 5s infinite ease-in-out;
}

.time-remaining {
  background: var(--clr-black);
  width: 0%;
  height: 100%;
}

/* -------------------------- */
/* UI Template Screen Styles  */
/* -------------------------- */

.ui-template-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  z-index: 10;
}

.access-granted {
  transform: scale(1.3);
}

.victory-video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.warning-triangle {
  width: 70%;
  max-width: 250px;
  animation: warning-flash 2s infinite;
}

/* -------------------*/
/* 404 Page Styles    */
/* -------------------*/

.page-404-image {
  max-width: 300px;
  transform: translateX(8%);
}

/* ------------------- */
/* Utility Styles      */
/* ------------------- */

.no-click {
  pointer-events: none;
}

.hide {
  display: none;
}

.highlight-text {
  color: var(--clr-white);
}

.warning-flash {
  animation: warning-flash 1s infinite;
}

.glitch-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 10;
}

.crt::before {
  content: " ";
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.06),
      rgba(0, 255, 0, 0.02),
      rgba(0, 0, 255, 0.06)
    );
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  border-radius: 15px;
  pointer-events: none;
}

.crt::after {
  content: " ";
  display: block;
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: 15px;
  animation: flicker 0.15s infinite;
}

/* ------------------- */
/* CSS Animations      */
/* ------------------- */

@keyframes flicker {
  0% {
    opacity: 0.27861;
  }
  5% {
    opacity: 0.34769;
  }
  10% {
    opacity: 0.23604;
  }
  15% {
    opacity: 0.90626;
  }
  20% {
    opacity: 0.18128;
  }
  25% {
    opacity: 0.83891;
  }
  30% {
    opacity: 0.65583;
  }
  35% {
    opacity: 0.67807;
  }
  40% {
    opacity: 0.26559;
  }
  45% {
    opacity: 0.84693;
  }
  50% {
    opacity: 0.96019;
  }
  55% {
    opacity: 0.08594;
  }
  60% {
    opacity: 0.20313;
  }
  65% {
    opacity: 0.71988;
  }
  70% {
    opacity: 0.53455;
  }
  75% {
    opacity: 0.37288;
  }
  80% {
    opacity: 0.71428;
  }
  85% {
    opacity: 0.70419;
  }
  90% {
    opacity: 0.7003;
  }
  95% {
    opacity: 0.36108;
  }
  100% {
    opacity: 0.24387;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 5px #00ffff14,
      0 0 10px #00ffff2e, 0 0 10px #00ffff16, 0 4px 25px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 7px #00ffff, 0 0 14px #00ffff, 0 0 7px #00ffff14,
      0 0 14px #00ffff2e, 0 0 14px #00ffff16, 0 4px 27px rgba(0, 0, 0, 0.12);
  }
}

@keyframes warning-flash {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
