/* One quiet motion rhythm for controls that disclose content. */
:root { --ui-motion: cubic-bezier(.22, 1, .36, 1); }

@media (max-width: 1100px) {
  body .site-header .main-nav:not(.open),
  body .site-header.is-scrolled .main-nav:not(.open) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -8px, 0);
    transition: opacity .24s ease, transform .34s var(--ui-motion), visibility 0s linear .34s;
  }
  body .site-header .main-nav.open,
  body .site-header.is-scrolled .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition: opacity .28s ease, transform .34s var(--ui-motion), visibility 0s;
  }
  .site-header .menu-toggle span {
    transition: top .28s var(--ui-motion), width .28s var(--ui-motion), transform .28s var(--ui-motion);
  }
}

@media (max-width: 600px) {
  body .site-header .header-contact,
  body .site-header.is-scrolled .header-contact {
    transition: width .34s var(--ui-motion), height .34s var(--ui-motion),
      padding .34s var(--ui-motion), border-radius .34s var(--ui-motion), box-shadow .25s ease;
  }
  body .site-header .header-contact .header-contact-title,
  body .site-header .header-contact .header-contact-actions {
    transition: opacity .22s ease, transform .3s var(--ui-motion), visibility 0s linear .22s;
  }
  body .site-header .header-contact.is-open .header-contact-title,
  body .site-header .header-contact.is-open .header-contact-actions {
    transition: opacity .26s ease .08s, transform .34s var(--ui-motion) .04s, visibility 0s;
  }
}

.site-dialog[open] {
  animation: ui-dialog-in .32s var(--ui-motion) both;
}
.site-dialog[open]::backdrop {
  animation: ui-backdrop-in .32s ease both;
}
.site-dialog[open].is-closing {
  animation: ui-dialog-out .22s ease-in both;
  pointer-events: none;
}
.site-dialog[open].is-closing::backdrop {
  animation: ui-backdrop-out .22s ease-in both;
}
@keyframes ui-dialog-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes ui-dialog-out {
  to { opacity: 0; transform: translate3d(0, 7px, 0) scale(.99); }
}
@keyframes ui-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-backdrop-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  body .site-header .main-nav,
  body .site-header .header-contact,
  body .site-header .header-contact .header-contact-title,
  body .site-header .header-contact .header-contact-actions,
  .site-header .menu-toggle span { transition: none !important; }
  .site-dialog[open], .site-dialog[open]::backdrop { animation: none !important; }
}
