@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&family=Ubuntu:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
html{
  scroll-behavior: smooth;
}

body {
  margin: 0px;
  box-sizing: border-box;
  color: #202020;
  font-family: 'source serif 4';
  background-color: #f6f6f6;
}

#logo {
  height: 3rem;
}

h1, h2 {
  font-family: 'source serif 4';
}

h1 {
  display: inline;
  margin: 0 auto;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 600;

  span {
    color: #5d5d5d;
  }
}

h2 {
  font-weight: 500;
  margin: 0 auto;
  margin-bottom: 1.5rem;
}

p {
  line-height: 1.6rem;
}

header {
  margin-top: 1rem;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#logo-container {
  display: flex;
  align-items: center;
}

header a {
  min-height: min-content;
}

main {
  margin: 1rem;
}

.section {
  padding: 12rem 0;
}

#phonemic { 
  margin-left: 0.8rem;
  font-size: 1.5rem;
  color: #5d5d5d;
}

#hero {
  /* Accounting for the height of the top bar and padding */
  height: calc(100vh - 80px - 12rem);
  max-height: 600px;
  min-height: 350px;
  padding: 10rem 0 0;

  #title {
    width: 100%;
    text-align:center;
    margin-bottom: 1.5rem;
  }
  p{
    text-align: center;
    max-width: 350px;
    margin: auto;
  }
  #learn-more {
    display: inline-block;
    font-size: 0.9rem;
    font-style: italic;
    text-decoration: underline;
    cursor: pointer;
    color: #5d5d5d;
    text-align: center;
    margin-top: 1rem;
    width: 100%;
  }
}

.download-link {
  margin: auto;
  margin-top: 2rem;
  text-align: center;
  background-color: #202020;
  color: #f6f6f6;
  padding: .75rem;
  display: block;
  width: 8rem;
  text-decoration: none;
  border-radius: .25rem;
}

#motivation-container {
  text-align: center; 
}

/** How it works */ 
#how-it-works-container h2 {
  text-align: center; 
  margin-bottom: 4rem;
}

.split-container {
  display: grid; 
  grid-template-rows: max-content 1fr;
}
.split-left {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.split-right {
  display: flex;
  justify-content: center;
}
.split-right img {
  width: 100%;
  object-fit: contain;
  border: linear-gradient(212deg, rgba(63,63,63,1) 0%, rgba(42,42,42,1) 100%) solid;
  border-width: 1.5rem 1.5rem  3.25rem;
}
#ereader-border {
  padding: 1.5rem 1.5rem 3.25rem 1.5rem;
  position: relative;
  background: linear-gradient(212deg, #3F3F3F 0%, #2A2A2A 100%);
  max-width: 20rem;
  border-radius: 1rem;
}

.max-width {
  max-width: 40rem;
}

#how-it-works-list {
  padding-left: 0;
  list-style: none;
  margin: auto;

  li {
    margin-bottom: 7rem;
    display: flex;
    align-items: start;
    line-height: 1.6rem;

    img {
      margin-top: .30rem;
      margin-right: 1.25rem;
    }
  }

  .how-it-works-graphic-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 2rem 0 4rem;
  }
  #wiki-input {
    height: 2rem;
    width: 18rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #d3d3d3;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
  }
  #convert{
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    min-height: 200px;
    width: 325px;
    padding: 1rem; 
    display: flex;
    justify-content: center;
    align-items: center;

    pre {
      margin: 0;
      white-space: pre-wrap;
      word-wrap: break-word;
      word-break:break-all;
      overflow-wrap: break-word;
    }
  }

  #arrow {
    width: 0.75rem;
    height: 0.75rem;
    background-color: #f6f6f6;
    border: 2px #d3d3d3;
    border-style: none solid solid none;
    border-radius: 0.25rem 0 0 0;
    /* This translate moves the arrow in place */
    transform: translate(5.5rem, 10.77rem) rotate(45deg);
  }
  #definition-container {
    border: 2px #d3d3d3 solid;
    border-radius: 0.25rem;
    padding: 1rem;
    min-width: 315px;
    max-width: 350px;

    h3 {
      margin: 0 0 0.5rem 0;
      font-weight: 500;
    }
    p {
      margin: 0;
      font-size: 0.90rem;
      line-height: 1.2rem;
    }
  }
  #book-text {
    text-indent: 1rem; 
    height: 5rem;
    font-size: 1.25rem;
    background-image: linear-gradient(180deg, rgba(0,0,0,1) 20%, rgba(255,255,255,0) 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
  }
}

footer {
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  p {
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
  }
}

/* download */
#download-container {
  margin: auto;
  padding-top: 7rem;
  text-align: center;
}


#logo-container{
  a {
    /* height of logo */
    height: 48px;
  }
}

#download-links-container {
  margin: 2.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  .link {
    text-decoration: none;
    color: #202020;
    border: 1px #202020 solid;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    width: 64px;
    font-size: 0.8rem;
    margin: 0 0.25rem;

    &:hover {
      background-color: #d3d3d380;
    }

    img {
      height: 28px;
      margin-bottom: 0.5rem;
    }
  }
}

#faq-container {
  margin: 12rem 0 12rem;
  text-align:left;

  h2 {
    text-align: center;
  }

  details {
    font-weight: bold;
    padding: 1rem 0 1rem 0;

    summary {
      cursor: pointer;
    }

    &:first-of-type{
      border-top: 1px #d3d3d3 solid;
    }
    border-bottom: 1px #d3d3d3 solid;

    p, ol {
      font-weight: normal;
    }
  } 
}

.disclaimer-text {
  font-size: 0.8rem;
  font-style: italic
}

/* 404 */
#notfound-container {
  margin: auto;
  padding-top: 7rem;
  text-align: center;
}

@media (min-width: 48rem){
  header {
    margin-top: 1.5rem;
    padding: 0 1.5rem;
  }

  #hero {
    padding-top: 7rem;
    max-height: unset;
  }
  .section {
    padding: 9rem 0;
    max-width: 64rem;
    margin: auto;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  #definition-container {
    margin-bottom: 2.5rem;
  }

  .expanse {
    font-size: 1.1rem;
  }

  .split-container {
    grid-template-columns: 0.75fr 1fr;
    grid-template-rows: 1fr;
    grid-gap: 2rem;
  }
  .split-left {
    margin-bottom: 4rem;
  }
  .split-right {
    justify-content: right;
  }

  #how-it-works-list li {
    display: flex;
    align-items: start;
    margin-bottom: 4rem;
  }

  #download-container {
    justify-content: start;
  }
}

/* Loader */
/* https://loading.io/css */

.lds-ellipsis {
  color: #5d5d5d;
}
.lds-ellipsis,
.lds-ellipsis div {
  box-sizing: border-box;
}
.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 104px;
  height: 80px;
}
.lds-ellipsis div {
  position: absolute;
  top: 33.33333px;
  width: 23.33333px;
  height: 23.33333px;
  border-radius: 50%;
  background: currentColor;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 16px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 48px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 72px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}
