/* Global header shell: edge-to-edge at rest, compact floating pill on scroll. */
:root {
  --hd-max: 1560px;
  --hd-pad: clamp(14px, 2.4vw, 20px);
  --hd-edge-pad: max(var(--hd-pad), calc((100vw - var(--hd-max)) / 2 + var(--hd-pad)));
  --hd-row-y: clamp(10px, 1.4vw, 14px);
  --hd-pill-y: 10px;
  --hd-pill-x: clamp(12px, 1.3vw, 18px);
  --hd-pill-radius: 46px;
  --hd-action: 46px;
  --hd-nav-font: 16px;
  --hd-nav-pad-y: 12px;
  --hd-nav-pad-x: clamp(12px, 1.15vw, 16px);
  --hd-panel-w: min(84vw, 330px);
}

.site-header {
  width: 100%;
  padding: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: padding .42s cubic-bezier(.22, 1, .36, 1);
}

.site-header .header-inner {
  width: 100%;
  max-width: none !important;
  margin-inline: 0;
  padding: var(--hd-row-y) var(--hd-edge-pad);
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(14, 12, 11, .08);
  transition:
    width .42s cubic-bezier(.22, 1, .36, 1),
    max-width .42s cubic-bezier(.22, 1, .36, 1),
    margin .42s cubic-bezier(.22, 1, .36, 1),
    padding .42s cubic-bezier(.22, 1, .36, 1),
    border-radius .42s cubic-bezier(.22, 1, .36, 1),
    box-shadow .42s cubic-bezier(.22, 1, .36, 1);
}

.site-header.scrolled {
  padding: 10px 0 !important;
}

.site-header.scrolled .header-inner {
  width: min(calc(100% - 32px), var(--hd-max));
  max-width: var(--hd-max) !important;
  margin-inline: auto;
  padding: var(--hd-pill-y) var(--hd-pill-x);
  border-radius: var(--hd-pill-radius);
  box-shadow: 0 16px 44px rgba(14, 12, 11, .18);
}

.site-header .site-nav {
  gap: 8px;
}

.site-header .site-nav a {
  font-size: var(--hd-nav-font);
  padding: var(--hd-nav-pad-y) var(--hd-nav-pad-x);
}

.site-header .nav-menu {
  min-width: 260px;
}

.site-header .nav-menu a {
  font-size: 15px;
  padding: 12px 16px;
}

@media (max-width: 640px) {
  .site-header .header-inner {
    padding: 10px 14px;
  }

  .site-header.scrolled {
    padding: 7px 0 !important;
  }

  .site-header.scrolled .header-inner {
    width: calc(100% - 16px);
    padding: 8px 10px;
    border-radius: 34px;
  }

  .site-header .theme-toggle {
    display: none;
  }
}

/* Services mega menu */
.services-mega {
  position: relative;
  display: inline-flex;
}

.services-mega__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.services-mega__caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.services-mega__trigger[aria-expanded="true"] .services-mega__caret {
  transform: translateY(2px) rotate(225deg);
}

.services-mega__panel {
  --services-menu-top: 76px;
  position: fixed;
  z-index: 130;
  top: var(--services-menu-top);
  left: 50%;
  width: min(1120px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  overflow: hidden;
  color: #f7f0e6;
  background: #15110e;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(18, 12, 8, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.services-mega__panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.services-mega__main {
  padding: 30px 34px 26px;
}

.services-mega__eyebrow {
  margin: 0 0 18px;
  color: rgba(247, 240, 230, .55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.services-mega__services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 46px;
}

.site-nav .services-mega__service {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 17px 0 18px;
  color: #f7f0e6;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 240, 230, .15);
}

.services-mega__index {
  padding-top: 3px;
  color: #ff9b55;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.services-mega__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.services-mega__name {
  white-space: normal;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.services-mega__description {
  color: rgba(247, 240, 230, .58);
  font-size: 13px;
  line-height: 1.45;
}

.services-mega__arrow {
  color: rgba(247, 240, 230, .45);
  transition: color .2s ease, transform .2s ease;
}

.services-mega__service:hover .services-mega__arrow {
  color: #ff9b55;
  transform: translate(2px, -2px);
}

.services-mega__utility {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 22px;
}

.site-nav .services-mega__utility a {
  color: rgba(247, 240, 230, .72);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav .services-mega__utility a:hover {
  color: #fff;
}

.services-mega__consult {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 330px;
  padding: 30px;
  color: #24150e;
  background: #ff9b55;
}

.services-mega__consult-mark {
  margin: 0 0 auto;
  font-size: 34px;
  line-height: 1;
}

.services-mega__consult-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.services-mega__consult-title {
  margin: 0 0 22px;
  max-width: 230px;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.services-mega__consult-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: #17110e;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.services-mega__trigger:focus-visible,
.services-mega__service:focus-visible,
.services-mega__utility a:focus-visible,
.services-mega__consult-button:focus-visible,
.mobile-services__toggle:focus-visible,
.mobile-services__link:focus-visible,
.mobile-services__all:focus-visible {
  outline: 2px solid #ff9b55;
  outline-offset: 4px;
}

body.header-mobile-nav .services-mega__panel {
  display: none;
}

/* Services accordion inside the mobile drawer */
.mobile-services {
  border-top: 1px solid rgba(244, 237, 225, .14);
  border-bottom: 1px solid rgba(244, 237, 225, .14);
}

.mobile-services__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  color: var(--paper, #f4ede1);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mobile-services__plus {
  position: relative;
  width: 18px;
  height: 18px;
}

.mobile-services__plus::before,
.mobile-services__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .2s ease;
}

.mobile-services__plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.mobile-services__toggle[aria-expanded="true"] .mobile-services__plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.mobile-services__panel[hidden] {
  display: none;
}

.mobile-services__panel {
  padding: 0 8px 14px;
}

.mobile-services__link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 7px;
  color: rgba(244, 237, 225, .82);
  border-bottom: 1px solid rgba(244, 237, 225, .1);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.mobile-services__index {
  color: #ff9b55;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.mobile-services__all {
  display: inline-flex;
  margin: 14px 7px 0;
  color: #ffad72;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .services-mega__panel,
  .services-mega__caret,
  .services-mega__arrow,
  .mobile-services__plus::before,
  .mobile-services__plus::after {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header .header-inner {
    transition: none;
  }
}

.mobile-menu-toggle {
  width: var(--hd-action);
  height: var(--hd-action);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--paper, #f4ede1);
  cursor: pointer;
  display: none;
  place-items: center;
  gap: 4px;
  padding: 0;
}

.mobile-menu-toggle.burger {
  display: none;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 1.7px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}

.mobile-menu__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 6, 5, .45);
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  width: var(--hd-panel-w);
  background: var(--ink, #0e0c0b);
  border-left: 1px solid rgba(244, 237, 225, .15);
  box-shadow: -24px 0 56px rgba(0, 0, 0, .42);
  transform: translateX(100%);
  transition: transform .28s ease;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.mobile-menu__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(244, 237, 225, .26);
  background: transparent;
  color: var(--paper, #f4ede1);
  margin-left: auto;
  margin-bottom: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mobile-menu__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7px;
}

.mobile-menu__link,
.mobile-menu__cta {
  width: 100%;
  text-align: left;
  color: var(--paper, #f4ede1);
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
}

.mobile-menu__link:hover,
.mobile-menu__cta:hover {
  border-color: rgba(244, 237, 225, .25);
  background: rgba(244, 237, 225, .06);
}

.mobile-menu__sublink {
  margin-left: 10px;
  width: calc(100% - 10px);
  font-size: 15px;
  color: var(--paper, #f4ede1);
  opacity: .82;
  border: 0;
  background: color-mix(in srgb, currentColor 4%, transparent);
}

.mobile-menu__cta {
  margin-top: 8px;
  background: var(--ember, #ff5d2e);
  border-color: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.mobile-menu.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

body.header-mobile-nav .site-nav {
  display: none;
}

body.header-mobile-nav .mobile-menu-toggle {
  display: grid;
}

body.header-mobile-nav .mobile-menu-toggle.burger {
  display: grid;
}

body.header-mobile-nav .header-inner .site-nav + .mobile-menu-toggle,
body.header-mobile-nav .site-header .header-inner {
  flex-wrap: nowrap;
}

body.header-mobile-nav .site-header .theme-toggle {
  display: none;
}

@media (max-width: 640px) {
  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  .mobile-menu-toggle span {
    width: 17px;
  }
}
