/* The menu (menu.js): where the header has no room for its links (1100px and narrower), the button
   next to Contact opens them, large, in a card over the page. The menu button above the solutions on
   the homepage opens the same menu at every width. Without JavaScript the button stays hidden; the
   footer has the same links. */

/* ------------------------------------------------------------ the button in the header */

.sb-hdr-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.sb-menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #252324;
  color: #fffce1;
  cursor: pointer;
  flex: none;
  transition: background-color 0.2s ease;
}

.sb-menu-btn svg {
  display: block;
}

.sb-menu-btn:hover {
  background: #000000;
}

.sb-menu-btn:focus-visible {
  outline: 2px solid #252324;
  outline-offset: 3px;
}

/* the language: the round flag of the other language (nl/ is the Dutch site, tools/i18n makes it);
   its name slides out under the pointer and is always there for screen readers */
.sb-lang {
  display: flex;
  align-items: center;
  flex: none;
  height: 46px;
  border-radius: 999px;
  background: #252324;
  color: #fffce1;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.sb-lang,
.sb-lang:hover {
  color: #fffce1;
}

.sb-lang:hover {
  background: #000000;
}

.sb-lang:focus-visible {
  outline: 2px solid #252324;
  outline-offset: 3px;
}

.sb-lang__flag {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  margin: 7px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 252, 225, 0.85);
}

.sb-lang__flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sb-lang__name {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s ease, padding 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sb-lang:hover .sb-lang__name,
.sb-lang:focus-visible .sb-lang__name {
  max-width: 140px;
  padding-right: 18px;
  opacity: 1;
}

/* in the menu: on the card's dark, with its name */
.sb-lang--menu {
  height: 52px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 252, 225, 0.35);
  font-size: 20px;
}

.sb-lang--menu .sb-lang__flag {
  width: 36px;
  height: 36px;
  margin: 8px;
}

.sb-lang--menu .sb-lang__name {
  max-width: none;
  padding-right: 22px;
  opacity: 1;
}

.sb-lang--menu:hover {
  background: rgba(255, 252, 225, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .sb-lang__name {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .mn-ok .sb-menu-btn {
    display: grid;
    place-items: center;
  }
}

/* on phones the header moves out a little and Contact becomes a round button with the speech bubble
   it has above the solutions, so the name still fits next to the eagle; its name stays for screen
   readers */
@media (max-width: 480px) {
  .sb-header {
    left: 24px !important;
    right: 20px !important;
    gap: 12px !important;
  }

  .sb-hdr-end {
    gap: 6px;
  }

  .mn-ok .sb-hdr-end .sb-pill {
    width: 42px;
    height: 42px !important;
    padding: 0 !important;
    justify-content: center;
    font-size: 0 !important;
  }

  .mn-ok .sb-hdr-end .sb-pill::before {
    content: '';
    width: 42px;
    height: 42px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill-rule='evenodd' d='M18.2 14.3H29.8A4.1 4.1 0 0 1 33.9 18.4V26.3A4.1 4.1 0 0 1 29.8 30.4H26.3L24 33.2L21.7 30.4H18.2A4.1 4.1 0 0 1 14.1 26.3V18.4A4.1 4.1 0 0 1 18.2 14.3ZM18.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0ZM22.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0ZM26.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill-rule='evenodd' d='M18.2 14.3H29.8A4.1 4.1 0 0 1 33.9 18.4V26.3A4.1 4.1 0 0 1 29.8 30.4H26.3L24 33.2L21.7 30.4H18.2A4.1 4.1 0 0 1 14.1 26.3V18.4A4.1 4.1 0 0 1 18.2 14.3ZM18.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0ZM22.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0ZM26.85 22.8a1.15 1.15 0 1 0 2.3 0a1.15 1.15 0 1 0 -2.3 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }

  .sb-menu-btn,
  .sb-menu-btn svg {
    width: 42px;
    height: 42px;
  }

  .sb-hdr-end .sb-lang {
    height: 42px;
  }

  .sb-hdr-end .sb-lang__flag {
    width: 30px;
    height: 30px;
    margin: 6px;
  }

  .sb-hdr-end .sb-lang:hover .sb-lang__name {
    max-width: 0;
    padding-right: 0;
    opacity: 0;
  }
}

/* ------------------------------------------------------------ the menu */

html.mn-lock {
  overflow: hidden;
}

.mn {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  box-sizing: border-box;
  background: transparent;
  color: #fffce1;
  overflow: hidden;
  overscroll-behavior: contain;
  font-family: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mn::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.mn__card {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 40px;
  background: #252324;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mn__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mn__fx--grain {
  mix-blend-mode: overlay;
  opacity: 0.1;
}

.mn__fx--dots {
  background-image: radial-gradient(circle at center, rgba(255, 252, 225, 0.07) 0.62px, rgba(255, 252, 225, 0) 1.05px);
  background-size: 7.5px 7.5px;
}

/* the top: the eagle and the name where they are in the header, the close button where the menu
   button was */
.mn__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 32px 0 40px;
}

.mn__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fffce1;
}

.mn__close {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #feeb8d;
  color: #252324;
  cursor: pointer;
  flex: none;
  transition: transform 0.3s ease;
}

.mn__close:hover {
  transform: rotate(90deg);
}

.mn__close:focus-visible,
.mn__link:focus-visible,
.mn__cta:focus-visible,
.mn__logo:focus-visible {
  outline: 2px solid #feeb8d;
  outline-offset: 4px;
}

.mn__nav {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 40px;
}

.mn__nav ul {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 252, 225, 0.16);
}

.mn__nav li {
  border-bottom: 1px solid rgba(255, 252, 225, 0.16);
}

.mn__link {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 14px 0 12px;
  color: #fffce1;
  text-decoration: none;
  font-size: clamp(34px, 5.6vw, 64px);
  font-size: min(clamp(34px, 5.6vw, 64px), 6.4svh);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.05em;
}

.mn__no {
  flex: none;
  width: 40px;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: rgba(255, 252, 225, 0.5);
  transform: translateY(-0.2em);
}

.mn__name {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}

.mn__link:hover .mn__name {
  transform: translateX(10px);
  color: #feeb8d;
}

/* the page you are on: yellow */
.mn__link[aria-current='page'] {
  color: #feeb8d;
}

.mn__foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 0 40px 36px;
}

.mn__cta {
  height: 52px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #feeb8d;
  color: #252324;
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: background-color 0.2s ease;
}

.mn__cta:hover {
  background: #fffce1;
}

.mn__cta[aria-current='page'] {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px #feeb8d;
  color: #feeb8d;
}

@media (max-width: 720px) {
  .mn__card {
    border-radius: 32px;
  }

  .mn__top {
    padding: 23px 24px 0 28px;
  }

  .mn__nav {
    align-items: flex-start;
    padding: 36px 24px 32px;
  }

  .mn__link {
    gap: 14px;
    padding: 13px 0 11px;
  }

  .mn__no {
    width: 30px;
    font-size: 15px;
  }

  .mn__foot {
    padding: 0 24px 28px;
  }
}

/* small phones: everything a little closer together */
@media (max-width: 720px) and (max-height: 700px) {
  .mn__nav {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .mn__link {
    padding: 10px 0 8px;
    font-size: 28px;
  }

  .mn__foot {
    padding-bottom: 20px;
  }
}

/* phones in landscape: the links in two columns, everything a little closer together */
@media (max-height: 520px) and (min-width: 560px) {
  .mn__top {
    padding-top: 14px;
  }

  .mn__nav {
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .mn__nav ul {
    columns: 2;
    column-gap: 40px;
    border-top: 0;
  }

  .mn__nav li {
    break-inside: avoid;
  }

  .mn__link {
    padding: 10px 0 8px;
    font-size: 26px;
  }

  .mn__foot {
    padding-bottom: 18px;
  }

  .mn__cta {
    height: 46px;
  }
}

/* ------------------------------------------------------------ opening and closing */

/* menu.js sets is-open a frame after the menu shows, and takes it off before it closes */
@media (prefers-reduced-motion: no-preference) {
  .mn::backdrop {
    transition: opacity 0.5s ease;
    opacity: 0;
  }

  .mn.is-open::backdrop {
    opacity: 1;
  }

  .mn__card {
    clip-path: inset(0 0 100% 0 round 40px);
    transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.2, 1);
  }

  .mn.is-open .mn__card {
    clip-path: inset(0 0 0 0 round 40px);
  }

  .mn__top,
  .mn__nav li,
  .mn__foot {
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .mn.is-open .mn__top,
  .mn.is-open .mn__nav li,
  .mn.is-open .mn__foot {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mn.is-open .mn__top {
    transition-delay: 0.2s;
  }

  .mn.is-open .mn__nav li {
    transition-delay: calc(0.25s + var(--i, 0) * 0.05s);
  }

  .mn.is-open .mn__foot {
    transition-delay: 0.55s;
  }
}
