/* =============================================================
   Conceptual Health — Colors & Typography
   ============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400..700&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400..600;1,6..72,400..600&display=swap");

:root {
  /* ---------- Backgrounds ---------- */
  --bg-obsidian: #070A12;     /* primary dark bg */
  --bg-midnight: #0E1424;     /* elevated surface */
  --bg-steel:    #1B2436;     /* inputs, hairlines */
  --bg-graphite: #2A3447;     /* hover surface */

  --bg-bone:     #F4F1EA;     /* primary light bg */
  --bg-parchment:#FFFFFF;     /* pure white card */
  --bg-mist:     #EDEAE2;     /* light hover */

  /* ---------- Foregrounds ---------- */
  --fg-1:        #F4F1EA;     /* primary on dark */
  --fg-2:        #B8BFCC;     /* secondary on dark */
  --fg-3:        #6E7689;     /* tertiary on dark */
  --fg-on-light-1: #0E1424;
  --fg-on-light-2: #4A5061;
  --fg-on-light-3: #8C92A1;

  /* ---------- Brand accents ---------- */
  --accent-guardian:  #3DDC97;     /* primary action / health */
  --accent-aurora:    #7BE0C6;     /* hover/lift */
  --accent-halo:      #E8C97A;     /* CH score / excellence */
  --accent-plasma:    #8C6BFF;     /* Conceptual Mastery / spirit */
  --accent-vital:     #E5484D;     /* alerts, critical */

  /* ---------- 9 Clinical Brackets ---------- */
  --bracket-dead:        #1A1A1A;
  --bracket-critical:    #E5484D;
  --bracket-severe:      #F76E5A;
  --bracket-poor:        #F5A24A;
  --bracket-below-avg:   #E8C97A;
  --bracket-average:     #C7D6A0;
  --bracket-good:        #7BD89A;
  --bracket-very-good:   #3DDC97;
  --bracket-excellent:   #19C2B8;

  /* ---------- 8 Axis tints (subtle, used in sigils) ---------- */
  --axis-po: #E5484D;   /* Physiological — vital red */
  --axis-nm: #8C6BFF;   /* Neurocognitive — plasma violet */
  --axis-er: #F5A24A;   /* Emotional Resilience — amber */
  --axis-sc: #E8C97A;   /* Spiritual Coherence — halo */
  --axis-rs: #7BE0C6;   /* Relational & Social — aurora */
  --axis-es: #7BD89A;   /* Environmental — leaf */
  --axis-ta: #19C2B8;   /* Technological — teal */
  --axis-pv: #3DDC97;   /* Purposeful Vitality — guardian */

  /* ---------- Semantic ---------- */
  --success: var(--accent-guardian);
  --warning: var(--bracket-poor);
  --danger:  var(--accent-vital);
  --info:    var(--bracket-excellent);

  /* ---------- Borders ---------- */
  --border-1-dark:  rgba(255,255,255,0.08);
  --border-2-dark:  rgba(255,255,255,0.14);
  --border-1-light: rgba(14,20,36,0.08);
  --border-2-light: rgba(14,20,36,0.14);

  /* ---------- Shadows / Elevation ---------- */
  --elev-1: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(0,0,0,0.4);
  --elev-2: 0 8px 32px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.05);
  --elev-3: 0 24px 64px rgba(0,0,0,0.60), inset 0 1px 0 rgba(255,255,255,0.06);
  --glow-health:  0 0 32px rgba(61,220,151,0.35);
  --glow-halo:    0 0 32px rgba(232,201,122,0.30);
  --glow-vital:   0 0 24px rgba(229,72,77,0.30);

  /* ---------- Radii ---------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 9999px;

  /* ---------- Spacing scale ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* ---------- Type families ----------
     WOW system: Editorial New (when licensed) → Fraunces fallback for display.
     Geist for UI replaces Inter — sharper at small sizes, more "platform" feel.
     Newsreader Italic reserved for the Master Equation + pull-quotes.
  */
  --font-display:  "Fraunces", "Editorial New", "Times New Roman", serif;
  --font-sans:     "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:     "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-equation: "Newsreader", "Fraunces", "Times New Roman", serif;

  /* ---------- Type scale (px) ---------- */
  --fs-display-xl: 88px;  /* 5.5rem */
  --fs-display-l:  56px;  /* 3.5rem */
  --fs-h1:         40px;
  --fs-h2:         30px;
  --fs-h3:         20px;
  --fs-body-l:     18px;
  --fs-body:       16px;
  --fs-body-s:     14px;
  --fs-eyebrow:    12px;
  --fs-mono:       14px;

  /* ---------- Motion ---------- */
  --ease-entrance: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-state:    cubic-bezier(0.4, 0, 0.2, 1);
  --dur-hover: 200ms;
  --dur-state: 320ms;
  --dur-enter: 600ms;
  --dur-hero:  1200ms;
}

/* =============================================================
   Base / reset-lite
   ============================================================= */

html, body {
  background: var(--bg-obsidian);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =============================================================
   Semantic typography (apply via class)
   ============================================================= */

.ch-display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display-xl);
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.ch-display-l {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: var(--fs-display-l);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.ch-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.ch-h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.2;
}
.ch-h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.ch-body-l {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--fg-2);
}
.ch-body {
  font-size: var(--fs-body);
  line-height: 1.6;
}
.ch-body-s {
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--fg-2);
}
.ch-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-guardian);
}
.ch-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 400;
  letter-spacing: 0;
}

/* Special: the equation */
.ch-equation {
  font-family: var(--font-equation);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--accent-halo);
}

/* =============================================================
   Utilities
   ============================================================= */

.ch-divider {
  border: 0;
  height: 1px;
  background: var(--border-1-dark);
  margin: var(--s-7) 0;
}

.ch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-1-dark);
  background: rgba(255,255,255,0.02);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.ch-grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

.ch-radial-hero {
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(61,220,151,0.10), transparent 60%),
    radial-gradient(800px 500px at 80% 20%, rgba(232,201,122,0.06), transparent 70%),
    var(--bg-obsidian);
}
