/* Design tokens. Every colour in the app comes from here. */

:root {
  color-scheme: light;

  --bg: #f6f5ff;
  --ink: #25234a;
  --ink-soft: #3f3d66;
  --muted: #55537a;
  --line: #d5d3ee;
  --surface: rgb(255 255 255 / 0.8);
  --surface-solid: #ffffff;
  --surface-edge: rgb(255 255 255 / 0.95);
  --well: #ecebfa;
  --accent: #5b55d6;
  --accent-strong: #4a45b8;
  --accent-soft: #eeeaff;
  --on-accent: #ffffff;
  --danger: #b8403a;
  --danger-soft: #fdeeea;
  --success: #1f7a58;
  --success-soft: #dff5ea;

  --grad-primary: linear-gradient(135deg, #5b55d6, #4b6fd8);
  --grad-highlight: linear-gradient(160deg, #ddd6ff 0%, #c9e8ff 55%, #c8f2e2 100%);
  --grad-reflection: linear-gradient(135deg, #f1eeff, #e6f3ff);
  --grad-mint: linear-gradient(135deg, #d6f5e8, #cfebfa);
  --grad-logo: linear-gradient(145deg, #8e86f2, #7fd8c0);

  --glow-1: #d9d4ff;
  --glow-2: #c9e8ff;
  --glow-3: #c8f2e2;
  --glow-4: #ffe0d2;
  --glow-opacity: 0.8;

  --shadow-card: 0 14px 40px rgb(91 85 214 / 0.08);
  --shadow-lift: 0 22px 50px rgb(91 85 214 / 0.16);
  --shadow-bar: 0 10px 30px rgb(91 85 214 / 0.12);

  --radius-card: 28px;
  --radius-field: 16px;
  --radius-pill: 999px;

  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* one colour per emotion, mirrored in static/js/emotions.js */
  --emo-joy: #f6c445;
  --emo-gratitude: #f29e6d;
  --emo-pride: #e58fb1;
  --emo-excitement: #f2775c;
  --emo-calm: #7cc6a4;
  --emo-confusion: #b9a7d6;
  --emo-tiredness: #a9b4c2;
  --emo-disappointment: #8fa3c8;
  --emo-sadness: #6c8fd6;
  --emo-anxiety: #9b7fd1;
  --emo-stress: #d9745f;
  --emo-anger: #c9504a;
  --emo-loneliness: #6f7fa8;
  --emo-fear: #58608f;
}

/* dark values, written once and applied in the two cases below */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #14132b;
  --ink: #eeedff;
  --ink-soft: #d3d1f2;
  --muted: #a9a6d4;
  --line: #3a3868;
  --surface: rgb(38 36 76 / 0.78);
  --surface-solid: #232148;
  --surface-edge: rgb(255 255 255 / 0.08);
  --well: #2c2a58;
  --accent: #a7a2ff;
  --accent-strong: #c2beff;
  --accent-soft: #2f2c63;
  --on-accent: #ffffff;
  --danger: #ff9d94;
  --danger-soft: #4a2530;
  --success: #86e0b9;
  --success-soft: #1d3f3a;

  --grad-primary: linear-gradient(135deg, #6a63e6, #4f74e0);
  --grad-highlight: linear-gradient(160deg, #3a3482 0%, #274a78 55%, #1f5a52 100%);
  --grad-reflection: linear-gradient(135deg, #2c2a60, #25395f);
  --grad-mint: linear-gradient(135deg, #1f4d44, #234a63);

  --glow-1: #4a3fb0;
  --glow-2: #1f5a94;
  --glow-3: #17655a;
  --glow-4: #7a3f52;
  --glow-opacity: 0.38;

  --shadow-card: 0 14px 40px rgb(0 0 0 / 0.35);
  --shadow-lift: 0 22px 50px rgb(0 0 0 / 0.5);
  --shadow-bar: 0 10px 30px rgb(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #14132b;
    --ink: #eeedff;
    --ink-soft: #d3d1f2;
    --muted: #a9a6d4;
    --line: #3a3868;
    --surface: rgb(38 36 76 / 0.78);
    --surface-solid: #232148;
    --surface-edge: rgb(255 255 255 / 0.08);
    --well: #2c2a58;
    --accent: #a7a2ff;
    --accent-strong: #c2beff;
    --accent-soft: #2f2c63;
    --on-accent: #ffffff;
    --danger: #ff9d94;
    --danger-soft: #4a2530;
    --success: #86e0b9;
    --success-soft: #1d3f3a;

    --grad-primary: linear-gradient(135deg, #6a63e6, #4f74e0);
    --grad-highlight: linear-gradient(160deg, #3a3482 0%, #274a78 55%, #1f5a52 100%);
    --grad-reflection: linear-gradient(135deg, #2c2a60, #25395f);
    --grad-mint: linear-gradient(135deg, #1f4d44, #234a63);

    --glow-1: #4a3fb0;
    --glow-2: #1f5a94;
    --glow-3: #17655a;
    --glow-4: #7a3f52;
    --glow-opacity: 0.38;

    --shadow-card: 0 14px 40px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 22px 50px rgb(0 0 0 / 0.5);
    --shadow-bar: 0 10px 30px rgb(0 0 0 / 0.4);
  }
}
