/* brainai.store — shared brand layer.
   Loaded by the home page, the privacy page, and every tool (after the tool's
   own stylesheet), so the header, footer and tokens stay identical everywhere. */

/* Static weights, not the variable font: WebKit builds without variable-font
   support rendered every weight as 400. */
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/fonts/schibsted-grotesk-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --b-ground: #f2f3ee;   /* chalk: page background */
  --b-paper: #fbfbf8;    /* raised surfaces */
  --b-ink: #15171a;      /* primary text */
  --b-graphite: #545962; /* secondary text, 6.4:1 on ground */
  --b-rule: #d3d6cc;     /* hairlines */
  --b-signal: #2638d9;   /* actions and links, 7.4:1 on ground */
  --b-signal-ink: #ffffff;
  --b-local: #0b6b43;    /* the "stayed on your device" green, 6.2:1 */
  --b-font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --b-wrap: 72rem;
  --b-gutter: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- header ---------- */
.b-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--b-ground) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--b-rule);
  font-family: var(--b-font);
}
.b-header__inner {
  max-width: var(--b-wrap); margin: 0 auto;
  padding: 0 var(--b-gutter);
  min-height: 3.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem;
}
.b-mark {
  display: inline-flex; align-items: baseline; gap: 0;
  color: var(--b-ink); text-decoration: none;
  font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em;
}
.b-mark span { color: var(--b-graphite); font-weight: 500; }
.b-crumb { color: var(--b-graphite); font-size: 0.95rem; font-weight: 500; }
.b-crumb::before { content: '/'; margin-right: 1.25rem; color: var(--b-rule); }
.b-nav { margin-left: auto; display: flex; gap: 0.25rem; }
.b-nav a {
  color: var(--b-ink); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 0.6rem 0.75rem; border-radius: 0.5rem; min-height: 44px;
  display: inline-flex; align-items: center;
}
.b-nav a:hover { background: color-mix(in srgb, var(--b-ink) 6%, transparent); }
.b-nav a[aria-current='page'] { color: var(--b-signal); }

/* ---------- footer ---------- */
.b-footer {
  border-top: 1px solid var(--b-rule);
  background: var(--b-ground);
  color: var(--b-graphite);
  font-family: var(--b-font); font-size: 0.95rem; line-height: 1.5;
}
.b-footer__inner {
  max-width: var(--b-wrap); margin: 0 auto;
  padding: 2rem var(--b-gutter) 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline;
}
.b-footer a { color: var(--b-ink); text-underline-offset: 0.2em; }
.b-footer__inner > a { min-height: 44px; display: inline-flex; align-items: center; }
.b-footer a:hover { color: var(--b-signal); }
.b-footer__maker { margin-right: auto; }
.b-footer__maker strong { color: var(--b-ink); font-weight: 600; }

.b-header a:focus-visible, .b-footer a:focus-visible {
  outline: 3px solid var(--b-signal); outline-offset: 2px; border-radius: 0.375rem;
}

@media (max-width: 40rem) {
  .b-crumb { display: none; }
  .b-nav a { padding: 0.6rem 0.5rem; }
}

/* skip link (tools; the home page has its own .skip) */
.b-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--b-ink); color: #fff; padding: 0.75rem 1rem; border-radius: 0.5rem;
  font-family: var(--b-font); font-weight: 600; text-decoration: none;
}
.b-skip:focus { top: 0.75rem; outline: 3px solid var(--b-signal); outline-offset: 2px; }
