/* Original Bruce character, restored beside the wordmark. */
.has-character-greeting.site-header {
  gap: 16px;
}
.has-character-greeting .hero-greeting {
  display: block;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 144px;
  width: 144px;
  height: 96px;
  align-self: flex-end;
  margin: 0 0 -12px;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}
.has-character-greeting .greeting-art {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.has-character-greeting .hero-greeting > span {
  position: absolute;
  top: 1px;
  right: -2px;
  font: 600 31px/1 Caveat, 'Segoe Print', cursive;
  letter-spacing: 0;
  color: var(--red);
  transform: rotate(7deg);
}
.has-character-greeting #primary-nav {
  margin-left: auto;
  gap: 20px;
}
.has-character-greeting .greeting-hand {
  transform-box: view-box;
  transform-origin: 102px 216px;
}
.has-character-greeting .hero-greeting.is-waving .greeting-hand {
  animation: bruce-hello-wave 1700ms ease-in-out 1;
}
@keyframes bruce-hello-wave {
  0%, 100% { transform: rotate(0deg); }
  22% { transform: rotate(-10deg); }
  43% { transform: rotate(3deg); }
  64% { transform: rotate(-7deg); }
  82% { transform: rotate(2deg); }
}

/* Collapse navigation before it can crowd the character and wordmark. */
@media (max-width: 1240px) {
  .has-character-greeting.site-header {
    height: 92px;
    padding: 8px 32px;
  }
  .has-character-greeting .wordmark {
    width: 220px;
    flex-basis: 220px;
  }
  .has-character-greeting .hero-greeting {
    flex-basis: 126px;
    width: 126px;
    height: 84px;
    margin-bottom: -8px;
  }
  .has-character-greeting .hero-greeting > span {
    font-size: 29px;
  }
  .has-character-greeting .menu-toggle {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 44px;
    margin-left: auto;
    padding: 8px 14px;
    border: 1px solid var(--edge);
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
  }
  .has-character-greeting .menu-toggle > span {
    font-size: 22px;
    line-height: 1;
  }
  .has-character-greeting #primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    margin: 0;
    padding: 16px 32px 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px #171a1914;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .has-character-greeting #primary-nav.open { display: flex; }
  .has-character-greeting #primary-nav > a {
    font-size: 17px;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
  }
  .has-character-greeting #primary-nav .nav-contact { margin: 12px 0 0; }
}
@media (max-width: 639px) {
  .has-character-greeting.site-header {
    height: 84px;
    padding: 8px 16px;
    gap: 8px;
  }
  .has-character-greeting .wordmark {
    width: clamp(125px, 34vw, 190px);
    flex-basis: clamp(125px, 34vw, 190px);
  }
  .has-character-greeting .hero-greeting {
    flex-basis: clamp(80px, 24vw, 118px);
    width: clamp(80px, 24vw, 118px);
    height: auto;
    aspect-ratio: 3 / 2;
    margin-bottom: -8px;
  }
  .has-character-greeting .hero-greeting > span {
    top: -2px;
    right: -3px;
    font-size: clamp(22px, 5vw, 27px);
  }
  .has-character-greeting .menu-toggle {
    flex: 0 0 52px;
    width: 52px;
    min-height: 44px;
    padding: 3px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    font-size: 11px;
    line-height: 1.25;
  }
  .has-character-greeting .menu-toggle > span { font-size: 19px; }
  .has-character-greeting #primary-nav {
    max-height: calc(100dvh - 84px);
    padding: 12px 20px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .has-character-greeting .hero-greeting.is-waving .greeting-hand {
    animation: none;
  }
}
