/* duktus unified design layer for the API docs — DARK ONLY (Matte Ceramic / Plum).
   Referenz: Docs-Dark-Mode (#15171A Anthrazit-Grau + iris-Akzent). Self-hosted fonts (DSGVO). */

/* Self-hosted variable fonts — served from /fonts (synced from brand/ via sync.mjs) */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url('/fonts/InstrumentSans-VariableFont_wdth_wght.ttf') format('truetype-variations');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/Newsreader-VariableFont_opsz_wght.ttf') format('truetype-variations');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations');
}

:root {
  /* Anthrazit-Grau-Flächen (= Docs-Dark-Mode, neutralisiert + dunkler; Iris bleibt Akzent) */
  --bg:        #15171A;
  --surface:   #1F2228;
  --surface2:  #262A30;
  --surface3:  #2C3036;

  --border:    #2C3036;
  --border2:   #3A3F46;

  /* Iris accent — lighter on dark for contrast */
  --accent:    #8A7AEF;   /* iris-400 */
  --accent-d:  #ACA0E4;   /* iris-300 — links/hover */
  --accent-h:  #ACA0E4;
  --accent-bg: rgba(138, 122, 239, 0.14);
  --accent-bd: rgba(138, 122, 239, 0.32);

  /* Clinical semantics — lightened for dark */
  --green:    #5BBF8A;  --green-bg: rgba(91, 191, 138, 0.14);  --green-bd: rgba(91, 191, 138, 0.30);
  --amber:    #E0B765;  --amber-bg: rgba(224, 183, 101, 0.14); --amber-bd: rgba(224, 183, 101, 0.30);
  --red:      #D87474;

  --text:     #F4F6F8;
  --text-md:  #C7CBD0;
  --text-dim: #939AA1;
  --code-bg:  #0F1114;

  --font-heading: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --purple-glow:        0 4px 22px -6px rgba(0, 0, 0, 0.45);
  --purple-glow-strong: 0 10px 34px -8px rgba(0, 0, 0, 0.55);
}

html {
  color-scheme: dark !important;
  background: var(--bg) !important;
}

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading) !important;
  color: var(--text) !important;
}

a { color: var(--accent) !important; }
a:hover { color: var(--accent-h) !important; }

header {
  background: rgba(21, 23, 26, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--border) !important;
}

aside {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
}

main, section, .card, .hero-card, .endpoint, .toc, .table-wrap, .panel {
  border-color: var(--border) !important;
}

pre, code, kbd, samp { font-family: var(--mono) !important; }

pre {
  background: var(--code-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

button, .btn, .button { border-radius: 12px !important; }

/* Filled primary CTA is an <a> — keep its text white (don't inherit the link-accent color) */
.wa-primary, .wa-primary i, a.btn-primary, a.button-primary { color: #fff !important; }

.badge, .tag, .pill {
  background: var(--accent-bg) !important;
  color: var(--accent-d) !important;
  border: 1px solid var(--accent-bd) !important;
}

/* Unobtrusive scrollbar (light translucent on dark, transparent track) */
::-webkit-scrollbar { width: 8px !important; height: 8px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26) !important;
}

/* Brand logomark in the header/footer (replaces the old "D" box) */
.dk-lm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: none;
}
.dk-lm svg { display: block; }

/* Lowercase brand wordmark + "· API" context suffix */
.logo .ln {
  text-transform: none !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
}
.logo .ln-sub {
  color: var(--text-dim) !important;
  font-weight: 500 !important;
}
.logo .ln-sub::before { content: "·"; margin: 0 6px 0 4px; color: var(--border2); }
