@font-face {
  font-family: "Krungthep";
  src: local("Krungthep"), url("client/fonts/krungthep.woff2") format("woff2");
}

@font-face {
  font-family: "Gandur";
  font-weight: normal;
  src: local("Gandur"), url("client/fonts/gandur-regular.woff2") format("woff2");
}

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  line-height: 1.5;
  font-size: 16px;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

button {
  outline: none;
}

.page {
  display: grid;
  width: 100%;
  height: 100%;
}

.content {
  grid-area: 1 / 1 / -1 / -1;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 0 auto;
  font-family: "Krungthep", sans-serif;
}

h1 {
  text-align: center;
  width: 100%;
  margin: auto 0;
  font-family: "Gandur", serif;
  font-weight: normal;
  color: #ccc;
  font-size: 96px;
  text-shadow: -1px -1px 0 #555, 1px -1px 0 #555, -1px 1px 0 #555,
    1px 1px 0 #555, 1px 0 0 #999, 0 1px 0 #999, 2px 1px 0 #999,
    1px 2px 0 #999, 3px 2px 0 #999, 2px 3px 0 #999, 4px 3px 0 #999,
    3px 4px 0 #999, 5px 4px 0 #999, 3px 5px 0 #555, 6px 5px 0 #555,
    -1px 2px 0 black, 0 3px 0 #555, 1px 4px 0 #555, 2px 5px 0 #555,
    2px -1px 0 #555, 3px 0 0 #555, 4px 1px 0 #555, 5px 2px 0 #555,
    6px 3px 0 #555, 7px 4px 0 #555;
}

.about {
  max-width: 900px;
  margin: auto;
  padding: 10px 20px;
}

.about p {
  margin: 14px 0;
  color: #444;
  font-size: 2.8vmin;
}

.about a {
  color: #333;
}

.about a:hover {
  color: #111;
}

.email-button {
  display: block;
  flex: 0 0 75px;
  width: 500px;
  height: 75px;
  border: 0;
  border-radius: 10px;
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: #e8ff67;
  color: #444;
  font: 1.6rem "Krungthep", sans-serif;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  cursor: pointer;
}

.email-button:hover {
  transition: all 600ms ease;
  background: #cfff55;
}

.email-track {
  display: block;
  width: 100%;
  height: 150px;
  transform: translateY(-75px);
}

.email-message {
  width: 100%;
  height: 75px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.copied-message {
  color: #eee;
}

.copied-message > span {
  font-size: 1.3rem;
  line-height: 1.8rem;
}

.email-address {
  position: relative;
  color: #64b2c8;
  filter: hue-rotate(var(--email-hue, 0deg)) saturate(80%);
}

.email-button.stage-1 .email-track {
  transform: translateY(-37.5px);
}

.email-button.stage-2 {
  transition: all 600ms cubic-bezier(.32, .01, .1, 1);
  background: #131b43;
}

.email-button.stage-2 .email-track {
  transition: all 600ms cubic-bezier(.32, .01, .1, 1);
  transform: translateY(0);
}

.email-button.stage-3 .email-track {
  transform: translateY(-37.5px);
}

.email-button.stage-3 .copied-message {
  color: #444;
}

.email-button.stage-3 .email-message:last-child {
  color: #eee;
}

.email-button.stage-4 {
  transition: all 600ms cubic-bezier(.32, .01, .1, 1);
  background: #e8ff67;
}

.email-button.stage-4 .email-track {
  transition: all 600ms cubic-bezier(.32, .01, .1, 1);
  transform: translateY(-75px);
}

.background {
  grid-area: 1 / 1 / -1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  background-color: #ddd;
  user-select: none;
}

.handshake {
  height: 100%;
  min-height: 100%;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: grayscale(100%);
  will-change: transform;
}

@keyframes up-down {
  from { transform: translateY(-70px); }
  to { transform: translateY(80px); }
}

@media (max-width: 1200px) {
  .about p { font-size: 2.8vmax; }
}

@media (max-width: 900px) {
  .about p { font-size: 4.2vw; }
}

@media (max-width: 500px) {
  .email-button {
    width: auto;
    margin: auto 8px 8px;
    font-size: 4.2vw;
  }

  .handshake { opacity: 0.4; }
}

@media (max-width: 475px) {
  h1 { font-size: 14vw; }
  .copied-message > span { font-size: 4.3vw; }
}

@media (max-height: 520px) {
  .about p { font-size: 4vw; }
}

@media (orientation: landscape) {
  h1 { padding-top: 4vh; }
  .email-button { font-size: 1.6rem; }
  .copied-message > span { font-size: 1.2rem; }
}

@media (hover: none), (pointer: coarse) {
  .handshake { animation: up-down 1.5s alternate infinite ease-in-out; }
}
