/* Keep the floating header's shape and contents on one scroll transition. */
@media (min-width: 761px) {
  .site-header,
  .site-header.is-scrolled {
    transition: width 1.05s cubic-bezier(.22,1,.36,1),
      max-width 1.05s cubic-bezier(.22,1,.36,1),
      padding 1.05s cubic-bezier(.22,1,.36,1),
      gap 1.05s cubic-bezier(.22,1,.36,1),
      border-radius 1.05s cubic-bezier(.22,1,.36,1),
      background .7s ease, box-shadow .7s ease !important;
  }
}

@media (min-width: 1151px) {
  .site-header.is-scrolled { max-width: 1150px; }
  /* The menu stays centred in both states; changing it to static caused a snap. */
  .site-header nav,
  .site-header.is-scrolled nav {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    margin: 0;
    flex: none;
  }
  .site-header > .header-socials-desktop,
  .site-header.is-scrolled > .header-socials-desktop {
    margin-left: auto !important;
  }

  /* Fade the wordmark before reclaiming its space so it cannot cross the menu. */
  .site-header .header-brand-name,
  .site-header.is-scrolled .header-brand-name {
    display: flex !important;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    translate: 0 0;
  }
  .site-header .header-brand-name {
    max-width: 190px;
    opacity: 1;
    transition: max-width .85s cubic-bezier(.22,1,.36,1),
      opacity .35s .48s ease !important;
  }
  .site-header.is-scrolled .header-brand-name {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-width .85s .12s cubic-bezier(.22,1,.36,1),
      opacity .28s ease !important;
  }
  .site-header.is-scrolled .brand { flex: 0 0 auto; }
}

@media (min-width: 1151px) and (max-width: 1180px) {
  .site-header > .header-socials-desktop,
  .site-header.is-scrolled > .header-socials-desktop { display: none; }
}

@media (max-width: 760px) {
  .site-header,
  .site-header.is-scrolled {
    transition: width .75s cubic-bezier(.22,1,.36,1),
      min-height .75s cubic-bezier(.22,1,.36,1),
      padding .75s cubic-bezier(.22,1,.36,1),
      border-radius .75s cubic-bezier(.22,1,.36,1),
      background .6s ease, box-shadow .6s ease !important;
  }
}
