/* --------------------------- */
/* Vars & Helper Functions */
/* --------------------------- */
:root {
  --screen-width: 320px;
  --screen-height: 560px;
  --header-bg-color: #9A1212;
  --splash-bg-color: #9A1212;
}

/* calculate a circle's circumference based on radius */
/* (CSS doesn't have functions, so we'll pre-calculate the circumference based on the radius used) */
/* --------------------------- */
/* Main Navigation Menu */
/* --------------------------- */
.nav{
  position: relative;
  margin-top: 13px;
}
.nav__toggle {
  display: inline-block;
  position: absolute;
  z-index: 10;
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
  right: 15px;
  top: 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.15s linear;
}

.nav__toggle:hover,
.nav__toggle:focus {
  background-color: rgba(54, 54, 54, 0.5);
}
.nav__menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  position: fixed;
  z-index: 5;
  list-style: none;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
}

.nav__item {
  transition: all 0.5s ease-in-out; 
}

.nav__item:nth-child(1) {
  transform: translateY(-40px);
}

.nav__item:nth-child(2) {
  transform: translateY(-80px);
}

.nav__item:nth-child(3) {
  transform: translateY(-120px);
}

.nav__link {
  color: white;
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 1.25rem;
  text-decoration: none;
  padding: 1rem;
}

.nav__link:hover,
.nav__link:focus {
  outline: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

/* --------------------------- */
/* SVG Menu Icon */
/* --------------------------- */
.menuicon {
  display: block;
  cursor: pointer;
  color: #363636;
  transform: rotate(0deg);
  transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.menuicon:hover {
  color: #FFF;
}

.menuicon__bar,
.menuicon__circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.menuicon__bar {
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 0.25s ease-in-out;
}

.menuicon__circle {
  transition: stroke-dashoffset 0.3s linear 0.1s;
  stroke-dashoffset: 144.5132620651;
  /* circumference(23) pre calculated */
  stroke-dasharray: 144.5132620651;
  /* circumference(23) pre calculated */
}

/* --------------------------- */
/* Circular Splash Background */
/* --------------------------- */
.splash {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 1px;
  height: 1px;
}

.splash::after {
  content: "";
  display: block;
  position: fixed;
  border-radius: 50%;
  background-color: var(--splash-bg-color);
  width: 284vmax;
  height: 284vmax;
  top: -142vmax;
  right: -142vmax;
  transform: scale(0);
  transform-origin: 50% 50%;
  transition: transform 0.5s cubic-bezier(0.755, 0.05, 0.855, 0.06);
  will-change: transform;
  z-index: 4;
}

/* --------------------------- */
/* Active State */
/* --------------------------- */
.nav:target > .splash::after,
.nav--open > .splash::after {
  transform: scale(1);
}

.nav:target .menuicon,
.nav--open .menuicon {
  color: white;
  transform: rotate(180deg);
}

.nav:target .menuicon__circle,
.nav--open .menuicon__circle {
  stroke-dashoffset: 0;
}

.nav:target .menuicon__bar:nth-child(1),
.nav:target .menuicon__bar:nth-child(4),
.nav--open .menuicon__bar:nth-child(1),
.nav--open .menuicon__bar:nth-child(4) {
  opacity: 0;
}

.nav:target .menuicon__bar:nth-child(2),
.nav--open .menuicon__bar:nth-child(2) {
  transform: rotate(45deg);
}

.nav:target .menuicon__bar:nth-child(3),
.nav--open .menuicon__bar:nth-child(3) {
  transform: rotate(-45deg);
}

.nav:target .nav__menu,
.nav--open .nav__menu {
  opacity: 1;   
  visibility: visible; 
}

.nav:target .nav__item,
.nav--open .nav__item {
  transform: translateY(0);
}