@font-face {
  font-family: JLSSpace;
  src: url(fonts/JlsspacegothicRnc-n2zY.otf);
}

@font-face {
  font-family: JLSGothic;
  src: url(fonts/JlsdatagothicCnc-yyz3.otf);
}


:root {
    --clr-primary: rgb(255, 139, 0);
    --clr-primary-100: rgb(243, 188, 122);
    --clr-dark: #000; 
    --clr-neutral: rgb(54, 54, 54);
    --clr-nav-bg: radial-gradient(circle at 24.1% 68.8%, rgb(50, 50, 50) 0%, rgb(0, 0, 0) 99.4%);
    --clr-nav-btn-bg:  radial-gradient(circle at 24.1% 68.8%, rgb(50, 50, 50) 0%, rgb(0, 0, 0) 99.4%);
    --ff-body: 'Space Mono', monospace;
    /* 'Share Tech Mono', monospace; */
    --ff-heading: JLSSpace;
    --ff-accent: JLSGothic;
    --fw-normal: 400;
    --fw-bold: 700;
    --fs-base: 1.625rem;
    --fs-heading: 4rem;
    --fs-sub-heading: 3rem;
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
* {
  margin: 0;
  padding: 0;
  /* 
  font: inherit: 
     resets font sizes of all headings etc  
     forces people to use the proper classes 
  */
  font: inherit;   
  outline: none;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'], 
li {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
ul[class],
ol[class],
figure,
blockquote {
  margin: 0;
  padding: 0;
}

p, 
h1, 
h2, 
h3, 
h4, 
h5, 
h6 {
overflow-wrap: break-word;
}

li {
    text-transform: uppercase;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-size: var(--fs-base);
    font-family: var(--ff-body);
    color: var(--clr-dark);
    font-weight: var(--fw-normal);

    /* push nav and footer apart  */
    display: flex;
    flex-direction: column;

    /*prevent any overflows from mobile nav*/
    overflow-x: hidden; 
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

a {
  font-weight: var(--fw-bold);
  text-decoration: none;
  color: inherit;
  /* makes entire "button" clickable */
  display: block;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  /* max-width: 370.8px; */
  height: auto;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* flex utility class */
.flex {
  display: flex;
  gap: var(--gap, 1rem);
}

/* styles the logo */
h1 { 
  max-width: 20rem;
  min-width: 13rem;
  margin: 2rem;
}

/* primary page heading (other than logo) */
h2 {
    font-family: var(--ff-heading);
    font-size: var(--fs-heading);
    color: var(--clr-primary);
    font-weight: var(--fw-normal);
    text-align: center;
}

h3 {
  font-family: var(--ff-accent);
  font-size: var(--fs-sub-heading);
  color: var(--clr-primary);
  font-weight: var(--fw-normal);
  text-align: center;
}

/* ***header styles*** */
.primary-header {
  width: 100%;
  /* background-color: var(--clr-dark); */
  background: var(--clr-nav-bg);
  align-items: center;
  justify-content: space-between;
  height: 15rem;
}

.primary-navigation {
  /* justify-content: space-between; */
  backdrop-filter: blur(1rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

/* hide the button on desktop view */
.mobile-nav-toggle {
  display: none;
}

/* make the button span text available only to screenreaders */
.sr-only {
  display: none;
}

nav {
  margin-right: 2rem;
}

/* style the main "body" */
main { 
  display: flex;
  flex-grow: 1; /*take up all available height space*/
  flex-direction: column;
  width: min(90%, 1000px);
  height: 100%;
  margin-inline: auto;
}

/* style the main section container */
.main-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  gap: 1rem;
  margin-bottom: 2rem;
}

.to-top {
  background-color: var(--clr-primary);
  position: fixed;
  bottom: 1rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity:0;
  pointer-events: none;
  transition: all .4s;

  outline: none;
}

.to-top.active {
  /* change how far from the bottom the button is */
  bottom: 1rem;
  pointer-events: auto;
  opacity: 0.9;
}

.to-top:hover {
  background-color: var(--clr-primary-100);
}

.up-icon {
  width: 2.8rem;
  height: 1.3em;
}

.home-page-container {
  display: flex;
}

/* .home-page-image {
  width: 50%;
  height: 50%;
} */

.about-page-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.about-image {
  border: 4px solid var(--clr-dark);
  outline: 5px solid var(--clr-primary);
}

footer {
  background-color: var(--clr-dark);
  color: var(--clr-primary);
  text-align: center;
}

/* style the basic button used throughout */
.nav-button {
  width: 11rem;
  height: 4rem;
  /* border-radius: 30px; */
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 0.25rem;  
}

.episode-button {
  width: 10rem;
  height: 2.5rem;
  /* border-radius: 30px; */
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 0.25rem;  
}

.comic-page-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* style the navigation button */
.nav-button{
  border: 5px solid var(--clr-primary);
  /* background-color: var(--clr-dark); */
  background: var(--clr-nav-btn-bg);
  color: var(--clr-primary);
}

.nav-button:hover {
  /* background-color: var(--clr-neutral); */
  border: 5px solid var(--clr-primary-100);
  color: var(--clr-primary-100);
} 

/* style the episode button */
.episode-button {
  background-color: var(--clr-primary);
  border: 4px solid var(--clr-dark);
  color: var(--clr-dark);
}

.episode-button:hover {
  background-color: var(--clr-primary-100);

}

.episode-list {
  display: flex;
  gap: 2rem;

  flex-direction: column;
}  

.episode-list-button {
  width: 20rem;
  height: 5rem;
  border: 5px solid var(--clr-primary);
  background-color: var(--clr-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.25rem; 
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.episode-list-button:hover {
  background-color: var(--clr-primary-100);
  border-color: var(--clr-primary-100);
}

.episode-list-button:active {
  background-color: var(--clr-primary-100);
  border-color: var(--clr-primary-100);
}

.episode-list-item-icon {
  height: 3rem;
  width: 3rem;
}

.comic-page-bottom-links {
  justify-content: center;
  align-items: center;
  gap: 4rem;
}

.page-navigation {
  width: 9rem;
  height: 3.5rem;
  border: 5px solid var(--clr-primary);
  background-color: var(--clr-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding-left: 0.5rem;
  padding-right: 0.5rem;

  font-weight: var(--fw-bold);
  letter-spacing: 0.25rem; 

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.page-navigation:hover, .page-navigation:active {
  background-color: var(--clr-primary-100);
  border-color: var(--clr-primary-100);
}

.left-rounded-border {
  border-top-left-radius: 80px 80px;
  border-bottom-left-radius: 80px 80px;
}

.right-rounded-border {
  border-top-right-radius: 80px 80px;
  border-bottom-right-radius: 80px 80px;
}

.page-navigation-icon {
  height: 2.8rem;
  width: 1.3em;
}

.episodes-icon {
  height: 5rem;
  width: 5rem;
}

.icon-transform {
  transform: rotate(50deg);

}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/**/
@media (max-width: 35em) {
  .primary-navigation {
      /* prevents disappearing if scrolling */
      position: fixed;
      z-index: 1000;
      /* shorthand for top bottom left right */
      /* position fixed */
      inset: 0 0 0 30%;
      /*makes the list stack*/
      flex-direction: column; 
      padding: min(30vh, 10rem) 2em;
      /* push the menu off the screen, hidden */
      transform: translateX(100%);
      transition: transform 250ms ease-out;
      --gap: 3rem;

      display: flex;
      /* justify-content: center; */
      align-items: center;
      background: hsl(0 0% 0% /0.5);

  }

  /* margin utility class to control mobile nav list height */
  .top-margin {
    margin-top: 7rem;
  }

  /* if the element has data-visible set to true, then 
  make the navigation visible again */
  .primary-navigation[data-visible="true"] {
      transform: translateX(0%);
  }

  /* here so the button is only appearing at smaller screen size */
  .mobile-nav-toggle {
      display: block;
      position: absolute;
      z-index: 9999; /* puts on top of everything else */
      background-color: transparent;
      background-image: url("/assets/hamburger-orange.png");
      background-repeat: no-repeat;
      width: 3rem;
      border: 0;
      aspect-ratio: 1; /*width and height are same*/
      top: 2rem;
      right: 2rem;
  }

  /* change the menu toggle image when the aria-expanded is set to true,
  happens when data-visible is also set to true */
  .mobile-nav-toggle[aria-expanded="true"] {
      background-image: url("/assets/closed-orange.png");
  }

  /* make header shorter*/
  .primary-header {
    height: 10rem;
  }

  /* keep logo at certain size on mobile */
  h1 { 
    max-width: 13rem;
    margin: 2rem;
  }

  .episode-list {
    flex-direction: column;
  }

  /* makes main body take up full width of smaller screens */
  main {
    width: 100%;
  }

  .nav-button {
  background-color: var(--clr-dark);
  }

  .nav-button:active {
    border: 5px solid var(--clr-primary-100);
    color: var(--clr-primary-100);
  } 

  .main-section {
    /* text-align: center; */
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .episodes-icon {
    height: 5rem;
    width: 5rem;
  }

  .comic-page-bottom-links {
    gap: 1.2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .page-navigation {
    letter-spacing: 0.20rem; 
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-navigation-icon {
    height: 2.3rem;
    width: 1em;
  }
}

/* make the nav buttons stack in between desktop and mobile view */
@media (min-width:35rem) and (max-width:900px) {
  .primary-navigation {
      color: var(--clr-light);
      background-color: transparent;
      padding: 3rem;

      display: flex;
      flex-direction: column;
  }

  .primary-header {
    width: 100%;
    /* flex-direction: column; */
  }

  .episode-list {
    flex-direction: column;
  }

  .comic-page {
    max-width: 20.25rem;
  }
}