/* /assets/css/header.css */

:root {
  --nav-bg: #050505;
  --nav-text: #ffffff;
  --nav-muted: #b8c0cc;
  --nav-height: 64px;
  --nav-logo-size: 36px;
  --menu-width-mobile: 336px;
}

.topnav {
  background: var(--nav-bg);
  color: var(--nav-text);
  position: sticky;
  top: 0;
  z-index: 120;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.28);
}

.topnav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--nav-height);
  max-width: var(--max-width, 1120px);
  margin: 0 auto;
  padding: 0 var(--page-gutter, 20px);
  box-sizing: border-box;
}

.topnav .brand a {
  color: var(--nav-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0;
}

.topnav .logo {
  display: inline-grid;
  place-items: center;
  width: var(--nav-logo-size);
  height: var(--nav-logo-size);
  background: #ffffff;
  color: #050505;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.topnav .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topnav .nav-links a {
  background: transparent;
  color: #eef2f7;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 12px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: none;
}

html[data-mobile-menu="ready"] .topnav .nav-links a {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.topnav .nav-links a:hover,
.topnav .nav-links a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.topnav .nav-links a:active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--nav-text);
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.drawer-head,
.nav-overlay {
  display: none;
}

.topnav a,
.topnav button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.topnav .brand a:focus-visible,
.nav-toggle:focus-visible,
.topnav .nav-links a:focus-visible,
.menu-close:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.45);
  outline-offset: 3px;
}

.topnav .brand a:focus:not(:focus-visible),
.nav-toggle:focus:not(:focus-visible),
.topnav .nav-links a:focus:not(:focus-visible),
.menu-close:focus:not(:focus-visible) {
  outline: none;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 760px) {
  .topnav .nav-inner {
    height: 60px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .drawer-brand {
    color: #0f172a;
    font-weight: 850;
    font-size: 17px;
  }

  .menu-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .nav-overlay[hidden] {
    display: none;
  }

  .nav-overlay.open {
    opacity: 1;
  }

  .topnav .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(var(--menu-width-mobile), calc(100vw - 28px));
    max-width: 100%;
    padding: 18px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: -22px 0 44px rgba(15, 23, 42, 0.18);
    transform: translateX(104%);
    transition: transform 220ms ease;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .topnav .nav-links.open {
    transform: translateX(0);
  }

  .topnav .nav-links[aria-hidden="true"] {
    visibility: hidden;
  }

  .topnav .nav-links.open[aria-hidden="false"] {
    visibility: visible;
  }

  .topnav .nav-links a {
    color: #111827;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 14px 12px;
    font-size: 16px;
    border-radius: 10px;
  }

  .topnav .nav-links a:hover,
  .topnav .nav-links a.active {
    background: #f1f5f9;
    color: #0f172a;
  }

}

@media (min-width: 761px) {
  .topnav .nav-links {
    position: static;
    visibility: visible !important;
  }

  .topnav .nav-links[aria-hidden="true"] {
    display: flex;
  }

  .topnav .menu-close,
  .topnav .drawer-head {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .topnav .nav-links a:hover {
    background: transparent;
    color: #eef2f7;
  }

  .topnav .nav-links a:active {
    background: transparent;
    color: #ffffff;
  }

  .topnav .nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }
}

@media (max-width: 760px) and (hover: none) and (pointer: coarse) {
  .topnav .nav-links a:hover {
    background: transparent;
    color: #111827;
  }

  .topnav .nav-links a:active {
    background: transparent;
    color: #111827;
  }

  .topnav .nav-links a.active {
    background: #f1f5f9;
    color: #0f172a;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --nav-height: 56px;
  }

  .topnav .nav-inner {
    height: var(--nav-height);
  }

  .topnav .logo {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }
}
