/* ============================================================
   945 CLUB — SITE CHROME, THE NEW STYLE
   The header on every page (markup: api/_lib/siteNav.js), the shop's promo
   bar, the phone menu, the bag panel and the footer. Loaded after theme.css
   by index.html, the policy pages, the 404 and /product/:id, so the same bar
   looks the same everywhere.

   Scoped by id (#nav, #msheet, #promo) to outrank the classic rules in
   components.css / responsive.css / theme.css without piling up !important;
   where those rules use it, these must too.

   The palette is the house one (css/main.css): cream paper, indigo type and
   action, burgundy marks. Type: Inter for the bar, Outfit for the big words.
   ============================================================ */

/* ---------- Hover roll: the label slides up, its twin slides in ---------- */
.nh-roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.2; --roll-color: var(--burgundy, #761B2C); transition: color 0.3s ease; }
.nh-roll::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) {
  .nh-roll:hover, a:hover > .nh-roll { color: transparent; }
  .nh-roll:hover::after, a:hover > .nh-roll::after { transform: translateY(-100%); color: var(--roll-color, currentColor); }
}

/* ---------- The bar ---------- */
#nav.nhb {
  position: sticky;
  top: 0;
  z-index: 900;
  height: calc(var(--nav, 60px) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(248, 238, 219, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(56, 60, 140, 0.12);
  box-shadow: none;
  color: var(--ink, #1C1D3D);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
#nav.nhb.stuck { background: rgba(248, 238, 219, 0.97); box-shadow: 0 12px 28px -24px rgba(20, 21, 45, 0.55); }
.nhb-in {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(16px, 2.2vw, 32px);
}
#nav.nhb .nhb-logo { justify-self: start; display: inline-flex; align-items: center; flex-direction: row; }
/* The 2030 lockup is 2.74 wide against the 1.89 of the one before it, so at the old 36px its athletes were a
   few pixels each. The bar has the room: 44px here, 36px on a phone. */
#nav.nhb .nhb-logo img { display: block; width: auto; height: 44px; }

#nav.nhb .nlinks { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 1.8vw, 30px); margin: 0; flex: none; }
#nav.nhb .nlink {
  height: auto;
  padding: 10px 0;
  display: inline-flex;
  font: 600 12px/1.2 'Inter', system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink, #1C1D3D);
  opacity: 1;
  white-space: nowrap;
}
#nav.nhb .nlink:hover, #nav.nhb .nlink.active { font-weight: 600; opacity: 1; }
#nav.nhb .nlink.active > .nh-roll { color: var(--burgundy, #761B2C); }
#nav.nhb .nlink:focus-visible { outline: 2px solid var(--burgundy, #761B2C); outline-offset: 4px; border-radius: 2px; }

.nhb-actions { justify-self: end; display: flex; align-items: center; gap: 2px; }
.nhb-search {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 16px 0 13px;
  margin-right: 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 60, 140, 0.22);
  background: transparent;
  color: var(--ink2, #5E5870);
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.nhb-search svg { color: var(--ink, #1C1D3D); flex-shrink: 0; }
.nhb-search:hover { border-color: var(--indigo, #383C8C); color: var(--indigo, #383C8C); background: rgba(56, 60, 140, 0.04); }

.nhb-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink, #1C1D3D);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.nhb-icon:hover { background: rgba(56, 60, 140, 0.08); color: var(--indigo, #383C8C); }
.nhb-icon:active { transform: scale(0.94); }
.nhb-search:focus-visible, .nhb-icon:focus-visible, #nav.nhb .nhb-logo:focus-visible { outline: 2px solid var(--burgundy, #761B2C); outline-offset: 2px; }
#nav.nhb .badge {
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--cream-soft, #F8EEDB);
}
#nav.nhb .cart-icon-popping { animation: nhbPop 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes nhbPop { 40% { transform: scale(1.18); } }

/* Signed in, the account icon becomes "[ Hi, name ]" (js/modules/customerAuth.js). */
#nav.nhb #accountBtn { width: auto; min-width: 38px; height: 38px; padding: 0; border-radius: 999px; }
#nav.nhb #accountBtn:has(.user-avatar-tag):hover { background: transparent; }
#nav.nhb .user-avatar-tag {
  position: relative;
  gap: 7px;
  padding: 0 14px 0 11px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(56, 60, 140, 0.22);
  border-radius: 999px;
  color: var(--indigo, #383C8C);
  transition: border-color 0.25s ease, background 0.25s ease;
}
#nav.nhb #accountBtn:hover .user-avatar-tag { border-color: var(--indigo, #383C8C); background: rgba(56, 60, 140, 0.04); }
#nav.nhb .user-avatar-tag svg { width: 15px !important; height: 15px !important; }
#nav.nhb .header-user-name {
  font: 700 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo, #383C8C);
}
.nhb-burger { display: none !important; }

/* Narrower desks: the search keeps its icon, then the least-used links go. */
@media (max-width: 1240px) {
  .nhb-search { width: 38px; padding: 0; margin-right: 0; justify-content: center; border-color: transparent; }
  .nhb-search:hover { border-color: transparent; background: rgba(56, 60, 140, 0.08); }
  .nhb-search-label { display: none; }
}
@media (max-width: 1120px) { #nav.nhb .nhb-contact { display: none; } }
@media (max-width: 1040px) { #nav.nhb #reviewsNavLink { display: none; } }

/* Tablets and phones: logo left, controls right, the rest in the menu. */
@media (max-width: 960px) {
  .nhb-in { grid-template-columns: auto 1fr; gap: 10px; }
  #nav.nhb .nlinks { display: none; }
  .nhb-burger { display: inline-flex !important; }
  #nav.nhb .theme-toggle-btn { display: none !important; } /* in the menu instead */
  #nav.nhb .mega { display: none; }
}
@media (max-width: 768px) {
  #nav.nhb { background: var(--cream-soft, #F8EEDB); }
  .nhb-in { padding: 0 8px 0 14px; }
  #nav.nhb .nhb-logo img { height: 36px; }
  .nhb-actions { gap: 0; }
  /* The classic bar hid the account button on phones; here it stays, the
     quickest way to sign in. Signed in, a burgundy dot says so. */
  #nav.nhb #accountBtn { display: inline-flex !important; }
  #nav.nhb .user-avatar-tag { width: 38px; height: 38px; padding: 0; justify-content: center; border: 0; }
  #nav.nhb .user-avatar-tag svg { width: 20px !important; height: 20px !important; }
  #nav.nhb .user-avatar-tag::after {
    content: '';
    position: absolute;
    top: 7px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--burgundy, #761B2C);
    box-shadow: 0 0 0 2px var(--cream-soft, #F8EEDB);
  }
}

/* ---------- Mega menu, in the bar's paper ---------- */
/* Solid: the drawn menus are tall enough to sit over the page's own large type. */
#nav.nhb .mega { background: #F8EEDB; border-bottom: 1px solid rgba(56, 60, 140, 0.12); }

/* ---------- Promo bar (the shop only) ---------- */
#promo.promo {
  background: #2B2E73 !important;
  color: rgba(248, 238, 219, 0.88) !important;
  border-bottom: 0;
  padding: 9px 48px;
  font: 600 11px/1.35 'Inter', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
#promo.promo b { color: var(--cream, #F2E0BE); font-weight: 700; }
#promo.promo a { color: var(--cream, #F2E0BE) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
#promo.promo .x { color: rgba(248, 238, 219, 0.7); }
#promo.promo .x:hover { opacity: 1; color: var(--cream, #F2E0BE); }
@media (max-width: 768px) {
  #promo.promo { padding: 8px 38px 8px 14px; font-size: 10px; letter-spacing: 0.08em; }
}

/* ---------- The phone menu ---------- */
#msheet.msheet { background: var(--cream-soft, #F8EEDB); }
#msheet .msheet-inner { gap: 18px; }
#msheet .msheet-auth-card {
  background: #383C8C;
  border: 0;
  border-radius: 14px;
  padding: 14px 14px 14px 16px;
  text-decoration: none;
  color: var(--cream-soft, #F8EEDB);
}
#msheet .msheet-auth-card:active { background: var(--indigo-deep, #2B2E73); }
#msheet .msheet-avatar-circle { background: rgba(248, 238, 219, 0.14); color: var(--cream, #F2E0BE); }
#msheet .msheet-auth-greeting { color: var(--cream-soft, #F8EEDB); font: 800 16px/1.2 'Outfit', sans-serif; letter-spacing: -0.01em; }
#msheet .msheet-auth-sub { color: rgba(248, 238, 219, 0.7); }
#msheet .msheet-auth-cta {
  background: var(--cream, #F2E0BE);
  color: var(--indigo, #383C8C);
  font: 700 11px/1 'Inter', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
}
#msheet .msheet-acc-item { border-bottom: 1px solid rgba(56, 60, 140, 0.14); }
#msheet .msheet-acc-header, #msheet .msheet-direct-header { padding: 15px 2px !important; }
#msheet .msheet-item-text {
  font: 800 25px/1.1 'Outfit', sans-serif !important;
  letter-spacing: -0.035em !important;
  color: var(--indigo, #383C8C) !important;
}
#msheet .msheet-select-text, #msheet .msheet-item-text.msheet-select-text { color: var(--burgundy, #761B2C) !important; }
#msheet .msheet-chevron { color: var(--burgundy, #761B2C) !important; }
#msheet .msheet-sale-item .msheet-item-text { color: var(--indigo, #383C8C) !important; }
#msheet .msheet-badge-red { font-size: 9.5px; letter-spacing: 0.1em; }
#msheet .msheet-sub-link { font: 500 16px/1.3 'Inter', sans-serif; color: var(--ink2, #5E5870); letter-spacing: 0; }
#msheet .msheet-sub-link.is-primary { font-weight: 700; color: var(--indigo, #383C8C); }
#msheet .msheet-sub-arrow { color: var(--burgundy, #761B2C); }
/* Headings and counts in the menus drawn from the catalogue (js/app.js renderGenderSheets). */
#msheet .msheet-sub-head { margin: 14px 0 2px; font: 700 11px/1.2 'Inter', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2, #5E5870); }
#msheet .msheet-count { margin-left: 4px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink2, #5E5870); opacity: 0.75; }
#msheet .msheet-acc-item.open .msheet-submenu-inner { border-left-color: rgba(118, 27, 44, 0.35); }
#msheet .msheet-sub-heading { color: var(--burgundy, #761B2C); letter-spacing: 0.14em; }
#msheet .msheet-tool-card { background: transparent; border: 1px solid rgba(56, 60, 140, 0.18); border-radius: 12px; }
#msheet .msheet-tool-card svg { color: var(--burgundy, #761B2C); }
#msheet .msheet-tool-title { color: var(--indigo, #383C8C); font-weight: 800; }
#msheet .msheet-theme-row { width: 100%; margin: 0; background: transparent; border: 1px solid rgba(56, 60, 140, 0.18); border-radius: 12px; font: inherit; color: var(--ink, #1C1D3D); }
#msheet .theme-status-pill { font: 700 10px/1 'Inter', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--burgundy, #761B2C); }
#msheet .msheet-footer-info { color: var(--burgundy, #761B2C); border-top-color: rgba(56, 60, 140, 0.14); letter-spacing: 0.14em; }
/* The dark-mode row is for phones: on a desk the bar has the toggle. */
@media (min-width: 961px) { #msheet .msheet-theme-row { display: none; } }

/* The menu on the pages outside the shop: its links, one level deep. */
.nhb-sheet-links { display: flex; flex-direction: column; }
.nhb-sheet-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(56, 60, 140, 0.14);
  font: 800 25px/1.1 'Outfit', sans-serif;
  letter-spacing: -0.035em;
  color: var(--indigo, #383C8C);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.nhb-sheet-link.is-select { color: var(--burgundy, #761B2C); }
.nhb-sheet-link span { font: 400 18px/1 'Inter', sans-serif; color: var(--burgundy, #761B2C); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.nhb-sheet-link:active span { transform: translateX(5px); }
.nhb-sheet { display: block; }
@media (min-width: 961px) { .nhb-sheet { display: none; } }
/* The phone menu keeps the bar on screen, so the page behind is locked on <html>
   alone. Not on <body> as well: on a phone <html> already clips sideways
   (responsive.css), which stops <body>'s overflow reaching the viewport, so
   hidden there turned <body> into its own scroller and the sticky bar scrolled
   away with the page, X and all. */
html.nhb-locked { overflow: hidden; }

/* ---------- The bag panel, below the bar wherever the bar is ---------- */
.bag-dropdown-menu {
  top: calc(var(--nav-bottom, var(--nav, 60px)) + 10px);
  right: clamp(12px, 2.2vw, 32px);
  background: var(--cream-soft, #F8EEDB);
  border: 1px solid rgba(56, 60, 140, 0.14);
  border-radius: 16px;
  box-shadow: 0 30px 70px -30px rgba(20, 21, 45, 0.55);
}
.bag-dropdown-overlay { background: rgba(20, 21, 45, 0.35); }
.bag-empty-heading { font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: -0.035em; color: var(--indigo, #383C8C); }
.bag-profile-title { color: var(--burgundy, #761B2C); letter-spacing: 0.14em; }
.bag-profile-links li a:hover, .bag-signin-note a { color: var(--indigo, #383C8C); }
.bag-profile-links svg { color: var(--burgundy, #761B2C); }

/* ---------- Footer (every page): the night, under the paper ---------- */
/* Outranks theme.css's `:root:not([data-theme="dark"]) .club-footer` cream, !important. */
.club-footer, :root:not([data-theme="dark"]) footer.club-footer { background: #14152D !important; border-top: 0 !important; color: rgba(242, 224, 190, 0.7); }
/* .club-footer-inner's own padding (components.css) wiped .wrap-wide's sides:
   at 1440 px and narrower the footer ran from edge to edge. The bar's gutter. */
.club-footer .club-footer-inner { padding: clamp(56px, 7vw, 88px) clamp(16px, 2.2vw, 32px) 0; }
.club-footer .club-footer-heading { color: #E3A6B1; letter-spacing: 0.16em; }
.club-footer .club-footer-col a { color: rgba(242, 224, 190, 0.78); }
.club-footer .club-footer-col a:hover, .club-footer .club-footer-col a:focus-visible { color: #F2E0BE; }
.club-footer .club-footer-blurb { color: rgba(242, 224, 190, 0.72); }
.club-footer .club-footer-note { color: rgba(242, 224, 190, 0.68); }
.club-footer .club-footer-bar { border-top-color: rgba(242, 224, 190, 0.14); color: rgba(242, 224, 190, 0.68); }
.club-footer .club-footer-mark { color: #F2E0BE; opacity: 0.07; }
/* The ink logo would vanish on the night: the cream one, in either theme. */
.club-footer .logo-pic-light { display: none !important; }
.club-footer .logo-pic-dark { display: block !important; }

/* ---------- Dark ----------
   Fixed colours, not the tokens: in dark mode theme.css turns --indigo-deep
   and friends into light tints for text, which as a background went lavender.
   theme.css's dark .navbar and .promo rules are !important, so these are. */
html[data-theme="dark"] #nav.nhb { background: rgba(20, 21, 45, 0.94) !important; border-bottom-color: rgba(242, 224, 190, 0.12) !important; color: #F2E0BE; }
html[data-theme="dark"] #nav.nhb.stuck { background: rgba(20, 21, 45, 0.98) !important; }
html[data-theme="dark"] #promo.promo { background: #0E0F24 !important; color: rgba(242, 224, 190, 0.8) !important; border-bottom: 1px solid rgba(242, 224, 190, 0.1) !important; }
html[data-theme="dark"] #promo.promo b, html[data-theme="dark"] #promo.promo a { color: #F2E0BE !important; }
html[data-theme="dark"] #nav.nhb .nlink, html[data-theme="dark"] .nhb-icon, html[data-theme="dark"] .nhb-search svg { color: #F2E0BE; }
html[data-theme="dark"] .nhb-search { color: rgba(242, 224, 190, 0.75); }
@media (min-width: 1241px) { html[data-theme="dark"] .nhb-search { border-color: rgba(242, 224, 190, 0.25); } }
html[data-theme="dark"] #msheet .msheet-auth-card { background: #2B2E73; }
html[data-theme="dark"] #msheet .msheet-auth-cta { background: #F2E0BE; color: #14152D; }
html[data-theme="dark"] .nhb-icon:hover, html[data-theme="dark"] .nhb-search:hover { background: rgba(242, 224, 190, 0.1); color: #F2E0BE; }
html[data-theme="dark"] #nav.nhb .badge { box-shadow: 0 0 0 2px #14152D; }
html[data-theme="dark"] #nav.nhb .user-avatar-tag, html[data-theme="dark"] #nav.nhb .header-user-name { color: #F2E0BE; border-color: rgba(242, 224, 190, 0.25); }
html[data-theme="dark"] #nav.nhb .mega { background: #14152D; }
html[data-theme="dark"] #msheet.msheet { background: #14152D; }
html[data-theme="dark"] #msheet .msheet-item-text, html[data-theme="dark"] .nhb-sheet-link { color: #F2E0BE !important; }
html[data-theme="dark"] #msheet .msheet-acc-item, html[data-theme="dark"] .nhb-sheet-link { border-color: rgba(242, 224, 190, 0.14); }
html[data-theme="dark"] #msheet .msheet-sub-link { color: rgba(242, 224, 190, 0.75); }
html[data-theme="dark"] #msheet .msheet-sub-link.is-primary, html[data-theme="dark"] #msheet .msheet-tool-title { color: #F2E0BE; }
html[data-theme="dark"] #msheet .msheet-tool-card, html[data-theme="dark"] #msheet .msheet-theme-row { border-color: rgba(242, 224, 190, 0.18); background: transparent !important; color: #F2E0BE; }
html[data-theme="dark"] .bag-dropdown-menu { background: #1D1F3C; border-color: rgba(242, 224, 190, 0.12); }
html[data-theme="dark"] .bag-empty-heading { color: #F2E0BE; }
