/* VaiBridge website: shared look for every page (colours, type, header, buttons, footer).
   The home page adds landing.css; the guide, licence and privacy pages add doc.css. */
/* Fonts are served from this site (fonts/, licence in fonts/OFL.txt), so visitors never contact Google.
   DM Sans and Space Grotesk are variable fonts: one file covers every weight. Latin characters only. */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/dm-sans-latin.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/space-grotesk-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #111416;
  --panel: #171c1b;
  --ink: #f5f7f2;
  --muted: #b1bdb7;
  --line: #33423a;
  --accent: #bef976;
  --accent-hover: #d2ff9e;
  --accent-ink: #162306;
  --accent-soft: #263721;
  --code: #1d2622;
  --warn-bg: #211e17;
  --warn-line: #6b5739;
  --warn-ink: #f4c675;
  --body: 'DM Sans', 'Segoe UI', sans-serif;
  --heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --gutter: clamp(16px, 4.5vw, 58px);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 85px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--accent); text-underline-offset: .18em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--accent-ink); background: var(--accent); }
.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); }
.tbc { color: var(--warn-ink); }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Header */
.bar { position: sticky; top: 0; z-index: 5; background: #121917; border-bottom: 1px solid var(--line); }
.bar .wrap { min-height: 72px; display: flex; align-items: center; gap: clamp(12px, 3vw, 38px); }
.logo { display: inline-flex; flex: none; align-items: center; padding-block: 8px; }
.logo img { display: block; width: clamp(150px, 17vw, 210px); height: auto; }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 2.7vw, 28px); margin-left: auto; font-size: .89rem; }
.bar nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
.bar nav a:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; width: fit-content; align-items: center; justify-content: center; min-height: 44px; background: var(--accent); color: var(--accent-ink); font: 700 .9rem/1.3 var(--body); text-align: center; text-decoration: none; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--accent); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: #536859; color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { min-height: 40px; padding: 7px 12px; white-space: nowrap; font-size: .83rem; }

/* Footer */
.site-footer { padding-block: 28px 40px; color: var(--muted); font-size: .88rem; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 10px 21px; }
.site-footer p { max-width: 86ch; }

@media (max-width: 900px) {
  .bar nav .hide-sm { display: none; }
}
@media (max-width: 680px) {
  .bar .wrap { min-height: 61px; justify-content: space-between; }
  .bar nav { display: none; }
}
