@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;
  background: #222;
}
:root {
  --darkBlue: #19313e;
  --cream: #ffe4c4;
  --emerald: #40755e;
  --gold: #956d3c;
  --bronze: #634625;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
.container {
  display: flex;
  gap: 150px;
  flex-wrap: wrap;
}
a {
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  padding: 20px 35px;
  border: 2px solid var(--emerald);
  color: var(--emerald);
  font-size: 20px;
  letter-spacing: 4px;
  transition: 0.5s
}
a:hover {
  color: white;
  border: 2px solid transparent;
}
span {
  position: absolute;
  background: var(--emerald);
  box-shadow:
   0 0 10px var(--emerald),
   0 0 20px var(--emerald),
   0 0 30px var(--emerald),
   0 0 50px var(--emerald),
   0 0 100px var(--emerald);

  }
span:nth-child(1),
span:nth-child(3) {
  width: 40px;
  height: 4px;
}
span:nth-child(2),
span:nth-child(4) {
  width: 4px;
  height: 40px;
}
span:nth-child(1) {
  top: 50%;
  left: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: left;
  transition-delay: .25s;
}

a:hover span:nth-child(1) {
  left: 50%;
  transform: scaleX(0);
  transition-delay: 0s;
}

span:nth-child(3) {
  top: 50%;
  right: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: right;
  transition-delay: .25s;
}
a:hover span:nth-child(3) {
  right: 50%;
  transform: scaleX(0);
  transition-delay: 0s;
}

span:nth-child(2){
  top: -50px;
  left: 50%;
  transition: 0.5s ease-in-out;
  transform-origin: top;
  transition-delay: .25s;
}
a:hover span:nth-child(2) {
  top: 50%;
  transform: scaleY(0);
  transition-delay: 0s;
}

span:nth-child(4){
  bottom: -50px;
  left: 50%;
  transition: 0.5s ease-in-out;
  transform-origin: bottom;
  transition-delay: .25s;
}
a:hover span:nth-child(4) {
  bottom: 50%;
  transform: scaleY(0);
  transition-delay: 0s;
}
a:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--emerald);
  transform: scale(0);
  transition: 0.5s;
  z-index:-1;

}
a:hover:before {
  transform: scale(1);
  transition-delay: .5s;
  /* box-shadow:
  0 0 10px var(--emerald),
  0 0 30px var(--emerald),
  0 0 60px var(--emerald); */
}
