/* Shared top navigation styles (match research.html) */

/* Prevent cross-page horizontal "twitch" from scrollbar appearing/disappearing */
@supports (scrollbar-gutter: stable) {
  html { scrollbar-gutter: stable; }
}
@supports not (scrollbar-gutter: stable) {
  /* Fallback: always reserve scrollbar space */
  html { overflow-y: scroll; }
}

/* Prevent mobile browsers (Samsung/Chrome) from autoscaling text metrics */
html, body{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* “Sidebar scroller” treatment (match `social-signal.html`, scaled for full pages)
   NOTE: WebKit scrollbar pseudo-elements must be attached to a selector. */
html{
  scrollbar-width: thin;
  scrollbar-color: #1A1A1A #EEEBE6;
}

/* WebKit (Chrome/Edge/Safari) */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar{
  width: 8px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track{
  background: #EEEBE6;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb{
  background: #1A1A1A;
  border-radius: 0;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover{
  background: rgba(26,26,26,0.75);
}

@font-face {
  /* Use a distinct family name so pages can't override with Google Bebas Neue */
  font-family: 'Korthos Bebas';
  src: url('fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  /* Site-owned mono so nav matches everywhere */
  font-family: 'Korthos Mono';
  src: url('fonts/JetBrainsMono[wght].ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

header.site-header {
  /* Use sticky (not fixed) to avoid cross-page layout jump on load */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 1.5rem 4rem !important;
  background-color: #EEEBE6 !important;
  border-bottom: none;
}

/* Inset hairline (matches intelligence page) */
header.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #1a1a1a;
  opacity: 0.2;
}

header.site-header .home-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

header.site-header .home-logo-text {
  font-size: 28px !important;
  font-weight: 400;
  color: #1a1a1a;
  font-family: 'Korthos Bebas', sans-serif !important;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

header.site-header .home-logo-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  padding-left: 0;
  margin-top: -6px;
  margin-left: -3px;
}

header.site-header .home-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background-color: transparent;
  padding-left: 0;
}

header.site-header nav {
  display: flex;
  gap: 36px;
  min-width: 0; /* allow horizontal overflow */
}

header.site-header nav a {
  color: #1A1A1A;
  text-decoration: none;
  font-size: 0.75rem !important; /* matches Intelligence */
  font-weight: 400 !important;   /* matches Intelligence */
  font-family: "Korthos Mono", ui-monospace, monospace !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding-bottom: 2px; /* keep underline close to text */
  border-bottom: 2px solid transparent;
}

header.site-header nav a:hover {
  color: #1A1A1A;
}

header.site-header nav a.active {
  border-bottom: 2px solid #FF6B35 !important;
}

/* Disabled nav items (used for DATA/ECOSYSTEM while not live) */
header.site-header nav a.nav-disabled,
header.site-header nav a[aria-disabled="true"]{
  pointer-events: none;
  opacity: 0.45;
  border-bottom-color: transparent !important;
}

/* Mobile: keep nav on one line via horizontal scroll (no hamburger, no wrapping) */
@media (max-width: 768px) {
  header.site-header {
    /* Printed logic: 3 stacked bands */
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px;
    padding: 12px 18px 10px 18px !important;
  }

  header.site-header::after {
    left: 18px;
    right: 18px;
  }

  /* Band 2: register line (nav), full width, scroll if needed */
  header.site-header nav {
    width: 100%;
    justify-self: start !important;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* firefox */
    gap: 18px;
  }

  header.site-header nav::-webkit-scrollbar { display: none; } /* chrome */

  header.site-header nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 11px !important;
    letter-spacing: 0.12em !important;
    padding-bottom: 1px;
  }
}

