.service-nav { position: static; display: flex; align-items: center; gap: 3px; height: var(--header-height); }
.service-menu-toggle { display: grid; place-items: center; width: 22px; height: 36px; padding: 0; border: 0; background: transparent; color: #536077; cursor: pointer; }
.service-menu-toggle span { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 200ms ease; }
.service-nav.is-open .service-menu-toggle span { transform: translateY(2px) rotate(225deg); }
.service-menu-toggle:hover { color: #104ae4; }
.service-dropdown {
  position: absolute; z-index: 20; top: calc(100% - 1px); left: 0; right: 0;
  height: min(72svh, 680px); max-height: calc(100svh - var(--header-height)); overflow-y: auto;
  background: #fbfcff; box-shadow: 0 24px 50px rgba(13, 32, 70, .13);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-12px);
  transition: opacity 240ms ease, transform 350ms cubic-bezier(.22,1,.36,1), visibility 0s linear 350ms;
}
.service-nav.is-open .service-dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
.service-menu-wave { position: absolute; bottom: 0; right: 0; width: 100%; height: 35%; pointer-events: none; }
.service-menu-inner { position: relative; z-index: 1; width: calc(100% - 2 * var(--edge)); max-width: 1450px; min-height: 100%; margin: 0 auto; padding: clamp(36px, 7vh, 72px) 0 clamp(70px, 12vh, 115px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: clamp(45px, 8vw, 140px); white-space: normal; }
.service-menu-mark { display: block; width: 88px; height: 5px; margin-bottom: clamp(24px, 4vh, 42px); background: linear-gradient(90deg, #1055e9 48%, rgba(16,85,233,0)); border-radius: 5px; }
.service-menu-heading { margin: 0; color: #08142f; font-size: clamp(34px, 3.9vw, 62px); font-weight: 650; letter-spacing: -.045em; line-height: 1.2; }
.service-menu-description { margin: clamp(20px, 3.3vh, 32px) 0 0; color: #63738e; font-size: clamp(15px, 1.25vw, 20px); line-height: 1.7; }
.desktop-nav .service-dropdown .service-dropdown-overview { display: inline-flex; align-items: center; gap: 12px; margin-top: clamp(22px, 4vh, 40px); padding: 0 0 8px; border-bottom: 1px solid #1459ed; color: #1055e9; font-size: clamp(16px, 1.3vw, 21px); line-height: 1.35; }
.desktop-nav .service-dropdown .service-dropdown-overview span { transition: transform 200ms ease; }
.desktop-nav .service-dropdown .service-dropdown-overview:hover span, .desktop-nav .service-dropdown .service-dropdown-overview:focus-visible span { transform: translate(3px, -3px); }
.service-menu-links { display: flex; flex-direction: column; }
.desktop-nav .service-menu-links a { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; min-height: clamp(62px, 11vh, 108px); padding: 10px clamp(14px, 2vw, 30px); border-bottom: 1px solid #d6e0f0; color: #08142f; font-size: clamp(23px, 2.3vw, 37px); font-weight: 600; letter-spacing: -.03em; line-height: 1.25; }
.desktop-nav .service-menu-links a::before { content: ''; position: absolute; z-index: -1; inset: 3px 0; border-radius: 52px 12px 52px 12px; background: linear-gradient(110deg, rgba(228,241,255,.85), rgba(177,212,255,.62), rgba(232,247,255,.22)); opacity: 0; transform: scaleX(.96); transform-origin: left center; transition: opacity 220ms ease, transform 300ms ease; }
.desktop-nav .service-menu-links a:hover, .desktop-nav .service-menu-links a:focus-visible { color: #0755ec; }
.desktop-nav .service-menu-links a:hover::before, .desktop-nav .service-menu-links a:focus-visible::before { opacity: 1; transform: scaleX(1); }
.service-menu-arrow { display: grid; flex: 0 0 clamp(38px, 3.2vw, 50px); width: clamp(38px, 3.2vw, 50px); height: clamp(38px, 3.2vw, 50px); place-items: center; border-radius: 50%; color: #91a2ba; font-size: clamp(22px, 1.9vw, 30px); font-weight: 400; transition: color 200ms ease, background-color 200ms ease, transform 200ms ease; }
.desktop-nav .service-menu-links a:hover .service-menu-arrow, .desktop-nav .service-menu-links a:focus-visible .service-menu-arrow { background: #0755ec; color: #fff; transform: translateX(3px); }
@media (min-width: 881px) and (max-height: 720px) {
  .service-menu-inner { padding-top: 28px; padding-bottom: 55px; }
  .service-menu-mark { margin-bottom: 16px; }
  .service-menu-heading { font-size: clamp(30px, 3.2vw, 48px); }
  .service-menu-description { margin-top: 14px; line-height: 1.5; }
  .desktop-nav .service-dropdown .service-dropdown-overview { margin-top: 18px; }
  .desktop-nav .service-menu-links a { min-height: clamp(54px, 10vh, 72px); }
}
@media (max-width: 880px) {
  .mobile-menu nav {
    max-height: calc(100svh - var(--header-height) - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-menu .mobile-service-menu > summary {
    display: flex;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e6e9ea;
    font-size: 14px;
    list-style: none;
  }
  .mobile-menu .mobile-service-menu > summary::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #536077;
    border-bottom: 1.5px solid #536077;
    transform: translateY(-2px) rotate(45deg);
  }
  .mobile-menu .mobile-service-menu[open] > summary::after { transform: translateY(2px) rotate(225deg); }
  .mobile-menu nav .mobile-service-links a {
    padding: 9px 10px;
    border-bottom: 0;
    color: #4a566b;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-menu-toggle span, .service-dropdown { transition: none; }
}
html[data-motion='paused'] .service-menu-toggle span,
html[data-motion='paused'] .service-dropdown { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .desktop-nav .service-menu-links a::before, .service-menu-arrow, .desktop-nav .service-dropdown .service-dropdown-overview span { transition: none; }
}
html[data-motion='paused'] .desktop-nav .service-menu-links a::before,
html[data-motion='paused'] .service-menu-arrow,
html[data-motion='paused'] .desktop-nav .service-dropdown .service-dropdown-overview span { transition: none; }

/* Mobile navigation: the links remain usable in the original details menu without JS. */
@media (max-width: 880px) {
  html.mobile-nav-open { overflow: hidden; overscroll-behavior: none; }
  html.mobile-nav-open body { overscroll-behavior: none; }

  /* The menu locks page scrolling; keep the original header visible at the viewport top. */
  html.mobile-nav-open body > .header,
  html.mobile-nav-open body.home-page > .header.is-transparent {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    background: #fff;
    color: #15181e;
  }
  html.mobile-nav-open body:not(.home-page)::before {
    content: '';
    display: block;
    height: var(--header-height);
  }
  html.mobile-nav-open body.home-page > .header.is-transparent::before { opacity: 0; }
  html.mobile-nav-open body.home-page > .header.is-transparent .brand img { filter: none; }

  .mobile-menu.mobile-nav-enhanced > summary {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    z-index: 2;
  }
  .mobile-menu.mobile-nav-enhanced > summary span {
    position: absolute;
    left: 8px;
    width: 27px;
    height: 1.5px;
    transform-origin: center;
    transition: transform .3s ease, top .3s ease;
  }
  .mobile-menu.mobile-nav-enhanced > summary span:first-child { top: 17px; }
  .mobile-menu.mobile-nav-enhanced > summary span:last-child { top: 25px; }
  .mobile-menu.mobile-nav-enhanced.is-open > summary span:first-child { top: 21px; transform: rotate(45deg); }
  .mobile-menu.mobile-nav-enhanced.is-open > summary span:last-child { top: 21px; transform: rotate(-45deg); }

  .mobile-menu.mobile-nav-enhanced > nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    max-height: none;
    padding: 0;
    overflow: hidden;
    background: #f5f9ff;
    box-shadow: none;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
    transition: clip-path .55s cubic-bezier(.22, 1, .36, 1), opacity .25s ease;
  }
  .mobile-menu.mobile-nav-enhanced.is-open > nav {
    opacity: 1;
    clip-path: inset(0);
    pointer-events: auto;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary,
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: clamp(28px, 5.2vh, 52px) clamp(24px, 5vw, 42px) calc(145px + env(safe-area-inset-bottom, 0px));
    background: #f5f9ff;
    isolation: isolate;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary { z-index: 1; }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary {
    z-index: 2;
    transform: translateX(100%);
    transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  }
  .mobile-menu.mobile-nav-enhanced nav.is-services-open .mobile-nav-secondary { transform: translateX(0); }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary::after,
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary::after {
    content: '';
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: -1px;
    left: 0;
    height: clamp(95px, 17vh, 165px);
    background: url('../assets/mobile-menu-wave.svg') center bottom / 100% 100% no-repeat;
    pointer-events: none;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary > *,
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary > * { position: relative; z-index: 1; flex-shrink: 0; }

  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary .mobile-service-menu > summary {
    min-height: clamp(64px, 8vh, 74px);
    padding: 0 20px;
    border: 0;
    border-radius: 16px;
    background: #deecff;
    color: #1557e9;
    font-size: clamp(21px, 5.4vw, 27px);
    font-weight: 600;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary .mobile-service-menu > summary::after,
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary .mobile-service-menu[open] > summary::after {
    content: '→';
    width: auto;
    height: auto;
    border: 0;
    color: #1557e9;
    font-size: 27px;
    line-height: 1;
    transform: none;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-primary > a:not(.mobile-nav-cta) {
    display: flex;
    align-items: center;
    min-height: clamp(60px, 9.4vh, 90px);
    padding: 0 12px;
    border-bottom: 1px solid #dce5f2;
    color: #0c1b38;
    font-size: clamp(21px, 5.4vw, 27px);
    font-weight: 600;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 60px;
    margin-top: clamp(28px, 4.5vh, 48px);
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    background: #1557e9;
    color: #fff;
    font-size: clamp(19px, 4.8vw, 23px);
    font-weight: 600;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-cta-arrow { font-size: 1.15em; line-height: 1; }

  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary { padding-top: clamp(22px, 3.5vh, 38px); }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-back {
    align-self: flex-start;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1557e9;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-back::before { content: '←'; margin-right: 8px; font-size: 22px; }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-eyebrow {
    margin: clamp(18px, 3vh, 30px) 0 0;
    color: #10203c;
    font-size: clamp(19px, 5vw, 24px);
    font-weight: 600;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-heading {
    margin: clamp(18px, 3vh, 30px) 0 0;
    color: #0b1b39;
    font-size: clamp(29px, 7vw, 38px);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.035em;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary .mobile-service-links { margin-top: clamp(24px, 4vh, 42px); }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary .mobile-service-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: clamp(58px, 6.5vh, 70px);
    padding: 0 10px;
    border-bottom: 1px solid #dce5f2;
    color: #0c1b38;
    font-size: clamp(18px, 4.8vw, 24px);
    font-weight: 600;
  }
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary .mobile-service-links a::after { content: '→'; color: #91a4c1; font-size: 25px; font-weight: 400; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu.mobile-nav-enhanced > summary span,
  .mobile-menu.mobile-nav-enhanced > nav,
  .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary { transition: none; }
}
html[data-motion='paused'] .mobile-menu.mobile-nav-enhanced > summary span,
html[data-motion='paused'] .mobile-menu.mobile-nav-enhanced > nav,
html[data-motion='paused'] .mobile-menu.mobile-nav-enhanced nav .mobile-nav-secondary { transition: none; }
