/* Site-wide chrome for the New York Noir design: navbar + footer.
   Source of truth for visuals: design/nynoir-home-handoff.html (mockup).
   All rules are scoped to #hlnavbar / .site-header / .site-footer so that
   later-loaded sheets (e.g. the wiki's) can't override them, and nothing
   bleeds into other navbar-nav uses (e.g. the wiki's in-content toolbar). */

:root {
  --nyn-ink: #191921;
  --nyn-ink-soft: #2A2A33;
  --nyn-paper: #F1EEE6;
  --nyn-paper-raised: #F7F5EE;
  --nyn-manila: #E9E2CF;
  --nyn-smoke: #6E6A60;
  --nyn-hairline: #D6D1C3;
  --nyn-cab: #F0B429;
  --nyn-cab-deep: #C98F0F;
  --nyn-stamp: #A63A2B;
  --nyn-green: #3F7A44;
  --nyn-max-w: 1080px;
  --nyn-sysfont: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* page background for EVERY page of the site — change this one token to retheme */
  --nyn-page-bg: var(--nyn-paper);
}

/* every page uses the same paper background (change --nyn-page-bg above) */
body.base-layout {
  background: var(--nyn-page-bg);
}

/* shared centered-width wrapper (used by the footer; the homepage reuses it) */
.nyn-wrap {
  max-width: var(--nyn-max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / navbar ---------- */

/* dark bar matching the footer: --nyn-ink ground, #ECE8DD/#C9C4B6 text,
   #4A4A55/#33333D hairlines, cab-yellow hover accents */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030; /* Bootstrap $zindex-sticky */
  background: color-mix(in srgb, var(--nyn-ink) 94%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #33333D;
}

/* keep anchor targets (e.g. /about/#recent-updates) visible below the sticky bar */
h1[id], h2[id], h3[id] {
  scroll-margin-top: 60px;
}

#hlnavbar {
  min-height: 46px;
  padding-top: 0;
  padding-bottom: 0;
}

#hlnavbar .navbar-brand {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1; /* keep the larger wordmark from growing the 46px bar */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}
/* brand hues lightened toward the footer text tone — the raw --nyn-green /
   --nyn-stamp values were tuned for paper and go muddy on the dark ink */
#hlnavbar .navbar-brand .nyn-ny { color: color-mix(in srgb, var(--nyn-green) 55%, #ECE8DD); }
#hlnavbar .navbar-brand .nyn-noir { color: color-mix(in srgb, var(--nyn-stamp) 65%, #ECE8DD); }

#hlnavbar .nav-link {
  font-family: var(--nyn-sysfont);
  font-size: 14.5px;
  color: #C9C4B6;
  border-bottom: 2px solid transparent;
}
#hlnavbar .nav-link:hover,
#hlnavbar .nav-link:focus,
#hlnavbar .nav-link.active {
  color: #ECE8DD;
  border-bottom-color: var(--nyn-cab);
}

#hlnavbar .navbar-toggler {
  border-color: #4A4A55;
}
/* light burger strokes (Bootstrap's default icon is ink-dark, invisible here) */
#hlnavbar {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28236, 232, 221, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* auth buttons (mockup .btn-small) */
#hlnavbar .nyn-btn {
  display: inline-block;
  font-family: var(--nyn-sysfont);
  font-size: 13px;
  text-decoration: none;
  color: #ECE8DD;
  padding: 4px 12px;
  border: 1.5px solid #4A4A55; /* footer .out-links border */
  white-space: nowrap;
}
#hlnavbar .nyn-btn-solid {
  background: var(--nyn-paper);
  color: var(--nyn-ink);
  border-color: var(--nyn-paper);
}
#hlnavbar .nyn-btn:hover {
  background: var(--nyn-cab);
  border-color: var(--nyn-cab);
  color: var(--nyn-ink);
}

/* account dropdown menu, restyled to match the dark chrome */
#hlnavbar .dropdown-menu {
  background: var(--nyn-ink-soft);
  border: 1px solid #4A4A55;
  border-radius: 0;
}
#hlnavbar .dropdown-item {
  color: #C9C4B6;
}
#hlnavbar .dropdown-item:hover,
#hlnavbar .dropdown-item:focus {
  background: color-mix(in srgb, var(--nyn-cab) 14%, var(--nyn-ink-soft));
  color: #ECE8DD;
}

/* desktop: slim bar laid out as a wordmark | centered links | auth grid
   (mockup's 1fr auto 1fr nav). display:contents dissolves the collapse
   wrapper so its two uls become grid items.
   The markup says navbar-expand-lg, which would collapse to the burger below
   Bootstrap's fixed 992px breakpoint — but the expanded bar actually fits
   down to ~870px, so this block starts at 870 and re-creates the pieces of
   Bootstrap's expand machinery (hide toggler, row-direction lists, absolute
   dropdown) for the 870-991px band. */
@media (min-width: 870px) {
  #hlnavbar .navbar-toggler {
    display: none;
  }
  #hlnavbar .navbar-nav {
    flex-direction: row;
  }
  #hlnavbar .navbar-nav .dropdown-menu {
    position: absolute;
  }
  #hlnavbar .nav-link {
    padding: 2px 8px;
  }
  #hlnavbar > .container-fluid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  #hlnavbar .navbar-brand {
    justify-self: start;
  }
  #navbarSupportedContent {
    display: contents !important;
  }
  /* NOTE: link spacing is margin on the anchors, NOT column-gap on the ul —
     the jrnavhide links hide only the <a>, so their zero-width <li>s would
     each still collect a column-gap, silently shifting the visible links
     ~30px off the true page center. */
  #navbarSupportedContent > ul.navbar-nav:first-child {
    justify-self: center;
  }
  #navbarSupportedContent > ul.navbar-nav:first-child .nav-link {
    margin-left: 6px;
    margin-right: 6px;
  }
  #navbarSupportedContent > ul.navbar-nav.ms-auto {
    justify-self: end;
  }
}

/* collapsed (burger) state: stacked links on the paper panel, auth buttons side by side */
@media (max-width: 869.98px) {
  #hlnavbar {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  #hlnavbar .nav-link {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #navbarSupportedContent {
    padding-bottom: 10px;
  }
  #hlnavAuth {
    flex-direction: row;
    gap: 8px;
    padding-top: 6px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 64px;
  background: var(--nyn-ink);
  color: #C9C4B6;
}

.site-footer .street-inner {
  padding: 34px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.site-footer .street-inner h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 23px;
  letter-spacing: 0.02em;
  color: #ECE8DD;
  line-height: 1.05;
  margin: 0;
}

.site-footer .out-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer .out-links a {
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ECE8DD;
  border: 1.5px solid #4A4A55;
  padding: 8px 14px;
}
.site-footer .out-links a:hover {
  border-color: var(--nyn-cab);
  color: var(--nyn-cab);
}

.site-footer .foot {
  border-top: 1px solid #33333D;
  padding: 16px 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: baseline;
  font-family: 'Courier Prime', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: #8E897C;
}
.site-footer .foot a {
  color: #C9C4B6;
  text-decoration: none;
}
.site-footer .foot a:hover {
  color: var(--nyn-cab);
}
.site-footer .foot .legal {
  margin-left: auto;
}
/* the "New York Noir" homepage link inside the legal line keeps the legal
   line's exact look (no link color, no hover change) */
.site-footer .foot .legal a,
.site-footer .foot .legal a:hover {
  color: inherit;
  text-decoration: none;
}

/* pin the footer to the viewport bottom on short pages (classic sticky-footer:
   the content area grows to fill free space, footer keeps its 64px margin).
   jrFullHeight full-viewport pages (map) run their own flex layout and
   suppress the footer, so they are excluded. */
body.base-layout:not(.jrFullHeight) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.base-layout:not(.jrFullHeight) > div.container-fluid {
  flex: 1 0 auto;
}
.site-footer {
  flex-shrink: 0;
}

/* focus visibility on chrome elements (mockup) */
#hlnavbar a:focus-visible,
#hlnavbar button:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--nyn-cab);
  outline-offset: 2px;
}
