@import "variables.css";

:root {
  --cover-wrapper-width: 30%;
  --cover-wrapper-pad-left: 4rem;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1rem 1rem 0;
  background-color: var(--secondary-color);
}

#appearing-title {
  background-color: var(--highlight-color);
  font-size: calc(var(--xl-font-size) - 0.5rem);
  font-family: "Bebas Neue", sans-serif;
  top: 0;
  left: 0;
  z-index: 11;
  width: var(--cover-wrapper-width);
  padding: 0.9rem 0 0.5rem var(--cover-wrapper-pad-left);
  transition: opacity 1s ease; /* transition opacity */
}

#appearing-title.show {
  display: block; /* make it visible */
  opacity: 1; /* fully opaque */
}

#appearing-title a {
  color: var(--secondary-color);
}

h1 a {
  text-decoration: none;
  color: var(--primary-color);
}

nav ul {
  list-style-type: none;
}

nav ul li {
  display: inline; /* Display list items horizontally */
}

nav ul li a {
  color: var(--primary-color);
  text-decoration: none;
  margin-left: 10px;
  font-size: var(--med-font-size);
  transition: text-decoration 1s ease; /* TODO: make left to right */
}

nav ul li a:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

.banner {
  width: 100%;
  height: 70vh;
  margin: 0;
  background: url("../banner.png") no-repeat center center fixed;
  background-size: cover;
  background-position: center center -40px;
}

.cover-wrapper {
  position: relative;
  top: 50vh;
  padding: 2rem 0rem 1rem var(--cover-wrapper-pad-left);
  background-color: var(--highlight-color);
  width: 30%;
  z-index: 9;
}

h1 {
  position: relative;
  color: var(--secondary-color);
}

.cover-wrapper p {
  position: relative;
  font-family: "Bebas Neue", sans-serif;
  font-style: normal;
  color: var(--secondary-color);
  font-size: calc(var(--med-font-size) + 0.5rem);
}

@media (max-width: 768px) {
  .banner {
    width: 100%;
    height: 80vh;
    margin: 0;
    background: url("../banner.png") no-repeat fixed;
  }

  .cover-wrapper {
    width: 85%;
    top: 50vh;
    /* height: 10vh; */
  }

  .nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1rem 2.25rem 0;
    background-color: var(--secondary-color);
  }
  .scroll-arrow {
    bottom: 5rem;
  }
  #appearing-title {
    width: 80%;
    padding: 0.2rem 0 0.05rem var(--cover-wrapper-pad-left);
    background-color: var(--secondary-color);
  }

  .fa-bars {
    display: block;
    z-index: 12;
    color: var(--primary-color);
  }

  #appearing-title a {
    color: var(--primary-color);
  }

  .drawer {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 10rem;
  }

  .drawer .contents ul {
    text-align: right;
  }

  .drawer .contents ul li {
    padding-top: 10px;
  }

  .drawer .contents ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: calc(var(--med-font-size) + 0.2rem);
    font-family: "Bebas Neue", sans-serif;
    font-style: normal;
  }

  .drawer button.controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    appearance: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    background-color: var(--secondary-color);
  }

  .drawer button.controls .fa-bars {
    order: 2;
    font-size: 1.5rem;
  }

  .drawer button.controls:after {
    font-family: Arial, sans-serif;
    font-size: 10px;
  }

  .drawer button.controls .fa {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 5px;
  }

  .drawer .contents {
    height: 0;
    overflow: hidden;
    padding: 0 10px;
    box-sizing: border-box;
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transition: height 0.5s, padding 0.5s;
  }

  .drawer.open .contents {
    height: 14rem;
    overflow: auto; /* Allow content to scroll if it exceeds the height */
    padding: 30px 10px 10px 10px;
  }
}

@media (max-width: 425px) {
  .cover-wrapper {
    width: 80%;
  }

  #appearing-title {
    width: 80%;
    padding: 0 0 0 1rem;
  }
}
