/* Invictus AeroTech, webfonts (carried over from Invictus Flugtechnik brand package) */

@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost-400.5fb2009b9ac0.ttf") format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost-400-Italic.02c23dea682d.ttf") format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url("../fonts/Jost-500.845f5f797150.ttf") format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url("../fonts/JetBrainsMono-Medium.38a5e21ca376.ttf") format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Invictus AeroTech, color tokens
   Base palette inherited verbatim from Invictus Flugtechnik GmbH brand spec v3.2 */

:root {
  /* Base brand palette */
  --invictus-blue: #0B72FF;      /* primary brand blue (light surfaces) */
  --amber: #FF9B00;              /* secondary accent */
  --blue-dark-mode: #3B8EFF;     /* blue lifted for navy backgrounds (WCAG) */
  --navy: #0A1628;               /* dark-mode background */
  --hangar: #2D2A26;             /* warm near-black neutral */
  --cloud-muted: #8FA0B5;        /* muted blue-gray (dark-mode muted + JSON gray on navy) */
  --editor-gray: #888888;        /* JSON punctuation gray on light */
  --legal-muted: #5C564E;        /* muted warm gray for legal / secondary text */
  --ink-on-dark: #EBE4D8;        /* warm off-white ink on navy */

  /* Derived tints (oklch-mixed from the base palette, not new hues) */
  --blue-tint-10: #E7F1FF;
  --blue-tint-20: #C7DFFF;
  --amber-tint-10: #FFF3E0;
  --navy-tint-90: #12233B;       /* raised surface on navy */
  --gray-line: #E3E0DB;          /* warm hairline on light */

  /* Semantic, light mode (default) */
  --bg: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-raised: #F7F6F4;
  --text-body: var(--hangar);
  --text-muted: var(--legal-muted);
  --text-accent: var(--invictus-blue);
  --accent: var(--invictus-blue);
  --accent-2: var(--amber);
  --border-line: var(--gray-line);
  /* Form controls sit on the same white as the card, so their border is the
     only thing identifying them. WCAG 1.4.11 wants 3:1 for that, which the
     warm hairline (1.32:1) cannot carry. Same warm family, deepened. */
  --border-control: #8A8279;             /* 3.8:1 on white */
  --border-on-navy: #22344E;             /* hairline within the navy sidebar */
  --ink-on-dark-strong: #FFFFFF;
  --focus-ring: var(--invictus-blue);
  --accent-ink: #FFFFFF;                 /* ink on accent-filled controls */
  --json-key: var(--amber);
  --json-value: var(--invictus-blue);
  --json-punct: var(--editor-gray);

  /* Semantic status (from palette; no new hues) */
  --status-ok: var(--invictus-blue);
  --status-warn: var(--amber);
  --status-danger: #C43D00; /* deepened amber for errors */

  /* Amber as ink (readable amber for text on light surfaces) */
  --amber-ink: #B36D00; /* ~4.6:1 on white (AA / AAA large text) */

  /* AAA-deepened brand hues (same hue family, darkened to >=7:1 on white) */
  --invictus-blue-aaa: #0853AC;  /* 7.4:1 on white */
  --amber-ink-aaa: #7A4900;      /* 7.6:1 on white */
  --blue-aaa-on-navy: #6FAAFF;   /* 7.6:1 on navy */
  --muted-aaa-on-navy: #99AABF;  /* 7.7:1 on navy */
}

/* WCAG AAA contrast scope - apply data-contrast="aaa" on any container.
   Deepens blue/amber inks to >=7:1 while keeping the brand hue family.
   Note: raw brand blue #0B72FF still passes AAA for LARGE text (>=24px / 18.7px bold),
   so headlines and the wordmark (logos are exempt) keep the true brand color. */
[data-contrast="aaa"] {
  --text-muted: var(--legal-muted);        /* #5C564E, 7.3:1 - already AAA */
  --text-accent: var(--invictus-blue-aaa);
  --accent: var(--invictus-blue-aaa);      /* buttons: white on #0853AC = 7.4:1 */
  --amber-ink: var(--amber-ink-aaa);
  --json-key: var(--amber-ink-aaa);
  --json-value: var(--invictus-blue-aaa);
  --json-punct: var(--legal-muted);        /* #888 is 3.5:1; use warm muted instead */
  --focus-ring: var(--invictus-blue-aaa);
  --status-danger: #A33200;                /* 7.0:1 on white */
}

[data-theme="dark"][data-contrast="aaa"],
[data-contrast="aaa"] [data-theme="dark"],
[data-theme="dark"] [data-contrast="aaa"] {
  --text-muted: var(--muted-aaa-on-navy);
  --text-accent: var(--blue-aaa-on-navy);
  --accent: var(--blue-aaa-on-navy);       /* use navy ink on this as button fill */
  --amber-ink: var(--amber);               /* #FF9B00 on navy = 8.6:1 - already AAA */
  --json-key: var(--amber);
  --json-value: var(--blue-aaa-on-navy);
  --json-punct: var(--muted-aaa-on-navy);
  --focus-ring: var(--blue-aaa-on-navy);
}

/* Dark mode scope, apply data-theme="dark" on any container */
[data-theme="dark"] {
  --bg: var(--navy);
  --surface-card: var(--navy-tint-90);
  --surface-raised: #162944;
  --text-body: var(--ink-on-dark);
  --text-muted: var(--cloud-muted);
  --text-accent: var(--blue-dark-mode);
  --accent: var(--blue-dark-mode);
  --accent-2: var(--amber);
  --border-line: #22344E;
  --focus-ring: var(--blue-dark-mode);
  --accent-ink: var(--navy);            /* ink on accent-filled controls: navy on light blue */
  --json-key: var(--amber);
  --json-value: var(--blue-dark-mode);
  --json-punct: var(--cloud-muted);
}

/* Invictus AeroTech, typography tokens (Jost + JetBrains Mono, per brand spec) */

:root {
  --font-sans: 'Jost', 'Century Gothic', 'Helvetica Neue', Arial, sans-serif;
  --font-wordmark: 'Jost', 'Century Gothic', 'Helvetica Neue', sans-serif; /* spec lists Futura first, but Jost is the shipped binary (spec aliases Futura -> Jost) */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;

  /* Wordmark specs (from logo geometry) */
  --wordmark-weight-primary: 500;   /* INVICTUS */
  --wordmark-weight-secondary: 400; /* AEROTECH */
  --wordmark-tracking-primary: 0.18em;
  --wordmark-tracking-secondary: 0.9em; /* AEROTECH, tuned to match INVICTUS line width */

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 19px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-4xl: 60px;

  --leading-tight: 1.15;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;

  /* Headings: Jost 500, generous tracking; body: Jost 400 */
  --tracking-heading: 0.04em;
  --tracking-caps: 0.14em;
  --tracking-body: 0.01em;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  color: var(--text-body);
  letter-spacing: var(--tracking-body);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* Invictus AeroTech, spacing, radii, borders, shadows */

:root {
  /* Spacing scale (px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radii, geometric brand: small, precise corners */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Borders */
  --border-w: 1px;
  --border-w-strong: 2px;

  /* Shadows, flat brand; shadows are subtle and cool */
  --shadow-card: 0 1px 3px rgba(10, 22, 40, 0.08), 0 4px 16px rgba(10, 22, 40, 0.06);
  --shadow-pop: 0 8px 32px rgba(10, 22, 40, 0.16);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --dur-fast: 120ms; /* @kind other */
  --dur-med: 220ms; /* @kind other */
}
