/* ==========================================================================
   Lukedible brand tokens
   Served at /brand/tokens.css on lukedible.com AND on every app subdomain
   (SWAG aliases /brand/ there). This file only defines fonts and custom
   properties, so injecting it into Audiobookshelf / ReadMeABook / Wizarr
   changes nothing until something uses a --lkd-* variable.
   Font URLs are relative so the site also previews from file://.
   ========================================================================== */

@font-face {
  font-family: "Boldonse";
  src: url("fonts/boldonse-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---- Brand constants (same in every theme) -------------------------- */
  --lkd-orange: #FD8E1B;      /* the logo. Fills only: never small text on light */
  --lkd-orange-hi: #FFB35E;
  --lkd-orange-lo: #EE7600;
  --lkd-orange-edge: #D96800;
  --lkd-grape-ink: #240046;   /* from the original site */
  --lkd-night: #120422;       /* from the original site (dark background) */
  --lkd-grape: #7B2CBF;
  --lkd-violet: #9D4EDD;
  --lkd-pink: #FF66C4;
  --lkd-hotpink: #FF007F;
  --lkd-lilac: #E0AAFF;
  --lkd-teal: #00F5D4;
  --lkd-yellow: #FEE440;

  --lkd-font-display: "Boldonse", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --lkd-font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --lkd-radius-s: 10px;
  --lkd-radius-m: 16px;
  --lkd-radius-l: 24px;
  --lkd-radius-pill: 999px;

  /* ---- Light theme (default) ------------------------------------------ */
  --lkd-bg: #FBF7FF;
  --lkd-bg-2: #F3EAFE;
  --lkd-surface: #FFFFFF;
  --lkd-surface-2: #F7F1FF;
  --lkd-ink: #240046;
  --lkd-ink-2: #54456E;
  --lkd-ink-3: #665985;
  --lkd-link: #6A1FB0;
  --lkd-accent: #B8006F;
  --lkd-line: #E6DAF5;
  --lkd-line-2: #D3C1EC;
  --lkd-line-input: #8D78AE;
  --lkd-focus: #7B2CBF;
  --lkd-up: #0B806E;
  --lkd-down: #C8004F;
  --lkd-warn: #8F6200;
  --lkd-maint: #5546C8;
  --lkd-none: #D9CCEB;
  --lkd-shadow: 36 0 70;      /* rgb triplet for rgb(var(--lkd-shadow) / a) */
  --lkd-footer-bg: #240046;
  --lkd-footer-ink: #F3EAFE;
  --lkd-footer-ink-2: #CDBBE6;
  --lkd-footer-link: #E0AAFF;
  --lkd-glass: rgb(251 247 255 / .82);
  --lkd-lcd: #EFE4FF;
  --lkd-lcd-ink: #240046;
}

/* ---- Dark theme: system preference unless the visitor picked Light ----- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lkd-bg: #120422;
    --lkd-bg-2: #170729;
    --lkd-surface: #1C0B35;
    --lkd-surface-2: #241044;
    --lkd-ink: #F8F2FF;
    --lkd-ink-2: #D3C3EC;
    --lkd-ink-3: #B4A2D3;
    --lkd-link: #E0AAFF;
    --lkd-accent: #FF7AC6;
    --lkd-line: #33205A;
    --lkd-line-2: #45307A;
    --lkd-line-input: #8A72B5;
    --lkd-focus: #E0AAFF;
    --lkd-up: #3BE3C3;
    --lkd-down: #FF6AA6;
    --lkd-warn: #FFD54A;
    --lkd-maint: #ABA6FF;
    --lkd-none: #3E2A63;
    --lkd-shadow: 0 0 0;
    --lkd-footer-bg: #0B0216;
    --lkd-footer-ink: #F3EAFE;
    --lkd-footer-ink-2: #CDBBE6;
    --lkd-footer-link: #E0AAFF;
    --lkd-glass: rgb(18 4 34 / .78);
    --lkd-lcd: #1A2A2C;
    --lkd-lcd-ink: #C9FFF5;
  }
}
/* ---- Dark theme: picked explicitly ------------------------------------- */
:root[data-theme="dark"] {
  --lkd-bg: #120422;
  --lkd-bg-2: #170729;
  --lkd-surface: #1C0B35;
  --lkd-surface-2: #241044;
  --lkd-ink: #F8F2FF;
  --lkd-ink-2: #D3C3EC;
  --lkd-ink-3: #B4A2D3;
  --lkd-link: #E0AAFF;
  --lkd-accent: #FF7AC6;
  --lkd-line: #33205A;
  --lkd-line-2: #45307A;
  --lkd-line-input: #8A72B5;
  --lkd-focus: #E0AAFF;
  --lkd-up: #3BE3C3;
  --lkd-down: #FF6AA6;
  --lkd-warn: #FFD54A;
  --lkd-maint: #ABA6FF;
  --lkd-none: #3E2A63;
  --lkd-shadow: 0 0 0;
  --lkd-footer-bg: #0B0216;
  --lkd-footer-ink: #F3EAFE;
  --lkd-footer-ink-2: #CDBBE6;
  --lkd-footer-link: #E0AAFF;
  --lkd-glass: rgb(18 4 34 / .78);
  --lkd-lcd: #1A2A2C;
  --lkd-lcd-ink: #C9FFF5;
}
