/********** FONTS ***********/
@font-face {
  font-family: "Fondamento";
  src: url('/assets/fonts/fondamento-regular.ttf');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Cardo";
  src: url('/assets/fonts/Cardo-Regular.ttf');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Cardo";
  src: url('/assets/fonts/Cardo-Italic.ttf');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Cardo";
  src: url('/assets/fonts/Cardo-Bold.ttf');
  font-weight: bold;
  font-style: normal;
}

body {
  /* background-color: #f9f9f7; */
  background-color: white;
  color: #282c34;
  margin: 0;
  padding-top: 60px;
  font-family: "Cardo",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.home-page {
  padding-top: 0;
}

/********** ANIMATIONS ***********/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
    padding: 3.5rem 2rem 7rem 2rem;
    max-width: 640px;
    margin: 0 auto;

    h1 {
      font-family: "Fondamento";
      font-size: 2.80rem;
      margin-bottom: 3.46rem;
      text-align: center;
      opacity: 0;
      animation: fadeIn 1s ease-out forwards;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
    }

    h1 .title-part1 {
      font-size: 2.80rem;
      line-height: 1;
    }

    h1 .title-part2 {
      font-size: 3.08rem;
      line-height: 1;
    }
    /* h2 { font-style: italic; margin-bottom: 4rem; font-size: 1.73rem; font-weight: 600; } */
    h2 {
      font-family: 'Fondamento';
      font-size: 1.73rem;
      margin-bottom: .2rem;
    }

    h3 {
      text-align: center;
      font-variant: small-caps;
      margin-top: 0;
      margin-bottom: 0.25rem;
    }

    /* Fade in content after title */
    > *:not(h1) {
      opacity: 0;
      animation: fadeIn 1s ease-out 1s forwards;
    }
    .moons {
      margin-bottom: 2.80rem;
      p { text-indent: 0; }
      img { margin-right: .35rem; }
    }
    p { 
      text-align: justify;
      font-size: 1.07rem; 
      text-indent: 2rem;
      line-height: 1.8rem;
      margin-top: 0;
      margin-bottom: 0;
    }
    a { text-decoration: none; }
}

/* H1 spacing on chapter pages */
body.chapter-page main h1 {
  margin-bottom: 5rem;
}

/* All caps for h2 on chapter pages */
body.chapter-page main h2 {
  text-transform: uppercase;
  font-family: 'Cardo';
  font-size: 1.1rem;
}

/* Style h3 same as h2 on chapter pages */
body.chapter-page main h3 {
  text-transform: uppercase;
  font-family: 'Cardo';
  font-size: 1.0rem;
  text-align: left;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

/* Section spacing on chapter pages */
body.chapter-page main section {
  margin-bottom: 4rem;
}

/********** NAVIGATION ***********/
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-home {
    color: #282c34;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    font-variant: small-caps;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-home:hover {
    color: rgba(40, 44, 52, 0.6);
}

.nav-logo {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-family: 'Fondamento';
    color: #282c34;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-variant: small-caps;
}

.nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/********** BUTTON ***********/
.button {
    font-family: 'Fondamento';
    display: inline-block;
    padding: 9px 21px;
    margin-top: 2rem;
    border: 1px solid rgb(125, 136, 141);
    border-radius: 2px;
    background-color: rgba(125, 136, 141, 0.15);
    color: rgb(125, 136, 141);
    text-decoration: none;
    font-size: 1rem;
    text-indent: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.2);
    transform: rotate(-0.5deg);
    transition: all 0.2s ease;
    position: relative;
}

.button:hover {
    transform: rotate(0.5deg) translateY(-2px);
    box-shadow: 3px 5px 6px rgba(0, 0, 0, 0.25);
    background-color: rgba(125, 136, 141, 0.25);
}

/* Center button when inside a paragraph */
p .button {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

/********** HOME PAGE ***********/
.arc-text {
    display: block;
    margin: 0 auto 0.125rem auto;
    width: 100%;
    max-width: 500px;
}

.arc-text text {
    font-family: 'Fondamento';
    font-size: 1.73rem;
    fill: #282c34;
}

main > img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 42.1875%;
    max-width: 42.1875%;
}
