/* ---------------------------------------------------------------
   header-docket.css -- the site header in the docket's black and cream.

   Loaded by includes/header.php ONLY on a page that sets $docket_header = true,
   after design2.css, so a rule here of the same weight as one there wins by
   coming later. Pages that do not opt in never load this file and keep the
   header they have.

   The header sits outside the docket sheet, so it carries its own copies of the
   sheet's colours rather than reading them from .docket.

   The site's link rule (design2.css, four :not()s) turns any plain link red and
   is stronger than a single class, so the links in the dropdown and the phone
   menu restate it behind the same chain. The bar's own links are excluded from
   that rule by name and need no help.
   --------------------------------------------------------------- */

.site-head,
.nav-mobile {
  --h-paper: #1c1915;
  --h-ink: #e7dcc6;
  --h-muted: #a39a89;
  --h-rule: #4a443b;
  --h-rule-soft: #38332c;
  --h-moral: #e74654;
}

/* ---- The bar ---- */
.site-head {
  background: rgba(28, 25, 21, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--h-rule);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ---- The wordmark. A chosen logo image keeps its own treatment. ---- */
.site-head .wordmark:not(.has-logo) {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--h-ink);
}

/* ---- Links: small caps, and the page you are on underlined in red ----
   Every item stretches to the height of the bar so the underline sits on its lower
   edge; the Apply stamp is the one thing that stays centred. */
@media (min-width: 768px) {
  .site-head .nav-desk,
  .site-head .head-account { align-self: stretch; align-items: stretch; gap: 0; }
}
.site-head .nav-item { display: flex; }
.site-head .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  font: 600 0.72rem "Instrument Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-muted);
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.site-head .nav-link:hover { color: var(--h-ink); box-shadow: inset 0 -2px 0 var(--h-rule); }
.site-head .nav-link.is-on { color: var(--h-ink); box-shadow: inset 0 -2px 0 var(--h-moral); }
.site-head .head-account .nav-link { padding: 0 0.7rem; }
.site-head .nav-link:focus-visible,
.site-head .apply-link:focus-visible,
.site-head .wordmark:focus-visible,
.site-head .nav-toggle:focus-visible { outline: 2px solid var(--h-moral); outline-offset: -2px; }

/* ---- Apply: a stamp ---- */
.site-head .apply-link {
  align-self: center;
  margin-left: 0.4rem;
  padding: 0.4rem 0.8rem;
  font: 700 0.72rem "Instrument Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-moral);
  background: transparent;
  border: 2px solid var(--h-moral);
  border-radius: 0;
  transform: rotate(-2deg);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-head .apply-link:hover,
.site-head .apply-link.is-on { color: var(--h-paper); background: var(--h-moral); border-color: var(--h-moral); }

/* ---- Something is waiting ---- */
.site-head .nav-dot,
.nav-mobile .nav-dot { background: var(--h-moral); }

/* ---- The dropdown ---- */
.site-head .nav-menu {
  background: var(--h-paper);
  border: 1px solid var(--h-rule);
  border-radius: 2px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}
.site-head .nav-menu a:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
  font: 600 0.72rem "Instrument Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-muted);
  border-radius: 0;
  text-decoration: none;
}
.site-head .nav-menu a:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark):hover,
.site-head .nav-menu a.is-on:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
  color: var(--h-ink);
  background: color-mix(in srgb, var(--h-moral) 10%, transparent);
  text-decoration: none;
}

/* ---- The phone ---- */
.nav-toggle span { background: var(--h-ink); border-radius: 0; }
.nav-mobile { background: var(--h-paper); border-top: 1px solid var(--h-rule); }
.nav-mobile .m-heading {
  font: 600 0.68rem "Instrument Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.2em;
  color: var(--h-muted);
}
.nav-mobile a.m-link:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
  font: 700 1.5rem "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cfc4ac;
  border-bottom: 1px solid var(--h-rule-soft);
  text-decoration: none;
}
.nav-mobile a.m-link.m-sub:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
  font: 600 0.95rem "Instrument Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
}
.nav-mobile a.m-link.is-on:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark),
.nav-mobile a.m-link:active:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) {
  color: var(--h-ink);
  box-shadow: inset 3px 0 0 var(--h-moral);
  padding-left: 0.8rem;
}
.nav-mobile a.m-link.m-apply:not(.btn):not(.nav-link):not(.apply-link):not(.wordmark) { color: var(--h-moral); }
.nav-mobile .m-account { border-top: 1px solid var(--h-rule); }

@media (prefers-reduced-motion: reduce) {
  .site-head .nav-link,
  .site-head .apply-link { transition: none; }
}
