@import url(https://fonts.googleapis.com/css?family=Lato:300italic);

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: #ee9ca7;
}

#cake {
  display: block;
  position: relative;
  margin: -10em auto 0 auto;
}

/* ============================================== Candle
*/

.velas {
  top: 310px;
  background: #ffffff;
  border-radius: 10px;
  position: absolute;
  top: 228px;
  left: 50%;
  margin-left: -2.4px;
  margin-top: -8.33333333px;
  width: 5px;
  height: 35px;
  transform: translateY(-300px);
  backface-visibility: hidden;
  animation: in 500ms 6s ease-out forwards;
}
.velas:after,
.velas:before {
  background: rgba(255, 0, 0, 0.4);
  content: "";
  position: absolute;
  width: 100%;
  height: 2.22222222px;
}
.velas:after {
  top: 25%;
  left: 0;
}
.velas:before {
  top: 45%;
  left: 0;
}

/* ============================================== Fire
*/

.fuego {
  border-radius: 100%;
  position: absolute;
  top: -20px;
  left: 50%;
  margin-left: -2.6px;
  width: 6.66666667px;
  height: 18px;
}
.fuego:nth-child(1) {
  animation: fuego 2s 6.5s infinite;
}
.fuego:nth-child(2) {
  animation: fuego 1.5s 6.5s infinite;
}
.fuego:nth-child(3) {
  animation: fuego 1s 6.5s infinite;
}
.fuego:nth-child(4) {
  animation: fuego 0.5s 6.5s infinite;
}
.fuego:nth-child(5) {
  animation: fuego 0.2s 6.5s infinite;
}

/* ============================================== Animation Fire
*/

@keyframes fuego {
  0%,
  100% {
    background: rgba(254, 248, 97, 0.5);
    box-shadow: 0 0 40px 10px rgba(248, 233, 209, 0.2);
    transform: translateY(0) scale(1);
  }
  50% {
    background: rgba(255, 50, 0, 0.1);
    box-shadow: 0 0 40px 20px rgba(248, 233, 209, 0.2);
    transform: translateY(-20px) scale(0);
  }
}

@keyframes in {
  to {
    transform: translateY(0);
  }
}

.text {
  color: #863e27;
  transition: ease-in;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  text-align: center;

  
  h1 {
    color: #863e27;
    font-size: 2.4em;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    text-align: center;
  }
  
}

p {
  font-size: 2em;
  font-weight: bold;
}


/* Make Cake Bigger */
.cake-container {
  transform: scale(1.4);
  transform-origin: center;
  margin-top: 4em;
}

/* Typewriter Animation */
.typewriter, .typewriter2 {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #8b6a60;
  width: 0;
  animation: typing 3s steps(30, end) forwards, blink .75s step-end infinite;
}

.typewriter2 {
  animation-delay: 3.2s;
}

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

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


/* Make the cake + candle scale together */
.cake-wrapper {
  transform: scale(1.4);
  transform-origin: center;
  display: flex;
  justify-content: center;
  margin-top: 4rem;
  margin-bottom: 7rem; /* This prevents overlap with text */
}

/* Text Appearance Animation */
.text {
  text-align: center;
  color: #8b6a60;
  font-family: "Lato", sans-serif;
  margin-top: 1rem;
}

.text h1,
.text p {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s ease forwards;
}

/* Delay name so it appears after the title */
.text p {
  animation-delay: 1s;
}

/* Animation Keyframes */
@keyframes fadeUp {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

