/* =====================================================================
   IDEAS — design tokens
   Layout concept: an engineering notebook on white. Wide margins, thin
   technical rules, data set in mono, one restrained red for the IDEAS
   mark and the "flexibility" signal. Category colours are reserved for
   analytical meaning (evidence states, chart series), never decoration.
   ===================================================================== */

@font-face {
  font-family: "Nasalization";
  src: url("../assets/fonts/nasalization-rg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Neutrals (cool-biased toward charcoal) ---- */
  --bg: #ffffff;
  --bg-sunk: #f5f6f7;        /* subtle grey sections */
  --bg-raised: #ffffff;      /* cards */
  --bg-inset: #eef0f2;       /* wells, code, chips */
  --fg: #16181b;             /* charcoal type */
  --fg-2: #464b52;           /* body secondary */
  --fg-3: #737a83;           /* captions, axes */
  --rule: #dfe2e6;           /* thin technical lines */
  --rule-strong: #c4c9cf;
  --grid: #eceef1;           /* chart gridlines */

  /* ---- Brand ---- */
  --red: #d7191f;            /* IDEAS accent, used sparingly */
  --red-soft: #fbe9e9;
  --red-ink: #b3141a;

  /* ---- Analytical categories ---- */
  --blue: #2f6db3;           /* measured / reference */
  --blue-soft: #e8f0f9;
  --green: #2e8a57;          /* feasible / verified */
  --green-soft: #e6f3ec;
  --purple: #6d4fc2;         /* simulated / optimized */
  --purple-soft: #efebfa;
  --orange: #c8661a;         /* forecast / constraints */
  --orange-soft: #fbefe4;
  --teal: #12827a;
  --indigo: #3f4fb8;
  --gold: #a07a06;
  --magenta: #b2387f;

  /* ---- Type ---- */
  --font-logo: "Nasalization", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.15rem);
  --fs-3xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --fs-hero: clamp(2.3rem, 1.5rem + 3.2vw, 3.9rem);

  /* ---- Space, radius, shadow ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 2px rgba(22, 24, 27, 0.05), 0 1px 1px rgba(22, 24, 27, 0.03);
  --shadow-2: 0 10px 30px -12px rgba(22, 24, 27, 0.16), 0 2px 6px rgba(22, 24, 27, 0.05);

  --content: 1200px;
  --prose: 66ch;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315;
    --bg-sunk: #16191c;
    --bg-raised: #1a1d21;
    --bg-inset: #22262b;
    --fg: #eceef0;
    --fg-2: #b9bec5;
    --fg-3: #8a919a;
    --rule: #2a2f35;
    --rule-strong: #3a4048;
    --grid: #23272c;
    --red: #f0484d;
    --red-soft: #3a1c1e;
    --red-ink: #ff7a7e;
    --blue: #6aa2e6;
    --blue-soft: #1a2635;
    --green: #5cc189;
    --green-soft: #17291f;
    --purple: #a28df0;
    --purple-soft: #241f38;
    --orange: #ec9a55;
    --orange-soft: #33241a;
    --teal: #4cc3b6;
    --indigo: #8b98f0;
    --gold: #e0b947;
    --magenta: #ec7ab9;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111315;
  --bg-sunk: #16191c;
  --bg-raised: #1a1d21;
  --bg-inset: #22262b;
  --fg: #eceef0;
  --fg-2: #b9bec5;
  --fg-3: #8a919a;
  --rule: #2a2f35;
  --rule-strong: #3a4048;
  --grid: #23272c;
  --red: #f0484d;
  --red-soft: #3a1c1e;
  --red-ink: #ff7a7e;
  --blue: #6aa2e6;
  --blue-soft: #1a2635;
  --green: #5cc189;
  --green-soft: #17291f;
  --purple: #a28df0;
  --purple-soft: #241f38;
  --orange: #ec9a55;
  --orange-soft: #33241a;
  --teal: #4cc3b6;
  --indigo: #8b98f0;
  --gold: #e0b947;
  --magenta: #ec7ab9;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}
