/*
 * RoboNHub theme for Vikunja (injected by Caddy before </head>).
 * Source of truth: robonhub-website/src/app/globals.css
 * Strategy: override Vikunja's CSS custom properties first; only a handful of
 * selectors are touched so Vikunja upgrades are unlikely to break this.
 * Light theme vars live on :root, dark theme on :root.dark (Vikunja 2.x).
 * We use html:root / html:root.dark for slightly higher specificity than
 * Vikunja's own :root / :root.dark so load order does not matter.
 */

/* ---------- Nunito (self-hosted, variable weight 200-1000) ---------- */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/brand/fonts/nunito-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/brand/fonts/nunito-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/brand/fonts/nunito-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/brand/fonts/nunito-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Light theme ---------- */
html:root {
  --rnh-font: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --family-primary: var(--rnh-font);
  --family-secondary: var(--rnh-font);
  --family-sans-serif: var(--rnh-font);
  --body-family: var(--rnh-font);

  /* primary = sun-500 #D13A31 (hover sun-600 #C43128 comes from Vikunja's l-offsets) */
  --primary-h: 3.4deg;
  --primary-s: 63.5%;
  --primary-l: 50.6%;

  /* grey scale -> RoboNHub slate (sky-*) + ink */
  --grey-50: #ffffff;
  --grey-100-hsl: 220, 30%, 96.1%;      /* #F2F4F8 */
  --grey-200: #e5e8ef;
  --grey-300: #d2d7e1;
  --grey-400: #8a94ac;
  --grey-500-hsl: 221.7, 16.7%, 42.4%;  /* #5A657E */
  --grey-600: #4d5770;
  --grey-700: #3e4759;
  --grey-800: #2a2724;                  /* ink-800 */
  --grey-900: #1d1d1f;                  /* ink-900 */

  --site-background: #f4efea;           /* cream */
  --text: #1d1d1f;
  --text-strong: #1d1d1f;
  --text-light: #6e675e;                /* ink-500 */
  --text-muted: #5a657e;                /* slate */
  --logo-text-color: #1d1d1f;
}

/* ---------- Dark theme (same palette, darker) ---------- */
html:root.dark {
  --primary-h: 3.2deg;                  /* sun-400 #E8483F, brighter for contrast */
  --primary-s: 78.6%;
  --primary-l: 57.8%;

  --grey-50-hsl: 222.4, 21.5%, 15.5%;   /* #1F2430 cards */
  --grey-100-hsl: 221.1, 19.6%, 19%;    /* #272D3A sky-900 */
  --grey-200: #333a4a;                  /* sky-800 */
  --grey-300: #3e4759;                  /* sky-700 */
  --grey-400: #4d5770;                  /* sky-600 */
  --grey-500-hsl: 222.4, 17%, 60.8%;    /* #8A94AC sky-400 */
  --grey-600: #bcc3d2;
  --grey-700: #d2d7e1;
  --grey-800: #ece6df;                  /* ink-100 (warm text) */
  --grey-900-hsl: 30, 31.3%, 93.7%;     /* #F4EFEA cream */

  --site-background: #1d1d1f;           /* ink-900 */
  --text: var(--grey-800);
  --text-strong: var(--grey-900);
  --text-light: var(--grey-500);
  --text-muted: var(--grey-500);
  --logo-text-color: var(--grey-800);
}

/* ---------- Minimal selectors ---------- */
/* Vikunja hard-codes "Quicksand"/"Open Sans" in a few scoped rules; force
   Nunito everywhere except code/monospace contexts. */
html { font-family: var(--rnh-font); }
body :where(*:not(code, pre, kbd, samp, pre *, .is-family-monospace, .is-family-code)) {
  font-family: inherit !important;
}

/* Login/register pages: drop the llama illustration, keep brand background. */
.no-auth-wrapper { background-image: none !important; }

::selection { background: #efbcb6; color: #1d1d1f; }
