@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500&display=swap');

html {
  scrollbar-gutter: stable;
}

.site-header {
  --header-height: 72px;
  --header-ease: cubic-bezier(.22,.61,.36,1);
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  color: #fff;
  font-family: 'Inter', sans-serif;
  line-height: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform .45s var(--header-ease), background .28s ease, backdrop-filter .28s ease;
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

.site-header.is-scrolled {
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.site-header .site-header-inner {
  height: var(--header-height);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.4vw, 34px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header a.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #fff;
  background: none;
  text-decoration: none;
}

.site-header .site-brand img {
  display: block;
  height: 26px;
  width: auto;
  max-width: none;
  margin: 0;
  opacity: .95;
}

.site-header .site-brand-name {
  font-size: 28px;
  font-weight: 200;
  letter-spacing: .09em;
  line-height: 1;
  white-space: nowrap;
}

.site-header .site-menu {
  margin: 0 0 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-header button {
  appearance: none;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  text-align: inherit;
  color: inherit;
  cursor: pointer;
}

.site-header .site-menu-item {
  position: relative;
  margin: 0;
  padding: 0;
  color: #fff;
  background: none;
  text-decoration: none;
  font-size: 16px;
  font-weight: 300;
  line-height: normal;
  letter-spacing: .05em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--header-ease);
}

.site-header .site-menu-item:is(:hover, :focus-visible) {
  transform: translateY(-1px);
}

.site-header .site-menu-item::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -9px;
  height: 3px;
  width: 0;
  margin: auto;
  background: linear-gradient(90deg, rgba(185,0,0,.62), #ff3c3c, rgba(185,0,0,.62));
  border-radius: 3px;
  transform: skewX(-12deg) rotate(-.35deg);
  filter: blur(.2px);
  opacity: .95;
  transition: width .38s cubic-bezier(.16,1,.3,1);
}

.site-header .site-menu-item:is(:hover, :focus-visible, :active)::after {
  width: 110%;
}

.site-header .site-language-picker {
  position: relative;
  flex: 0 0 auto;
}

.site-header .site-language-trigger {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 38px;
  min-width: 122px;
  padding: 0 30px 0 35px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 10px;
  background: linear-gradient(180deg, #252121, #181515);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  color: #fbf7f7;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header .site-language-trigger::before,
.site-header .site-language-trigger::after {
  content: '';
  position: absolute;
  top: 50%;
  pointer-events: none;
}

.site-header .site-language-trigger::before {
  left: 12px;
  width: 16px;
  height: 16px;
  background: #fa817c;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
}

.site-header .site-language-trigger::after {
  right: 14px;
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: #cfc5c5;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}

.site-header .site-language-trigger:is(:hover, :focus-visible, [aria-expanded='true']) {
  border-color: #ed6660;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 0 12px rgba(255,60,60,.18);
}

.site-header .site-language-trigger[aria-expanded='true']::after {
  transform: translateY(-25%) rotate(225deg);
}

.site-header :is(.site-language-trigger, .site-language-option):focus-visible {
  outline: 2px solid #ff6161;
  outline-offset: 2px;
}

.site-header .site-language-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 2;
  box-sizing: border-box;
  width: min(326px, calc(100vw - 32px));
  padding: 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-top-color: rgba(237,102,96,.58);
  border-radius: 16px;
  background: linear-gradient(155deg, #251e1e, #171515 65%);
  box-shadow: 0 18px 48px rgba(0,0,0,.56);
}

.site-header .site-language-heading {
  margin: 2px 3px 10px;
  color: #e1d4d4;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .035em;
}

.site-header .site-language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.site-header .site-language-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  min-width: 0;
  padding: 5px 17px 5px 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-language-option:hover {
  background: rgba(255,255,255,.07);
}

.site-header .site-language-option:is([aria-pressed='true'], [aria-current='page']) {
  border-color: rgba(250,129,124,.38);
  background: rgba(250,129,124,.12);
  color: #fff;
}

.site-header .site-language-option:is([aria-pressed='true'], [aria-current='page'])::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid #fa817c;
  border-bottom: 1.5px solid #fa817c;
  transform: translateY(-65%) rotate(-45deg);
}

.site-header .site-language-code {
  flex: 0 0 26px;
  padding: 4px 0;
  border-radius: 5px;
  background: rgba(255,255,255,.075);
  color: #e6d7d7;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.site-header .site-language-option:is([aria-pressed='true'], [aria-current='page']) .site-language-code {
  background: rgba(250,129,124,.19);
  color: #ffd3d0;
}

.site-header .site-language-status {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(240px, 80vw);
  padding: 8px 12px;
  border-radius: 6px;
  background: #211818;
  color: #fff;
  font-size: 13px;
  z-index: 1;
}

.site-header .site-language-status:empty {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.site-header :is(.lang-en, .lang-ru):not(.active) {
  display: none;
}

.site-header .site-menu-toggle {
  display: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 9px;
  margin-left: auto;
  flex: 0 0 44px;
  flex-direction: column;
  justify-content: space-between;
}

.site-header .site-menu-toggle:hover {
  background: rgba(255,255,255,.06);
}

.site-header .site-menu-toggle[aria-expanded='true'] {
  transform: rotate(90deg);
}

.site-header .site-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.site-header .site-menu-toggle span:nth-child(2) {
  width: 80%;
  margin-left: auto;
}

.site-header .site-menu-toggle span:nth-child(3) {
  width: 60%;
  margin-left: auto;
}

@media (max-width: 1100px) {
  .site-header { --header-height: 70px; }
  .site-header .site-menu { gap: 26px; }
  .site-header .site-menu-item { font-size: 15px; }
}

@media (max-width: 960px) {
  .site-header { --header-height: 68px; }
  .site-header .site-menu-toggle { display: flex; }

  .site-header .site-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    box-sizing: border-box;
    z-index: 1500;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
    gap: 42px;
    padding: 16px 0 36px;
    overflow-y: auto;
    background: transparent;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255,255,255,.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05);
    transition: opacity .45s var(--header-ease), transform .45s var(--header-ease), visibility .45s;
  }

  .site-header .site-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: -1;
  }

  .site-header .site-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  body.site-menu-open { overflow: hidden; }
  .site-header .site-menu-item { font-size: 24px; letter-spacing: .08em; }
  .site-header .site-menu-item:hover { transform: translateY(-2px); }
  .site-header .site-menu-item::after { bottom: -10px; }
  .site-header .site-language-trigger { min-height: 44px; min-width: 140px; margin: 0 auto; font-size: 15px; }
  .site-header .site-language-panel { position: static; margin-top: 12px; }
  .site-header .site-menu:has(.site-language-picker.is-open) { gap: clamp(14px, 3.5vh, 26px); }
  .site-header .site-language-status { right: 50%; transform: translateX(50%); }
}

@media (max-width: 420px) {
  .site-header .site-menu-item { font-size: 17px; }
}

@media (max-width: 960px) and (max-height: 650px) {
  .site-header .site-menu { gap: clamp(12px, 5vh, 42px); }
}

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