/* ==========================================================================
   Ruminative — design tokens
   Palette comes from the Ruminative logo: red #AE1D2F, tan #A49683, grey #6D6E70.
   --brand and --brand-2 are the two customisable colours (Branding page overrides them
   at runtime); everything else is derived from them with color-mix().
   JS sets <html data-theme="light|dark"> (see js/theme-boot.js).
   ========================================================================== */

:root {
  color-scheme: light;

  --font-ui: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* customisable brand colours (defaults = logo) */
  --brand: #AE1D2F;
  --brand-2: #A49683;
  --on-brand: #FFFFFF;          /* set by JS from the brand colour's luminance */

  /* supporting hues for charts / avatars */
  --ink: #262323;
  --plum: var(--brand);
  --moss: #5E7350;
  --amber: var(--brand-2);
  --rust: #C0553F;
  --sky: #3B6E8A;

  /* surfaces — warm neutrals pulled from the logo's grey and tan */
  --bg: #F6F4F1;
  --surface: #FFFFFF;
  --surface-2: #FAF9F7;
  --surface-3: #F0EDE9;
  --overlay: rgba(28, 24, 24, .52);
  --border: #E6E2DC;
  --border-strong: #D3CDC4;

  /* text */
  --text: #231F20;
  --text-2: #5C5D60;
  --text-3: #8C8D90;
  --text-inverse: #F6F3EF;

  /* accent = brand */
  --accent: var(--brand);
  --accent-text: color-mix(in srgb, var(--brand) 92%, #000);
  --accent-hover: color-mix(in srgb, var(--brand) 84%, #000);
  --accent-soft: color-mix(in srgb, var(--brand) 9%, var(--surface));
  --on-accent: var(--on-brand);

  /* status */
  --success: #4B6A3D;   --success-soft: #E5EDDD;   --success-solid: #5E7350;
  --warning: #8F6A1F;   --warning-soft: #F5EAD0;   --warning-solid: #B88A32;
  --danger:  #B3261E;   --danger-soft:  #FAE3E0;   --danger-solid:  #C0392B;
  --info:    #2F6684;   --info-soft:    #DFECF3;   --info-solid:    #3B6E8A;

  /* shape + depth */
  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(35, 31, 32, .05), 0 1px 1px rgba(35, 31, 32, .03);
  --shadow-md: 0 6px 18px -6px rgba(35, 31, 32, .14), 0 2px 6px rgba(35, 31, 32, .05);
  --shadow-lg: 0 24px 60px -16px rgba(35, 31, 32, .32), 0 8px 20px -8px rgba(35, 31, 32, .12);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 26%, transparent);

  /* the always-dark "clock hero" and login art */
  --hero-1: #2E2929;
  --hero-2: #181414;
  --hero-text: #F6F3EF;
  --hero-dim: #B0ABA6;
  --hero-glow: color-mix(in srgb, var(--brand-2) 72%, #fff);
  --hero-brand: color-mix(in srgb, var(--brand) 78%, #fff);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar-w: 252px;
  --topbar-h: 64px;
  --tabbar-h: 66px;
}

[data-theme='dark'] {
  color-scheme: dark;

  --bg: #131010;
  --surface: #1B1818;
  --surface-2: #211E1E;
  --surface-3: #2A2626;
  --overlay: rgba(6, 4, 4, .68);
  --border: #302B2B;
  --border-strong: #413B3B;

  --text: #EFECE8;
  --text-2: #AEAAA6;
  --text-3: #7F7B79;
  --text-inverse: #231F20;

  --accent-text: color-mix(in srgb, var(--brand) 58%, #fff);
  --accent-hover: color-mix(in srgb, var(--brand) 88%, #fff);
  --accent-soft: color-mix(in srgb, var(--brand) 20%, var(--surface));

  --success: #A5C792;   --success-soft: #1F2A1D;   --success-solid: #7FA06C;
  --warning: #E3B567;   --warning-soft: #30260F;   --warning-solid: #D9A441;
  --danger:  #F0968C;   --danger-soft:  #3A1F1C;   --danger-solid:  #D2594B;
  --info:    #84B6D2;   --info-soft:    #172633;   --info-solid:    #5B9BBD;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 28px 70px -18px rgba(0, 0, 0, .8), 0 8px 24px -8px rgba(0, 0, 0, .5);

  --hero-1: #2A2424;
  --hero-2: #120F0F;
}
