/* Flex Music Labs: the site header (brand, main menu, the Products drop-down and, on narrow screens, the Menu button).
   ONE source for every page of flexmusiclabs.com, including the /help guides: link it as <link rel="stylesheet" href="/css/header.css">,
   with js/nav.js in the head, and use the markup in website/header-kit/header.html. Self-contained and scoped to .site-header,
   so a page's own styles (a help page's own header, nav and .wrap rules) neither change it nor are changed by it. */

.site-header {
  --hd-panel: #181b22; --hd-panel-2: #1e222b; --hd-line: #2a2f3a; --hd-text: #e9ebf0; --hd-muted: #a4abb8; --hd-blue: #4696ff;
  --hd-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  display: block; position: sticky; top: 0; z-index: 10; box-sizing: border-box; width: 100%; margin: 0; padding: 0; float: none;
  background: rgba(15, 17, 21, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hd-line);
  font-family: var(--hd-sans); line-height: 1.5; text-align: left;
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header .site-header-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  width: 100%; max-width: 1120px; min-height: 64px; margin: 0 auto; padding: 0 20px;
}
.site-header .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--hd-text); text-decoration: none; font-weight: 700; font-size: 1.08rem;
}
.site-header .brand img { width: 30px; height: 30px; }
.site-header .nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; }
.site-header .nav a {
  color: var(--hd-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px;
}
.site-header .nav a:hover, .site-header .nav a[aria-current="page"] { color: var(--hd-text); background: var(--hd-panel-2); }

/* Tunody's launch special: one line, full width, at the very top of every page (Ken, 2026-11-15); hidden after 2027-01-01 UTC (js/nav.js sets html.promo-over) */
.site-header .promo-bar { display: block; margin: 0; background: #c62828; color: #fff; text-align: center; font-family: var(--hd-sans); font-weight: 700; font-size: 0.92rem; line-height: 1.3; padding: 8px 12px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header .promo-bar:hover, .site-header .promo-bar:focus-visible { background: #b71c1c; color: #fff; text-decoration: underline; }
.site-header .promo-bar .pb-short { display: none; }
html.promo-over .site-header .promo-bar:not(.beta-bar) { display: none; }
/* Tunody's free beta banner (Ken 2026-11-20): one line in the launch special's red/orange; the short text below 1024 px so the long one is never cut */
@media (max-width: 1023px) { .site-header .promo-bar.beta-bar .pb-long { display: none; } .site-header .promo-bar.beta-bar .pb-short { display: inline; } }
@media (max-width: 760px) { .site-header .promo-bar { font-size: clamp(0.62rem, 3.2vw, 0.86rem); padding: 7px 6px; } .site-header .promo-bar .pb-long { display: none; } .site-header .promo-bar .pb-short { display: inline; } }

/* The Products drop-down (a <details>: keyboard and touch work without a script) */
.site-header .nav-drop { position: relative; }
.site-header .nav-drop > summary {
  list-style: none; cursor: pointer; color: var(--hd-muted); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; gap: 7px; user-select: none;
}
.site-header .nav-drop > summary::-webkit-details-marker { display: none; }
.site-header .nav-drop > summary::after {
  content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.site-header .nav-drop[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.site-header .nav-drop > summary:hover, .site-header .nav-drop[open] > summary, .site-header .nav-drop.has-current > summary { color: var(--hd-text); background: var(--hd-panel-2); }
.site-header .nav-drop > summary:focus-visible, .site-header .nav a:focus-visible, .site-header .nav-toggle:focus-visible { outline: 2px solid var(--hd-blue); outline-offset: 2px; }
.site-header .nav-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--hd-panel); border: 1px solid var(--hd-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.site-header .nav-drop-menu a { white-space: nowrap; }

/* The Menu button (js/nav.js builds it) */
.site-header .nav-toggle { display: none; }
html.js .site-header .nav { flex-wrap: nowrap; }
@media (max-width: 1000px) {
  html.js .site-header .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; font: 700 0.95rem/1 var(--hd-sans); color: var(--hd-text);
    background: var(--hd-panel); border: 1px solid var(--hd-line); border-radius: 8px; padding: 9px 14px; cursor: pointer;
  }
  html.js .site-header .nav-toggle::before { content: ""; width: 14px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  html.js .site-header .nav { display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 2px; padding: 6px 0 12px; max-height: calc(100vh - 120px); overflow-y: auto; }
  html.js .site-header.open .nav { display: flex; }
  html.js .site-header .nav a, html.js .site-header .nav-drop > summary { padding: 12px 12px; }
  html.js .site-header .nav-drop-menu { position: static; box-shadow: none; border: 0; background: none; padding: 0 0 4px 14px; min-width: 0; }
}
@media (max-width: 520px) {
  .site-header .site-header-wrap { padding: 8px 16px; }
}
