:root {
  --bg: #f8f9ff;
  --surface: #ffffff;
  --surface-soft: #eff4ff;
  --navy: #0a1c3e;
  --muted: #45464e;
  --line: #c5c6cf;
  --gold: #f9d423;
  --shadow: 0 18px 42px rgba(10, 28, 62, 0.08);
  --max: 1180px;
}

.shell {
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(197, 198, 207, 0.72);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 226px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 206px;
  height: 65px;
  display: block;
  object-fit: contain;
}

.brand-mark {
  display: block;
  width: 1px;
  height: 38px;
  background: var(--line);
}

.brand-text {
  display: block;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.25;
  color: var(--muted);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
}

.language-switcher button {
  min-width: 31px;
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--navy);
}

.nav-links a {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: inherit;
  text-decoration: none;
}

.product-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
}

.product-menu > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.product-menu > button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.product-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 238px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.product-menu:hover .product-dropdown,
.product-menu:focus-within .product-dropdown,
.product-menu.is-open .product-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.product-dropdown a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  color: var(--navy);
}

.product-dropdown a:hover,
.product-dropdown a:focus-visible {
  background: var(--surface-soft);
  border: 0;
  outline: none;
}

.product-dropdown strong {
  font-size: 14px;
  line-height: 1.2;
}

.product-dropdown span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.product-menu > button:hover,
.product-menu > button:focus-visible {
  color: var(--navy);
  border-color: var(--gold);
  outline: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(10, 28, 62, 0.16);
  outline: none;
}

@media (max-width: 980px) {
  .shell {
    width: min(var(--max), calc(100% - 48px));
  }

  .nav {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .language-switcher { margin-left: auto; }
}

@media (max-width: 760px) {
  .shell {
    width: min(var(--max), calc(100% - 32px));
  }

  .brand-mark,
  .brand-text {
    display: none;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    min-height: 68px;
    padding: 10px 0;
  }

  .brand { min-width: 0; }
  .brand img { width: 158px; height: 48px; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    padding: 8px 0 0;
    overflow: visible;
    border-top: 1px solid var(--line);
    font-size: 13px;
  }

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

  .nav-links a,
  .product-menu {
    width: 100%;
    padding: 0;
  }

  .nav-links a,
  .product-menu > button {
    min-height: 48px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .product-menu > button {
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
  }

  .product-dropdown {
    position: static;
    display: none;
    min-width: 0;
    margin: 0 0 8px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
  }

  .product-menu:hover .product-dropdown,
  .product-menu:focus-within .product-dropdown,
  .product-menu.is-open .product-dropdown { display: block; }

  .product-dropdown a { padding: 12px; }

  .nav .button {
    display: none;
  }

  .language-switcher { grid-column: 3; grid-row: 1; margin-left: 0; }
}
