/* ============================================================
   Tellus Power — Colour tokens
   Names follow the official brand palette (brand guidelines, 05 Colour).
   The system is LIGHT-FIRST for documents and slides (Pure Signal page,
   white cards) with deep Grid Core dark surfaces for hero/contact moments.
   ============================================================ */
:root {
  /* ---- Primary palette: neutrals ---- */
  --tp-system-void: #121212;   /* near-black — primary text, dark surfaces */
  --tp-pure-signal: #F5F5F5;   /* off-white — page background, text on dark */
  --tp-control-layer: #242424; /* dark grey — secondary dark surface */
  --tp-signal-shadow: #484848; /* mid grey — secondary text */
  --tp-data-light: #969696;    /* light grey — muted text, captions */

  /* ---- Primary palette: greens ---- */
  --tp-grid-core: #12241F;     /* deep infrastructure green — dark hero/contact surfaces */
  --tp-grid-flow: #1D6134;     /* forest green — accent text, solid green fills */
  --tp-intelligence-core: #6DCC00;    /* vibrant lime — the signature accent */
  --tp-intelligence-core-m: #9EEB46;  /* lime mid */
  --tp-intelligence-core-l: #CAFF80;  /* lime light — capsules, chips, highlights */
  --tp-logo-green: #77C11F;    /* logotype green (used in the wordmark) */

  /* ---- Accent palette ---- */
  --tp-cognitive-pulse: #8E82FE;   /* purple — intelligence, data, digital */
  --tp-cognitive-pulse-m: #AEA5FE;
  --tp-cognitive-pulse-l: #CCC6FE;
  --tp-energy-spark: #F56262;      /* coral — actions, alerts, emphasis */
  --tp-energy-spark-m: #FF9494;
  --tp-energy-spark-l: #FFCCCC;

  /* ---- Semantic aliases (light-first) ---- */
  --surface-page: var(--tp-pure-signal);
  --surface-card: #FFFFFF;
  --surface-panel: #EFEFEC;          /* soft warm panel behind grids */
  --surface-dark: var(--tp-grid-core);
  --surface-dark-alt: var(--tp-system-void);

  --text-heading: var(--tp-system-void);
  --text-body: var(--tp-signal-shadow);
  --text-muted: var(--tp-data-light);
  --text-on-dark: var(--tp-pure-signal);
  --text-on-lime: var(--tp-system-void);
  --text-accent: var(--tp-grid-flow);      /* green phrase inside headlines */
  --text-accent-on-dark: var(--tp-intelligence-core-l);

  --accent: var(--tp-intelligence-core);
  --accent-soft: var(--tp-intelligence-core-l);
  --accent-strong: var(--tp-grid-flow);

  --border-subtle: rgba(18, 18, 18, 0.10);
  --border-on-dark: rgba(245, 245, 245, 0.22);

  --link: var(--tp-grid-flow);
  --link-hover: var(--tp-intelligence-core);
}

/* ============================================================
   LEGACY ALIASES (deprecated — v1 dark-first names).
   Kept so earlier components/cards keep rendering as designed.
   New work should use the canonical names above.
   ============================================================ */
:root {
  --tp-intelligence:   var(--tp-intelligence-core);
  --tp-intelligence-m: var(--tp-intelligence-core-m);
  --tp-intelligence-l: var(--tp-intelligence-core-l);
  --tp-cognitive:   var(--tp-cognitive-pulse);
  --tp-cognitive-m: var(--tp-cognitive-pulse-m);
  --tp-cognitive-l: var(--tp-cognitive-pulse-l);
  --tp-spark:   var(--tp-energy-spark);
  --tp-spark-m: var(--tp-energy-spark-m);
  --tp-spark-l: var(--tp-energy-spark-l);
  --tp-white: #FFFFFF;

  /* v1 dark-first semantics — values preserved */
  --surface-base:    var(--tp-system-void);
  --surface-raised:  var(--tp-control-layer);
  --surface-tint:    var(--tp-grid-core);
  --surface-inverse: var(--tp-pure-signal);
  --text-primary:    var(--tp-pure-signal);
  --text-secondary:  var(--tp-data-light);
  --text-inverse:    var(--tp-system-void);
  --text-brand:      var(--tp-intelligence-core);
  --border-strong:   var(--tp-data-light);
  --border-brand:    var(--tp-intelligence-core);
  --accent-primary:       var(--tp-intelligence-core);
  --accent-primary-hover: var(--tp-intelligence-core-m);
  --accent-primary-press: var(--tp-grid-flow);
  --on-accent:            var(--tp-system-void);
  --info:    var(--tp-cognitive-pulse);
  --danger:  var(--tp-energy-spark);
  --success: var(--tp-intelligence-core);
  --focus-ring: var(--tp-intelligence-core-m);
}

/* Legacy dark-component scope: v1 components were designed on dark.
   Wrap them in .tp-dark to restore the dark border treatment. */
.tp-dark {
  --border-subtle: #484848;
}
