/* ============================================================================
   Hullira — Design Tokens · "Blueprint"
   The page is a drawing sheet: deep blueprint navy, faint grid paper, white and
   cyan line work, and the antifouling red of the logo used as the redline —
   the colour a drafter marks revisions in.
   Brand: antifouling #D2462F / #E8553C and hull navy #14284B / #9BBBEA from
   logo/LOGO_RESEARCH.md. The accent is lifted slightly (#F26A4F) so it clears
   WCAG AA on the navy sheet.
   ========================================================================== */

:root {
  /* ---- Sheet (backgrounds) ---- */
  --bg-base: #0f2c4c;          /* blueprint navy, the sheet */
  --bg-900: #0a2140;           /* title-block bands: header, footer */
  --bg-800: #0c2646;
  --surface-1: #12335a;        /* a panel laid on the sheet */
  --surface-2: #163b65;
  --surface-3: #1c4673;
  --canvas: #0a2140;           /* consoles, code, logs */

  /* ---- Grid paper ---- */
  --grid-minor: #143559;
  --grid-major: #1a416b;
  --grid-step: 24px;
  --grid-step-major: 120px;

  /* ---- Ink ---- */
  --text-primary: #eef6fc;     /* white line / lettering */
  --text-secondary: #c2d7e8;
  --text-muted: #93b3cf;
  --text-faint: #7899b9;
  --text-on-accent: #0a1e36;

  /* ---- Line work ---- */
  --line: #7fd6ec;             /* cyan drawing line */
  --line-dim: #3f86ae;         /* construction lines, stations, waterlines */
  --line-faint: #2a6390;

  /* ---- Borders ---- */
  --border-subtle: #22507d;
  --border-default: #2e6093;
  --border-strong: #4c80b2;
  --grid-line: #1a416b;
  --ring: #ffd27a;             /* focus: a yellow highlighter on the sheet */

  /* ---- Redline accent (antifouling red, AA-safe on navy) ---- */
  --accent: #f26a4f;
  --accent-hover: #ff8166;
  --accent-press: #e8553c;
  --accent-soft: #3a2a3a;
  --redline: #ff8a6e;          /* red lettering on navy (>= 4.5:1) */

  /* ---- Brand navy ---- */
  --brand-navy: #9bbbea;
  --brand-navy-soft: #1c4673;

  /* ---- Agent status (always paired with glyph + text label) ---- */
  --st-queued: #93b3cf;
  --st-queued-soft: #163b65;
  --st-running: #ff8a6e;
  --st-running-soft: #3a2a3a;
  --st-waiting: #9bbbea;
  --st-waiting-soft: #1c4673;
  --st-approve: #f5c85a;
  --st-approve-soft: #33363a;
  --st-success: #5ee0b4;
  --st-success-soft: #123f4a;
  --st-failed: #ff7b8c;
  --st-failed-soft: #3a2a42;
  --st-blocked: #e08aa0;
  --st-blocked-soft: #322c48;

  /* ---- Graph nodes / edges ---- */
  --node-bg: var(--surface-1);
  --node-border: var(--line-dim);
  --node-active: var(--accent);
  --edge: var(--line-dim);
  --edge-active: var(--line);
  --edge-wrap: #c46a5e;
  --run-done: #3a9c8a;

  /* ---- Brand mark fills ---- */
  --mark-top: #9bbbea;
  --mark-anti: #e8553c;

  /* ---- Generic semantic ---- */
  --good: var(--st-success);
  --warn: var(--st-approve);
  --bad: var(--st-failed);
  --info: var(--st-waiting);

  /* ---- Type: Antonio (condensed, hull-marking lettering) for display;
          Titillium Web for running text; Libertinus Mono for drafting
          annotations, dimensions and values ---- */
  --font-sans: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Antonio", "DIN Condensed", "Arial Narrow", Impact, sans-serif;
  --font-mono: "Libertinus Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-display: clamp(3rem, 1.6rem + 6vw, 6.5rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
  --fs-h4: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-body-lg: 1.1875rem;
  --fs-small: 0.9375rem;
  --fs-mono: 0.875rem;
  --fs-micro: 0.75rem;
  --fs-metric: clamp(2.4rem, 1.7rem + 2.8vw, 3.75rem);
  --fs-price: clamp(2.6rem, 2rem + 2.6vw, 4rem);

  /* ---- Spacing: 6-pt drafting rhythm (grid paper is 24px) ---- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;
  --space-40: 160px;

  /* ---- Radii: drawings have square corners ---- */
  --radius-sm: 0;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-xl: 4px;
  --radius-pill: 999px;

  /* ---- Containers ---- */
  --container-sm: 680px;
  --container-md: 840px;
  --container-lg: 1080px;
  --container-xl: 1248px;
  --container-2xl: 1440px;
  --gutter: clamp(16px, 4vw, 48px);

  /* ---- Section rhythm (multiples of the grid step) ---- */
  --section-y: clamp(72px, 7vw, 120px);
  --section-y-lg: clamp(96px, 10vw, 168px);
  --nav-h: 64px;

  /* ---- Density ---- */
  --panel-gap: clamp(12px, 1.4vw, 24px);
  --panel-pad: clamp(18px, 1.8vw, 28px);
  --log-line-y: 4px;
  --node-pad: var(--space-3) var(--space-4);
  --step-gap: var(--space-5);
  --stack: clamp(12px, 1.4vw, 20px);
  --tick: 12px;                /* length of a panel corner tick */

  /* ---- Motion ---- */
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;
  --dur-run: 600ms;
  --dur-draw: 2400ms;
  --ease-out: cubic-bezier(0.2, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --pulse: 1.6s;

  /* ---- Elevation: none. Line weight carries hierarchy. ---- */
  --hairline: 1px solid var(--border-subtle);
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
  --offset-shadow: 4px 4px 0 var(--line-faint);
  --scrim: #081a33;

  /* ---- Grid ---- */
  --grid-cols: 12;
  --grid-gap: var(--panel-gap);
}

/* ---- Optional whiteprint theme (not used by default) ---- */
[data-theme="light"] {
  --bg-base: #f2f6fa;
  --bg-900: #e4ecf4;
  --bg-800: #e9f0f6;
  --surface-1: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #e1e9f2;
  --canvas: #f7fafc;
  --grid-minor: #e3ebf3;
  --grid-major: #d3e0ec;
  --text-primary: #0f2c4c;
  --text-secondary: #2b4a6b;
  --text-muted: #4b6886;
  --text-faint: #5c7894;
  --text-on-accent: #ffffff;
  --line: #135b8c;
  --line-dim: #6f9cc0;
  --line-faint: #b7cde0;
  --border-subtle: #d3e0ec;
  --border-default: #b7cde0;
  --border-strong: #6f9cc0;
  --grid-line: #d3e0ec;
  --ring: #b45309;
  --accent: #c43c26;
  --accent-hover: #a8321f;
  --accent-press: #8f2a1a;
  --accent-soft: #f8ddd6;
  --redline: #b3361f;
  --brand-navy: #14284b;
  --brand-navy-soft: #dce5f3;
  --st-queued: #4b6886;
  --st-running: #b3361f;
  --st-waiting: #14284b;
  --st-approve: #8a5a00;
  --st-success: #0f766e;
  --st-failed: #be123c;
  --st-blocked: #9f1239;
  --st-queued-soft: #e1e9f2;
  --st-running-soft: #f8ddd6;
  --st-waiting-soft: #dce5f3;
  --st-approve-soft: #f3e8cc;
  --st-success-soft: #d5ece8;
  --st-failed-soft: #f3d8e0;
  --st-blocked-soft: #efd8e0;
  --edge-wrap: #d98a78;
  --run-done: #7cbfb2;
  --scrim: #f2f6fa;
  --mark-top: #14284b;
  --mark-anti: #d2462f;
}
