/*
 * Canonical site-wide Header and Footer shell.
 * Markup source: /templates/site-header.html and /templates/site-footer.html.
 * This file loads after page themes so page-specific CSS cannot restyle the shell.
 */

html body {
  --site-shell-navy: #071846;
  --site-shell-muted: #5d687d;
  --site-shell-gold: #d6ae3a;
  --site-shell-line: rgba(7, 24, 70, 0.1);
  --site-shell-container: 1180px;
  --site-shell-header-container: 1320px;
  --site-shell-header-inline-space: 64px;
  --site-shell-content-container: var(--site-shell-header-container);
  --site-shell-content-inline-space: var(--site-shell-header-inline-space);
}

html body .site-shell-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 160 !important;
  width: 100% !important;
  min-height: 76px !important;
  color: var(--site-shell-navy) !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--site-shell-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}

html body .site-shell-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(7, 24, 70, 0.06) !important;
}

html body .site-shell-header .container {
  width: min(calc(100% - var(--site-shell-header-inline-space)), var(--site-shell-header-container)) !important;
  max-width: var(--site-shell-header-container) !important;
  margin-inline: auto !important;
}

/*
 * Desktop page-frame contract: every page starts on the same content line as
 * the shared Header. The first selector covers the canonical page template;
 * the second covers the one legacy case-study wrapper without positional
 * offsets or page-specific logo adjustments.
 */
@media (min-width: 768px) {
  html body main > section:first-child > :is(.container, .case-container),
  html body main.cs-case[data-case-template] > section:first-child > :is(.container, .case-container),
  html body main > div:first-child > section:first-child > :is(.container, .case-container),
  html body .site-content-frame {
    width: min(calc(100% - var(--site-shell-content-inline-space)), var(--site-shell-content-container)) !important;
    max-width: var(--site-shell-content-container) !important;
    margin-inline: auto !important;
  }
}

html body .site-footer-shell .container {
  width: min(calc(100% - 40px), var(--site-shell-container)) !important;
  max-width: var(--site-shell-container) !important;
  margin-inline: auto !important;
}

html body .site-shell-header-inner {
  display: grid !important;
  min-height: 76px !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: clamp(20px, 3vw, 42px) !important;
  align-items: center !important;
  padding: 0 !important;
}

html body .site-shell-brand {
  justify-self: start !important;
  text-decoration: none !important;
}

html body .site-shell-primary-nav {
  display: flex !important;
  min-width: 0 !important;
  gap: clamp(18px, 2.1vw, 32px) !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

html body .site-shell-primary-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 28px 0 26px !important;
  color: var(--site-shell-navy) !important;
  font-size: 14px !important;
  font-weight: 720 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

html body .site-shell-primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 1px;
  background: var(--site-shell-gold);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

html body .site-shell-primary-nav a:hover::after,
html body .site-shell-primary-nav a:focus-visible::after,
html body .site-shell-primary-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

html body .site-shell-primary-nav a[aria-current="page"] {
  color: var(--site-shell-navy) !important;
}

html body .site-shell-actions {
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
  justify-self: end !important;
}

html body .site-shell-phone {
  display: inline-flex !important;
  gap: 8px !important;
  align-items: center !important;
  color: var(--site-shell-navy) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

html body .site-shell-phone-icon {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
  color: #fff !important;
  background: var(--site-shell-gold) !important;
  border-radius: 50% !important;
}

html body .site-shell-phone-icon svg {
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .site-shell-language {
  display: inline-flex !important;
  padding: 3px !important;
  background: #f5f7fa !important;
  border: 1px solid var(--site-shell-line) !important;
  border-radius: 999px !important;
}

html body .site-shell-language button {
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  place-items: center !important;
  color: var(--site-shell-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

html body .site-shell-language button.is-active {
  color: #fff !important;
  background: var(--site-shell-navy) !important;
}

html body .site-shell-menu-toggle,
html body .site-shell-mobile-menu {
  display: none !important;
}

html body .site-footer {
  color: var(--site-shell-navy) !important;
  background: #fff !important;
  border: 0 !important;
}

html body .site-footer-shell {
  color: var(--site-shell-navy) !important;
  background: #fff !important;
  border-top: 1px solid var(--site-shell-line) !important;
}

html body .site-footer-shell .footer-main {
  padding: 48px 0 42px !important;
  color: var(--site-shell-navy) !important;
  background: #fff !important;
  border: 0 !important;
}

html body .site-footer-shell .footer-main-grid {
  display: grid !important;
  grid-template-columns: minmax(240px, 1.3fr) minmax(130px, 0.72fr) minmax(130px, 0.72fr) minmax(210px, 1fr) !important;
  gap: clamp(28px, 4vw, 58px) !important;
  align-items: start !important;
}

html body .site-footer-shell .footer-brand {
  min-width: 0 !important;
}

html body .site-footer-shell .footer-socials {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 20px !important;
}

html body .site-footer-shell .footer-social {
  display: grid !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  place-items: center !important;
  color: var(--site-shell-navy) !important;
  background: #fff !important;
  border: 1px solid rgba(7, 24, 70, 0.14) !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transform: none !important;
}

html body .site-footer-shell .footer-social:hover,
html body .site-footer-shell .footer-social:focus-visible {
  color: #fff !important;
  background: var(--site-shell-navy) !important;
  border-color: var(--site-shell-navy) !important;
}

html body .site-footer-shell .footer-social svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
  stroke: none !important;
}

html body .site-footer-shell .footer-social.mail svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
}

html body .site-footer-shell .footer-col {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

html body .site-footer-shell .footer-accordion-summary {
  display: block !important;
  padding: 0 !important;
  cursor: default !important;
  list-style: none !important;
}

html body .site-footer-shell .footer-accordion-summary::-webkit-details-marker {
  display: none !important;
}

html body .site-footer-shell .footer-col h3,
html body .site-footer-shell .footer-accordion-summary h3 {
  margin: 0 0 16px !important;
  color: var(--site-shell-navy) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

html body .site-footer-shell .footer-col ul {
  display: grid !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html body .site-footer-shell .footer-col li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

html body .site-footer-shell .footer-col a,
html body .site-footer-shell .footer-contact-link {
  color: var(--site-shell-muted) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  line-height: 1.45 !important;
  text-decoration: none !important;
}

html body .site-footer-shell .footer-col a:hover,
html body .site-footer-shell .footer-col a:focus-visible,
html body .site-footer-shell .footer-contact-link:hover,
html body .site-footer-shell .footer-contact-link:focus-visible {
  color: var(--site-shell-navy) !important;
}

html body .site-footer-shell .footer-link-arrow::after {
  display: none !important;
}

html body .site-footer-shell .footer-mini-contact {
  display: grid !important;
  gap: 12px !important;
}

html body .site-footer-shell .footer-contact-link {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  gap: 9px !important;
  align-items: center !important;
}

html body .site-footer-shell .footer-contact-link svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .site-footer-shell .footer-bottom {
  padding: 17px 0 !important;
  color: var(--site-shell-muted) !important;
  background: #fff !important;
  border: 0 !important;
  border-top: 1px solid var(--site-shell-line) !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

@media (max-width: 1060px) {
  html body .site-shell-primary-nav {
    gap: 17px !important;
  }

  html body .site-shell-primary-nav a {
    font-size: 13px !important;
  }

  html body .site-shell-phone > span:last-child {
    display: none !important;
  }

  html body .site-footer-shell .footer-main-grid {
    grid-template-columns: minmax(230px, 1.15fr) repeat(3, minmax(130px, 1fr)) !important;
    gap: 28px !important;
  }
}

@media (max-width: 1120px) {
  html body.mobile-menu-open {
    overflow: hidden !important;
  }

  html body .site-shell-header {
    min-height: 68px !important;
    backdrop-filter: none !important;
  }

  html body .site-shell-header .container {
    width: min(calc(100% - 32px), var(--site-shell-container)) !important;
  }

  html body .site-shell-header-inner {
    min-height: 68px !important;
    grid-template-columns: minmax(0, 1fr) 46px auto !important;
    gap: 8px !important;
  }

  html body .site-shell-primary-nav,
  html body .site-shell-phone {
    display: none !important;
  }

  html body .site-shell-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    gap: 0 !important;
  }

  html body .site-shell-language {
    padding: 2px !important;
  }

  html body .site-shell-language button {
    width: 32px !important;
    height: 36px !important;
    font-size: 11px !important;
  }

  html body .site-shell-menu-toggle {
    display: inline-grid !important;
    width: 46px !important;
    height: 46px !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    place-content: center !important;
    gap: 5px !important;
    padding: 0 !important;
    color: var(--site-shell-navy) !important;
    background: #fff !important;
    border: 1px solid rgba(7, 24, 70, 0.14) !important;
    border-radius: 13px !important;
    cursor: pointer !important;
  }

  html body .site-shell-menu-toggle span {
    display: block !important;
    width: 19px !important;
    height: 1.5px !important;
    background: currentColor !important;
    border-radius: 999px !important;
  }

  html body .site-shell-mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    z-index: 300 !important;
    display: block !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html body .site-shell-mobile-menu.is-open {
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body .site-shell-menu-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    background: rgba(7, 24, 70, 0.52) !important;
    border: 0 !important;
    opacity: 0 !important;
    transition: opacity 180ms ease !important;
  }

  html body .site-shell-mobile-menu.is-open .site-shell-menu-backdrop {
    opacity: 1 !important;
  }

  html body .site-shell-menu-panel {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: grid !important;
    width: min(88vw, 360px) !important;
    grid-template-rows: auto 1fr auto !important;
    padding: 22px 22px 96px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    color: var(--site-shell-navy) !important;
    background: #fff !important;
    box-shadow: -16px 0 42px rgba(7, 24, 70, 0.18) !important;
    transform: translateX(100%) !important;
    transition: transform 200ms ease !important;
  }

  html body .site-shell-mobile-menu.is-open .site-shell-menu-panel {
    transform: translateX(0) !important;
  }

  html body .site-shell-menu-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid var(--site-shell-line) !important;
  }

  html body .site-shell-menu-head strong {
    font-size: 15px !important;
    font-weight: 800 !important;
  }

  html body .site-shell-menu-close {
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    place-items: center !important;
    color: var(--site-shell-navy) !important;
    background: #f6f7fa !important;
    border: 1px solid var(--site-shell-line) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 26px !important;
    font-weight: 350 !important;
    line-height: 1 !important;
  }

  html body .site-shell-mobile-links {
    display: grid !important;
    align-content: start !important;
    padding: 18px 0 !important;
  }

  html body .site-shell-mobile-links a {
    display: flex !important;
    min-height: 48px !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: var(--site-shell-navy) !important;
    border-bottom: 1px solid rgba(7, 24, 70, 0.08) !important;
    font-size: 16px !important;
    font-weight: 720 !important;
    text-decoration: none !important;
  }

  html body .site-shell-mobile-links a::after {
    color: var(--site-shell-gold) !important;
    content: "→" !important;
  }

  html body .site-shell-mobile-links a[aria-current="page"] {
    color: var(--site-shell-navy) !important;
    background: rgba(217, 164, 65, 0.12) !important;
  }

  html body .site-shell-mobile-links a[aria-current="page"]::after {
    content: "•" !important;
  }

  html body .site-shell-menu-contact {
    display: grid !important;
    gap: 12px !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--site-shell-line) !important;
  }

  html body .site-shell-menu-contact > a:first-child {
    color: var(--site-shell-navy) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
  }

  html body .site-shell-menu-cta {
    display: flex !important;
    min-height: 50px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    color: #fff !important;
    background: var(--site-shell-navy) !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-align: center !important;
    text-decoration: none !important;
  }
}

@media (max-width: 767px) {
  html body .site-footer-shell .container {
    width: min(calc(100% - 32px), var(--site-shell-container)) !important;
  }

  html body .site-footer-shell .footer-main {
    padding: 34px 0 24px !important;
  }

  html body .site-footer-shell .footer-main-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  html body .site-footer-shell .footer-brand {
    order: 0 !important;
    padding-bottom: 24px !important;
  }

  html body .site-footer-shell .footer-contact-column {
    order: 1 !important;
    padding: 20px 0 !important;
    border-top: 1px solid var(--site-shell-line) !important;
  }

  html body .site-footer-shell .footer-navigation {
    order: 2 !important;
  }

  html body .site-footer-shell .footer-legal {
    order: 3 !important;
  }

  html body .site-footer-shell .footer-accordion {
    padding: 0 !important;
    border-top: 1px solid var(--site-shell-line) !important;
  }

  html body .site-footer-shell .footer-accordion-summary {
    position: relative !important;
    display: flex !important;
    min-height: 58px !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
  }

  html body .site-footer-shell .footer-accordion-summary::after {
    color: var(--site-shell-gold) !important;
    content: "+" !important;
    font-size: 22px !important;
    font-weight: 600 !important;
  }

  html body .site-footer-shell .footer-accordion[open] > .footer-accordion-summary::after {
    content: "−" !important;
  }

  html body .site-footer-shell .footer-accordion-summary h3,
  html body .site-footer-shell .footer-contact-column h3 {
    margin: 0 !important;
    font-size: 15px !important;
  }

  html body .site-footer-shell .footer-accordion > ul {
    padding: 0 0 18px !important;
  }

  html body .site-footer-shell .footer-bottom {
    padding: 16px 0 88px !important;
  }
}

@media (max-width: 350px) {
  html body .site-shell-header .container {
    width: min(calc(100% - 24px), var(--site-shell-container)) !important;
  }

  html body .site-shell-header-inner {
    grid-template-columns: minmax(0, 1fr) 42px auto !important;
    gap: 6px !important;
  }

  html body .site-shell-menu-toggle {
    width: 42px !important;
    height: 44px !important;
  }

  html body .site-shell-language button {
    width: 29px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .site-shell-menu-backdrop,
  html body .site-shell-menu-panel,
  html body .site-shell-primary-nav a::after {
    transition: none !important;
  }
}
