/* GLOBAL STYLES */
body {
  background: #02010A;
  padding-top: 5em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 80vh;
  text-align: center;
}

/* DEMO-SPECIFIC STYLES */
.typewriter h1 {
  color: #fff;
  margin-top: 4vh;
  margin-bottom:4vh;
  font-family: monospace;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .15em solid orange; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .15em; /* Adjust as needed */
  opacity: 0;
  animation: 
  revealText 0.5s forwards 1s,
    typing 2s steps(30, end) 1s,
    blink-caret .5s step-end infinite,
    removeBorder 0s forwards 3.5s;
}


.typewriter2 h1 {
  color: #fff;
  margin-top: 4vh;
  margin-bottom:4vh;
  font-family: monospace;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .15em solid orange; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .15em; /* Adjust as needed */
  opacity: 0;
  animation: 
  revealText 0.5s forwards 5s,
    typing 3.5s steps(30, end) 5s,
    blink-caret .5s step-end infinite,
    removeBorder 0s forwards 8.5s;

}

.typewriter3 h1 {
  color: #fff;
  margin-top: 4vh;
  margin-bottom:4vh;
  font-family: monospace;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .15em solid orange; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .15em; /* Adjust as needed */
  opacity: 0;
  animation: 
  revealText 0.5s forwards 9s,
    typing 2s steps(30, end) 9s,
    blink-caret .5s step-end infinite,
    removeBorder 0s forwards 11s;
}

@keyframes revealText {
  to {
    visibility: visible;
    opacity: 1;
  }
}


/* The typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: orange }
}

/* Animation to remove the border */
@keyframes removeBorder {
  from { border-right: .15em solid orange; }
  to { border-right: none; }
}