.box {
  /* background: #333; */
  width: 100%;

  padding-top: 5em;
  display: flex;
  justify-content: center;
}

.typewriter {
  width: 100%;
  white-space: nowrap;
}

/* DEMO-SPECIFIC STYLES */
.typewriter h1 {
  color: grey;
  font-family: monospace;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: 0.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: 0.15em; /* Adjust as needed */
  animation: typing 3.5s steps(30, end), blink-caret 0.5s step-end infinite;
}

/* 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;
  }
}

/* type 2 */
.typewriting p {
  border-right: solid 3px rgba(0, 255, 0, 0.75);
  white-space: nowrap;
  overflow: hidden;
  font-family: 'Source Code Pro', monospace;
  font-size: 28px;
  color: black;
}

/* Animation */
.typewriting p {
  animation: animated-text 4s steps(29, end) 1s 1 normal both,
    animated-cursor 600ms steps(29, end) infinite;
}

/* text animation */

@keyframes animated-text {
  from {
    width: 0;
  }
  to {
    /* width: 472px; */
    width: 100%;
  }
}

/* cursor animations */

@keyframes animated-cursor {
  from {
    border-right-color: rgba(0, 255, 0, 0.75);
  }
  to {
    border-right-color: transparent;
  }
}

/* 3 */
.typewriter {
  font-family: Courier, monospace;
  display: inline-block;
}

.typewriter-text {
  display: inline-block;
  overflow: hidden;
  letter-spacing: 2px;
  animation: typing 5s steps(30, end), blink 0.75s step-end infinite;
  white-space: nowrap;
  font-size: 30px;
  font-weight: 700;
  border-right: 4px solid orange;
  box-sizing: border-box;
}

@keyframes typing {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: orange;
  }
}

/* ton */
h1 {
  animation: type 3s steps(22);
  overflow: hidden;
  white-space: nowrap;
  font-family: consolas;
  border-right: 4px solid black;
  width: 220ch;
}

@keyframes type {
  0% {
    width: 0ch;
  }
  100% {
    width: 22ch;
  }
}

/* 6 */
.css-typing p {
  border-right: 0.15em solid orange;
  font-family: 'Courier';
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.css-typing p:nth-child(1) {
  width: 7.3em;
  -webkit-animation: type 2s steps(4000, end);
  animation: type 2s steps(4000, end);
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

.css-typing p:nth-child(2) {
  width: 11.5em;
  opacity: 0;
  -webkit-animation: type2 2s steps(40, end);
  animation: type2 2s steps(40, end);
  -webkit-animation-delay: 2s;
  animation-delay: 2s;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

.css-typing p:nth-child(3) {
  width: 7.3em;
  opacity: 0;
  -webkit-animation: type3 5s steps(20, end),
    blink 0.5s step-end infinite alternate;
  animation: type3 5s steps(20, end), blink 0.5s step-end infinite alternate;
  -webkit-animation-delay: 4s;
  animation-delay: 4s;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

@keyframes type {
  0% {
    width: 0;
  }
  99.9% {
    border-right: 0.15em solid orange;
  }
  100% {
    border: none;
  }
}

@-webkit-keyframes type {
  0% {
    width: 0;
  }
  99.9% {
    border-right: 0.15em solid orange;
  }
  100% {
    border: none;
  }
}

@keyframes type2 {
  0% {
    width: 0;
  }
  1% {
    opacity: 1;
  }
  99.9% {
    border-right: 0.15em solid orange;
  }
  100% {
    opacity: 1;
    border: none;
  }
}

@-webkit-keyframes type2 {
  0% {
    width: 0;
  }
  1% {
    opacity: 1;
  }
  99.9% {
    border-right: 0.15em solid orange;
  }
  100% {
    opacity: 1;
    border: none;
  }
}

@keyframes type3 {
  0% {
    width: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@-webkit-keyframes type3 {
  0% {
    width: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}
@-webkit-keyframes blink {
  50% {
    border-color: tranparent;
  }
}

/* 7 */
.slogan {
  width: 0;
  margin: 0 auto;
  padding: 2px 0 0;
  letter-spacing: 2px;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: 300;
  border-right: 6px solid #27ae60;
  overflow: hidden;
  position: relative;
  display: block;
  @include animation-name(blink-start, typing, blink-end);
  @include animation-duration(1s, 1s, 1s);
  @include animation-timing-function(linear, steps(13, end), linear);
  @include animation-iteration-count(1, 1, infinite);
  @include animation-delay(0s, 1s, 2s);
  @include animation-fill-mode(forwards);
}
span {
  display: block;
  width: 100%;
}

@include keyframes(typing) {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@include keyframes(blink-start) {
  from,
  to {
    border-color: #27ae60;
  }
  50% {
    border-color: transparent;
  }
}

@include keyframes(blink-end) {
  from,
  to {
    border-color: #27ae60;
  }
  50% {
    border-color: transparent;
  }
}

/* 8 */

.container {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.animation p {
  color: #d64933;
  font-family: 'Lato', cursive;
  font-size: 10vh;
  white-space: nowrap;
  overflow: hidden;
  width: 30em;
  animation: title 7s steps(70, end);
  margin-bottom: 40px;
}

@keyframes title {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
