/* Eagle HEX site header and responsive navigation */
:root {
  --eh-red: #E31E24;
  --eh-black: #0A0A0C;
  --eh-white: #FFFFFF;
  --eh-silver: #A7ADB4;
  --eh-line: #29292E;
  --eh-header-height: 82px;
}

.header,
.header * { box-sizing: border-box; }

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: min(100% - 48px, 1440px);
  height: var(--eh-header-height);
  margin: 0 auto;
  padding: 0 clamp(0px, 1vw, 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.4vw, 24px);
  border-bottom: 1px solid var(--eh-line);
  background: rgba(10, 10, 12, .96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header .logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 192px;
  width: 192px;
  height: 72px;
  overflow: visible;
}

.header .brand-logo {
  display: block;
  flex: none;
  width: 192px;
  height: 64px;
  max-width: none;
  object-fit: contain;
}

.header .site-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.12vw, 17px);
}

.header .site-nav > .nav-link,
.header .nav-dropdown > summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #D0D2D6;
  font: 600 11px/1.2 var(--sans, Arial, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease;
}

.header .site-nav > .nav-link:hover,
.header .site-nav > .nav-link:focus-visible,
.header .nav-dropdown > summary:hover,
.header .nav-dropdown > summary:focus-visible,
.header .nav-dropdown[open] > summary { color: var(--eh-white); }

.header .site-nav > .nav-link:focus-visible,
.header .nav-dropdown > summary:focus-visible,
.header .nav-action:focus-visible,
.header .menu:focus-visible {
  outline: 2px solid var(--eh-red);
  outline-offset: 4px;
}

.header .nav-dropdown { position: relative; }
.header .nav-dropdown > summary { list-style: none; }
.header .nav-dropdown > summary::-webkit-details-marker { display: none; }

.header .chevron {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.header .nav-dropdown[open] > summary .chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.header .dropdown-panel {
  position: absolute;
  top: calc(100% + 11px);
  left: -14px;
  z-index: 5;
  width: max-content;
  min-width: 238px;
  max-width: min(310px, 90vw);
  padding: 7px;
  display: grid;
  gap: 2px;
  border: 1px solid #34343A;
  background: #111114;
  box-shadow: 0 18px 42px #000A;
}

.header .nav-dropdown:not([open]) > .dropdown-panel { display: none; }
.header .nav-dropdown[open] > .dropdown-panel { display: grid; }

.header .dropdown-panel a {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 10px;
  color: #C4C6CB;
  font-size: 11px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}

.header .dropdown-panel a:hover,
.header .dropdown-panel a:focus-visible {
  outline: none;
  background: #1B1B20;
  color: var(--eh-white);
}

.header .dropdown-panel small {
  color: var(--eh-red);
  font: 7px var(--mono, monospace);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.header .account-dropdown { position: relative; }
.header .account-dropdown > summary { padding: 0 11px; border: 1px solid #484A50; }
.header .account-dropdown .dropdown-panel { right: 0; left: auto; min-width: 190px; }
.header .account-dropdown .dropdown-panel form { margin: 0; }
.header .account-dropdown .account-logout {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: #C4C6CB;
  font: 600 11px/1.45 var(--sans, Arial, sans-serif);
  text-align: left;
  cursor: pointer;
}
.header .account-dropdown .account-logout:hover,
.header .account-dropdown .account-logout:focus-visible { outline: none; background: #1B1B20; color: var(--eh-white); }

.header .header-actions,
.header .mobile-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.header .mobile-actions,
.header .menu { display: none; }

.header .nav-action {
  min-width: 61px;
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #484A50;
  background: transparent;
  color: var(--eh-white);
  font: 9px var(--mono, monospace);
  letter-spacing: .8px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.header .login-action:hover { border-color: var(--eh-silver); background: #FFFFFF0D; }
.header .header-actions form,
.header .mobile-actions form { margin: 0; }

.header .menu {
  width: 42px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #393A40;
  background: transparent;
  cursor: pointer;
}

.header .menu i { width: 100%; height: 1px; background: var(--eh-white); transition: transform 160ms ease; }
.header .menu[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.header .menu[aria-expanded="true"] i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.header .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.mobile-menu-open { overflow: hidden; }

@media (max-width: 1160px) {
  .header { width: calc(100% - 36px); gap: 14px; }
  .header .logo-link { flex-basis: 172px; width: 172px; }
  .header .brand-logo { width: 172px; height: 58px; }
  .header .site-nav { gap: clamp(7px, .85vw, 11px); }
  .header .site-nav > .nav-link,
  .header .nav-dropdown > summary { font-size: 10px; }
  .header .nav-action { min-width: 54px; padding-inline: 8px; font-size: 8px; }
}

@media (max-width: 1000px) {
  :root { --eh-header-height: 76px; }
  .header { width: 100%; padding-inline: 22px; }
  .header .logo-link { flex-basis: 184px; width: 184px; height: 66px; }
  .header .brand-logo { width: 184px; height: 62px; }
  .header .menu { display: flex; }
  .header .header-actions { display: none; }
  .header .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    max-height: calc(100dvh - var(--eh-header-height));
    display: none;
    overflow-y: auto;
    padding: 12px 22px 20px;
    align-items: stretch;
    border-bottom: 1px solid #34343A;
    background: #0D0D10;
    box-shadow: 0 20px 35px #0009;
  }
  .header .site-nav.open { display: flex; flex-direction: column; gap: 0; }
  .header .site-nav > .nav-link,
  .header .nav-dropdown > summary {
    width: 100%;
    min-height: 47px;
    justify-content: space-between;
    border-bottom: 1px solid #FFFFFF12;
    font-size: 13px;
  }
  .header .nav-dropdown { width: 100%; }
  .header .dropdown-panel {
    position: static;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 4px 0 9px 12px;
    border: 0;
    border-bottom: 1px solid #FFFFFF12;
    background: transparent;
    box-shadow: none;
  }
  .header .account-dropdown .dropdown-panel { right: auto; left: 0; }
  .header .account-dropdown > summary { padding-inline: 0; border: 0; }
  .header .dropdown-panel a { min-height: 42px; font-size: 12px; }
  .header .mobile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding-top: 15px;
  }
  .header .mobile-actions .nav-action { width: 100%; min-height: 43px; font-size: 10px; }
}

@media (max-width: 600px) {
  :root { --eh-header-height: 70px; }
  .header { padding-inline: 16px; }
  .header .logo-link { flex-basis: 158px; width: 158px; height: 58px; }
  .header .brand-logo { width: 158px; height: 53px; }
  .header .site-nav { max-height: calc(100dvh - var(--eh-header-height)); padding-inline: 17px; }
  .header .menu { width: 40px; height: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  .header *, .header *::before, .header *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
