/* Shared global navigation. Content, scene typography and photographs retain their own styles. */
/* The cinematic controller may fade its former scene navigation; global destinations stay readable. */
.site-header .site-navigation, .global-dialog .site-navigation { opacity: 1 !important; }
.site-header .site-navigation > .global-link[data-global="solutions"] { color: var(--teal); }
.site-header { gap: 24px; flex-wrap: nowrap; }
.site-header .site-navigation { display: flex; align-items: center; flex: none; gap: clamp(24px, 3vw, 44px); margin: 0 0 0 auto; width: auto; padding: 0; order: initial; pointer-events: auto; }
.site-header .site-navigation > .global-link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #c5d1d5; white-space: nowrap; text-decoration: none; font: 11px/1.3 var(--mono); letter-spacing: .065em; }
.site-header .global-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 1px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.site-header .global-link:is(:hover, [aria-current]) { color: var(--teal); }
.site-header .global-link:is(:hover, [aria-current])::after { transform: scaleX(1); }
.site-header .site-navigation > .global-model { display: grid; align-content: center; gap: 7px; border-left: 1px solid var(--line); padding-left: 24px; margin: 0; }
.site-header .global-model small { font: 9px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
.site-header .global-model b { font: inherit; font-weight: 400; }
.site-header .global-model::after { left: 24px; }
.site-header .global-contact { padding: 0; border: 0; border-radius: 0; min-width: 0; background: transparent; box-shadow: none; }
.solutions-header.site-header .global-contact { min-width: 123px; padding: 0 24px; border: 1px solid rgba(42,221,209,.66); border-radius: 999px; background: rgba(0,12,15,.5); color: #fff; font: 14px/1.2 var(--sans); letter-spacing: 0; }
.solutions-header.site-header .global-contact::after { content: none; }
.sixis-discover { display: inline-flex; align-items: center; flex: none; gap: 8px; min-height: 44px; color: #a5b9bb; font: 11px/1.4 var(--mono); text-decoration: none; white-space: nowrap; pointer-events: auto; }
.sixis-discover:hover { color: var(--teal); }
.site-header .global-toggle, .site-header .global-solutions-shortcut { display: none; }
.global-toggle { flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(133,185,182,.55); border-radius: 50%; padding: 0; background: rgba(4,12,13,.55); color: var(--paper); cursor: pointer; pointer-events: auto; touch-action: manipulation; }
.global-toggle svg { display: block; width: 23px; height: 23px; }
.global-solutions-shortcut { align-items: center; flex: none; min-height: 44px; margin-left: auto; color: var(--teal); font: 11px/1.2 var(--mono); letter-spacing: .065em; text-decoration: none; pointer-events: auto; }
.site-header[data-compact] { gap: 16px; }
.site-header[data-compact] > .sixis-discover { display: none; }
.site-header[data-compact] .global-toggle, .site-header[data-compact] .global-solutions-shortcut { display: inline-flex; }
.site-header :is(a, button):focus-visible, .global-dialog :is(a, button):focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.global-measure { position: absolute; display: flex; align-items: center; gap: 24px; width: max-content; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.site-header .global-measure .site-navigation { display: flex; }
.site-header .global-measure .sixis-discover { display: inline-flex; }
.solutions-header.site-header { position: sticky; top: 0; z-index: 40; min-height: 80px; padding-top: 17px; padding-bottom: 17px; background: rgba(3,14,18,.94); border-bottom: 1px solid transparent; }
.solutions-header.site-header[data-navigation-scrolled] { border-bottom-color: rgba(40,201,193,.16); }
/* Native modal: small, readable panel, with its own scrolling on short viewports. */
.global-dialog { position: fixed; inset: calc(var(--site-header-height, 80px) + 8px) max(20px, env(safe-area-inset-right, 0px)) auto auto; width: min(380px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - var(--site-header-height, 80px) - 24px - env(safe-area-inset-bottom, 0px)); margin: 0; padding: 12px 16px 16px; border: 1px solid rgba(40,201,193,.38); border-radius: 0 0 18px 18px; background: rgba(3,14,18,.97); color: var(--paper); box-shadow: 0 24px 48px rgba(0,0,0,.3); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.global-dialog::backdrop { background: rgba(2,8,10,.35); backdrop-filter: blur(3px); }
.global-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.global-dialog-head > span { color: #83aaa8; font: 8px/1.6 var(--mono); letter-spacing: .04em; }
.global-close { display: flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0; background: none; border: 0; color: #c5d1d5; font: 12px/1.3 var(--sans); cursor: pointer; }
.global-close span { color: var(--teal); font: 24px/1 var(--sans); }
.global-dialog .site-navigation { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 0; }
.global-dialog .site-navigation > .global-link { display: flex; align-items: center; justify-content: space-between; min-height: 49px; margin: 0; padding: 0 8px; border: 0; border-bottom: 1px solid rgba(133,185,182,.16); border-radius: 0; background: none; box-shadow: none; color: #c5d1d5; font: 12px/1.3 var(--mono); letter-spacing: .065em; text-decoration: none; }
.global-dialog .global-link::after { content: '→'; position: static; color: var(--teal); font: 18px/1 var(--sans); }
.global-dialog .global-link > span[aria-hidden] { display: none; }
.global-dialog .global-link[data-global="solutions"] { color: var(--teal); background: linear-gradient(90deg, rgba(9,237,224,.065), transparent); box-shadow: inset 1px 0 var(--teal); }
.global-dialog .site-navigation > .global-model { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-block: 12px; }
.global-dialog .global-model small { grid-column: 1; color: #83aaa8; font: 9px/1.4 var(--mono); letter-spacing: .075em; }
.global-dialog .global-model b { grid-column: 1; font: inherit; font-weight: 400; }
.global-dialog .global-model::after { grid-column: 2; grid-row: 1 / 3; }
.global-dialog .global-link[aria-current], .global-dialog .global-link:hover { color: var(--teal); }
.global-dialog .sixis-discover { display: flex; justify-content: space-between; min-height: 49px; padding: 8px; margin-top: 14px; border-top: 1px solid rgba(40,201,193,.3); font: 12px/1.3 var(--mono); }
html.global-navigation-open, html.global-navigation-open body { overflow: hidden; }
/* Independent cinematic controller, never a second global menu. */
.home-explore.chapter-control { display: block; position: fixed; z-index: 35; left: clamp(20px, 4vw, 64px); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); pointer-events: auto; }
.home-explore .chapter-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 112px; min-height: 44px; border: 0; padding: 0; background: none; color: var(--teal); font: 11px/1.3 var(--mono); letter-spacing: .065em; }
.home-explore .chapter-toggle svg { display: none; }
.home-explore .chapter-toggle::after { content: '+'; font: 20px/1 var(--sans); }
.home-explore .chapter-toggle[aria-expanded="true"]::after { content: '−'; }
.home-explore .chapter-toggle-count, .home-explore #chapter-current-label { display: none; }
.home-explore .chapter-menu { top: auto; right: auto; bottom: calc(100% + 8px); left: 0; width: min(330px, calc(100vw - 40px)); max-height: calc(100dvh - var(--site-header-height, 80px) - 112px); border: 1px solid rgba(40,201,193,.38); background: rgba(3,14,18,.97); padding: 8px 16px; border-radius: 0 0 18px 18px; overflow-y: auto; }
.home-explore .chapter-option { display: grid; grid-template-columns: 24px 1fr 18px; align-items: center; gap: 12px; min-height: 44px; border: 0; border-bottom: 1px solid rgba(133,185,182,.16); padding: 0 4px; color: #c5d1d5; background: none; }
.home-explore .chapter-option::after { content: '→'; font: 18px/1 var(--sans); color: #83aaa8; }
.home-explore .chapter-option span { font: 10px/1 var(--mono); }
.home-explore .chapter-option b { font: 12px/1.3 var(--mono); letter-spacing: .065em; font-weight: 400; }
.home-explore .chapter-option[aria-current="step"] { box-shadow: inset 1px 0 var(--teal); background: linear-gradient(90deg, rgba(9,237,224,.065), transparent); }
.home-explore .chapter-option[aria-current="step"] :is(b,span), .home-explore .chapter-option[aria-current="step"]::after { color: var(--teal); }
.home-explore .chapter-menu-heading { padding: 10px 4px 14px; font: 9px/1.4 var(--mono); }
.story-nav .scroll-label { visibility: hidden; min-width: 112px; }
.timeline a { min-width: 44px; min-height: 44px; }
body:is(.in-outsourcing, .in-reading) .site-header .site-navigation { display: flex; }
body.in-reading .home-explore, body.andrei-interruption-open .home-explore { display: none; }
/* Global compact header reserves its space instead of covering scene copy. */
html[data-home-navigation] body { padding-top: var(--home-header-height, 66px); }
html[data-home-navigation] .topbar { background: var(--ink); border-bottom: 1px solid rgba(205,244,237,.12); }
html[data-home-navigation] body:not(.andrei-interruption-open) .topbar { visibility: visible; pointer-events: auto; }
html[data-home-navigation] .scene, html.enhanced[data-home-navigation] .human-sticky { top: var(--home-header-height, 66px); height: calc(100svh - var(--home-header-height, 66px)); min-height: 0; }
html[data-home-navigation] .industries-guide { top: calc(var(--home-header-height, 66px) + 12px); max-height: calc(100svh - var(--home-header-height, 66px) - 28px); overflow-y: auto; }
html[data-home-navigation] .industry-entry { scroll-margin-top: calc(var(--home-header-height, 66px) + 100px); }
html[data-home-navigation] .knowledge { scroll-margin-top: calc(var(--home-header-height, 66px) + 24px); }
/* Local category navigation belongs exclusively to the solutions grid. */
.solutions-local-navigation { position: sticky; top: var(--site-header-height, 80px); z-index: 25; margin: 0 0 18px; padding: 6px 12px; border-block: 1px solid rgba(40,201,193,.22); background: rgba(3,14,18,.97); }
.solutions-local-navigation .axis-selector { display: flex; align-items: center; justify-content: flex-start; gap: clamp(18px, 3vw, 40px); flex-wrap: nowrap; }
.solutions-local-navigation .axis-selector a { font-size: 11.5px; min-height: 44px; }
.solutions-local-navigation .overview-selector::before { content: none; }
.solutions-local-navigation .overview-selector { padding-right: 20px; border-right: 1px solid var(--line); }
.category-select { display: none; width: 100%; min-height: 44px; padding: 0 32px 0 8px; border: 0; border-radius: 0; background: var(--ink); color: var(--teal); font: 12px/1.4 var(--mono); cursor: pointer; }
.category-select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.solution-card { scroll-margin-top: calc(var(--site-header-height, 80px) + 76px); }
.solutions-main { scroll-margin-top: var(--site-header-height, 80px); }
@media (max-width:720px) {
  .solutions-header.site-header { min-height: 66px; padding-top: calc(11px + env(safe-area-inset-top,0px)); padding-bottom: 10px; }
  .site-header[data-compact] { gap: 12px; }
  .home-explore.chapter-control { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .solutions-local-navigation { padding-inline: 8px; }
  .solutions-local-navigation[data-local-ready] .axis-selector { display: none; }
  .solutions-local-navigation[data-local-ready] .category-select { display: block; }
}
@media (max-width:360px) {
  .site-header[data-compact] { gap: 9px; }
  .site-header .global-solutions-shortcut { font-size: 10px; }
}
@media (max-height:500px) {
  .global-dialog { inset-block-start: 8px; max-height: calc(100dvh - 16px); }
  .home-explore.chapter-control { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .home-explore .chapter-menu { max-height: calc(100dvh - 70px); }
}
@media (forced-colors:active) {
  .site-header, .global-dialog, .home-explore .chapter-menu, .solutions-local-navigation, .category-select { background: Canvas; color: CanvasText; border-color: ButtonText; }
  .global-dialog::backdrop { backdrop-filter: none; }
  .global-link[aria-current], .global-solutions-shortcut, .sixis-discover { color: LinkText; }
}
@media (prefers-reduced-motion:reduce) {
  .global-link, .home-explore .chapter-menu { transition: none; animation: none; }
}

html:not(.enhanced) .home-explore { display: none; }
html[data-home-navigation] .outsourcing-stage { min-height: max(620px, calc(100svh - var(--home-header-height, 66px))); }
html[data-home-navigation] .outsourcing.is-scroll-scene .outsourcing-stage { min-height: 0; }
@media (max-width:1100px) { .story-outsourcing { display: none; } }
.site-header:not([data-global-ready]) { overflow-x: auto; }
.site-header:not([data-global-ready]) > :is(.brand, .solutions-brand) { flex: none; }

.site-header > :is(.brand, .solutions-brand) { min-height: 44px; }
.solutions-header.site-header .site-navigation > .global-link:not(.global-contact) { font-size: 11.5px; }

.global-dialog .site-navigation > .global-link::after { width: auto; height: auto; background: none; transform: none; }

/* On segmented displays, keep navigation controls on a usable side of the hinge. */
@media (horizontal-viewport-segments: 2) {
  .global-dialog { width: min(380px, calc(env(viewport-segment-width 1 0, 50vw) - 40px)); }
  .home-explore .chapter-menu { max-width: calc(env(viewport-segment-width 0 0, 50vw) - clamp(20px, 4vw, 64px) - 16px); }
  .solutions-local-navigation[data-local-ready] .axis-selector { display: none; }
  .solutions-local-navigation[data-local-ready] .category-select { display: block; max-width: calc(env(viewport-segment-right 0 0, 50vw) - var(--local-navigation-left, 40px) - 16px); }
}
@media (vertical-viewport-segments: 2) {
  .global-dialog { max-height: calc(env(viewport-segment-height 0 0, 50dvh) - var(--site-header-height, 80px) - 24px); }
  .home-explore .chapter-menu { max-height: calc(env(viewport-segment-height 0 1, 50dvh) - 80px); }
}
