/* Animation for the navigation links.
 *  They pop up from below, they go up above their position, and then fall into place.
 */
@keyframes pop-up {
  0% { margin-top: 350px; opacity: 0; }
  60% { margin-top: -10px; opacity: 0.6; }
  100% { margin-top: 0; opacity: 1; }
}

/* General stuff */
body {
  background-color: white;
  color: rgb(98, 63, 159);    /* the purple used throughout the site */
  text-align: center;
  font-family: Mali, cursive;
  font-weight: 200;           /* light */
  font-size: 18px;
}
/* Reset the margins on the headings we need */
h1, h2 {
  margin: 0;
}
/* Links */
a {
  text-decoration: none;
  font-weight: 500;
  color: rgb(98, 63, 159);
  transition: opacity 0.5s;
}
a:active, a:hover {
  opacity: 0.5;
}

/* The header contains the title and navigation links */
div.header {
  margin: 0 auto;
  margin-top: 20px;
}
/* The main title */
h1 img {
  width: 800px;
  max-width: 95%;
}

/* The navigation links, which are designed to look randomly spaced.
 * This is done using a 2 x 3 grid, with paddings adjusted.
 */
div.links {
  display: grid;
  width: 430px;
  max-width: 95%;
  grid-template-columns: 4fr 5fr;  /* the right hand side looks naturally narrower so make it a bit bigger so it looks balanced */
  grid-template-rows: 50px 50px; 50px;
  margin: 0 auto;
}
div.links a {
  opacity: 1;
  transition: opacity 0.5s;   /* change opacity on hover */
  animation-name: pop-up;
  animation-duration: 1s;
}
div.links a:hover {
  opacity: 0.5;      /* change opacity on hover */
}

/* On screens narrower than around 500 pixels, the links start to look a bit big */
@media screen and (max-width: 500px) {
  div.links {
    grid-template-columns: 2fr 3fr;
    grid-template-rows: 40px 40px; 40px;
  }
  div.links img {
    transform: scale(0.7);
  }
}
@media screen and (max-width: 370px) {
  div.links {
    grid-template-rows:  30px 30px; 30px;
  }
  div.links img {
    transform: scale(0.6);
  }
}

/* The animation durations are at 0.2s intervals, it looks better when they're not in sync */
a#home {
  animation-duration: 1s;
  /*padding-left: 100px;*/
  text-align: right;
}
a#philosophy {
  animation-duration: 1.2s;
}
a#about {
  animation-duration: 1.4s;
  padding-top: 7px;
}
a#saxes {
  animation-duration: 1.6s;
}
a#contact {
  animation-duration: 1.8s;
  /*padding-left: 90px;*/
  text-align: right;
}
a#faq {
  animation-duration: 2s;
}

/* The container for the main content of the page */
div.container {
  width: 800px;
  max-width: 95%;
  margin: 15px auto;
}

/* The page heading (or first paragragh, in the case of the home page */
h2 {
  font-size: 22px;
  font-weight: 700;
}
/* On screens narrower than around 550 pixels, the heading text looks a bit big */
@media screen and (max-width: 550px) {
  h2 {
    font-size: 18px;
  }
}

/* The text on the home page flows around the photo */
img.home-photo {
  max-width: 50%;
  width: 350px;
  float: left;
}

/* The photo on the 'about me' page */
img.about-photo {
  width: 300px;
  max-width: 95%;
}

/* On screens narrower than around 600 pixels, the photo gets a bit small, so don't try and float it */
@media screen and (max-width: 600px) {
  img.photo {
    float: none;
    display: block;
    max-width: 95%;
    margin: 0 auto;
  }
}

/* The symbol that looks a bit like a turn, on the home page */
img.thingy {
  width: 60px;
  margin: 20px auto 30px;
}
img.small-thingy {
  width: 30px;
}

/* Where an SVG image is being used for a page title, make it a little bigger than the nav links*/
h2 img {
  transform: scale(1.2);
}

/* Subtitles */
h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px auto 0;
}

/* Quotes from clients */
blockquote {
  width: 600px;
  max-width: 95%;
  font-family: 'Gloria Hallelujah', cursive;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  margin: 30px auto 40px;
}

/* The sections describing each type of sax */
div.sax {
  margin: 10px auto 40px;
  text-align: left;
}
div.sax h3 {
  margin-bottom: 0;
  font-size: 18px;
}
div.sax p {
  margin 0;
}

/* The question list at the top of the FAQ section */
ul {
  text-align: left;
}

/* Each question in the FAQ section */
div.faq {
  text-align: left;
}

/* The contact form */
form {
  width: 600px;
  max-width: 95%;
  margin: 0 auto 40px;
  text-align: right;  /* put the submit button on the right */
}

/* All the text input fields */
input[type=text], textarea {
  font-family: Mali, cursive;
  font-size: 18px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgb(98, 63, 159);
  border-radius: 5px;
  box-sizing: border-box; /* make sure that padding and width stays in place */
  margin-top: 6px;
  margin-bottom: 16px;
  color: rgb(98, 63, 159);
  resize: vertical /* allow the user to vertically resize the textarea (not horizontally) */
}

/* This is there to trap bots, which try to fill in all the fields */
input#confirm-email {
  display: none;
}

/* The submit button */
input[type=submit] {
  font-family: Mali, cursive;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  background-color: white;
  border: 2px solid rgb(98, 63, 159);
  border-radius: 8px;
  padding: 5px 15px;
  color: rgb(98, 63, 159);
  white-space: nowrap;
}
input[type=submit]:hover {
  opacity: 0.5;
}
input {
  transition: opacity 0.5s;
}

/* Social media and copyright */
div.social {
  clear: both;    /* on the home page, the image floats */
}
div.social img {
  height: 60px;
  margin: 10px 10px;
}
div.copyright {
  font-size: 14px;
}
