/* ------------------------------------------------------------------ */
/* Phone menu                                                         */
/* ------------------------------------------------------------------ */

/* Two hairlines that turn into a cross. */
.menu-btn {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  margin: -14px -12px -14px 0;
  color: var(--fg);
}

.menu-btn__line {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: currentColor;
  transition: transform 0.32s var(--ease), translate 0.32s var(--ease);
}

.menu-btn__line:first-child { top: 18px; }
.menu-btn__line:last-child { top: 25px; left: 18px; }

.menu-btn:focus-visible {
  outline-offset: -6px;
}

.menu .menu-btn__line:first-child {
  translate: 0 3.5px;
  transform: rotate(45deg);
}

.menu .menu-btn__line:last-child {
  left: 12px;
  translate: 0 -3.5px;
  transform: rotate(-45deg);
}

html.is-locked {
  overflow: hidden;
}

.menu {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
  color: var(--fg);
  overflow: hidden;
}

.menu::backdrop {
  background: rgba(5, 5, 6, 0.62);
}

.menu__sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l);
  background: var(--bg);
}

.menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.menu__nav {
  display: grid;
  margin-top: clamp(40px, 10vh, 96px);
  border-top: 1px solid var(--rule);
}

.menu__item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  align-items: baseline;
  row-gap: 8px;
  width: 100%;
  padding: clamp(14px, 2.6vh, 22px) 0;
  border-bottom: 1px solid var(--rule);
  text-align: start;
  text-decoration: none;
  color: var(--fg);
  font-size: clamp(26px, 8.4vw, 40px);
  font-weight: 470;
  line-height: 1;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  font-feature-settings: "kern", "case";
}

.menu__item:focus-visible {
  outline-offset: -1px;
}

.menu__item[aria-current="page"] .menu__label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: var(--fg-3);
}

.menu__n {
  align-self: start;
  padding-top: 0.35em;
}

/* The company block: one line each (name, street, city, country, KvK, VAT), never run together. */
.menu__company {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: auto;
  padding-top: 28px;
  font-style: normal;
  line-height: 1.6;
}

.menu__company .company__name {
  color: var(--fg-2);
}

.menu[open] .menu__sheet {
  animation: panel-in 0.42s var(--ease) both;
}

/* The cross draws itself from the two lines on open. */
.menu[open] .menu-btn__line:first-child {
  animation: line-a 0.36s var(--ease) 0.06s both;
}

.menu[open] .menu-btn__line:last-child {
  animation: line-b 0.36s var(--ease) 0.06s both;
}

@keyframes line-a {
  from { translate: 0 0; transform: none; }
}

@keyframes line-b {
  from { left: 18px; translate: 0 0; transform: none; }
}

.menu[open] .menu__nav,
.menu[open] .menu__company {
  animation: content-in 0.5s var(--ease) 0.08s both;
}

.menu.is-closing .menu__sheet {
  animation: panel-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
}

/* Phones (and narrow windows): the navigation goes behind the button. */
@media (max-width: 760px) {
  .top .nav,
  .top .contact-trigger,
  .top .top__signin {
    display: none;
  }

  .menu-btn {
    display: block;
  }
}
