/* Isolated mobile navigation. No desktop or page-content selectors. */
.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  /* If JavaScript is delayed or unavailable, keep the mobile signature visible. */
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 1199;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 22px;
    color: #171717;
    background: rgba(247, 246, 243, 0.78);
    border-bottom: 0;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .mobile-header .brand {
    color: inherit;
    text-decoration: none;
    font: 600 10px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.18em;
  }

  .mobile-header .brand--logo,
  .ps-nav-brand.has-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    min-width: 82px;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding-block: 0;
    overflow: hidden;
    line-height: 0;
    position: static;
  }

  .mobile-header .brand--logo .brand-logo,
  .ps-nav-brand.has-logo .brand-logo {
    display: block;
    width: 145%;
    max-width: none;
    height: auto;
    filter: none;
    mix-blend-mode: multiply;
    margin: 0;
    transform: none;
    position: static;
  }

  /* Lockups retain the graphic mark and the written signature on light pages. */
  .ps-nav-brand.has-wordmark {
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    max-width: calc(100% - 3.25rem);
    gap: 0.625rem;
    overflow: visible;
  }

  .ps-nav-brand.has-wordmark .brand-mark {
    display: flex;
    flex: 0 0 2.5rem;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 100%;
    overflow: hidden;
  }

  .ps-nav-brand.has-wordmark .brand-wordmark {
    color: currentColor;
    font: 600 10px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.18em;
    white-space: nowrap;
  }

  .home-page .mobile-header .brand--logo .brand-logo,
  .home-page .ps-nav-brand.has-logo .brand-logo {
    filter: grayscale(1) contrast(1.55) brightness(1.35);
    mix-blend-mode: screen;
  }

  .mobile-header .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -12px;
    padding: 0;
    gap: 5px;
    border: 0;
    background: transparent;
  }

  .mobile-header .menu-toggle span {
    display: block;
    width: 20px;
    height: 1px;
    background: currentColor;
  }

  .mobile-header + .desktop-header { display: none; }

  .ps-mobile-nav {
    --nav-height: 58px;
    --nav-gutter: 22px;
    --nav-paper: 247, 246, 243;
    --nav-ink: #171717;
    --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: fixed;
    inset: 0 0 auto;
    z-index: 1200;
    height: var(--nav-height);
    color: var(--nav-ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: normal;
  }

  .ps-mobile-nav[data-in-flow] {
    position: sticky;
  }

  .ps-mobile-nav[data-theme="white"] {
    --nav-paper: 255, 255, 255;
  }

  /* The Home header shares the hero's dark, photographic field. */
  .home-page .mobile-header {
    position: absolute;
    inset: 0 0 auto;
    color: #f4f2ed;
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .home-page .ps-mobile-nav {
    --nav-paper: 14, 17, 16;
    --nav-ink: #f4f2ed;
  }

  .home-page .ps-nav-header {
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
  }

  .home-page .ps-mobile-nav[data-scrolled="true"] .ps-nav-header {
    background: rgba(10, 15, 14, 0.56);
    border-bottom-color: transparent;
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    transition: background 220ms ease, -webkit-backdrop-filter 220ms ease, backdrop-filter 220ms ease;
  }

  .home-page .ps-mobile-nav[data-in-flow] { position: absolute; }
  .home-page .ps-mobile-nav[data-in-flow][data-scrolled="true"] { position: fixed; }

  .company-profile-page .ps-mobile-nav[data-in-flow] {
    position: absolute;
    --nav-paper: 255, 255, 255;
    --nav-ink: #171717;
  }

  .company-profile-page .ps-nav-header {
    background: rgba(255, 255, 255, 0.14);
    border-bottom-color: rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
  }

  .company-profile-page .ps-mobile-nav[data-in-flow][data-scrolled="true"] {
    position: fixed;
  }

  .company-profile-page .ps-mobile-nav[data-scrolled="true"] .ps-nav-header {
    color: #171717;
    background: rgba(255, 255, 255, 0.14);
    border-bottom-color: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }

  .company-profile-page .ps-mobile-nav[data-scrolled="true"] .brand-logo {
    filter: none;
    mix-blend-mode: multiply;
  }

  .home-page .ps-nav-link { color: rgba(244, 242, 237, 0.68); }
  .home-page .ps-nav-link[aria-current="page"],
  .home-page .ps-nav-link:focus-visible,
  .home-page .ps-nav-link:active { color: var(--nav-ink); }
  .home-page .ps-nav-number { color: rgba(244, 242, 237, 0.48); }
  .home-page .ps-nav-link::before { background: rgba(244, 242, 237, 0.16); }

  .ps-mobile-nav,
  .ps-mobile-nav * {
    box-sizing: border-box;
  }

  .ps-nav-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 var(--nav-gutter);
    background: rgba(var(--nav-paper), 0.78);
    border-bottom: 0;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  /* The open navigation owns its viewport. It never inherits the page header's
     scroll tone, positioning, or stacking context. */
  body.menu-open .ps-mobile-nav {
    --nav-paper: 12, 16, 15;
    --nav-ink: #f4f2ed;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    color: #f4f2ed;
    background: #0c100f;
  }

  body.menu-open .ps-mobile-nav[data-open] .ps-nav-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    min-height: calc(var(--nav-height) + env(safe-area-inset-top));
    height: calc(var(--nav-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--nav-gutter) 0;
    color: #f4f2ed;
    background: rgba(12, 16, 15, 0.92);
    border-bottom-color: rgba(244, 242, 237, 0.12);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  body.menu-open .ps-mobile-nav[data-open] .ps-nav-brand,
  body.menu-open .ps-mobile-nav[data-open] .ps-nav-toggle {
    position: relative;
    z-index: 3;
    color: #f4f2ed;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  body.menu-open .ps-mobile-nav[data-open] .ps-nav-brand .brand-logo {
    filter: none;
    mix-blend-mode: normal;
  }

  body.menu-open .ps-nav-overlay {
    position: absolute;
    inset: calc(var(--nav-height) + env(safe-area-inset-top)) 0 0;
    z-index: 1;
    height: auto;
    background: #0c100f;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open .ps-nav-link {
    color: rgba(244, 242, 237, 0.72);
  }

  body.menu-open .ps-nav-link[aria-current="page"],
  body.menu-open .ps-nav-link:focus-visible,
  body.menu-open .ps-nav-link:active {
    color: #f4f2ed;
  }

  body.menu-open .ps-nav-number {
    color: rgba(244, 242, 237, 0.48);
  }

  body.menu-open .ps-nav-link::before {
    background: rgba(244, 242, 237, 0.16);
  }

  .ps-nav-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    white-space: nowrap;
    transition: opacity 180ms ease;
  }

  .ps-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 -12px 0 0;
    padding: 0;
    gap: 5px;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .ps-nav-toggle span {
    display: block;
    flex: 0 0 1px;
    width: 20px;
    height: 1px;
    background: currentColor;
    transform-origin: center;
    transition: transform 240ms var(--nav-ease), opacity 160ms ease;
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .ps-nav-overlay {
    position: fixed;
    inset: var(--nav-height) 0 0;
    z-index: 1;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(var(--nav-paper), 0.90);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 220ms ease, transform 240ms var(--nav-ease), visibility 0s 240ms;
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  body.menu-open .ps-mobile-nav[data-open="true"] .ps-nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .ps-nav-inner {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 28px var(--nav-gutter) max(28px, env(safe-area-inset-bottom));
  }

  .ps-nav-link {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 22px;
    min-height: 64px;
    margin: 0;
    padding: 22px 0;
    color: #625f59;
    text-decoration: none;
    font-size: clamp(21px, 5.6vw, 27px);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 180ms ease, opacity 180ms ease;
  }

  .ps-nav-link::before {
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    content: "";
    background: rgba(23, 23, 23, 0.10);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms var(--nav-ease);
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-link::before {
    transform: scaleX(1);
    transition-delay: var(--nav-delay, 0ms);
  }

  .ps-nav-number {
    flex: 0 0 16px;
    color: #77736d;
    font-size: 8px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
  }

  .ps-nav-label {
    display: inline-block;
  }

  .ps-nav-link[aria-current="page"] {
    color: var(--nav-ink);
    font-weight: 500;
  }

  /* One traveling line connects focus/touch/hover back to the current page. */
  .ps-nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--nav-line-width, 0px);
    height: 1px;
    background: var(--nav-ink);
    opacity: 0;
    pointer-events: none;
    transform: translate(var(--nav-line-x, 0px), var(--nav-line-y, 0px)) scaleX(0);
    transform-origin: left;
    transition: transform 240ms var(--nav-ease), width 240ms var(--nav-ease), opacity 160ms ease;
  }

  .ps-mobile-nav[data-open="true"] .ps-nav-indicator[data-visible="true"] {
    opacity: 1;
    transform: translate(var(--nav-line-x, 0px), var(--nav-line-y, 0px)) scaleX(1);
  }

  .ps-nav-link:focus-visible,
  .ps-nav-brand:focus-visible,
  .ps-nav-toggle:focus-visible {
    outline: 1px solid var(--nav-ink);
    outline-offset: 4px;
  }

  .ps-nav-link:focus-visible,
  .ps-nav-link:active {
    color: var(--nav-ink);
  }

  .ps-nav-brand:active,
  .ps-nav-toggle:active {
    opacity: 0.65;
  }

  @media (hover: hover) and (pointer: fine) {
    .ps-nav-link:hover {
      color: var(--nav-ink);
    }

    .ps-nav-brand:hover {
      opacity: 0.6;
    }
  }

  @media (max-width: 380px) {
    .ps-mobile-nav {
      --nav-height: 54px;
      --nav-gutter: 16px;
    }

    .ps-nav-brand {
      font-size: 9px;
      letter-spacing: 0.13em;
    }
  }

  @media (min-width: 700px) {
    .ps-mobile-nav {
      --nav-height: 64px;
      --nav-gutter: 32px;
    }
  }

  /* Reserve only the header's own row in short landscape viewports, where the
     existing page intro has too little top space for a fixed header. */
  @media (max-height: 480px) {
    .ps-mobile-nav {
      position: sticky;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .ps-mobile-nav *,
    .ps-mobile-nav *::before,
    .ps-mobile-nav *::after {
      transition: none !important;
      animation: none !important;
      scroll-behavior: auto;
    }
  }
}
