/* Design tokens — the single source every other stylesheet reads from.
   The default theme is "Midnight". Other themes only override these variables
   (see the [data-theme] blocks below; js/themes.js sets the attribute). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/space-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../fonts/figtree-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-italic-latin.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  /* Midnight — cool near-black, violet accent */
  --bg: #0a0b10;
  --panel: #12141c;
  --panel2: #1a1d28;
  --border: #272b3a;

  --text: #eef0f7;
  --muted: #9aa1b6;
  --faint: #7a8199;

  --accent: #6d5efc;
  --accent-hover: #8174ff;
  --accent-ink: #ffffff;       /* text that sits ON the accent */
  --accent-text: #a99fff;      /* accent used as text on --bg */

  --user-bg: #5648e8;          /* your messages */
  --user-ink: #ffffff;
  --bubble: #151823;           /* their messages */
  --bubble-border: #232738;
  --em: #b7b0ff;               /* *actions* in a message */

  --shade: 10 11 16;           /* rgb of the page, for translucent layers */
  --veil: 6 7 10;              /* rgb behind dialogs */

  --accent2: #6fd6a0;          /* good / positive */
  --dislike: #ff7a7a;
  --warn: #f0c36a;
  --discord: #5865f2;

  /* Type */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-chat: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 650;
  --display-track: -.03em;
  --chat-size: 15.5px;
  --chat-leading: 1.6;

  /* Spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 36px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Layout */
  --header-h: 60px;
  --drawer-w: 380px;
  --read-w: 720px;       /* the chat column */
}

/* Daylight — light and clean */
[data-theme="daylight"] {
  color-scheme: light;
  --bg: #f5f6fa; --panel: #ffffff; --panel2: #eceef5; --border: #dde0ea;
  --text: #14161f; --muted: #5a6077; --faint: #737a91;
  --accent: #5b4bf0; --accent-hover: #4a3adb; --accent-ink: #ffffff; --accent-text: #4a3bd6;
  --user-bg: #5b4bf0; --user-ink: #ffffff; --bubble: #ffffff; --bubble-border: #e1e4ee; --em: #6a4fe0;
  --shade: 245 246 250; --veil: 20 22 35;
  --accent2: #168a55; --dislike: #d03a3a; --warn: #a8710a;
}

/* Bubblegum — dark, pink, playful */
[data-theme="bubblegum"] {
  --bg: #130910; --panel: #1d1019; --panel2: #2a1727; --border: #40243a;
  --text: #fcf0f7; --muted: #c9a9bf; --faint: #8c6a82;
  --accent: #ff5fa8; --accent-hover: #ff7ab8; --accent-ink: #2b0618; --accent-text: #ff8cc2;
  --user-bg: #ff5fa8; --user-ink: #2b0618; --bubble: #1f1220; --bubble-border: #3a2237; --em: #ffb6d9;
  --shade: 19 9 16; --veil: 10 4 8;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --display-weight: 600; --display-track: -.035em;
}

/* Candlelight — the warm, bookish one */
[data-theme="candlelight"] {
  --bg: #120f0d; --panel: #1a1512; --panel2: #231d19; --border: #322a25;
  --text: #f3ece3; --muted: #a89f94; --faint: #8a8074;
  --accent: #e88660; --accent-hover: #f09a78; --accent-ink: #1e110a; --accent-text: #ee9a79;
  --user-bg: #2e221b; --user-ink: #f3ece3; --bubble: #171210; --bubble-border: #2a221d; --em: #e8b9a3;
  --shade: 18 15 13; --veil: 8 6 5;
  --font-ui: "Figtree", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-chat: "Fraunces", Georgia, "Times New Roman", serif;
  --display-weight: 500; --display-track: -.02em;
  --chat-size: 16.5px; --chat-leading: 1.72;
}
