@import "common.css";

body {
  background: light-dark(var(--main-grey6), var(--main-grey1));
  color: light-dark(var(--main-grey1), var(--main-grey6));
  font-family: "Fira Sans", sans-serif;
  font-size: 13pt;
  font-style: normal;
  font-weight: 300;
  margin: 0 auto;
  padding: 0;
  line-height: 1.5;
}

footer {
  background: var(--theme-cyan);
  color: light-dark(var(--main-white), var(--main-black));
  margin-top: 5rem;
  padding: 1rem 0;
}

footer a {
  color: light-dark(var(--main-white), var(--main-black));
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

h1 span {
  color: var(--main-grey3);
}

header {
  background: var(--theme-pink);
  color: var(--main-white);
  position: sticky;
  top: 0;
}

header nav div div {
  display: flex;
}

main {
  margin: 0 auto;
}

nav {
  display: flex;
  margin: 0 8rem;
  overflow: hidden;
  padding: 0;
  width: auto;
}

nav a {
  color: var(--main-white);
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
}

nav img {
  display: none;
  height: 1rem;
  margin: 0;
  padding: 1rem;
  width: 1rem;
}

nav li {
  float: left;
  list-style: none;
  padding: 1rem;
  width: auto;
}

nav li:hover {
  background: var(--main-black);
}

div p {
  white-space: normal;
}

nav ul {
  align-items: end;
  list-style: none;
  margin: 0;
  padding: 0;
  row-gap: 1rem;
}

.container {
  margin: 0 auto;
  max-width: 64rem;
}

.dark {
  color-scheme: dark;
}

.light {
  color-scheme: light;
}

.navbar {
  display: flex;
}

.navbar-open img {
  content: url("/assets/img/menu-close.svg");
}

div.rounded-box {
  border-color: light-dark(var(--main-grey5), var(--main-grey2));
  border-radius: 0.5rem;
  border-style: solid;
  border-width: 2px;
  margin-bottom: 1rem;
  padding: 1rem 2rem;
  text-align: center;
}

#author,
#book,
#buy,
#contact {
  margin-top: 5rem;
  clear: both;
}

#bluesky {
  content: light-dark(
    url("/assets/img/bluesky-light.svg"),
    url("/assets/img/bluesky-dark.svg")
  );
}

#book-title {
  margin: 0 auto;
  width: 100%;
}

#book-title img {
  height: 21rem;
  object-fit: cover;
  width: 100%;
}

#buy div a {
  background: var(--main-grey3);
  border-radius: 0.5rem;
  color: var(--main-white);
  font-weight: bold;
  padding: 0.5rem 2rem;
  text-decoration: none;
}

#buy div a:hover {
  background: var(--theme-pink);
}

#contact button {
  background: var(--theme-cyan);
  border-radius: 0 0.5rem 0.5rem 0;
  border: 1px;
  color: light-dark(var(--main-white), var(--main-black));
  font-size: 75%;
  font-weight: bold;
  padding: 0.5rem;
}

#contact img {
  height: 3rem;
  vertical-align: middle;
  width: 3rem;
}

#contact input {
  border-radius: 0.5rem 0 0 0.5rem;
  border: none;
  padding: 0.5rem;
}

#contact-middle {
  margin: 2rem 0;
}

#mastodon {
  content: light-dark(
    url("/assets/img/mastodon-light.svg"),
    url("/assets/img/mastodon-dark.svg")
  );
}

#theme-selector {
  background-color: light-dark(var(--main-grey5), var(--main-grey2));
  background-image: light-dark(
    url("/assets/img/theme-dark.svg"),
    url("/assets/img/theme-light.svg")
  );
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2rem;
  bottom: 1rem !important;
  height: 2rem;
  opacity: 0.25;
  padding: 0.5rem;
  position: fixed !important;
  right: 1rem !important;
  text-align: center;
  width: 2rem;
  z-index: 1000;
}

#theme-selector:hover {
  opacity: 1;
}

@media only screen and (max-width: 1440px) and (orientation: landscape) {
  main {
    margin: 0 13rem;
  }
}

@media only screen and (max-width: 864px) and (orientation: portrait) {
  nav {
    margin: 0;
  }

  nav div {
    width: 100%;
  }

  nav img {
    display: block;
    right: 0;
    top: 0;
  }

  nav ul {
    display: none;
  }

  nav ul li {
    width: 100%;
  }

  .container {
    margin: 0 1rem;
  }

  .navbar {
    display: none;
  }

  .navbar-close {
    content: url("/assets/img/menu-close.svg");
  }

  .navbar-responsive {
    display: grid;
  }

  #book-title {
    width: 100%;
  }

  #book-title img {
    height: auto;
  }

  #contact button {
    width: 25%;
  }

  #contact input {
    width: 60%;
  }

  #contact strong {
    font-size: 85%;
  }

  #theme-selector {
    bottom: 0.25rem !important;
    right: 0.25rem !important;
  }
}
