/*
 * @sann/brand-chrome — the chrome every public SANN site shares.
 *
 * One file, plain CSS, no build. apps/forening imports it as a module
 * (`import '@sann/brand-chrome/chrome.css'`); sites/sann-public copies it
 * under /assets/ with a content hash (`pnpm static:sync-chrome`) and the
 * static-site validator fails when the copy drifts from this file.
 *
 * The reference pixels are the Förening start page
 * (forening.platform.sann.com): a header laid over the hero film, the
 * `SANN | Product` lockup at 21 px, pill navigation, and a white footer
 * with the lockup, three link columns and a factual status line. Brand
 * manual chapters 03 (lockup) and 17 (shell and footer).
 *
 * Every rule is unlayered on purpose: a host's Tailwind base and utility
 * layers must not reshape the chrome. The footer's rules are nested under
 * `.brand-footer` so a host's own element rules (`.page h2 { … }`) cannot
 * outrank them either.
 */

:root {
  --brand-ink: #0f1115;
  --brand-paper: #f2f3f6;
  --brand-white: #ffffff;
  --brand-muted: #5b6170;
  --brand-line: #e4e7ec;
  --brand-line-soft: #eceef2;
  /* The product accent for footer hovers. Hosts with an accent override it
     (Förening sets its green); hosts without one get ink. */
  --brand-accent: var(--brand-ink);
  --brand-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- container: 1280 px, 24 px gutters ---------- */

.brand-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- lockup: `SANN | Product` ----------
   The wordmark is the approved SVG, never typeset. The divider is a drawn
   1 px rule, never a `|` glyph. The descriptor is live text at 18 px
   semibold, tracked -2 %. A product with no descriptor renders the
   wordmark alone. */

.brand-lockup {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--brand-font);
}

.brand-lockup img {
  display: block;
  width: auto;
  height: 21px;
  max-width: none;
}

.brand-lockup-divider {
  display: block;
  width: 1px;
  height: 20px;
  margin: 0 10px;
  background: var(--brand-line);
}

.brand-lockup-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.brand-lockup--inverse img {
  filter: brightness(0) invert(1);
}

.brand-lockup--inverse .brand-lockup-divider {
  background: rgba(255, 255, 255, 0.6);
}

.brand-lockup--inverse .brand-lockup-name {
  color: #ffffff;
}

/* ---------- header over a hero ----------
   Not sticky: it is the first row of the hero and scrolls with it. White on
   the film; the host gives it `position: relative` above the film layer. */

.brand-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  color: #ffffff;
  font-family: var(--brand-font);
  font-size: 16px;
  line-height: 1.55;
}

.brand-header-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}

.brand-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.brand-header nav > a,
.brand-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-decoration: none;
  cursor: pointer;
}

.brand-header nav > a:hover {
  background: #ffffff14;
}

.brand-header .brand-header-cta {
  margin-left: 12px;
  padding-inline: 22px;
  border-color: #ffffff80;
}

.brand-header-cta:hover {
  background: #ffffff14;
}

.brand-header :focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

/* ---------- footer ----------
   Signature and purpose on the left, link columns on the right, a hairline,
   then the factual status line (chapter 17). */

.brand-footer {
  border-top: 1px solid var(--brand-line);
  background: var(--brand-white);
  color: var(--brand-ink);
  font-family: var(--brand-font);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.brand-footer > .brand-container {
  padding-top: 64px;
  padding-bottom: 32px;
}

.brand-footer .brand-footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
}

.brand-footer .brand-footer-brand > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}

.brand-footer .brand-footer-brand > p {
  margin: 12px 0 0;
  color: var(--brand-muted);
  font-size: 14px;
}

.brand-footer .brand-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}

.brand-footer .brand-footer-links > * {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-footer .brand-footer-links h2 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0.14em;
  color: var(--brand-muted);
  text-transform: uppercase;
}

.brand-footer .brand-footer-links a,
.brand-footer .brand-footer-links button,
.brand-footer .brand-footer-links span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--brand-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  text-decoration: none;
  cursor: default;
}

.brand-footer .brand-footer-links a,
.brand-footer .brand-footer-links button {
  cursor: pointer;
}

.brand-footer .brand-footer-links a:hover,
.brand-footer .brand-footer-links button:hover {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.brand-footer .brand-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--brand-line-soft);
  color: var(--brand-muted);
  font-size: 13px;
}

.brand-footer .brand-footer-bottom > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-footer :focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 4px;
}

/* ---------- compact ---------- */

@media (max-width: 600px) {
  .brand-header {
    align-items: flex-start;
    gap: 20px;
  }

  .brand-header nav {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }

  .brand-header nav > a {
    padding-inline: 6px;
    font-size: 12px;
  }

  .brand-header .brand-header-cta {
    margin-left: 4px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .brand-footer .brand-footer-links {
    width: 100%;
    gap: 28px 48px;
  }

  .brand-footer .brand-footer-links > * {
    min-width: 100px;
  }
}
