/* Side menu for phones and tablets: a button in the header opens a drawer from the right. */
.menu-toggle {
  display: none;
  justify-self: end;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  position: relative;
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transform: translateY(-4px);
}

.menu-toggle span::after {
  position: absolute;
  top: 7px;
  right: 0;
  width: 16px;
  height: 1px;
  background: currentColor;
  content: "";
}

.side-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}

.side-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.side-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 26, 46, 0.42);
  opacity: 0;
  transition: opacity 320ms ease;
}

.side-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(86vw, 380px);
  padding: 14px 28px max(28px, env(safe-area-inset-bottom));
  color: #1c2a48;
  background: #f6f2ea;
  box-shadow: -18px 0 40px rgba(11, 20, 38, 0.16);
  transform: translateX(100%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
  text-shadow: none;
}

.side-menu.is-open .side-menu-backdrop {
  opacity: 1;
}

.side-menu.is-open .side-menu-panel {
  transform: none;
}

.side-menu-close {
  align-self: flex-end;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.side-menu-close::before,
.side-menu-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
}

.side-menu-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.side-menu-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.side-menu-links {
  display: grid;
  gap: 6px;
  margin: clamp(28px, 8vh, 64px) 0 0;
}

.side-menu-links a {
  display: block;
  padding: 8px 0;
  font-family: "Bodoni Moda", Didot, Georgia, serif;
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(28, 42, 72, 0.14);
}

.side-menu-links a[aria-current="page"] {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.01em;
}

.side-menu-foot {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-menu-cta {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: #f6f2ea;
  background: #1c2a48;
}

html.side-menu-locked {
  overflow: hidden;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header .header-cta {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-menu-backdrop,
  .side-menu-panel {
    transition: none;
  }
}
