/* RENALDWEB: isolated menu. Header geometry and brand use main.css. */
.header {
  --header-menu-spacing: 16px;
}

.front-page .site-header__bar,
.blog-page .site-header__bar,
.about-page .site-header__bar,
.longform-page .site-header__bar,
.service-page .site-header__bar,
.contact-page .site-header__bar,
.page-node-3171012 .site-header__bar {
  --site-header-foreground: var(--fourth-color);
}

.front-page .site-header__brand,
.blog-page .site-header__brand,
.about-page .site-header__brand,
.longform-page .site-header__brand,
.service-page .site-header__brand,
.contact-page .site-header__brand,
.page-node-3171012 .site-header__brand {
  --site-header-foreground: #9b98ff;
}

.front-page .site-header,
.blog-page .site-header,
.about-page .site-header,
.longform-page .site-header,
.service-page .site-header,
.contact-page .site-header,
.page-node-3171012 .site-header {
  --site-header-background: var(--front-page-background);
}

.front-page .header__desktop,
.blog-page .header__desktop,
.about-page .header__desktop,
.longform-page .header__desktop,
.service-page .header__desktop,
.contact-page .header__desktop,
.page-node-3171012 .header__desktop {
  --header-nav-color: var(--fourth-color);
}

.header [hidden] {
  display: none;
}

.header__desktop,
.header__list,
.header__row {
  display: flex;
  align-items: center;
}

.header__desktop {
  gap: 16px;
}

.header__item {
  position: relative;
}

.header__list {
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__link {
  display: block;
  padding: 12px var(--header-menu-spacing);
  color: var(--header-nav-color, #6f6f7b);
  background: transparent;
  border: 0;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.header__submenu-arrow {
  display: block;
  flex: 0 0 1em;
  width: 1em;
  height: 1em;
  fill: currentColor;
  transform: rotate(90deg);
}

.header__link[aria-expanded="true"] .header__submenu-arrow {
  transform: none;
}

.header__panel {
  position: absolute;
  top: 100%;
  right: auto;
  left: 0;
  z-index: 30;
  width: 260px;
  padding-top: 4px;
  color: var(--header-nav-color, #faf3e6);
  text-align: left;
}

.header__panel-surface {
  position: relative;
}

.header__menu-overlay,
.header__responsive {
  display: none;
}

.header__submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__submenu-link {
  display: block;
  color: inherit;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
}

@media screen and (min-width: 992px) {
  .header__desktop .header__submenu-link {
    padding: 6px var(--header-menu-spacing);
    border-radius: 50rem;
  }

  .header__submenu-link:hover,
  .header__submenu-link:focus-visible,
  .header__submenu-link[aria-current="page"] {
    color: #1c2246;
    background: var(--fourth-color, #faf3e6);
  }

  .header__desktop .header__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    height: 36px;
    padding-block: 6px;
    border-radius: 50rem;
    transition: color 0.05s ease-out, background-color 0.05s ease-out;
  }

  .header__desktop .header__link--selected {
    color: var(--fourth-color, #faf3e6);
    background-color: #0f1433;
  }

  .header__desktop .header__link:hover {
    color: #1c2246;
    background-color: #fdfaf5;
  }

  .header__submenu-overview {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  .header__desktop .header__submenu {
    display: grid;
    gap: 8px;
    padding: 12px 8px;
  }

  .header__desktop .header__panel-surface {
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--front-page-background, #1c2246) 85%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
  }
}

@media screen and (max-width: 991.98px) {
  .header__desktop {
    display: none;
  }

  /* RENALDWEB: show the backdrop immediately; animate only the card. */
  .header__menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
  }

  .header__menu-overlay[hidden] {
    display: none;
  }

  .header__menu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 597px;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding: 70px 0;
    color: #13183b;
    background: #fdfaf5;
    box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
    font-family: var(--main-font-family, "PT Sans", sans-serif);
    animation: header-menu-enter 0.6s ease both;
  }

  .header__menu-close {
    position: absolute;
    top: 20px;
    /* RENALDWEB: the icon's 8px button padding completes the 10px content inset. */
    right: calc(5% + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
  }

  .header__responsive {
    display: block;
    min-height: 0;
    padding-inline: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .header__menu-card,
  .header__menu-card * {
    box-sizing: border-box;
  }

  .header__menu-close:focus-visible,
  .header__responsive a:focus-visible,
  .header__responsive button:focus-visible {
    color: #ffffff;
    background: #13183b;
    outline: 2px solid #ffffff;
    outline-offset: -4px;
  }

  .header__responsive .header__list {
    display: block;
  }

  .header__responsive .header__link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    color: inherit;
    font-size: 28px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
  }

  .header__responsive .header__link[aria-current="page"] .header__link-label,
  .header__responsive .header__submenu-link[aria-current="page"] {
    text-decoration: underline;
  }

  .header__responsive .header__panel {
    position: static;
    width: 100%;
    padding: 0 0 0 32px;
    color: inherit;
  }

  .header__responsive .header__submenu-link {
    padding: 8.5px 0;
  }

  .header__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
    font-size: 21px;
    line-height: 1.5;
  }

  .header__contact-name {
    margin: 0;
    font-weight: 700;
  }

  .header__contact a,
  .header__social-link a {
    color: inherit;
    text-decoration: none;
  }

  .header__social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 32px;
    font-size: 18px;
    font-weight: 700;
    line-height: 21px;
  }

  .header__social-link p {
    margin: 0;
  }
}

@keyframes header-menu-enter {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media screen and (max-width: 767px) {
  .header__menu-overlay {
    align-items: center;
  }

  .header__menu-card {
    height: calc(100% - 24px);
    padding-block: 50px;
  }
}

@media screen and (max-width: 991.98px) and (orientation: landscape) {
  .header__menu-card {
    height: 100%;
  }
}

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

  .header__menu-card {
    animation: none;
  }
}
