:root {
  --c3-background: #07090d;
  --c3-surface: #10141b;
  --c3-surface-raised: #171c25;
  --c3-border: rgba(255, 255, 255, 0.1);
  --c3-text: #f4f6f8;
  --c3-text-muted: #aeb6c2;
  --c3-red: #e2242c;
  --c3-blue: #2978ff;
  --c3-header-height: 116px;
  --c3-content-width: 1600px;
  --c3-radius: 12px;
  --c3-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--c3-background);
  color: var(--c3-text);
  font-family:
    Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

body.mobile-navigation-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

#site-header,
#site-footer {
  width: 100%;
}

.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background:
    radial-gradient(circle at 12% -80%, rgba(41, 120, 255, 0.22), transparent 45%),
    linear-gradient(180deg, #10141b 0%, #0b0e13 100%);
  border-bottom: 1px solid var(--c3-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.site-header__accent,
.site-footer__accent {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--c3-blue) 0%,
    var(--c3-blue) 42%,
    #f4f6f8 50%,
    var(--c3-red) 58%,
    var(--c3-red) 100%
  );
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, var(--c3-content-width));
  min-height: var(--c3-header-height);
  margin: 0 auto;
  gap: 48px;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  color: var(--c3-text);
  text-decoration: none;
}

.site-brand:focus-visible,
.navigation-link:focus-visible,
.dropdown-link:focus-visible,
.mobile-menu-button:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgba(41, 120, 255, 0.75);
  outline-offset: 3px;
}

.site-brand__mark {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #1b2230, #0c0f15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.32);
}

.site-brand__mark::before,
.site-brand__mark::after {
  position: absolute;
  top: 0;
  width: 50%;
  height: 4px;
  content: "";
}

.site-brand__mark::before {
  left: 0;
  background: var(--c3-blue);
}

.site-brand__mark::after {
  right: 0;
  background: var(--c3-red);
}

.site-brand__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.06);
}

.site-brand__mark-code {
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.site-brand__text {
  display: grid;
  gap: 3px;
}

.site-brand__name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.site-brand__tagline {
  color: var(--c3-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.primary-navigation {
  margin-left: auto;
}

.navigation-list,
.dropdown-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

.navigation-list {
  display: flex;
  align-items: center;
  gap: 9px;
}

.navigation-item {
  position: relative;
}

.navigation-link,
.dropdown-link {
  border: 0;
  cursor: pointer;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.navigation-link {
  position: relative;
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  background: transparent;
  border-radius: 9px;
  color: #d9dee6;
  font-size: 1rem;
  white-space: nowrap;
}

.navigation-link::after {
  position: absolute;
  right: 16px;
  bottom: 4px;
  left: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--c3-blue), var(--c3-red));
  border-radius: 999px;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.navigation-link:hover,
.navigation-link.is-active,
.navigation-link[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.navigation-link:hover::after,
.navigation-link.is-active::after,
.navigation-link[aria-expanded="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.navigation-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.navigation-toggle[aria-expanded="true"] .navigation-caret {
  transform: translateY(2px) rotate(225deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  width: 260px;
  padding: 8px;
  background: rgba(18, 22, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--c3-radius);
  box-shadow: var(--c3-shadow);
}

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

.dropdown-menu.is-open {
  display: block;
  animation: dropdown-in 140ms ease-out;
}

.dropdown-item {
  position: relative;
}

.dropdown-item + .dropdown-item {
  margin-top: 2px;
}

.dropdown-link {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 11px;
  background: transparent;
  border-radius: 8px;
  color: #d8dde6;
  font-size: 0.84rem;
  line-height: 1.35;
}

.dropdown-link:hover,
.dropdown-link[aria-expanded="true"] {
  background: rgba(41, 120, 255, 0.12);
  color: #ffffff;
}

.submenu-arrow {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.dropdown-menu--submenu {
  top: -8px;
  left: calc(100% + 9px);
}

.dropdown-menu--submenu::before {
  top: 0;
  right: auto;
  bottom: 0;
  left: -10px;
  width: 10px;
  height: auto;
}

.mobile-menu-button {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #ffffff;
  cursor: pointer;
}

.mobile-menu-button__icon {
  display: grid;
  width: 20px;
  gap: 4px;
}

.mobile-menu-button__icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.mobile-menu-button[aria-expanded="true"]
  .mobile-menu-button__icon
  span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-button[aria-expanded="true"]
  .mobile-menu-button__icon
  span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button[aria-expanded="true"]
  .mobile-menu-button__icon
  span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-button__label {
  font-size: 0.8rem;
  font-weight: 750;
}

.site-footer {
  margin-top: auto;
  background:
    radial-gradient(circle at 88% 130%, rgba(226, 36, 44, 0.16), transparent 35%),
    linear-gradient(180deg, #0d1117 0%, #07090d 100%);
  border-top: 1px solid var(--c3-border);
}

.site-footer__inner {
  display: flex;
  width: min(100% - 40px, var(--c3-content-width));
  min-height: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 42px 0;
  margin: 0 auto;
}

.site-footer__brand {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer__brand-mark {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #1b2230, #0c0f15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.3);
}

.site-footer__brand-mark::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--c3-blue) 0%,
    var(--c3-blue) 45%,
    var(--c3-red) 55%,
    var(--c3-red) 100%
  );
  content: "";
  pointer-events: none;
}

.site-footer__brand-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.site-footer__brand-text {
  display: block;
  flex: 0 0 auto;
  line-height: 1.1;
  white-space: nowrap;
}

.site-footer__legal {
  max-width: 690px;
  color: var(--c3-text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: right;
}

.site-footer__legal p {
  margin: 0;
}

.site-footer__legal p + p {
  margin-top: 3px;
}

.site-footer__copyright {
  padding-top: 10px;
  color: #e4e8ee;
}

.component-error {
  padding: 14px 20px;
  background: #351318;
  border-bottom: 1px solid #7f2831;
  color: #ffffff;
  text-align: center;
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1201px) {
  .navigation-item--dropdown:hover > .dropdown-menu,
  .dropdown-item--submenu:hover > .dropdown-menu {
    display: block;
    animation: dropdown-in 140ms ease-out;
  }
}

@media (max-width: 1280px) {
  .site-brand__tagline {
    display: none;
  }

  .site-header__inner {
    gap: 24px;
  }

  .navigation-link {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 0.94rem;
  }
}

@media (max-width: 1200px) {
  .site-header__inner {
    min-height: 84px;
  }

  .site-brand__mark {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .site-brand__name {
    font-size: 1.15rem;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .primary-navigation {
    position: fixed;
    top: 87px;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    overflow-y: auto;
    padding: 18px 20px 40px;
    background: rgba(7, 9, 13, 0.985);
    border-top: 1px solid var(--c3-border);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .navigation-list {
    display: grid;
    width: min(100%, 720px);
    margin: 0 auto;
    gap: 5px;
  }

  .navigation-link {
    width: 100%;
    min-height: 50px;
    justify-content: space-between;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .navigation-link::after {
    display: none;
  }

  .dropdown-menu,
  .dropdown-menu--submenu {
    position: static;
    width: 100%;
    padding: 5px 0 5px 15px;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(41, 120, 255, 0.38);
    border-radius: 0;
    box-shadow: none;
  }

  .dropdown-menu::before,
  .dropdown-menu--submenu::before {
    display: none;
  }

  .dropdown-link {
    min-height: 46px;
    font-size: 0.88rem;
  }

  .submenu-arrow {
    transform: rotate(135deg);
    transition: transform 160ms ease;
  }

  .dropdown-toggle[aria-expanded="true"] .submenu-arrow {
    transform: rotate(315deg);
  }
}

@media (max-width: 700px) {
  .site-header__inner,
  .site-footer__inner {
    width: min(100% - 28px, var(--c3-content-width));
  }

  .site-brand__mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .site-brand__name {
    font-size: 1.08rem;
  }

  .site-brand__tagline {
    display: none;
  }

  .site-footer__inner {
    display: grid;
    min-height: auto;
    justify-items: start;
    gap: 24px;
    padding: 34px 0;
  }

  .site-footer__brand {
    gap: 13px;
    font-size: 1.08rem;
  }

  .site-footer__brand-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .site-footer__legal {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
