@import "./theme.css";
@import "./utilities.css";
@import "./animations.css";
@import "../fontello/css/fontello.css";
@import "./coffee.css";
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
  margin: 0.5rem;
  background-color: var(--background-color);
  background-repeat: no-repeat;
  background-position: left top;
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  max-width: 100vw;
}

body.no-scroll {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--shade-500);
  text-decoration: none;
}

.link-btn {
  display: inline-block;
  border: 2px solid var(--grey-color);
  background-color: transparent;
  border-radius: 2em;
  padding: 1em 2em;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  transition: border 500ms, background-color 500ms, color 500ms;
}

.link-btn:hover,
.link-btn:focus {
  outline: none;
  color: var(--background-color);
  background-color: var(--shade-500);
  border-color: var(--shade-500);
}

button {
  border: none;
  background-color: transparent;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--shade-500);
  cursor: pointer;
}

button:hover,
button:focus {
  color: var(--text-color);
}

nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background-color: var(--background-color);
  transition: top 500ms;
}

nav.js-nav {
  opacity: 0;
}

.js-nav.visible {
  z-index: 50;
  animation: fade-in 0.6s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

.js-nav.visible.scroll-up {
  top: 0;
}

.js-nav.visible.scroll-down {
  top: -20%;
}

.js-nav.hidden {
  animation: fade-out 0.6s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  margin: -1em 0;
  flex: 1 0 auto;
  justify-content: flex-end;
  align-items: center;
}

.nav-links .link {
  position: relative;
  margin: 1em;
  color: var(--text-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links .link:before {
  content: "";
  z-index: -1;
  position: absolute;
  background-color: var(--secondary-color);
  bottom: 0;
  left: 0;
  width: 50vw;
  height: 50%;
  max-width: 0;
  transition: max-width 500ms;
  overflow-x: hidden;
}

.nav-links .link:hover,
.nav-links .link:focus {
  outline: none;
}

.nav-links .link:hover:before,
.nav-links .link:focus:before,
.nav-links .link.active:before {
  max-width: 90vw;
}

.js-nav .nav-controls {
  padding-left: 1rem;
  display: flex;
  align-items: center;
}

.js-nav .nav-controls .hamburger {
  width: 1.5rem;
  margin: 0 1.5rem;
  height: 0.75rem;
  position: relative;
}

.js-nav .nav-controls .hamburger:before,
.js-nav .nav-controls .hamburger:after {
  content: "";
  position: absolute;
  height: 2px;
  width: 100%;
  background-color: var(--shade-500);
  left: 0;
  margin: auto;
  transition: transform 500ms;
}

.nav-controls .hamburger:before {
  top: 0;
}

.nav-controls .hamburger:after {
  bottom: 0;
}

.nav-controls .hamburger.active:before {
  bottom: 0;
  transform: rotate(45deg);
}

.nav-controls .hamburger.active:after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-controls .control {
  display: none;
  font-size: 1rem;
  padding: 0;
}

.js-nav .nav-controls .control {
  display: inline-block;
}

.nav-controls .control:hover,
.nav-controls .control:focus {
  outline: none;
  animation: rotate-center 2s ease-in-out both infinite;
}

.nav-logo {
  position: relative;
  line-height: 1;
  font-size: 1.1rem;
}

.logo {
  text-align: center;
  font-size: 1.25rem;
  color: var(--shade-500);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.theme-container {
  position: absolute;
  padding: 2rem;
  right: 0;
  top: 4.5rem;
  margin-right: 1em;
  display: flex;
  flex-direction: column;
  background-color: var(--shade-100);
  opacity: 0;
  box-shadow: 0px 0 10px 1px rgb(0 0 0 / 20%);
  border-radius: 0.25em;
  visibility: hidden;
}

.theme-container.visible {
  visibility: visible;
  animation: fade-in-top 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

.theme-container .theme-select {
  text-align: left;
  padding: 0;
}

.theme-container .theme-select + .theme-select {
  margin-top: 1em;
}

.theme-select .theme-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 0.25em;
  margin-bottom: 0.5em;
  display: inline-block;
  position: relative;
}

.theme-select .theme-label:before {
  content: "";
  z-index: -1;
  position: absolute;
  background-color: var(--secondary-color);
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  max-width: 0;
  transition: max-width 500ms;
}

.theme-select.active .theme-label:before {
  max-width: 5rem;
}

.theme-select .theme {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background-color: var(--grey-color);
  border-radius: 0.25em;
  transition: filter 500ms;
}

.theme-select:focus {
  outline: none;
}

.theme-select:hover .theme,
.theme-select:focus .theme {
  filter: brightness(1.1);
}

.theme-select .theme .color {
  height: 1rem;
  width: 1rem;
  margin: 0 0.125em;
  border-radius: 0.2rem;
  flex: 1 0 1rem;
}

.wave-border {
  height: 150px;
  overflow: hidden;
}

.scroll-in.js-opacity {
  opacity: 0;
}

.scroll-in.scrolled {
  animation: fade-in-bottom 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

.scroll-in.unscrolled {
  animation: fade-out-top 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}

footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  background-color: var(--shade-100);
}

footer .support.container {
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 1rem;
}

footer .support p {
  margin: 0 0 0.5rem;
  max-width: 45ch;
  font-size: 0.9rem;
  color: var(--shade-500);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

footer .social-media {
  display: flex;
  margin-left: -0.5rem;
}

footer .social-media a {
  margin: 0.5rem;
  font-size: 1.1rem;
}

footer .copyright {
  font-size: 0.9rem;
  color: var(--shade-500);
}

.copyright .heart {
  color: var(--shade-300);
}

@media screen and (min-width: 721px) {
  .hamburger,
  .nav-links .social-media {
    display: none;
  }
}

@media screen and (max-width: 720px) {
  .logo {
    font-size: 1rem;
  }

  .js-nav .nav-links {
    position: absolute;
    padding: 2rem;
    right: 0;
    top: 4.5rem;
    left: 0;
    margin: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-shadow: 0px 0 10px 1px rgb(0 0 0 / 20%);
    border-radius: 0.25em;
    opacity: 0;
    visibility: hidden;
  }

  .js-nav .nav-links.visible {
    z-index: 50;
    background-color: var(--background-color);
    visibility: visible;
    animation: fade-in-top 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;
  }

  .js-nav .nav-links .social-media {
    display: flex;
    margin: 1rem -0.5rem;
  }

  .js-nav .nav-links .social-media a {
    margin: 0 1rem;
    font-size: 1.1rem;
  }

  footer .support.container {
    margin-bottom: 2rem;
  }
}

@media (prefers-reduced-motion) {
  .scroll-in.js-opacity {
    opacity: 1;
    animation: none !important;
  }
}
