/* Inner-page home link. Include with the shared masthead on each inner page. */
.masthead-home {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 140px;
  width: 140px;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  color: #e4002b;
  text-decoration: none;
}
.masthead-home img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 70%;
}
.masthead-home::after {
  position: absolute;
  top: 0;
  right: -8px;
  content: "✦";
  color: var(--foreground);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}
.masthead-home:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 6px;
  border-radius: 2px;
}
.masthead-home:focus-visible img { animation: magic-home-wobble 760ms ease-out; }
.masthead-home:focus-visible::after { animation: magic-home-twinkle 760ms ease-out; }
@media (hover: hover) {
  .masthead-home:hover img { animation: magic-home-wobble 760ms ease-out; }
  .masthead-home:hover::after { animation: magic-home-twinkle 760ms ease-out; }
}
@keyframes magic-home-wobble {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  18% { transform: translateY(-2px) rotate(-4deg) scale(1.035); }
  38% { transform: translateY(-1px) rotate(3deg) scale(1.025); }
  58% { transform: translateY(-1px) rotate(-2deg) scale(1.015); }
  78% { transform: translateY(0) rotate(1deg) scale(1); }
}
@keyframes magic-home-twinkle {
  0%, 100% { opacity: 0; transform: translateY(3px) scale(.4) rotate(-15deg); }
  28% { opacity: 1; transform: translateY(-2px) scale(1.2) rotate(12deg); }
  65% { opacity: .4; transform: translateY(-5px) scale(.7) rotate(35deg); }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .masthead-home { flex-basis: 120px; width: 120px; }
  .masthead-home + .masthead-actions { gap: 14px; }
  .masthead-home + .masthead-actions .masthead-note { max-width: 180px; font-size: 9px; letter-spacing: .1em; }
}
@media (max-width: 600px) {
  .masthead-home { grid-column: 1; grid-row: 1; width: min(90px, 100%); }
}
@media (max-width: 360px) {
  .services-page .masthead { grid-template-columns: minmax(0, 1fr) 44px auto; grid-template-rows: 48px 44px; }
  .masthead-home + .masthead-actions .theme-toggle { grid-column: 2; grid-row: 1; }
  .masthead-home + .masthead-actions .magic-menu-toggle { grid-column: 3; grid-row: 1; }
  .masthead-home + .masthead-actions .bundle-toggle { grid-column: 3; grid-row: 2; }
  .masthead-home + .masthead-actions .masthead-note { grid-column: 1 / 3; grid-row: 2; justify-self: start; text-align: left; }
  .services-page main { padding-top: 126px; }
}
@media (prefers-reduced-motion: reduce) {
  .masthead-home img, .masthead-home::after { animation: none !important; }
}
