body {
  width:100vw;
  height:100vh;
  display:grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  background:#002E62;
  overflow:hidden;
  font-family:proxima-nova, sans-serif;
  font-style:normal;
  font-weight:800;
}

.container {
  grid-column: 1;
  grid-row: 1;
  justify-self:center;
  align-self:center;
  width:50%;
  max-width: 200px;
}

/* ---------- Talking head ---------- */

.head {
  position: relative;
  cursor: pointer;
}

#lemon {
  display: block;
  width:100%;
}

/* Upper face: everything above the lip line */
.face-top {
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 80.6%, 60.4% 82.7%, 42.1% 83.6%, 23.9% 83.8%, 0 84.4%);
}

/* Lower jaw: same image, everything below the lip line */
.face-jaw {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 3;
  clip-path: polygon(0 84%, 23.9% 83.4%, 42.1% 83.2%, 60.4% 82.3%, 100% 80.2%, 100% 100%, 0 100%);
  transform-origin: 75% 82%;
}

/* Dark gap that shows when the jaw drops */
.mouth-hole {
  position: absolute;
  z-index: 1;
  left: 21%;
  width: 57%;
  top: 80%;
  height: 14%;
  background: #2a0d0d;
  border-radius: 40% 40% 50% 50%;
  opacity: 0;
}

/* Only show the gap while the jaw is moving */
.talking .mouth-hole {
  animation: show 1.6s steps(1, end) 0.3s 1;
}

@keyframes show {
  0%, 99% { opacity: 1; }
  100%    { opacity: 0; }
}

.talking .face-jaw {
  animation: jabber 1.6s steps(1, end) 0.3s 1;
}

@keyframes jabber {
  0%   { transform: translateY(0); }
  10%  { transform: translateY(5%) rotate(-2deg); }
  22%  { transform: translateY(1%); }
  32%  { transform: translateY(6%) rotate(-3deg); }
  45%  { transform: translateY(0); }
  55%  { transform: translateY(4%) rotate(-1deg); }
  66%  { transform: translateY(1%); }
  76%  { transform: translateY(6%) rotate(-3deg); }
  88%  { transform: translateY(0); }
  100% { transform: translateY(0); }
}

/* ---------- Speech bubble ---------- */

.bubble {
  position: absolute;
  z-index: 4;
  left: 58%;
  top: 4%;
  padding: 8px 14px;
  background: #fff;
  color: #002E62;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: scale(0);
  transform-origin: 10% 100%;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -12px;
  border-style: solid;
  border-width: 14px 14px 0 0;
  border-color: #fff transparent transparent transparent;
}

.talking .bubble {
  animation: pop 0.35s cubic-bezier(.3, 1.6, .5, 1) 0.3s forwards;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .talking .face-jaw, .talking .mouth-hole { animation: none; }
  .talking .bubble { animation: none; opacity: 1; transform: rotate(-4deg); }
}

#coming {
  text-align: center;
  font-size: 20px;
  color:#fff;
}
