@import url('https://fonts.googleapis.com/css2?family=Playfair+Display&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text&display=swap');
body {
  font-family: 'Crimson Text', serif;
  font-weight: 400;
  color: #333;
  overflow: hidden;
  text-align: center;
  background-image: linear-gradient(45deg, #eee, white, #eee);
}

h1, h2 {
  border-bottom: 2px solid #d4af37;
  margin-top: -0.5em;
  display: inline-block
}

h2 {
  margin-bottom: -0.3em;
}

h1, h1::before {
  cursor: default;
  vertical-align: middle;
  background-color: #f3ec78;
  background-image: linear-gradient(45deg, #a67724, #f4af37, #a67724);
  background-size: 100%;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  background-position: 0px 0px;
  transition: all 1s ease;
}

h1:hover {
  background-size: 200%;
  background-position: -35em;
  transition: all 5s ease;
}

h1 {
  text-align: center;
  color: #333;
  letter-spacing: 0.1em;
}

a {
  color: lightslategray;
  text-decoration: underline;
}

a:hover {
  color: darkslategray;
}

#content {
  margin: 0 auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#overlay {
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  z-index: 4
}

#contactform {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#contactform p, #contactform h2 {
    margin: 0.5em;
}

#contactform, #sent {
  margin: 0 auto;
  border-radius: .15em;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  background-color: white;
  padding: 1.5em;
  text-align: left;
}

.form-buttons {
  text-align: right;
  
}

#sent {
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  font-size: 1em;
  top: 0;
  padding: 0.5em;
  vertical-align: middle;
  visibility: hidden;
  opacity: 0;
  z-index: 10;
}

@media only screen and (max-width: 800px) {
  #contactform {
    margin: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    border-radius: 0;
  }
}

.success, .success .material-icons {
  background-color: #cfc !important;
  color: green;
}

.error, .error .material-icons {
  background-color: #fcc !important;
  color: red;
}

label {
  font-size: 1em;
  font-weight: bold;
  color: #333;
  margin-bottom: 2em
}

input, textarea {
  background-color: white;
  border-radius: .15em;
  border: 1px solid #ccc;
  padding: 0.5em;
  margin-top: 0.5em;
  width: 100%;
  font-family: 'Open Sans', sans-serif;
}

textarea {
  height: 6em;
  resize: none;
}

input:focus, textarea:focus {
  outline: none;
  transition: all 0.5s ease;
  border: 1px solid #888
}

select {
  position: relative;
  z-index: 11;
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: .15em;
  border: 1px solid #ccc;
  padding: 0.2em;
  cursor: pointer;
  color: #333;
  padding: 0.5em;
  padding-right: 3em;
  background-color: rgba(0, 0, 0, 0);
  transition: color 0.3s ease, background-color 0.3s ease, border-bottom-color 0.3s ease;
}

.select-button::after {
  transition: all 0.5s ease;
  z-index: 5;
  position: absolute;
  font-size: 1.5em;
  font-family: "Material Icons";
  content: 'arrow_drop_down';
  color: #ccc;
  margin-left: -1.2em;
  margin-top: 0.1em;
}

select:hover, select:active {
  border-color: #888;
}

.select-button:hover::after {
  color: lightslategray;
}

select:active {
  outline: none;
}

select::-ms-expand {
  display: none;
}

button {
  cursor: pointer;
  line-height: 2em;
  display: inline-block;
  padding: 0.4em 0.7em;
  margin: 0 0.3em 0.3 0;
  border: none;
  border-radius: .15em;
  box-sizing: border-box;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 400;
  color: black;
  background-color: #ccc;
  box-shadow: inset 0 -0.6em 0 -0.35em rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  transition: all 0.5s ease;
}

.sendbutton {
  background-color: lightslategray;
  color: white
}

button:hover {
  filter: brightness(1.1)
}

.spamnote {
  font-size: 0.85em;
  font-weight: bold;
  color: #666
}

.fadein {
  opacity: 1;
  animation: fadein 0.2s linear;
  animation-fill-mode: forwards
}

.fadeout {
  opacity: 1;
  animation: fadeout 1s linear 5s;
  animation-fill-mode: forwards
}

#spambait {
  display: none
}

.closed {
  opacity: 0;
  visibility: hidden
}

.rollup {
  animation: rollup 0.2s ease;
  animation-fill-mode: forwards
}

.show {
  transform: scaleY(100%);
  transition: all .5s ease
}

.popin {
  animation: popin 0.5s ease 0.5s;
  animation-fill-mode: forwards
}

.icon {
  vertical-align: middle;
  font-size: 0.6;
}

.sendbutton .icon {
  transition: all 0.5s ease
}

.sendbutton:hover .icon {
  transform: scale(1.1, 1.1) rotate(-10deg);
  transition: all 0.5s ease
}

@keyframes fadein {
  100% {
    opacity: 1;
    visibility: visible
  }
}

@keyframes fadeout {
  100% {
    opacity: 0;
    visibility: hidden
  }
}

@keyframes rollup {
  100% {
    transform: scaleY(0);
  }
}

@keyframes popin {
  0% {
    transform: scale(0.1, 0.1);
    opacity: 1;
    visibility: visible
  }
  100% {
    transform: scale(1, 1);
    opacity: 1;
    visibility: visible
  }
}
