/* BrainMine global header and footer.
 *
 * Shared by the dashboard and the privacy policy so both carry the same
 * brand chrome. The pages are static HTML with no build step, so this file
 * is the single place the chrome is defined; each page includes the same
 * markup and this stylesheet rather than duplicating styles.
 *
 * Colour tokens mirror the dashboard's existing palette. --brand is sampled
 * from the logo itself so the accent and the mark agree.
 */

:root {
  --brand: #afcb1e;          /* sampled from the logo's mark */
  --brand-ink: #0f1115;
  --bm-bg: #0f1115;
  --bm-panel: #161922;
  --bm-border: #2a2f42;
  --bm-text: #e6e9ef;
  --bm-muted: #8a91a7;
}

/* ---------------------------------------------------------------- header */

.bm-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--bm-border);
}

.bm-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bm-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--bm-text);
  min-width: 0;
}

/* The logo's wordmark is dark and its background is transparent, so on this
 * dark header it sits on a light chip rather than being recoloured. The
 * asset itself is never altered. */
.bm-logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  flex: none;
}

.bm-logo {
  display: block;
  height: 26px;
  width: auto;        /* preserves the asset's own proportions */
}

.bm-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.bm-product {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.bm-company {
  font-size: 11px;
  color: var(--bm-muted);
  white-space: nowrap;
}

.bm-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bm-nav a {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--bm-muted);
  text-decoration: none;
}

.bm-nav a:hover { color: var(--bm-text); background: rgba(255, 255, 255, 0.05); }
.bm-nav a[aria-current="page"] { color: var(--bm-text); }

.bm-nav a:focus-visible,
.bm-brand:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 7px;
}

/* ---------------------------------------------------------------- footer */

.bm-footer {
  border-top: 1px solid var(--bm-border);
  background: var(--bm-panel);
  margin-top: 56px;
}

.bm-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.bm-footer h2 {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bm-muted);
  margin: 0 0 10px;
  font-weight: 600;
}

.bm-footer p { margin: 0 0 5px; font-size: 13px; color: var(--bm-muted); }
.bm-footer strong { color: var(--bm-text); font-weight: 600; }

.bm-footer ul { list-style: none; margin: 0; padding: 0; }
.bm-footer li { margin-bottom: 6px; }

.bm-footer a { color: var(--bm-muted); text-decoration: none; font-size: 13px; }
.bm-footer a:hover { color: var(--bm-text); text-decoration: underline; }
.bm-footer a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.bm-footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px 26px;
  border-top: 1px solid var(--bm-border);
  font-size: 12.5px;
  color: var(--bm-muted);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 760px) {
  .bm-header-inner { padding: 10px 16px; gap: 10px; }
  .bm-company { display: none; }      /* keep the header one line on phones */
  .bm-nav a { padding: 6px 8px; font-size: 13px; }
  .bm-footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 24px 16px 26px; }
  .bm-footer-bottom { padding: 14px 16px 24px; }
}

@media (max-width: 420px) {
  .bm-product { font-size: 13px; }
  .bm-logo { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .bm-header { backdrop-filter: none; }
}
