* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #050505;
  color: white;
  font-family: Georgia, serif;
}

.scene {
  min-height: 100vh;
  width: 100%;
  padding: 35px 18px;
  text-align: center;
  overflow: hidden;
}

h1 {
  color: #ff4568;
  font-size: 30px;
  text-shadow: 0 0 15px #ff1744;
  animation: fade 2s ease forwards;
}

.subtitle {
  color: #eab5c5;
  font-size: 13px;
  letter-spacing: 2px;
}

svg {
  width: 100%;
  max-width: 390px;
  display: block;
  margin: 15px auto;
  overflow: visible;
  animation: floating 4s ease-in-out infinite;
}

/* STEMS */
.stems path {
  fill: none;
  stroke: #287b3c;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: grow 4s forwards;
}

/* LEAVES */
.leaves path {
  fill: #318d45;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: bloom 1.5s forwards 3s;
}

/* FLOWERS */
.petals path {
  fill: none;
  stroke: #e91e45;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: draw 2s forwards;
}

.stamens path {
  fill: none;
  stroke: #ff7185;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 2s forwards;
}

.middle {
  fill: #ffbd8b;
  opacity: 0;
  animation: fade 1s forwards;
}

.f1 .petals path,
.f1 .stamens path {
  animation-delay: 3s;
}

.f2 .petals path,
.f2 .stamens path {
  animation-delay: 4s;
}

.f3 .petals path,
.f3 .stamens path {
  animation-delay: 5s;
}

.f1 .middle { animation-delay: 5s; }
.f2 .middle { animation-delay: 6s; }
.f3 .middle { animation-delay: 7s; }

/* WRAPPER */
.wrapper {
  fill: #79263b;
  opacity: 0;
  animation: fade 2s forwards 6s;
}

.ribbon {
  fill: #f05b79;
  opacity: 0;
  animation: fade 2s forwards 7s;
}

/* BIRTHDAY LETTER */
.message {
  max-width: 450px;
  margin: 25px auto;
  padding: 22px;
  color: #f5c6d0;
  background: #160d12;
  border: 1px solid #7e3048;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .3px;
  text-align: center;
  opacity: 0;
  animation: fade 2s forwards 8s;
}

.message p {
  margin-bottom: 22px;
}

.ending {
  color: #ff6b91;
  font-size: 18px;
  font-weight: bold;
}

/* ANIMATIONS */
@keyframes grow {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bloom {
  to {
    transform: scale(1);
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}