.room-logo {
  display: block;
  width: auto;
  height: 43px;
  max-width: 100%;
  color: var(--room-brand-ink, #134638);
}
.mast .brand { padding-bottom: 0; }
.site-footer .footer-wordmark { display: inline-flex; max-width: 100%; }
.site-footer .room-logo { height: 40px; }
.shop-brand .room-logo { height: 33px; }
.login .room-logo, .login-card .room-logo { height: 41px; }

:root[data-theme='christmas'] {
  --room-brand-ink: #f3e6d3;
}
:root[data-mail-theme='dark'] {
  --room-brand-ink: #e4eee7;
}

@media (max-width: 799px) {
  .mast .room-logo { height: 33px; }
}
@media (max-width: 359px) {
  .mast .room-logo { height: 27px; }
}

@media (prefers-reduced-motion: no-preference) {
  .room-brand-link {
    position: relative;
  }

  .room-brand-link::before,
  .room-brand-link::after {
    position: absolute;
    z-index: 1;
    width: .56rem;
    height: .56rem;
    opacity: 0;
    pointer-events: none;
    content: '';
    background: var(--room-brand-spark, #ba6e3e);
    clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%);
  }

  .room-brand-link::before {
    inset: 1% -1.2% auto auto;
    --room-spark-x: .55rem;
    --room-spark-y: -.43rem;
    --room-spark-delay: .29s;
  }
  .room-brand-link::after {
    inset: auto auto 1% -.4%;
    --room-spark-x: -.55rem;
    --room-spark-y: .36rem;
    --room-spark-delay: .43s;
  }

  .room-letter:nth-child(1) { --room-draw-time: .093s; --room-draw-from: inset(0 100% 0 0); }
  .room-letter:nth-child(2) { --room-draw-delay: .09s; --room-draw-time: .061s; --room-draw-from: inset(100% 86% 0 0); }
  .room-letter:nth-child(3) { --room-draw-delay: .14s; --room-draw-time: .074s; --room-draw-from: inset(0 92% 100% 0); }
  .room-letter:nth-child(4) { --room-draw-delay: .205s; --room-draw-time: .091s; --room-draw-from: inset(0 96% 70% 0); }
  .room-letter:nth-child(5) { --room-draw-delay: .275s; --room-draw-time: .16s; --room-draw-from: inset(0 100% 0 0); }
  .room-letter:nth-child(6) { --room-draw-delay: .427s; --room-draw-time: .08s; --room-draw-from: inset(0 100% 0 0); }

  .room-brand-link[data-room-motion] .room-letter,
  .room-brand-link[data-room-motion] > img {
    animation: room-wordmark-draw var(--room-draw-time) ease-out var(--room-motion-delay) var(--room-motion-direction) both;
  }
  .room-brand-link[data-room-motion='erase'] .room-letter {
    /* Mirror each letter's interval around the end of the complete drawing. */
    --room-motion-delay: calc(.507s - var(--room-draw-delay, 0s) - var(--room-draw-time));
    --room-motion-direction: reverse;
  }
  .room-brand-link[data-room-motion='draw'] .room-letter {
    --room-motion-delay: calc(.035s + var(--room-draw-delay, 0s));
    --room-motion-direction: normal;
  }
  .room-brand-link[data-room-motion] > img {
    --room-draw-time: .37s;
  }
  .room-brand-link[data-room-motion='erase'] > img {
    --room-motion-delay: 0s;
    --room-motion-direction: reverse;
  }
  .room-brand-link[data-room-motion='draw'] > img {
    --room-motion-delay: .035s;
    --room-motion-direction: normal;
  }
  .room-brand-link[data-room-motion='draw']::before,
  .room-brand-link[data-room-motion='draw']::after {
    animation: room-wordmark-spark .5s ease-out var(--room-spark-delay) both;
  }

  @keyframes room-wordmark-draw {
    from { clip-path: var(--room-draw-from, inset(0 100% 0 0)); opacity: 0; }
    14% { opacity: 1; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
  }

  @keyframes room-wordmark-spark {
    0% { opacity: 0; transform: translate(0, 0) scale(.12) rotate(-14deg); }
    29% { opacity: .95; transform: translate(0, 0) scale(1.04) rotate(4deg); }
    60% { opacity: .75; }
    100% { opacity: 0; transform: translate(var(--room-spark-x), var(--room-spark-y)) scale(.13) rotate(31deg); }
  }
}
