.site-header {
  --site-header-paper: #f4f4f4;
  --site-header-ink: #000000;
  --site-header-panel: #e9e9e9;
  --site-header-muted: rgba(0, 0, 0, 0.55);
  --site-header-muted-strong: rgba(0, 0, 0, 0.6);
  --site-header-line-soft: rgba(0, 0, 0, 0.18);
  --site-header-frost: rgba(244, 244, 244, 0.7);
  --site-header-frost-solid: rgba(244, 244, 244, 0.95);
  --site-header-elev-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  --site-header-menu-item-hover: rgba(0, 0, 0, 0.05);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: "STK Bureau Sans", "Helvetica Neue", Arial, sans-serif;
}

body[data-theme="dark"] .site-header {
  --site-header-paper: #101216;
  --site-header-ink: #f2f2f2;
  --site-header-panel: #1a1d22;
  --site-header-muted: rgba(242, 242, 242, 0.72);
  --site-header-muted-strong: rgba(242, 242, 242, 0.82);
  --site-header-line-soft: rgba(242, 242, 242, 0.3);
  --site-header-frost: rgba(16, 18, 22, 0.72);
  --site-header-frost-solid: rgba(16, 18, 22, 0.95);
  --site-header-elev-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  --site-header-menu-item-hover: rgba(242, 242, 242, 0.08);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--site-header-frost);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before {
    background: var(--site-header-frost-solid);
  }
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  position: relative;
}

.logo {
  justify-self: start;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  line-height: 0;
  border-radius: 4px;
}

.logo:hover {
  cursor: pointer;
}

.logo:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: 24px;
  font-family: inherit;
  font-size: 19px;
  letter-spacing: 0;
  position: static;
}

.nav-links > a,
.nav-links .dropdown-toggle {
  padding: 6px 2px;
  transition: opacity 0.12s ease;
}

.dropdown {
  position: static;
  display: flex;
  flex-direction: column;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.arrow {
  width: 5px;
  height: 5px;
  margin-left: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown:hover .arrow,
.dropdown:focus-within .arrow {
  transform: rotate(225deg) translateY(-1px);
}

.dropdown.open .arrow {
  transform: rotate(225deg) translateY(-1px);
}

.mobile-menu-cta {
  display: none;
}

.mobile-menu-footer {
  display: none;
}

.dropdown-menu {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%);
  background: var(--site-header-frost);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  font-family: inherit;
  width: 100vw;
  max-width: 100vw;
  border: none;
  border-radius: 0;
  box-shadow: var(--site-header-elev-shadow);
  z-index: 1001;
  padding: 36px 0 40px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(440px, 620px) minmax(280px, 320px);
  justify-content: center;
  gap: 4px;
  align-items: stretch;
}

.mega-list {
  display: grid;
  gap: 8px;
  padding: 28px;
  box-sizing: border-box;
  align-self: stretch;
  align-content: start;
}

.mega-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: start;
  color: var(--site-header-ink);
  padding: 10px 12px;
  border-radius: 8px;
  transition: background-color 0.16s ease, opacity 0.16s ease;
  letter-spacing: 0;
  opacity: 1;
}

.mega-item:hover,
.mega-item:focus-visible {
  opacity: 1;
  background: var(--site-header-menu-item-hover);
}

.mega-icon {
  width: 44px;
  height: 44px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mega-icon-glyph {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--site-header-ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.mega-icon-dots {
  background:
    radial-gradient(circle at 25% 25%, currentColor 4.2px, transparent 4.8px),
    radial-gradient(circle at 75% 25%, currentColor 4.2px, transparent 4.8px),
    radial-gradient(circle at 25% 75%, currentColor 4.2px, transparent 4.8px),
    radial-gradient(circle at 75% 75%, currentColor 4.2px, transparent 4.8px);
}

.mega-icon-star::before {
  content: '✦';
}

.mega-icon-wave::before {
  content: '≋≋';
  letter-spacing: -1px;
}

.mega-label {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 4px;
  font-weight: 600;
}

.mega-copy {
  display: block;
  font-size: 13px;
  color: var(--site-header-muted);
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 80ch;
}

.mega-feature {
  background: var(--site-header-panel);
  padding: 28px;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.mega-feature h3 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mega-feature p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--site-header-muted-strong);
}

.dropdown.open .dropdown-menu {
  display: block;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.language-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  margin-right: 4px;
  cursor: pointer;
}

.language-flag {
  font-size: 17px;
  line-height: 1;
}

.language-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.theme-toggle {
  margin-left: 0;
  margin-right: 0;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent url('../assets/darkicon.png') center / 18px 18px no-repeat;
  color: var(--site-header-ink);
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: none;
}

.menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2.4px;
  background: var(--site-header-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body[data-theme="dark"] .theme-toggle {
  background-image: url('../assets/lighticon.png');
}

.header-actions a {
  transition: opacity 0.12s ease;
}

.header-actions:has(a:hover) a:not(:hover),
.header-actions:has(a:focus-visible) a:not(:focus-visible) {
  opacity: 0.35;
}

.site-header .contact-button-slot {
  display: inline-grid;
  grid-template-columns: 0fr;
  align-items: center;
  min-width: 0;
  margin-left: -12px;
  transition: grid-template-columns 0.46s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.46s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: grid-template-columns, margin-left;
}

.site-header .contact-button-slot.is-visible {
  grid-template-columns: 1fr;
  margin-left: 0;
}

.site-header .contact-button {
  border: 1px solid #000000;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 0;
  padding: 5px 18px;
  background: #000000;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease, background 0.2s ease, color 0.2s ease;
  will-change: transform, opacity;
}

.site-header .contact-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.site-header .contact-button:hover,
.site-header .contact-button:focus-visible {
  background: #000000;
  color: #ffffff;
}

.nav-links:has(.dropdown:hover) > a,
.nav-links:has(.dropdown:focus-within) > a,
.nav-links:has(> a:hover) > a:not(:hover),
.nav-links:has(> a:focus-visible) > a:not(:focus-visible),
.nav-links:has(> a:hover) .dropdown-toggle,
.nav-links:has(> a:focus-visible) .dropdown-toggle {
  opacity: 0.35;
}

.nav-links > a:hover,
.nav-links > a:focus-visible,
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible,
.dropdown:hover .dropdown-toggle,
.dropdown:focus-within .dropdown-toggle {
  opacity: 1;
}

@media (max-width: 820px) {
  body {
    padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
  }

  html.mw-menu-open,
  body.mw-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
  }

  body.mw-menu-open {
    touch-action: none;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  .site-header.is-menu-open::before {
    background: var(--site-header-frost-solid);
  }

  .site-header.is-menu-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: var(--site-header-frost);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
  }

  .site-header .header-actions:has(.contact-button.is-visible) .language-wrapper,
  .site-header .header-actions:has(.contact-button.is-visible) .theme-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header.is-menu-open .header-actions .language-wrapper {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header.is-menu-open .header-actions .theme-toggle {
    display: inline-flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    text-align: left;
    gap: 12px;
    align-items: center;
  }

  .logo {
    justify-self: start;
    position: relative;
    z-index: 1003;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1003;
  }

  .header-actions {
    margin-left: auto;
    justify-content: flex-end;
    justify-self: end;
    position: relative;
    z-index: 1003;
    overflow: visible;
  }

  .site-header .contact-button-slot {
    position: absolute;
    top: 50%;
    right: 42px;
    display: block;
    margin-left: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1002;
    will-change: transform, opacity;
  }

  .site-header .contact-button-slot.is-visible {
    pointer-events: auto;
  }

  .arrow {
    width: 8px;
    height: 8px;
    margin-left: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    padding: calc(env(safe-area-inset-top, 0px) + 96px) 24px 40px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    z-index: 1002;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .site-header.is-menu-open .nav-links {
    display: flex;
  }

  .dropdown {
    width: 100%;
    gap: 0;
  }

  .dropdown:hover .arrow,
  .dropdown:focus-within .arrow {
    transform: rotate(45deg) translateY(-1px);
  }

  .dropdown.open .arrow {
    transform: rotate(225deg) translateY(-1px);
  }

  .nav-links > a,
  .nav-links .dropdown-toggle {
    padding: 6px 0;
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.05;
    text-align: left;
  }

  .dropdown-menu {
    position: static;
    display: block;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.52s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.34s ease, padding-top 0.34s ease;
  }

  .dropdown.open .dropdown-menu {
    max-height: 520px;
    padding-top: 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mega-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .mega-list {
    gap: 18px;
    padding: 0;
  }

  .mega-label {
    margin-bottom: 4px;
    font-size: clamp(17px, 4.8vw, 19px);
    line-height: 1.2;
    font-weight: 500;
  }

  .mega-copy {
    font-size: clamp(14px, 3.9vw, 15px);
    line-height: 1.45;
    color: var(--site-header-muted-strong);
  }

  .dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .dropdown-toggle > span:first-child {
    flex: 1 1 auto;
  }

  .mega-item {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 0;
    border-top: none;
    border-radius: 0;
    background: transparent;
  }

  .mega-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    margin-top: 1px;
    opacity: 0.78;
    justify-content: center;
  }

  .mega-icon-glyph {
    width: 34px;
    height: 34px;
    font-size: 30px;
  }

  .mega-feature {
    display: none;
  }

  .site-header .contact-button-slot {
    grid-template-columns: 0fr;
    margin-left: 0;
  }

  .site-header.is-menu-open .contact-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header.is-menu-open .mobile-menu-cta {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 22px;
    padding-top: 12px;
  }

  .site-header.is-menu-open .mobile-menu-footer {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  .site-header .mobile-contact-button,
  .site-header .mobile-contact-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000000;
    border-radius: 999px;
    padding: 10px 22px;
    background: #000000;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .site-header .mobile-contact-button:hover,
  .site-header .mobile-contact-button:focus-visible,
  .site-header .mobile-contact-button:active {
    background: #000000;
    color: #ffffff;
  }

  .mobile-menu-brand {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .mobile-menu-brand img {
    display: block;
    width: min(320px, 82vw);
    height: auto;
    max-width: 100%;
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(6.4px) rotate(45deg);
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6.4px) rotate(-45deg);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (max-width: 820px) {
    .site-header.is-menu-open::after {
      background: var(--site-header-frost-solid);
    }
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
    gap: 16px;
  }

  .nav-links {
    padding-left: 16px;
    padding-right: 16px;
  }
}
