/* Shared site chrome and actions. Only component stylesheet for the header,
   fullscreen menu, footer and CTA states on every page. Load after page styles.
   Markup source: shared/*.html; build: node scripts/build-shared.mjs. */
:root {
  --chrome-pad: clamp(24px, 6.4vw, 104px);
  --chrome-edge: clamp(18px, 1.8vw, 26px);
  --chrome-body: var(--type-paragraph-small);
  --chrome-meta: var(--type-caption);
  --action-duration: 550ms;
  --action-ease: cubic-bezier(.22, .61, .36, 1);
  --action-lift: -3px;
  --action-glow: 0 10px 26px rgba(255,255,255,.12), 0 0 18px rgba(143,179,204,.08);
}

/* Same motion, color, focus and press states; navigation is a compact size. */
.btn-p, .btn-primary, .btn-secondary, .nav-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; max-width: 100%; padding: 14px clamp(20px, 2.3vw, 34px);
  border: 1px solid transparent; border-radius: 0; appearance: none;
  font-family: var(--display); font-size: var(--type-cta);
  font-weight: 700; line-height: 1.35; letter-spacing: 0;
  text-align: center; text-decoration: none; text-transform: uppercase;
  cursor: pointer; transform: translateY(0); box-shadow: none;
  transition: transform var(--action-duration) var(--action-ease),
    box-shadow var(--action-duration) var(--action-ease),
    background-color var(--action-duration) ease,
    border-color var(--action-duration) ease, color var(--action-duration) ease;
}
.btn-p, .btn-primary, .nav-cta,
:is(.btn-p, .btn-primary, .nav-cta):is(:visited, :hover, :focus, :active) {
  background-color: #fff; color: #050608; -webkit-text-fill-color: #050608;
}
.btn-secondary, .btn-secondary:visited { border-color: rgba(143,179,204,.3); background-color: rgba(255,255,255,.01); color: #fff; }
.site-nav .nav-cta {
  width: clamp(120px, 9.8vw, 140px);
  min-height: 50px;
  padding: 14px 20px;
}
.cs-link, .fs-cs-link, .p-learn {
  display: inline-flex; align-items: center; width: fit-content; max-width: 100%;
  color: var(--acc-2); font: 700 var(--chrome-meta)/1.4 var(--display);
  text-transform: uppercase; text-decoration: none; opacity: 1;
  transition: transform var(--action-duration) var(--action-ease),
    text-shadow var(--action-duration) var(--action-ease), color var(--action-duration) ease;
}
@media (hover: hover) and (pointer: fine) {
  :is(.btn-p, .btn-primary, .btn-secondary, .nav-cta):not(:disabled):not([aria-disabled="true"]):hover {
    transform: translateY(var(--action-lift)); box-shadow: var(--action-glow);
  }
  .btn-secondary:hover { border-color: rgba(143,179,204,.58); background-color: rgba(143,179,204,.07); }
  :is(.cs-link, .fs-cs-link, .p-learn):hover { color: #fff; transform: translateY(var(--action-lift)); text-shadow: 0 0 16px rgba(143,179,204,.35); }
}
:is(.btn-p, .btn-primary, .btn-secondary, .nav-cta, .cs-link, .fs-cs-link, .p-learn):focus-visible { outline: 2px solid var(--acc-2); outline-offset: 5px; box-shadow: var(--action-glow); }
:is(.btn-p, .btn-primary, .btn-secondary, .nav-cta):not(:disabled):not([aria-disabled="true"]):active { transform: translateY(-1px); }
:is(.btn-p, .btn-primary, .btn-secondary, .nav-cta):is(:disabled, [aria-disabled="true"]) { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }

/* Ordinary navigation links deliberately exclude CTA buttons. */
.site-nav {
  position: absolute; top: clamp(16px, 1.6vw, 22px); left: 50%; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1600px; min-height: 44px; padding: 0 var(--chrome-pad);
  transform: translateX(-50%); pointer-events: none;
}
.site-nav > * { pointer-events: auto; }
.logo, .footer-brand-mark, .footer-logo { font-family: var(--display); font-weight: 700; letter-spacing: -.045em; }
.logo-dot { margin-left: .015em; color: var(--brand-electric); }
.site-nav .logo {
  color: #fff; font-size: var(--type-brand); line-height: 1.2; text-decoration: none;
  background: linear-gradient(110deg, #fff 0 38%, #d9efff 47%, #fff 56% 100%);
  background-size: 240% 100%; background-position: 160% 50%;
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: lex-logo-shine 6.8s cubic-bezier(.4,0,.2,1) 1.2s infinite;
}
.site-nav .logo .logo-dot { -webkit-text-fill-color: var(--brand-electric); }
@keyframes lex-logo-shine { 0%, 62% { background-position: 160% 50%; } 84%, 100% { background-position: -65% 50%; } }
.nav-links { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); }
.nav-links > a:not(.nav-cta), .nav-drop-btn {
  color: rgba(255,255,255,.85); font: 400 var(--type-nav)/1.4 var(--display);
  text-transform: uppercase; text-decoration: none; transition: color .3s ease;
}
.nav-links > a:not(.nav-cta):hover, .nav-drop-btn:hover, .nav-drop[data-open="true"] .nav-drop-btn { color: #fff; }
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.nav-drop-caret { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s ease; }
.nav-drop[data-open="true"] .nav-drop-caret { transform: translateY(1px) rotate(225deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 50;
  display: none; width: max-content; min-width: 220px; max-width: calc(100vw - 32px); padding: 8px; transform: translateX(-50%);
  background: rgba(8,10,12,.6);
  border: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav-drop[data-open="true"] .nav-drop-menu { display: grid; }
.nav-drop-menu::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 12px;
}
.nav-drop-menu a {
  display: block;
  padding: 10px 14px;
  color: rgba(225,230,239,.66);
  font: 500 .86rem/1.4 var(--display);
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  transform: translateX(0);
  transition: color .28s ease, transform .38s var(--action-ease);
}
.nav-drop-menu a:is(:hover, :focus-visible) {
  color: rgba(255,255,255,.96);
  background: transparent;
  box-shadow: none;
  transform: translateX(3px);
}
.nav-drop-menu a[aria-current="page"] { color: #fff; box-shadow: none; }
.nav-drop-sep { height: 1px; margin: 6px 8px; background: rgba(143,179,204,.16); }

/* One fullscreen menu for home, services and utility pages. */
.burger-btn, .fs-close {
  position: fixed; top: clamp(16px, 1.6vw, 22px); right: var(--chrome-edge);
  width: 44px; height: 44px; padding: 4px; border: 0; border-radius: 0; background: none; cursor: pointer;
}
.burger-btn { z-index: 99999; display: flex; flex-direction: column; justify-content: center; gap: 7px; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .3s ease, visibility .3s ease; }
.burger-btn.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.burger-btn span { display: block; width: 100%; height: 2px; background: #fff; }
.fs-overlay {
  position: fixed; inset: 0; z-index: 999999; display: flex; align-items: stretch; justify-content: space-between;
  width: 100%; height: 100vh; height: 100dvh; gap: clamp(32px, 6vw, 80px);
  padding: clamp(80px, 10vh, 120px) var(--chrome-pad) clamp(40px, 5vh, 80px);
  visibility: hidden; opacity: 0; pointer-events: none; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(8,10,12,.86); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  font-family: var(--body); transition: opacity .4s ease, visibility .4s ease;
}
.fs-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }
.fs-close { z-index: 10; }
.fs-close span { position: absolute; top: 50%; left: 50%; width: calc(100% - 8px); height: 2px; background: #fff; }
.fs-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.fs-close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.fs-left { flex: 1; min-width: 0; max-width: 500px; margin-block: auto; }
.fs-cs-label { margin: 0 0 18px; color: var(--muted); font: 700 clamp(1rem, .92rem + .22vw, 1.15rem)/1.4 var(--display); text-transform: uppercase; }
.fs-cs-featured { padding: clamp(24px, 2.5vw, 36px); border: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035)); }
.fs-cs-title { margin-bottom: 12px; color: #fff; font: 600 1.45rem/1.2 var(--display); }
.fs-cs-desc { margin-bottom: 20px; color: #a0a6ae; font-size: var(--chrome-body); line-height: 1.72; }
.fs-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 18px 0 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.fs-stat-card { min-width: 0; padding-inline: 12px; border-right: 1px solid rgba(255,255,255,.08); text-align: left; }
.fs-stat-card:first-child { padding-left: 0; }
.fs-stat-card:last-child { padding-right: 0; border-right: 0; }
.fs-stat-n { margin-bottom: 6px; color: #fff; font: 700 var(--type-metric-box)/1 var(--display); white-space: nowrap; }
.fs-stat-l { color: #a0a6ae; font: 600 var(--type-metric-label)/var(--leading-caption) var(--display); text-transform: uppercase; }
.fs-right { min-width: 0; width: min(100%, 440px); margin-block: auto; text-align: right; }
.fs-list { display: grid; gap: clamp(18px, 2.5vh, 28px); margin: 0; padding: 0; list-style: none; }
.fs-list > li { margin: 0; padding: 0; }
.fs-list > li > a, .fs-list > li > button {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px;
  max-width: 100%; margin: 0; padding: 0; border: 0; background: none;
  color: #fff; font: 600 var(--type-menu)/1.12 var(--display);
  text-align: right; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: color .3s ease;
}
.fs-list > li > a:hover, .fs-list > li > button:hover { color: var(--acc-2); }
.svc-chevron { flex: 0 0 8px; width: 8px; height: 8px; margin: -4px 4px 0 6px; border-right: 1px solid var(--acc); border-bottom: 1px solid var(--acc); transform: rotate(45deg); transition: transform .4s ease; }
.svc-chevron.rotated { transform: translateY(4px) rotate(225deg); }
.svc-dropdown { height: 0; overflow: hidden; opacity: 0; margin-top: 0; pointer-events: none; text-align: right; transition: height .45s var(--action-ease), opacity .3s ease, margin-top .45s var(--action-ease); }
.svc-dropdown.open { height: auto; opacity: 1; margin-top: 20px; pointer-events: auto; }
.svc-dropdown a { display: block; padding: 8px 0; color: #aeb5bf; font: 500 var(--chrome-body)/1.5 var(--body); text-decoration: none; transition: color .3s ease; }
.svc-dropdown a:is(:hover, [aria-current="page"]) { color: var(--acc-2); }
.fs-cta { margin-top: clamp(28px, 4vh, 44px); text-align: right; }

/* Footer typography and spacing do not inherit page-specific variants. */
.site-footer { position: relative; z-index: 10; display: block; margin: 0; padding: 0; border-top: 1px solid var(--border); background: #040506; font-family: var(--body); }
.footer-shell {
  display: grid; grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(160px, .8fr)); align-items: start;
  width: 100%; max-width: 1600px; margin: 0 auto; gap: clamp(24px, 3vw, 48px);
  padding: clamp(64px, 7vw, 100px) var(--chrome-pad) 40px;
}
.footer-shell > * { min-width: 0; }
.footer-brand-mark { display: inline-block; margin-bottom: 16px; color: #fff; font-size: var(--type-brand); line-height: 1.4; text-decoration: none; }
.footer-brand-copy { max-width: 34ch; margin: 0 0 22px; color: #90959f; font-size: var(--chrome-body); line-height: 1.72; }
.footer-contact { display: grid; gap: 8px; color: #949ba7; font-size: var(--chrome-meta); line-height: 1.5; text-transform: uppercase; }
.footer-contact a { color: #a5abb5; font-size: var(--chrome-body); text-transform: none; overflow-wrap: anywhere; text-decoration: none; transition: color .3s ease; }
.footer-col { display: grid; gap: 12px; align-content: start; }
.footer-head { margin-bottom: 6px; color: #8fa8bd; font: 700 .72rem/1.4 var(--display); text-transform: uppercase; }
.footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #9ba1ac; font-size: var(--chrome-body); line-height: 1.5; text-decoration: none; transition: color .3s ease; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; max-width: 1600px; margin: 24px auto 0; padding: 18px var(--chrome-pad) 40px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-logo { color: #96989b; font-size: var(--type-brand); }
.footer-copy { color: #9097a2; font-size: var(--chrome-meta); line-height: 1.5; }
.mobile-sticky-cta { display: none; }

@media (max-width: 1180px) { .footer-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .site-nav .nav-links, .fs-left { display: none; }
  .burger-btn { visibility: visible; opacity: 1; pointer-events: auto; }
  .fs-overlay { justify-content: flex-end; align-items: flex-start; padding-top: 94px; }
  .fs-right { margin: 0 0 0 auto; }
  .fs-list > li > a, .fs-list > li > button { width: 100%; font-size: var(--type-menu); }
}
@media (max-width: 720px) {
  :root { --chrome-pad: 24px; --chrome-edge: 18px; }
  .burger-btn, .fs-close { top: max(18px, env(safe-area-inset-top)); width: 46px; height: 46px; }
  .burger-btn { gap: 9px; }
  .fs-overlay { padding: calc(94px + env(safe-area-inset-top)) 24px calc(36px + env(safe-area-inset-bottom)); }
  .fs-list { gap: clamp(18px, 3.5vh, 28px); }
  .fs-cta { margin-top: 28px; }
  .footer-shell { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 56px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 600px) {
  :root {
    --mobile-header-content-height: 64px;
    --mobile-sticky-cta-content-height: 50px;
    --chrome-pad: 22px;
    --chrome-edge: 18px;
  }

  body {
    padding-bottom: calc(var(--mobile-sticky-cta-content-height) + env(safe-area-inset-bottom)) !important;
  }

  /* Mercury-inspired mobile proportions: one calm, fixed brand bar with a
     compact wordmark and a menu control that remains available while reading. */
  .site-nav {
    position: fixed !important;
    z-index: 89990;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    min-height: calc(var(--mobile-header-content-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--chrome-pad) 0;
    transform: none;
    background: rgba(5,7,9,.92);
    border-bottom: 1px solid rgba(143,179,204,.10);
    backdrop-filter: blur(18px) saturate(118%);
    -webkit-backdrop-filter: blur(18px) saturate(118%);
  }
  .site-nav .logo {
    font-size: 1.24rem;
    line-height: 1;
    animation: none;
    background: none;
    -webkit-text-fill-color: #fff;
  }
  .site-nav .logo .logo-dot { -webkit-text-fill-color: var(--brand-electric); }

  .burger-btn,
  .fs-close {
    top: calc(env(safe-area-inset-top) + 11px);
    right: var(--chrome-edge);
    width: 42px;
    height: 42px;
    padding: 6px;
  }
  .burger-btn {
    gap: 6px;
    align-items: flex-end;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }
  .burger-btn span { width: 30px; height: 2px; }

  .mobile-sticky-cta {
    position: fixed;
    z-index: 90000;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex !important;
    min-height: calc(var(--mobile-sticky-cta-content-height) + env(safe-area-inset-bottom));
    padding: 0 22px env(safe-area-inset-bottom);
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(8,10,12,.16);
    background: #dce8ef;
    color: #080a0c;
    -webkit-text-fill-color: #080a0c;
    font-family: var(--display);
    font-size: clamp(.78rem, 3.4vw, .88rem);
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    touch-action: manipulation;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: paint;
    transition: none;
  }

  /* The persistent conversion bar owns the phone CTA. Forms retain their
     submit controls; navigation and informational links remain available. */
  :is(a.btn-p, a.btn-primary, a.btn-secondary, a.nav-cta):not(.mobile-sticky-cta),
  button.js-open-consultation,
  .fs-cta,
  .why-cta,
  .about-cta,
  .about-split-action,
  .proto-cta,
  .cs-foot,
  .whyus-live-actions,
  .talk-action,
  .proof-cta-row,
  .section-footer-cta,
  a.section-cta {
    display: none !important;
  }

  :is(a, button, [role="button"], .why-card, .cs-card, .wy-row, .stat-item,
      .metric, .rs-stat, .hero-stat, .about-entry, .about-v3-row, .faqx-item) {
    transition: none !important;
  }
  :is(a, button, [role="button"], .why-card, .cs-card, .wy-row, .stat-item,
      .metric, .rs-stat, .hero-stat, .about-entry, .about-v3-row, .faqx-item):hover {
    transform: none !important;
    box-shadow: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.btn-p, .btn-primary, .btn-secondary, .nav-cta, .cs-link, .fs-cs-link, .p-learn) { transition: none; }
  :is(.btn-p, .btn-primary, .btn-secondary, .nav-cta, .cs-link, .fs-cs-link, .p-learn):is(:hover, :active) { transform: none; }
  .site-nav .logo { animation: none; background-position: 50% 50%; }
  .fs-overlay, .svc-dropdown, .svc-chevron { transition: none; }
}
