body {
  font-size: 16px;
  font-family: "Junge", serif;
  letter-spacing: 0.5em;
  -webkit-font-smoothing: antialiased;
}

.handwritten {
  font-family: "La Belle Aurore", cursive;
  -webkit-font-smoothing: antialiased;
  color: #444;
}

.container {
  height: 90vh;
  width: 40vw;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.polaroids {
  width: 100%;
  margin: 0 auto;
  display: grid;

  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  justify-content: center;
}

.gabe { grid-area: 1 / 1 / 2 / 2; }
.save-the-date { grid-area: 1 / 2 / 2 / 3; }
.gabi { grid-area: 1 / 3 / 2 / 4; }

.polaroids:hover .polaroid {
  filter: grayscale(0);
  animation: none;
}
  
.polaroid {
  width: 18em;
  margin: 1em;
  filter: grayscale(1);
  animation: shake 20s;
  animation-iteration-count: infinite;
}

.save-the-date {
  text-align: center;
  letter-spacing: .06em;
  line-height: .6em;
  font-size: 1.2em;
  z-index: -1;
}

.palm {
  width: 100px;
}

.gabe, .gabi {
  transition: all 200ms;
}

.gabe {
  transform: rotate(-2deg) translateX(6em) translateY(-1em);
  animation-direction: reverse;

}

.gabi {
  transform: rotate(2deg) translateX(-6em) translateY(-1em);
}

.polaroids:hover .gabi {
  transform: translateX(0);
  top: initial;
}

.polaroids:hover .gabe {
  transform: translateX(0);
}


@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.box-outside {
  border: 1px solid #666;
  box-sizing: border-box;
  height: 3.5em;
  width: 22em;
  margin: 2em 0;
  position: relative;
  display: flex;
  align-items: center;
  z-index: -1;
  flex-direction: column;

}

.box-inside {
  background-color: white;
  height: 1.25em;
  width: 18.75em;

  position: absolute;
  top: -0.625em;
  left: 1.25em;
  margin: 0 auto;

  z-index: 1;

}

.text {
  line-height: 1.6;
  width: fit-content;
  padding: 1em 2em;
  text-align: justify;
  margin: 0 auto;
  position: absolute;
  top: -1.8em;
  z-index: 2;
}

.location {
  margin: 0;
  font-size: 0.875em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrow {
  position: relative;
  top: 1px;
  left: 0.25em;
  display: inline-block;
  vertical-align: middle;
  color: #666;
  box-sizing: border-box;
  width: 0.5em;
  height: 0.5em;
  border-width: 1px 1px 0 0;
  border-style: solid;
  margin: 0.625em;
  transform: rotate(45deg);
}


.arrow::before {
  content: "";
  box-sizing: border-box;
  right: 0;
  top: -1px;
  position: absolute;
  height: 1px;
  box-shadow: inset 0 0 0 32px;
  transform: rotate(-45deg);
  width: 24px;
  transform-origin: right top;
}

.arrow::after {
  content: "";
  box-sizing: border-box;
}

@media only screen and (max-width: 600px) {

  .polaroid {
    width: 14em;
  }

  .palm {
    width: 60px;
  }

  .container {
    height: initial;
    width: 40vw;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .gabe {
    transform: translateX(0) translateY(5em);
  }

  .polaroids:hover .gabe {
    transform: translateX(0) translateY(2em);
  }

  .polaroids:hover .gabi {
    transform: translateX(0) translateY(-7em)
  }

  .gabi {
    transform: translateX(0) translateY(-18em);
  }

  .polaroids {
    height: initial;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
  }

  .gabe { grid-area: 1 / 1 / 2 / 2; }
  .save-the-date { grid-area: 2 / 1 / 3 / 2; }
  .gabi { grid-area: 3 / 1 / 4 / 2; }


  .box-outside {
    margin-bottom: 0;
  }

}