@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
:root {
  --darkBlue: #19313e;
  --cream: #ffe4c4;
  --emerald: #40755e;
  --gold: #956d3c;
  --bronze: #634625;
}
a {
  position: relative;
  padding: 20px 40px;
  font-size: 24px;
  font-weight: bold;
  color: #262626;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 2px;
  ;
}
span:nth-child(1),
span:nth-child(3) {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #262626;
}
span:nth-child(1) {
  top: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
}
a:hover span:nth-child(1) {
  transform: scaleX(1);
  transition: 0.2s
}
span:nth-child(3) {
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
}
a:hover span:nth-child(3) {
  transform: scaleX(1);
  transition: 0.2s;
  transition-delay: 0.4s
}
span:nth-child(2),
span:nth-child(4) {
  position: absolute;
  height: 100%;
  width: 3px;
  background: #262626;
}
span:nth-child(2) {
  top: 0;
  right: 0;
  transform: scaleY(0);
  transform-origin: top;
}
a:hover span:nth-child(2) {
  transform: scaleY(1);
  transition: 0.2s;
  transition-delay: 0.2s
}
span:nth-child(4) {
  top: 0;
  left: 0;
  transform: scaleY(0);
  transform-origin: bottom;
}
a:hover span:nth-child(4) {
  transform: scaleY(1);
  transition: 0.2s;
  transition-delay: 0.6s
}
a:before {
  content: '';
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height: 100%;
  background:#262626;
  transform: scale(0);
  z-index: -1;
  transform-origin: top left;
}
a:hover:before {
  transform: scale(1);
transition: 0.4s;
transition-delay: 0.8s;
}
a:hover {
  color: white;
  transition: 0.16s;
  transition-delay: .94s;
  transform-origin: top left;
}
a:after {
  content: url(pencilsmall.png);
  position: absolute;
  top: -22px;
  left: 0;
  pointer-events: none;
}
a:hover:after {
  animation: draw 1s linear forwards;
}
@keyframes draw {
  0%{
    top:-30px;
    left: 0;
  }
  20%{
    top:-30px;
    left: 100%;
  }
  40%{
    top:60%;
    left: 100%;
  }
  60%{
    top:60%;
    left: 0;
  }
  80%{
    top:-30px;
    left: 0;
  }
  100%{
    top:60%;
    left: 100%;
  }
}
