@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
* {
    margin: 0;
    padding: 0;
}
#mainmenu {
    backdrop-filter: blur(2px) saturate(0.5);
    height: 100%;
    width: 100%;
    background: linear-gradient(-125deg, #000000FC, #000000F0, #000000EC, #464222D0);
    position: fixed;
    bottom: 0;
    left: 0;
    display: none;
    mask-image: radial-gradient(farthest-corner at 0% 90%, black,black,black,black, var(--size),
    transparent,transparent,transparent,transparent);
    transition: --size 1.25s;
}
#compass {
    display: block;
    position: fixed;
    top: calc(100% - 7rem);
    left: 0rem;
    z-index: 10;
}
.menuIsOpen {
  --size:100%;
}
.hex:hover {
    scale: 1.15;
    z-index: 10;
    transition: scale 0.25s ease-in;
    filter: drop-shadow(3px 6px 1rem black);
}
#compassimg {
   height: 7rem;
   width: 7rem;
   position: fixed;
   z-index: 1;
}
#compassimg:hover, #compassimg.hovered {
  scale: 115%;
  filter: drop-shadow(0 0 2.5rem #fc04) drop-shadow(3px -2px 0.25rem #ff0c);
  transition: scale 0.4s, filter 0.2s;
}
.glow {
    filter: drop-shadow(0 0 2.5rem #fc04) drop-shadow(3px -2px 0.25rem #ff0c);
}
#hexGrid {
  display: flex;
  flex-wrap: wrap;
  width: 65%;
  margin: 0 auto auto;
  overflow: hidden;
  padding: 2rem;
  font-size: 15px;
  list-style-type: none;

}
@property --size {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

.hex {
  top: 0;
  left: 0;
  position: relative;
  visibility:hidden;
  outline:1px solid transparent; /* fix for jagged edges in FF on hover transition */
  filter: drop-shadow(10px 4px 8px #0008);
}
.hex::after{
  content:'';
  display:block;
  padding-bottom: 86.602%;  /* =  100 / tan(60) * 1.5 */
}
.hexIn{
  position: absolute;
  width:99%;
  padding-bottom: 114.31%; /* =  width / sin(60) */
  margin:0 0;
  overflow: hidden;
  visibility: hidden;
  outline:2px solid transparent; /* fix for jagged edges in FF on hover transition */
  -webkit-transform: rotate3d(0,0,1,-60deg) skewY(30deg);
      -ms-transform: rotate3d(0,0,1,-60deg) skewY(30deg);
          transform: rotate3d(0,0,1,-60deg) skewY(30deg);
}
.hexIn * {
  position: absolute;
  visibility: visible;
  outline:2px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hexLink {
    display:block;
    width: 100%;
    height: 100%;
    text-align: center;
    color: #fff;
    overflow: hidden;
    outline:2px solid black;
    -webkit-transform: skewY(-30deg) rotate3d(0,0,1,60deg);
        -ms-transform: skewY(-30deg) rotate3d(0,0,1,60deg);
            transform: skewY(-30deg) rotate3d(0,0,1,60deg);
}

/*** HEX CONTENT **********************************************************************/
.hex img {
  left: -100%;
  right: -100%;
  width: auto;
  height: 100%;
  margin: 0 auto;
  -webkit-transform: rotate3d(0,0,0,0deg);
      -ms-transform: rotate3d(0,0,0,0deg);
          transform: rotate3d(0,0,0,0deg);
}

.hex h1, .hex p {
  width: 100%;
  padding: 5%;
  box-sizing:border-box;
  margin: 0 0;
  color: #fff;
  height: 100%;
  width: 100%;
  background-color: #0008;
  background-blend-mode: multiply;
  font-weight: 700;
  text-shadow: 1px 1px black, 0 0 1rem black;
  -webkit-transition:  -webkit-transform .4s ease-in-out, opacity .5s ease-in-out;
          transition:          transform .4s ease-in-out, opacity .5s ease-in-out;
}
.hex h1 {
  bottom: 50%;
  padding-top:98%;
  font-size: 1.5em;
  font-family: 'Ibarra Real Nova';
  z-index: 1;
  background-position: 65% -495%;
  background-size: 125%;
  -webkit-transform:translate3d(0,-100%,0);
      -ms-transform:translate3d(0,-100%,0);
          transform:translate3d(0,-100%,0);
}
.hex h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 45%;
  width: 10%;
  text-align: center;
  border-bottom: 1px solid #fff;
}
.hex p {
  top: 50%;
  padding-bottom:50%;
  font-family: 'Raleway';
  font-weight: 500;
  font-size: 0.9em;
  background-position: 65% 715%;
  background-size: 125%;
  -webkit-transform:translate3d(0,100%,0);
      -ms-transform:translate3d(0,100%,0);
          transform:translate3d(0,100%,0);
}


/*** HOVER EFFECT  **********************************************************************/
.hexLink:hover h1, .hexLink:focus h1, .hexLink.hovered h1,
.hexLink:hover p, .hexLink:focus p, .hexLink.hovered p {
  -webkit-transform:translate3d(0,0,0);
      -ms-transform:translate3d(0,0,0);
          transform:translate3d(0,0,0);
}
.hexOpen {
    scale: 1.2;
    z-index: 1;
    transition: scale 1s ease-out, color 0.25s, top 1s ease-out, left 1s ease-out;
    filter: drop-shadow(0 0 1rem #66fc) brightness(1.1) contrast(1.1);
    position: relative;
    top: -1.25rem;
    left: -1.25rem;
}
.hexOpen p {
  color: #0000 !important;
  text-shadow: none;
  background-color: #0000 !important;
}
.hexOpen h1 {
  color: #0000 !important;
  text-shadow: none;
  background-color: #0000 !important;
}
.hexOpen h1::after {
  border-bottom: none;
}

/*** HEXAGON SIZING AND EVEN ROW INDENTATION *****************************************************************/
@media (min-width:1201px) { /* <- 5-4  hexagons per row */
  #hexGrid{
    padding-bottom: 5.4%
  }
  .hex {
    width: 25%; /* = 100 / 4 */
  }
  .hex:nth-child(7n+1){ /* first hexagon of even rows */
    margin-left:12.5%;  /* = width of .hex / 2  to indent even rows */
  }
  .hex h1 { font-size: 1.85rem; } 
  .hex p { font-size: 1.1rem; }
  #compass {
    top: calc(100% - 14rem);
    left: 2rem;
  }
  #compassimg {
    width: 12rem;
    height: 12rem;
  }
}

@media (max-width: 1200px) and (min-width:901px) { /* <- 4-3  hexagons per row */
  #hexGrid{
    padding-bottom: 5.5%
  }
  .hex {
    width: 33.333%; /* = 100 / 3 */
  }
  .hex:nth-child(5n+1){ /* first hexagon of even rows */
    margin-left:16.6667%;  /* = width of .hex / 2  to indent even rows */
  }
  .hex h1 { font-size: 1.72rem; }
  .hex p { font-size: 1rem; }
  #compass {
    top: calc(100% - 11rem);
    left: 1rem
  }
  #compassimg {
    width: 10rem;
    height: 10rem;
  }
  
}

@media (max-width: 900px) and (min-width:601px) { /* <- 3-2  hexagons per row */
  #hexGrid{
    padding-bottom: 7.4%
  }
  .hex {
    width: 50%; /* = 100 / 2 */
  }
  .hex:nth-child(3n+1){ /* first hexagon of even rows */
    margin-left:25%;  /* = width of .hex / 2  to indent even rows */
  }
  .hex h1 { font-size: 1.6rem; }
  .hex p { font-size: 0.95rem; }
  #compass {
    top: calc(100% - 9rem);
    left: 0.5rem;
  }
  #compassimg {
    width: 8.5rem;
    height: 8.5rem;
  }
}

@media (max-width: 600px) { /* <- 2-1  hexagons per row */
  #hexGrid{
    padding-bottom: 11.2%
  }
  .hex {
    width: 50%; /* = 100 / 3 */
  }
  .hex:nth-child(3n+3){ /* first hexagon of even rows */
    margin-left:25%;  /* = width of .hex / 2  to indent even rows */
  }
}

@media (max-width: 400px) {
    #hexGrid {
        font-size: 13px;
    }
    .hex h1 {
      padding-top: 91%;
      font-size: 1.33em;
    }
    .hex p {
      font-size: 0.8em;
    }
}
