/* Warm paper lettering against the changing light of the moon. */
body > header {
  --head-paper: #f7e9d9;
  --head-copper: #edbb96;
  --head-rim: rgb(235 184 147 / 52%);
  --head-ink: #291b18;
  gap: clamp(16px, 2vw, 32px);
  color: var(--head-paper);
}

body > header nav { gap: clamp(4px, 1vw, 20px); }
body > header nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  font: 500 13px/1.25 var(--sans);
  letter-spacing: .03em;
  white-space: nowrap;
}
body > header nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 1px;
  background: var(--head-copper);
  transform: scaleX(0);
  transform-origin: left;
}

body > header .head-actions { flex: none; gap: 4px; }
body > header .studio-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  margin-inline-end: 8px;
  padding: 0 16px;
  border: 1px solid var(--head-rim);
  border-radius: 999px;
  background: rgb(55 31 26 / 89%);
  color: var(--head-paper);
  font: 500 13px/1.2 var(--sans);
  letter-spacing: .025em;
  white-space: nowrap;
}
body > header .studio-entry span {
  color: var(--head-copper);
  font: 17px/1 Arial, sans-serif;
}
body > header :is(#motion, #menu) {
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--head-paper);
}
body > header #motion .motion-icon { border-radius: 1px; }
body > header #menu { gap: 5px; }
body > header #menu span {
  width: 19px;
  height: 1.5px;
  margin: 0;
  border-radius: 2px;
  background: currentColor;
}
body > header #menu span:last-child { width: 13px; }
body > header #menu[aria-expanded="true"] { background: rgb(54 32 27 / 85%); }
body > header #menu[aria-expanded="true"] span {
  width: 19px;
  transform: translateY(3.25px) rotate(45deg);
}
body > header #menu[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}
body > header #drawer {
  top: calc(100% - 4px);
  width: min(224px, calc(100% - 2 * var(--edge)));
  min-width: 0;
  padding: 8px;
  border: 1px solid rgb(231 178 141 / 29%);
  border-radius: 16px;
  background: var(--head-ink);
  box-shadow: 0 8px 24px rgb(14 7 5 / 24%);
}
body > header #drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9px;
}
body > header :is(a, button):focus-visible {
  outline: 2px solid var(--head-copper);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  body > header nav a:hover { color: var(--head-paper); }
  body > header nav a:hover::after { transform: scaleX(1); }
  body > header .studio-entry:hover {
    background: #61372b;
    border-color: var(--head-copper);
  }
  body > header :is(#motion, #menu):hover, body > header #drawer a:hover {
    background: rgb(91 55 43 / 85%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  body > header #menu span, body > header nav a::after { transition: transform 160ms ease-out; }
}
@media (max-width: 620px) {
  body > header { gap: 8px; padding-inline: clamp(12px, 4vw, 24px); }
  body > header .head-actions { gap: 0; }
  body > header .studio-entry {
    min-height: 44px;
    margin-inline-end: 4px;
    padding-inline: 12px;
    gap: 8px;
  }
}
@media (pointer: coarse) {
  body > header .studio-entry { min-height: 44px; }
}
