/* ============================================================
   HEARTH — COLOR SYSTEM
   Soft, premium, warm. No pure black / pure white.
   Base palette (raw) + semantic aliases. Light is default;
   [data-theme="dark"] and .dark remap the semantic tokens.
   ============================================================ */

:root {
  /* --- Warm neutrals (cream / paper / sand) --- */
  --cream-50:  #FBFAF6;
  --cream-100: #F6F2EA;
  --cream-200: #EFEADF;
  --paper:     #FEFDFA;
  --sand-100:  #F1ECE1;
  --sand-200:  #E7E0D1;

  /* --- Cool pale blue-grays (mist) --- */
  --mist-50:  #F4F6F9;
  --mist-100: #EAEFF4;
  --mist-200: #DCE4EC;
  --mist-300: #C8D3DE;

  /* --- Slate / navy (ink & text) --- */
  --ink:       #1C2733;
  --slate-900: #1E2A36;
  --slate-800: #283643;
  --slate-700: #3A4A59;
  --slate-600: #4F606F;
  --slate-500: #647585;
  --slate-400: #8B98A5;
  --slate-300: #BCC6D0;
  --slate-200: #DBE1E8;
  --slate-100: #ECEFF3;

  /* --- Accent blue (muted, refined) --- */
  --blue-300: #A9C4DC;
  --blue-400: #6E97BC;
  --blue-500: #4C7DA6;
  --blue-600: #3C6E99;
  --blue-700: #305A80;
  --blue-800: #284A69;

  /* --- Warm tan / sand / bronze --- */
  --tan-300:  #E7D3B5;
  --tan-400:  #D2B488;
  --tan-500:  #C29A6B;
  --bronze:   #B27F4E;

  /* --- Sage (community / success) --- */
  --sage-300: #BFD3BC;
  --sage-500: #6E9270;
  --sage-600: #5C7E5E;

  /* --- Signal --- */
  --amber-500: #C99445;
  --rose-500:  #B5635F;

  /* ===== SEMANTIC — LIGHT ===== */
  --bg:            var(--cream-50);
  --bg-subtle:     #F2EEE5;
  --surface:       var(--paper);
  --surface-2:     #F7F3EB;
  --surface-inset: var(--mist-100);
  --surface-glass: rgba(254, 253, 250, 0.72);

  --border:        #E7E1D5;
  --border-cool:   #E1E6EC;
  --border-strong: #D6CFC1;

  --text:           var(--slate-900);
  --text-secondary: #51616F;
  --text-muted:     #818D99;
  --text-inverse:   #F7F3EB;
  --text-on-accent: #FBFAF6;

  --accent:        var(--blue-600);
  --accent-hover:  var(--blue-700);
  --accent-press:  var(--blue-800);
  --accent-soft:   #E8EFF5;
  --accent-border: #CBDAE7;

  --primary:       var(--ink);
  --primary-hover: #2A3947;
  --primary-press: #141E28;
  --primary-text:  #F7F3EB;

  --warm:        var(--tan-500);
  --warm-soft:   #F4EADA;
  --warm-border: #E7D6BC;

  --sage:        var(--sage-600);
  --sage-soft:   #E7EFE6;

  --focus-ring:  rgba(76, 125, 166, 0.45);

  --success:     var(--sage-600);
  --warning:     var(--amber-500);
  --danger:      var(--rose-500);
  --danger-soft: #F4E5E3;

  --shadow-color: 28, 39, 51;            /* ink rgb for shadows */
  color-scheme: light;
}

/* ===== SEMANTIC — DARK ===== */
:root[data-theme="dark"],
.dark {
  --bg:            #10151C;
  --bg-subtle:     #141B24;
  --surface:       #18202B;
  --surface-2:     #1E2733;
  --surface-inset: #131A22;
  --surface-glass: rgba(24, 32, 43, 0.66);

  --border:        #2A3340;
  --border-cool:   #283544;
  --border-strong: #394451;

  --text:           #ECE6DA;
  --text-secondary: #AEB8C2;
  --text-muted:     #79848F;
  --text-inverse:   #16202B;
  --text-on-accent: #10151C;

  --accent:        #84ACCF;
  --accent-hover:  #9CBEDB;
  --accent-press:  #B2CDE3;
  --accent-soft:   #1B2A39;
  --accent-border: #2D4255;

  --primary:       #EAE4D8;
  --primary-hover: #DDD6C6;
  --primary-press: #CFC7B4;
  --primary-text:  #16202B;

  --warm:        var(--tan-400);
  --warm-soft:   #2A2418;
  --warm-border: #3A3322;

  --sage:        #84A886;
  --sage-soft:   #1A241B;

  --focus-ring:  rgba(132, 172, 207, 0.5);

  --success:     #84A886;
  --warning:     #D8A95E;
  --danger:      #CC817D;
  --danger-soft: #2A1E1D;

  --shadow-color: 0, 0, 0;
  color-scheme: dark;
}
