/* FROM — phones and tablets: the floating header capsule and the full-screen menu sheet. Wide screens are in
   header.css. */

@media (max-width: 1080px) {
  .site-header {
    padding-top: 10px;
  }

  .site-header__bar {
    height: 60px;
  }

  /* The bar floats as a glass capsule once you scroll, a little outside the content so everything stays lined up. */
  .site-header__bar::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 calc(var(--gutter) - 10px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: 0 0 0 1px rgba(7, 13, 23, 0.06), 0 12px 32px -14px rgba(7, 13, 23, 0.22);
    opacity: 0;
    transition: opacity 0.35s var(--ease-out), background-color 0.3s;
  }

  .site-header.is-scrolled .site-header__bar::before,
  .site-header.is-menu .site-header__bar::before {
    opacity: 1;
  }

  .site-header.is-menu .site-header__bar::before {
    background: #fff;
  }

  .site-header.is-dark:not(.is-menu) .site-header__bar::before {
    background: rgba(14, 20, 31, 0.66);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 12px 32px -14px rgba(0, 0, 0, 0.5);
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-block;
  }

  .mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 96px var(--gutter) max(28px, env(safe-area-inset-bottom));
    background: var(--paper);
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s;
  }

  .mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav__links {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-nav__links a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }

  .mobile-nav__links b {
    font-size: clamp(30px, 8vw, 40px);
    font-weight: 740;
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .mobile-nav__links small {
    grid-column: 1;
    font-size: 15px;
    color: var(--ink-3);
  }

  .mobile-nav__links .icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    color: var(--ink-3);
    transition: transform 0.3s var(--ease-out), color 0.3s;
  }

  .mobile-nav__links a:hover .icon {
    transform: translateX(3px);
    color: var(--ink);
  }

  .mobile-nav__links a[aria-current="page"] b {
    color: var(--orange);
  }

  .mobile-nav__links a[aria-current="page"] .icon {
    color: var(--orange);
  }

  .mobile-nav__foot {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 32px;
  }

  .mobile-nav__cta {
    width: 100%;
    justify-content: center;
  }

  .mobile-nav__foot p {
    font-size: 14px;
    color: var(--ink-3);
    text-align: center;
  }

  .mobile-nav__foot p a {
    color: var(--ink);
    font-weight: 600;
  }

  /* The links rise in one after another as the sheet opens. */
  .mobile-nav__links li,
  .mobile-nav__foot {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out);
  }

  .mobile-nav.is-open :is(.mobile-nav__links li, .mobile-nav__foot) {
    opacity: 1;
    transform: none;
  }

  .mobile-nav.is-open li:nth-child(2) {
    transition-delay: 0.04s;
  }

  .mobile-nav.is-open li:nth-child(3) {
    transition-delay: 0.08s;
  }

  .mobile-nav.is-open li:nth-child(4) {
    transition-delay: 0.12s;
  }

  .mobile-nav.is-open .mobile-nav__foot {
    transition-delay: 0.16s;
  }

  /* The page behind stays put while the menu is open. */
  html.is-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .logo img {
    width: 84px;
  }

  .site-header__end .btn {
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .site-header__end .btn .icon {
    display: none;
  }

  .menu-btn {
    width: 40px;
    height: 40px;
  }

  .menu-btn::before,
  .menu-btn::after {
    left: 12px;
    right: 12px;
  }

  .menu-btn::before {
    top: 16px;
  }

  .menu-btn::after {
    top: 22px;
  }
}
