/* Invictus Flugtechnik — Color tokens
   Base palette from brand_spec.json. Aviation blue + amber on navy.
   "dark" in this brand means: for use on dark/navy backgrounds. */
:root {
  /* ---- Brand base palette ---- */
  --ift-blue: #0B72FF;          /* Invictus Blue — primary, light backgrounds */
  --ift-blue-dark: #3B8EFF;     /* Blue lifted for navy backgrounds (WCAG) */
  --ift-amber: #FF9B00;         /* Amber — origin node, rules, highlight */
  --ift-navy: #0A1628;          /* Navy — primary dark surface */
  --ift-hangar: #2D2A26;        /* Warm near-black */
  --ift-cloud-muted: #8FA0B5;   /* Muted blue-gray — secondary text on navy */
  --ift-editor-gray: #888888;   /* JSON gray on light */
  --ift-legal-muted: #5C564E;   /* Warm gray — legal fine print */
  --ift-ink-dark: #EBE4D8;      /* Warm off-white — text on navy */
  --ift-white: #FFFFFF;
  --ift-ink: #0A1628;           /* Body ink on light = navy */

  /* Tints / surfaces derived from navy (technical, cool) */
  --ift-navy-700: #12233D;      /* Card / panel on navy */
  --ift-navy-600: #1B2F4D;      /* Raised surface / hover on navy */
  --ift-hairline-dark: #25364F; /* Borders / grid lines on navy */
  --ift-cloud-050: #F4F6F9;     /* Lightest cool gray — page bg light */
  --ift-cloud-100: #E7ECF2;     /* Light surface / hairline on light */
  --ift-cloud-200: #D4DCE6;     /* Border on light */

  /* Semantic status (kept close to brand hues) */
  --ift-success: #1E9E5A;
  --ift-warning: #FF9B00;       /* reuses amber */
  --ift-danger:  #E5484D;
  --ift-info:    #0B72FF;       /* reuses blue */

  /* ---- Semantic aliases (light context = default) ---- */
  --color-bg: var(--ift-cloud-050);
  --color-surface: var(--ift-white);
  --color-surface-raised: var(--ift-white);
  --color-surface-sunken: var(--ift-cloud-050);
  --color-border: var(--ift-cloud-200);
  --color-hairline: var(--ift-cloud-100);

  --color-text: var(--ift-ink);
  --color-text-muted: #5E6B7E;
  --color-text-faint: #8A97A8;
  --color-text-legal: var(--ift-legal-muted);
  --color-text-on-accent: var(--ift-white);

  --color-primary: var(--ift-blue);
  --color-primary-hover: #0961D8;
  --color-primary-active: #0850B5;
  --color-accent: var(--ift-amber);
  --color-accent-hover: #E68A00;

  --color-link: var(--ift-blue);
  --color-rule: var(--ift-amber);       /* the signature amber divider */
  --color-code-key: var(--ift-amber);   /* JSON keys */
  --color-code-string: var(--ift-blue); /* JSON values */
  --color-code-punct: var(--ift-editor-gray);

  --color-success: var(--ift-success);
  --color-warning: var(--ift-warning);
  --color-danger: var(--ift-danger);
}

/* ---- Dark / navy context ---- */
.ift-dark,
[data-theme="dark"] {
  --color-bg: var(--ift-navy);
  --color-surface: var(--ift-navy-700);
  --color-surface-raised: var(--ift-navy-600);
  --color-surface-sunken: #0C1A2F;
  --color-border: var(--ift-hairline-dark);
  --color-hairline: #1C2D45;

  --color-text: var(--ift-ink-dark);
  --color-text-muted: var(--ift-cloud-muted);
  --color-text-faint: #5E7088;
  --color-text-legal: var(--ift-cloud-muted);
  --color-text-on-accent: var(--ift-navy);

  --color-primary: var(--ift-blue-dark);
  --color-primary-hover: #5BA2FF;
  --color-primary-active: #2C7FF0;
  --color-accent: var(--ift-amber);
  --color-accent-hover: #FFB13A;

  --color-link: var(--ift-blue-dark);
  --color-code-key: var(--ift-amber);
  --color-code-string: var(--ift-blue-dark);
  --color-code-punct: var(--ift-cloud-muted);
}
